aclocal.m4 revision d769e936
1d769e936Smrg# generated automatically by aclocal 1.11.3 -*- Autoconf -*- 21d54945dSmrg 31d54945dSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4d769e936Smrg# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 5d769e936Smrg# Inc. 61d54945dSmrg# This file is free software; the Free Software Foundation 71d54945dSmrg# gives unlimited permission to copy and/or distribute it, 81d54945dSmrg# with or without modifications, as long as this notice is preserved. 91d54945dSmrg 101d54945dSmrg# This program is distributed in the hope that it will be useful, 111d54945dSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 121d54945dSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 131d54945dSmrg# PARTICULAR PURPOSE. 141d54945dSmrg 15ba85709eSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16ba85709eSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17d769e936Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 18d769e936Smrg[m4_warning([this file was generated for autoconf 2.68. 19ba85709eSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20ba85709eSmrgIf you have problems, you may need to regenerate the build system entirely. 21ba85709eSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 22ba85709eSmrg 231d54945dSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24d769e936Smrg# 25d769e936Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 26d769e936Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 27d769e936Smrg# Foundation, Inc. 28d769e936Smrg# Written by Gordon Matzigkeit, 1996 29d769e936Smrg# 30d769e936Smrg# This file is free software; the Free Software Foundation gives 31d769e936Smrg# unlimited permission to copy and/or distribute it, with or without 32d769e936Smrg# modifications, as long as this notice is preserved. 33d769e936Smrg 34d769e936Smrgm4_define([_LT_COPYING], [dnl 35d769e936Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 36d769e936Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 37d769e936Smrg# Foundation, Inc. 38d769e936Smrg# Written by Gordon Matzigkeit, 1996 39d769e936Smrg# 40d769e936Smrg# This file is part of GNU Libtool. 41d769e936Smrg# 42d769e936Smrg# GNU Libtool is free software; you can redistribute it and/or 43d769e936Smrg# modify it under the terms of the GNU General Public License as 44d769e936Smrg# published by the Free Software Foundation; either version 2 of 45d769e936Smrg# the License, or (at your option) any later version. 46d769e936Smrg# 47d769e936Smrg# As a special exception to the GNU General Public License, 48d769e936Smrg# if you distribute this file as part of a program or library that 49d769e936Smrg# is built using GNU Libtool, you may include this file under the 50d769e936Smrg# same distribution terms that you use for the rest of that program. 51d769e936Smrg# 52d769e936Smrg# GNU Libtool is distributed in the hope that it will be useful, 53d769e936Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 54d769e936Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 55d769e936Smrg# GNU General Public License for more details. 56d769e936Smrg# 57d769e936Smrg# You should have received a copy of the GNU General Public License 58d769e936Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 59d769e936Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 60d769e936Smrg# obtained by writing to the Free Software Foundation, Inc., 61d769e936Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 62d769e936Smrg]) 631d54945dSmrg 64d769e936Smrg# serial 57 LT_INIT 651d54945dSmrg 661d54945dSmrg 67d769e936Smrg# LT_PREREQ(VERSION) 68d769e936Smrg# ------------------ 69d769e936Smrg# Complain and exit if this libtool version is less that VERSION. 70d769e936Smrgm4_defun([LT_PREREQ], 71d769e936Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 72d769e936Smrg [m4_default([$3], 73d769e936Smrg [m4_fatal([Libtool version $1 or higher is required], 74d769e936Smrg 63)])], 75d769e936Smrg [$2])]) 76786a6f21Smrg 77786a6f21Smrg 78d769e936Smrg# _LT_CHECK_BUILDDIR 79d769e936Smrg# ------------------ 80d769e936Smrg# Complain if the absolute build directory name contains unusual characters 81d769e936Smrgm4_defun([_LT_CHECK_BUILDDIR], 82d769e936Smrg[case `pwd` in 83d769e936Smrg *\ * | *\ *) 84d769e936Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 85d769e936Smrgesac 86d769e936Smrg]) 87d769e936Smrg 88d769e936Smrg 89d769e936Smrg# LT_INIT([OPTIONS]) 90d769e936Smrg# ------------------ 91d769e936SmrgAC_DEFUN([LT_INIT], 92d769e936Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 93d769e936SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 94d769e936SmrgAC_BEFORE([$0], [LT_LANG])dnl 95d769e936SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 96d769e936SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 97d769e936Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 98d769e936Smrg 99d769e936Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 100d769e936Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 101d769e936Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 102d769e936Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 103d769e936Smrgdnl unless we require an AC_DEFUNed macro: 104d769e936SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 105d769e936SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 106d769e936SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 107d769e936SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 108d769e936Smrgm4_require([_LT_PROG_LTMAIN])dnl 109d769e936Smrg 110d769e936Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 111d769e936Smrg 112d769e936Smrgdnl Parse OPTIONS 113d769e936Smrg_LT_SET_OPTIONS([$0], [$1]) 1141d54945dSmrg 1151d54945dSmrg# This can be used to rebuild libtool when needed 116d769e936SmrgLIBTOOL_DEPS="$ltmain" 1171d54945dSmrg 1181d54945dSmrg# Always use our own libtool. 1191d54945dSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1201d54945dSmrgAC_SUBST(LIBTOOL)dnl 1211d54945dSmrg 122d769e936Smrg_LT_SETUP 123786a6f21Smrg 124d769e936Smrg# Only expand once: 125d769e936Smrgm4_define([LT_INIT]) 126d769e936Smrg])# LT_INIT 127786a6f21Smrg 128d769e936Smrg# Old names: 129d769e936SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 130d769e936SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 131d769e936Smrgdnl aclocal-1.4 backwards compatibility: 132d769e936Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 133d769e936Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 134d769e936Smrg 135d769e936Smrg 136d769e936Smrg# _LT_CC_BASENAME(CC) 137d769e936Smrg# ------------------- 138d769e936Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 139d769e936Smrgm4_defun([_LT_CC_BASENAME], 140d769e936Smrg[for cc_temp in $1""; do 141d769e936Smrg case $cc_temp in 142d769e936Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 143d769e936Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 144d769e936Smrg \-*) ;; 145d769e936Smrg *) break;; 146d769e936Smrg esac 147d769e936Smrgdone 148d769e936Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 149d769e936Smrg]) 150d769e936Smrg 151d769e936Smrg 152d769e936Smrg# _LT_FILEUTILS_DEFAULTS 153d769e936Smrg# ---------------------- 154d769e936Smrg# It is okay to use these file commands and assume they have been set 155d769e936Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 156d769e936Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 157d769e936Smrg[: ${CP="cp -f"} 158d769e936Smrg: ${MV="mv -f"} 159d769e936Smrg: ${RM="rm -f"} 160d769e936Smrg])# _LT_FILEUTILS_DEFAULTS 161d769e936Smrg 162d769e936Smrg 163d769e936Smrg# _LT_SETUP 164d769e936Smrg# --------- 165d769e936Smrgm4_defun([_LT_SETUP], 166d769e936Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1671d54945dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 168d769e936SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 169d769e936SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 170ec713c28Smrg 171d769e936Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 172d769e936Smrgdnl 173d769e936Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 174d769e936Smrg_LT_DECL([], [host], [0])dnl 175d769e936Smrg_LT_DECL([], [host_os], [0])dnl 176d769e936Smrgdnl 177d769e936Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 178d769e936Smrg_LT_DECL([], [build], [0])dnl 179d769e936Smrg_LT_DECL([], [build_os], [0])dnl 180d769e936Smrgdnl 181d769e936SmrgAC_REQUIRE([AC_PROG_CC])dnl 182d769e936SmrgAC_REQUIRE([LT_PATH_LD])dnl 183d769e936SmrgAC_REQUIRE([LT_PATH_NM])dnl 184d769e936Smrgdnl 1851d54945dSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 186d769e936Smrgtest -z "$LN_S" && LN_S="ln -s" 187d769e936Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 188786a6f21Smrgdnl 189d769e936SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 190d769e936Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 191d769e936Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 192d769e936Smrgdnl 193d769e936Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 194d769e936Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 195d769e936Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 196d769e936Smrgm4_require([_LT_CMD_RELOAD])dnl 197d769e936Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 198d769e936Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 199d769e936Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 200d769e936Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 201d769e936Smrgm4_require([_LT_WITH_SYSROOT])dnl 202d769e936Smrg 203d769e936Smrg_LT_CONFIG_LIBTOOL_INIT([ 204d769e936Smrg# See if we are running on zsh, and set the options which allow our 205d769e936Smrg# commands through without removal of \ escapes INIT. 206d769e936Smrgif test -n "\${ZSH_VERSION+set}" ; then 207d769e936Smrg setopt NO_GLOB_SUBST 208d769e936Smrgfi 209d769e936Smrg]) 210d769e936Smrgif test -n "${ZSH_VERSION+set}" ; then 211d769e936Smrg setopt NO_GLOB_SUBST 212d769e936Smrgfi 213786a6f21Smrg 214d769e936Smrg_LT_CHECK_OBJDIR 215d769e936Smrg 216d769e936Smrgm4_require([_LT_TAG_COMPILER])dnl 2171d54945dSmrg 2181d54945dSmrgcase $host_os in 2191d54945dSmrgaix3*) 2201d54945dSmrg # AIX sometimes has problems with the GCC collect2 program. For some 2211d54945dSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2221d54945dSmrg # vanish in a puff of smoke. 2231d54945dSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 2241d54945dSmrg COLLECT_NAMES= 2251d54945dSmrg export COLLECT_NAMES 2261d54945dSmrg fi 2271d54945dSmrg ;; 2281d54945dSmrgesac 2291d54945dSmrg 2301d54945dSmrg# Global variables: 231d769e936Smrgofile=libtool 2321d54945dSmrgcan_build_shared=yes 2331d54945dSmrg 2341d54945dSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 2351d54945dSmrg# which needs '.lib'). 2361d54945dSmrglibext=a 2371d54945dSmrg 238d769e936Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 239ec713c28Smrg 2401d54945dSmrgold_CC="$CC" 2411d54945dSmrgold_CFLAGS="$CFLAGS" 2421d54945dSmrg 2431d54945dSmrg# Set sane defaults for various variables 2441d54945dSmrgtest -z "$CC" && CC=cc 2451d54945dSmrgtest -z "$LTCC" && LTCC=$CC 2461d54945dSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2471d54945dSmrgtest -z "$LD" && LD=ld 2481d54945dSmrgtest -z "$ac_objext" && ac_objext=o 2491d54945dSmrg 2501d54945dSmrg_LT_CC_BASENAME([$compiler]) 2511d54945dSmrg 2521d54945dSmrg# Only perform the check for file, if the check method requires it 253d769e936Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2541d54945dSmrgcase $deplibs_check_method in 2551d54945dSmrgfile_magic*) 2561d54945dSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 257d769e936Smrg _LT_PATH_MAGIC 2581d54945dSmrg fi 2591d54945dSmrg ;; 2601d54945dSmrgesac 2611d54945dSmrg 262d769e936Smrg# Use C for the default configuration in the libtool script 263d769e936SmrgLT_SUPPORTED_TAG([CC]) 264d769e936Smrg_LT_LANG_C_CONFIG 265d769e936Smrg_LT_LANG_DEFAULT_CONFIG 266d769e936Smrg_LT_CONFIG_COMMANDS 267d769e936Smrg])# _LT_SETUP 268786a6f21Smrg 269786a6f21Smrg 270d769e936Smrg# _LT_PREPARE_SED_QUOTE_VARS 271d769e936Smrg# -------------------------- 272d769e936Smrg# Define a few sed substitution that help us do robust quoting. 273d769e936Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 274d769e936Smrg[# Backslashify metacharacters that are still active within 275d769e936Smrg# double-quoted strings. 276d769e936Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 277786a6f21Smrg 278d769e936Smrg# Same as above, but do not quote variable references. 279d769e936Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 280786a6f21Smrg 281d769e936Smrg# Sed substitution to delay expansion of an escaped shell variable in a 282d769e936Smrg# double_quote_subst'ed string. 283d769e936Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 284786a6f21Smrg 285d769e936Smrg# Sed substitution to delay expansion of an escaped single quote. 286d769e936Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 287786a6f21Smrg 288d769e936Smrg# Sed substitution to avoid accidental globbing in evaled expressions 289d769e936Smrgno_glob_subst='s/\*/\\\*/g' 290d769e936Smrg]) 2911d54945dSmrg 292d769e936Smrg# _LT_PROG_LTMAIN 293d769e936Smrg# --------------- 294d769e936Smrg# Note that this code is called both from `configure', and `config.status' 295d769e936Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 296d769e936Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 297d769e936Smrg# so we pass a copy along to make sure it has a sensible value anyway. 298d769e936Smrgm4_defun([_LT_PROG_LTMAIN], 299d769e936Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 300d769e936Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 301d769e936Smrgltmain="$ac_aux_dir/ltmain.sh" 302d769e936Smrg])# _LT_PROG_LTMAIN 3031d54945dSmrg 3041d54945dSmrg 305ec713c28Smrg 306d769e936Smrg# So that we can recreate a full libtool script including additional 307d769e936Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 308d769e936Smrg# in macros and then make a single call at the end using the `libtool' 309d769e936Smrg# label. 310ec713c28Smrg 3111d54945dSmrg 312d769e936Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 313d769e936Smrg# ---------------------------------------- 314d769e936Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 315d769e936Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 316d769e936Smrg[m4_ifval([$1], 317d769e936Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 318d769e936Smrg [$1 319d769e936Smrg])])]) 3201d54945dSmrg 321d769e936Smrg# Initialize. 322d769e936Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3231d54945dSmrg 3241d54945dSmrg 325d769e936Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 326d769e936Smrg# ------------------------------ 327d769e936Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 328d769e936Smrgm4_define([_LT_CONFIG_LIBTOOL], 329d769e936Smrg[m4_ifval([$1], 330d769e936Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 331d769e936Smrg [$1 332d769e936Smrg])])]) 333d769e936Smrg 334d769e936Smrg# Initialize. 335d769e936Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 336d769e936Smrg 337d769e936Smrg 338d769e936Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 339d769e936Smrg# ----------------------------------------------------- 340d769e936Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 341d769e936Smrg[_LT_CONFIG_LIBTOOL([$1]) 342d769e936Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 343d769e936Smrg]) 3441d54945dSmrg 345ba85709eSmrg 346d769e936Smrg# _LT_FORMAT_COMMENT([COMMENT]) 347d769e936Smrg# ----------------------------- 348d769e936Smrg# Add leading comment marks to the start of each line, and a trailing 349d769e936Smrg# full-stop to the whole comment if one is not present already. 350d769e936Smrgm4_define([_LT_FORMAT_COMMENT], 351d769e936Smrg[m4_ifval([$1], [ 352d769e936Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 353d769e936Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 354d769e936Smrg)]) 355d769e936Smrg 356d769e936Smrg 357d769e936Smrg 358d769e936Smrg 359d769e936Smrg 360d769e936Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 361d769e936Smrg# ------------------------------------------------------------------- 362d769e936Smrg# CONFIGNAME is the name given to the value in the libtool script. 363d769e936Smrg# VARNAME is the (base) name used in the configure script. 364d769e936Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 365d769e936Smrg# VARNAME. Any other value will be used directly. 366d769e936Smrgm4_define([_LT_DECL], 367d769e936Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 368d769e936Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 369d769e936Smrg [m4_ifval([$1], [$1], [$2])]) 370d769e936Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 371d769e936Smrg m4_ifval([$4], 372d769e936Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 373d769e936Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 374d769e936Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 375ba85709eSmrg]) 3761d54945dSmrg 3771d54945dSmrg 378d769e936Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 379d769e936Smrg# -------------------------------------------------------- 380d769e936Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3811d54945dSmrg 3821d54945dSmrg 383d769e936Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 384d769e936Smrg# ------------------------------------------------ 385d769e936Smrgm4_define([lt_decl_tag_varnames], 386d769e936Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3871d54945dSmrg 3881d54945dSmrg 389d769e936Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 390d769e936Smrg# --------------------------------------------------------- 391d769e936Smrgm4_define([_lt_decl_filter], 392d769e936Smrg[m4_case([$#], 393d769e936Smrg [0], [m4_fatal([$0: too few arguments: $#])], 394d769e936Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 395d769e936Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 396d769e936Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 397d769e936Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 398d769e936Smrg]) 3991d54945dSmrg 4001d54945dSmrg 401d769e936Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 402d769e936Smrg# -------------------------------------------------- 403d769e936Smrgm4_define([lt_decl_quote_varnames], 404d769e936Smrg[_lt_decl_filter([value], [1], $@)]) 4051d54945dSmrg 4061d54945dSmrg 407d769e936Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 408d769e936Smrg# --------------------------------------------------- 409d769e936Smrgm4_define([lt_decl_dquote_varnames], 410d769e936Smrg[_lt_decl_filter([value], [2], $@)]) 4111d54945dSmrg 4121d54945dSmrg 413d769e936Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 414d769e936Smrg# --------------------------------------------------- 415d769e936Smrgm4_define([lt_decl_varnames_tagged], 416d769e936Smrg[m4_assert([$# <= 2])dnl 417d769e936Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 418d769e936Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 419d769e936Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 420d769e936Smrgm4_define([_lt_decl_varnames_tagged], 421d769e936Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4221d54945dSmrg 423ec713c28Smrg 424d769e936Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 425d769e936Smrg# ------------------------------------------------ 426d769e936Smrgm4_define([lt_decl_all_varnames], 427d769e936Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 428d769e936Smrg m4_if([$2], [], 429d769e936Smrg m4_quote(lt_decl_varnames), 430d769e936Smrg m4_quote(m4_shift($@))))[]dnl 431d769e936Smrg]) 432d769e936Smrgm4_define([_lt_decl_all_varnames], 433d769e936Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 434d769e936Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 435d769e936Smrg]) 4361d54945dSmrg 4371d54945dSmrg 438d769e936Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 439d769e936Smrg# ------------------------------------ 440d769e936Smrg# Quote a variable value, and forward it to `config.status' so that its 441d769e936Smrg# declaration there will have the same value as in `configure'. VARNAME 442d769e936Smrg# must have a single quote delimited value for this to work. 443d769e936Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 444d769e936Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4451d54945dSmrg 4461d54945dSmrg 447d769e936Smrg# _LT_CONFIG_STATUS_DECLARATIONS 448d769e936Smrg# ------------------------------ 449d769e936Smrg# We delimit libtool config variables with single quotes, so when 450d769e936Smrg# we write them to config.status, we have to be sure to quote all 451d769e936Smrg# embedded single quotes properly. In configure, this macro expands 452d769e936Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 453d769e936Smrg# 454d769e936Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 455d769e936Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 456d769e936Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 457d769e936Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4581d54945dSmrg 459d769e936Smrg 460d769e936Smrg# _LT_LIBTOOL_TAGS 461d769e936Smrg# ---------------- 462d769e936Smrg# Output comment and list of tags supported by the script 463d769e936Smrgm4_defun([_LT_LIBTOOL_TAGS], 464d769e936Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 465d769e936Smrgavailable_tags="_LT_TAGS"dnl 466d769e936Smrg]) 467d769e936Smrg 468d769e936Smrg 469d769e936Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 470d769e936Smrg# ----------------------------------- 471d769e936Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 472d769e936Smrg# expand to a commented shell variable setting: 473d769e936Smrg# 474d769e936Smrg# # Some comment about what VAR is for. 475d769e936Smrg# visible_name=$lt_internal_name 476d769e936Smrgm4_define([_LT_LIBTOOL_DECLARE], 477d769e936Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 478d769e936Smrg [description])))[]dnl 479d769e936Smrgm4_pushdef([_libtool_name], 480d769e936Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 481d769e936Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 482d769e936Smrg [0], [_libtool_name=[$]$1], 483d769e936Smrg [1], [_libtool_name=$lt_[]$1], 484d769e936Smrg [2], [_libtool_name=$lt_[]$1], 485d769e936Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 486d769e936Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 487d769e936Smrg]) 488d769e936Smrg 489d769e936Smrg 490d769e936Smrg# _LT_LIBTOOL_CONFIG_VARS 491d769e936Smrg# ----------------------- 492d769e936Smrg# Produce commented declarations of non-tagged libtool config variables 493d769e936Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 494d769e936Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 495d769e936Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 496d769e936Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 497d769e936Smrg[m4_foreach([_lt_var], 498d769e936Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 499d769e936Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 500d769e936Smrg 501d769e936Smrg 502d769e936Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 503d769e936Smrg# ------------------------- 504d769e936Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 505d769e936Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 506d769e936Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 507d769e936Smrg 508d769e936Smrg 509d769e936Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 510d769e936Smrg# ------------------------------ 511d769e936Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 512d769e936Smrg 513d769e936Smrg 514d769e936Smrg# _LT_CONFIG_COMMANDS 515d769e936Smrg# ------------------- 516d769e936Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 517d769e936Smrg# variables for single and double quote escaping we saved from calls 518d769e936Smrg# to _LT_DECL, we can put quote escaped variables declarations 519d769e936Smrg# into `config.status', and then the shell code to quote escape them in 520d769e936Smrg# for loops in `config.status'. Finally, any additional code accumulated 521d769e936Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 522d769e936Smrgm4_defun([_LT_CONFIG_COMMANDS], 523d769e936Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 524d769e936Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 525d769e936Smrg dnl instead of duplicating it all over again into config.status, 526d769e936Smrg dnl then we will have config.status run $CONFIG_LT later, so it 527d769e936Smrg dnl needs to know what name is stored there: 528d769e936Smrg [AC_CONFIG_COMMANDS([libtool], 529d769e936Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 530d769e936Smrg dnl If the libtool generation code is destined for config.status, 531d769e936Smrg dnl expand the accumulated commands and init code now: 532d769e936Smrg [AC_CONFIG_COMMANDS([libtool], 533d769e936Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 534d769e936Smrg])#_LT_CONFIG_COMMANDS 535d769e936Smrg 536d769e936Smrg 537d769e936Smrg# Initialize. 538d769e936Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 539d769e936Smrg[ 540d769e936Smrg 541d769e936Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 542d769e936Smrg# if CDPATH is set. 543d769e936Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 544d769e936Smrg 545d769e936Smrgsed_quote_subst='$sed_quote_subst' 546d769e936Smrgdouble_quote_subst='$double_quote_subst' 547d769e936Smrgdelay_variable_subst='$delay_variable_subst' 548d769e936Smrg_LT_CONFIG_STATUS_DECLARATIONS 549d769e936SmrgLTCC='$LTCC' 550d769e936SmrgLTCFLAGS='$LTCFLAGS' 551d769e936Smrgcompiler='$compiler_DEFAULT' 552d769e936Smrg 553d769e936Smrg# A function that is used when there is no print builtin or printf. 554d769e936Smrgfunc_fallback_echo () 555d769e936Smrg{ 556d769e936Smrg eval 'cat <<_LTECHO_EOF 557d769e936Smrg\$[]1 558d769e936Smrg_LTECHO_EOF' 559d769e936Smrg} 560d769e936Smrg 561d769e936Smrg# Quote evaled strings. 562d769e936Smrgfor var in lt_decl_all_varnames([[ \ 563d769e936Smrg]], lt_decl_quote_varnames); do 564d769e936Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 565d769e936Smrg *[[\\\\\\\`\\"\\\$]]*) 566d769e936Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 567ec713c28Smrg ;; 568d769e936Smrg *) 569d769e936Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 570ec713c28Smrg ;; 571ec713c28Smrg esac 572d769e936Smrgdone 5731d54945dSmrg 574d769e936Smrg# Double-quote double-evaled strings. 575d769e936Smrgfor var in lt_decl_all_varnames([[ \ 576d769e936Smrg]], lt_decl_dquote_varnames); do 577d769e936Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 578d769e936Smrg *[[\\\\\\\`\\"\\\$]]*) 579d769e936Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 580ec713c28Smrg ;; 581d769e936Smrg *) 582d769e936Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 583ec713c28Smrg ;; 5841d54945dSmrg esac 585d769e936Smrgdone 5861d54945dSmrg 587d769e936Smrg_LT_OUTPUT_LIBTOOL_INIT 588d769e936Smrg]) 589ec713c28Smrg 590d769e936Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 591d769e936Smrg# ------------------------------------ 592d769e936Smrg# Generate a child script FILE with all initialization necessary to 593d769e936Smrg# reuse the environment learned by the parent script, and make the 594d769e936Smrg# file executable. If COMMENT is supplied, it is inserted after the 595d769e936Smrg# `#!' sequence but before initialization text begins. After this 596d769e936Smrg# macro, additional text can be appended to FILE to form the body of 597d769e936Smrg# the child script. The macro ends with non-zero status if the 598d769e936Smrg# file could not be fully written (such as if the disk is full). 599d769e936Smrgm4_ifdef([AS_INIT_GENERATED], 600d769e936Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 601d769e936Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 602d769e936Smrg[m4_require([AS_PREPARE])]dnl 603d769e936Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 604d769e936Smrg[lt_write_fail=0 605d769e936Smrgcat >$1 <<_ASEOF || lt_write_fail=1 606d769e936Smrg#! $SHELL 607d769e936Smrg# Generated by $as_me. 608d769e936Smrg$2 609d769e936SmrgSHELL=\${CONFIG_SHELL-$SHELL} 610d769e936Smrgexport SHELL 611d769e936Smrg_ASEOF 612d769e936Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 613d769e936SmrgAS_SHELL_SANITIZE 614d769e936Smrg_AS_PREPARE 615d769e936Smrgexec AS_MESSAGE_FD>&1 616d769e936Smrg_ASEOF 617d769e936Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 618d769e936Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 619d769e936Smrg 620d769e936Smrg# LT_OUTPUT 621d769e936Smrg# --------- 622d769e936Smrg# This macro allows early generation of the libtool script (before 623d769e936Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 624d769e936Smrg# tests. 625d769e936SmrgAC_DEFUN([LT_OUTPUT], 626d769e936Smrg[: ${CONFIG_LT=./config.lt} 627d769e936SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 628d769e936Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 629d769e936Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 630d769e936Smrg 631d769e936Smrgcat >>"$CONFIG_LT" <<\_LTEOF 632d769e936Smrglt_cl_silent=false 633d769e936Smrgexec AS_MESSAGE_LOG_FD>>config.log 634d769e936Smrg{ 635d769e936Smrg echo 636d769e936Smrg AS_BOX([Running $as_me.]) 637d769e936Smrg} >&AS_MESSAGE_LOG_FD 6381d54945dSmrg 639d769e936Smrglt_cl_help="\ 640d769e936Smrg\`$as_me' creates a local libtool stub from the current configuration, 641d769e936Smrgfor use in further configure time tests before the real libtool is 642d769e936Smrggenerated. 643786a6f21Smrg 644d769e936SmrgUsage: $[0] [[OPTIONS]] 6451d54945dSmrg 646d769e936Smrg -h, --help print this help, then exit 647d769e936Smrg -V, --version print version number, then exit 648d769e936Smrg -q, --quiet do not print progress messages 649d769e936Smrg -d, --debug don't remove temporary files 6501d54945dSmrg 651d769e936SmrgReport bugs to <bug-libtool@gnu.org>." 6521d54945dSmrg 653d769e936Smrglt_cl_version="\ 654d769e936Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 655d769e936Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 656d769e936Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6571d54945dSmrg 658d769e936SmrgCopyright (C) 2011 Free Software Foundation, Inc. 659d769e936SmrgThis config.lt script is free software; the Free Software Foundation 660d769e936Smrggives unlimited permision to copy, distribute and modify it." 661786a6f21Smrg 662d769e936Smrgwhile test $[#] != 0 663d769e936Smrgdo 664d769e936Smrg case $[1] in 665d769e936Smrg --version | --v* | -V ) 666d769e936Smrg echo "$lt_cl_version"; exit 0 ;; 667d769e936Smrg --help | --h* | -h ) 668d769e936Smrg echo "$lt_cl_help"; exit 0 ;; 669d769e936Smrg --debug | --d* | -d ) 670d769e936Smrg debug=: ;; 671d769e936Smrg --quiet | --q* | --silent | --s* | -q ) 672d769e936Smrg lt_cl_silent=: ;; 673d769e936Smrg 674d769e936Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 675d769e936SmrgTry \`$[0] --help' for more information.]) ;; 676d769e936Smrg 677d769e936Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 678d769e936SmrgTry \`$[0] --help' for more information.]) ;; 679d769e936Smrg esac 680d769e936Smrg shift 681d769e936Smrgdone 6821d54945dSmrg 683d769e936Smrgif $lt_cl_silent; then 684d769e936Smrg exec AS_MESSAGE_FD>/dev/null 6851d54945dSmrgfi 686d769e936Smrg_LTEOF 687d769e936Smrg 688d769e936Smrgcat >>"$CONFIG_LT" <<_LTEOF 689d769e936Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 690d769e936Smrg_LTEOF 691d769e936Smrg 692d769e936Smrgcat >>"$CONFIG_LT" <<\_LTEOF 693d769e936SmrgAC_MSG_NOTICE([creating $ofile]) 694d769e936Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 695d769e936SmrgAS_EXIT(0) 696d769e936Smrg_LTEOF 697d769e936Smrgchmod +x "$CONFIG_LT" 698d769e936Smrg 699d769e936Smrg# configure is writing to config.log, but config.lt does its own redirection, 700d769e936Smrg# appending to config.log, which fails on DOS, as config.log is still kept 701d769e936Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 702d769e936Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 703d769e936Smrglt_cl_success=: 704d769e936Smrgtest "$silent" = yes && 705d769e936Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 706d769e936Smrgexec AS_MESSAGE_LOG_FD>/dev/null 707d769e936Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 708d769e936Smrgexec AS_MESSAGE_LOG_FD>>config.log 709d769e936Smrg$lt_cl_success || AS_EXIT(1) 710d769e936Smrg])# LT_OUTPUT 711d769e936Smrg 712d769e936Smrg 713d769e936Smrg# _LT_CONFIG(TAG) 714d769e936Smrg# --------------- 715d769e936Smrg# If TAG is the built-in tag, create an initial libtool script with a 716d769e936Smrg# default configuration from the untagged config vars. Otherwise add code 717d769e936Smrg# to config.status for appending the configuration named by TAG from the 718d769e936Smrg# matching tagged config vars. 719d769e936Smrgm4_defun([_LT_CONFIG], 720d769e936Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 721d769e936Smrg_LT_CONFIG_SAVE_COMMANDS([ 722d769e936Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 723d769e936Smrg m4_if(_LT_TAG, [C], [ 724d769e936Smrg # See if we are running on zsh, and set the options which allow our 725d769e936Smrg # commands through without removal of \ escapes. 726d769e936Smrg if test -n "${ZSH_VERSION+set}" ; then 727d769e936Smrg setopt NO_GLOB_SUBST 728d769e936Smrg fi 7291d54945dSmrg 730d769e936Smrg cfgfile="${ofile}T" 731d769e936Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 732d769e936Smrg $RM "$cfgfile" 7331d54945dSmrg 734d769e936Smrg cat <<_LT_EOF >> "$cfgfile" 735d769e936Smrg#! $SHELL 7361d54945dSmrg 737d769e936Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 738d769e936Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 739d769e936Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 740d769e936Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 741d769e936Smrg# 742d769e936Smrg_LT_COPYING 743d769e936Smrg_LT_LIBTOOL_TAGS 7441d54945dSmrg 745d769e936Smrg# ### BEGIN LIBTOOL CONFIG 746d769e936Smrg_LT_LIBTOOL_CONFIG_VARS 747d769e936Smrg_LT_LIBTOOL_TAG_VARS 748d769e936Smrg# ### END LIBTOOL CONFIG 7491d54945dSmrg 750d769e936Smrg_LT_EOF 7511d54945dSmrg 752d769e936Smrg case $host_os in 753d769e936Smrg aix3*) 754d769e936Smrg cat <<\_LT_EOF >> "$cfgfile" 755d769e936Smrg# AIX sometimes has problems with the GCC collect2 program. For some 756d769e936Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 757d769e936Smrg# vanish in a puff of smoke. 758d769e936Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 759d769e936Smrg COLLECT_NAMES= 760d769e936Smrg export COLLECT_NAMES 761d769e936Smrgfi 762d769e936Smrg_LT_EOF 7631d54945dSmrg ;; 764d769e936Smrg esac 7651d54945dSmrg 766d769e936Smrg _LT_PROG_LTMAIN 7671d54945dSmrg 768d769e936Smrg # We use sed instead of cat because bash on DJGPP gets confused if 769d769e936Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 770d769e936Smrg # text mode, it properly converts lines to CR/LF. This bash problem 771d769e936Smrg # is reportedly fixed, but why not run on old versions too? 772d769e936Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 773d769e936Smrg || (rm -f "$cfgfile"; exit 1) 774d769e936Smrg 775d769e936Smrg _LT_PROG_REPLACE_SHELLFNS 776d769e936Smrg 777d769e936Smrg mv -f "$cfgfile" "$ofile" || 778d769e936Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 779d769e936Smrg chmod +x "$ofile" 780d769e936Smrg], 781d769e936Smrg[cat <<_LT_EOF >> "$ofile" 782d769e936Smrg 783d769e936Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 784d769e936Smrgdnl in a comment (ie after a #). 785d769e936Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 786d769e936Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 787d769e936Smrg# ### END LIBTOOL TAG CONFIG: $1 788d769e936Smrg_LT_EOF 789d769e936Smrg])dnl /m4_if 790d769e936Smrg], 791d769e936Smrg[m4_if([$1], [], [ 792d769e936Smrg PACKAGE='$PACKAGE' 793d769e936Smrg VERSION='$VERSION' 794d769e936Smrg TIMESTAMP='$TIMESTAMP' 795d769e936Smrg RM='$RM' 796d769e936Smrg ofile='$ofile'], []) 797d769e936Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 798d769e936Smrg])# _LT_CONFIG 7991d54945dSmrg 800d769e936Smrg 801d769e936Smrg# LT_SUPPORTED_TAG(TAG) 802d769e936Smrg# --------------------- 803d769e936Smrg# Trace this macro to discover what tags are supported by the libtool 804d769e936Smrg# --tag option, using: 805d769e936Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 806d769e936SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 807d769e936Smrg 808d769e936Smrg 809d769e936Smrg# C support is built-in for now 810d769e936Smrgm4_define([_LT_LANG_C_enabled], []) 811d769e936Smrgm4_define([_LT_TAGS], []) 8121d54945dSmrg 8131d54945dSmrg 814d769e936Smrg# LT_LANG(LANG) 815d769e936Smrg# ------------- 816d769e936Smrg# Enable libtool support for the given language if not already enabled. 817d769e936SmrgAC_DEFUN([LT_LANG], 818d769e936Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 819d769e936Smrgm4_case([$1], 820d769e936Smrg [C], [_LT_LANG(C)], 821d769e936Smrg [C++], [_LT_LANG(CXX)], 822d769e936Smrg [Go], [_LT_LANG(GO)], 823d769e936Smrg [Java], [_LT_LANG(GCJ)], 824d769e936Smrg [Fortran 77], [_LT_LANG(F77)], 825d769e936Smrg [Fortran], [_LT_LANG(FC)], 826d769e936Smrg [Windows Resource], [_LT_LANG(RC)], 827d769e936Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 828d769e936Smrg [_LT_LANG($1)], 829d769e936Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 830d769e936Smrg])# LT_LANG 831d769e936Smrg 832d769e936Smrg 833d769e936Smrg# _LT_LANG(LANGNAME) 834ec713c28Smrg# ------------------ 835d769e936Smrgm4_defun([_LT_LANG], 836d769e936Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 837d769e936Smrg [LT_SUPPORTED_TAG([$1])dnl 838d769e936Smrg m4_append([_LT_TAGS], [$1 ])dnl 839d769e936Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 840d769e936Smrg _LT_LANG_$1_CONFIG($1)])dnl 841d769e936Smrg])# _LT_LANG 8421d54945dSmrg 8431d54945dSmrg 844d769e936Smrgm4_ifndef([AC_PROG_GO], [ 845d769e936Smrg# NOTE: This macro has been submitted for inclusion into # 846d769e936Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 847d769e936Smrg# a released version of Autoconf we should remove this # 848d769e936Smrg# macro and use it instead. # 849d769e936Smrgm4_defun([AC_PROG_GO], 850d769e936Smrg[AC_LANG_PUSH(Go)dnl 851d769e936SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 852d769e936SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 853d769e936Smrg_AC_ARG_VAR_LDFLAGS()dnl 854d769e936SmrgAC_CHECK_TOOL(GOC, gccgo) 855d769e936Smrgif test -z "$GOC"; then 856d769e936Smrg if test -n "$ac_tool_prefix"; then 857d769e936Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 858d769e936Smrg fi 859d769e936Smrgfi 860d769e936Smrgif test -z "$GOC"; then 861d769e936Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 862d769e936Smrgfi 863d769e936Smrg])#m4_defun 864d769e936Smrg])#m4_ifndef 8651d54945dSmrg 8661d54945dSmrg 867d769e936Smrg# _LT_LANG_DEFAULT_CONFIG 868d769e936Smrg# ----------------------- 869d769e936Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 870d769e936Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 871d769e936Smrg [LT_LANG(CXX)], 872d769e936Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 873d769e936Smrg 874d769e936SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 875d769e936Smrg [LT_LANG(F77)], 876d769e936Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 877d769e936Smrg 878d769e936SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 879d769e936Smrg [LT_LANG(FC)], 880d769e936Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 881d769e936Smrg 882d769e936Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 883d769e936Smrgdnl pulling things in needlessly. 884d769e936SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 885d769e936Smrg [LT_LANG(GCJ)], 886d769e936Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 887d769e936Smrg [LT_LANG(GCJ)], 888d769e936Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 889d769e936Smrg [LT_LANG(GCJ)], 890d769e936Smrg [m4_ifdef([AC_PROG_GCJ], 891d769e936Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 892d769e936Smrg m4_ifdef([A][M_PROG_GCJ], 893d769e936Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 894d769e936Smrg m4_ifdef([LT_PROG_GCJ], 895d769e936Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 896d769e936Smrg 897d769e936SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 898d769e936Smrg [LT_LANG(GO)], 899d769e936Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 900d769e936Smrg 901d769e936SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 902d769e936Smrg [LT_LANG(RC)], 903d769e936Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 904d769e936Smrg])# _LT_LANG_DEFAULT_CONFIG 905d769e936Smrg 906d769e936Smrg# Obsolete macros: 907d769e936SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 908d769e936SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 909d769e936SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 910d769e936SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 911d769e936SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 912d769e936Smrgdnl aclocal-1.4 backwards compatibility: 913d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 914d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 915d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 916d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 917d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 918d769e936Smrg 919d769e936Smrg 920d769e936Smrg# _LT_TAG_COMPILER 921d769e936Smrg# ---------------- 922d769e936Smrgm4_defun([_LT_TAG_COMPILER], 923d769e936Smrg[AC_REQUIRE([AC_PROG_CC])dnl 9241d54945dSmrg 925d769e936Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 926d769e936Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 927d769e936Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 928d769e936Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 9291d54945dSmrg 930d769e936Smrg# If no C compiler was specified, use CC. 931d769e936SmrgLTCC=${LTCC-"$CC"} 9321d54945dSmrg 933d769e936Smrg# If no C compiler flags were specified, use CFLAGS. 934d769e936SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 935ec713c28Smrg 936d769e936Smrg# Allow CC to be a program name with arguments. 937d769e936Smrgcompiler=$CC 938d769e936Smrg])# _LT_TAG_COMPILER 9391d54945dSmrg 9401d54945dSmrg 941d769e936Smrg# _LT_COMPILER_BOILERPLATE 942d769e936Smrg# ------------------------ 943d769e936Smrg# Check for compiler boilerplate output or warnings with 944d769e936Smrg# the simple compiler test code. 945d769e936Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 946d769e936Smrg[m4_require([_LT_DECL_SED])dnl 947d769e936Smrgac_outfile=conftest.$ac_objext 948d769e936Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 949d769e936Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 950d769e936Smrg_lt_compiler_boilerplate=`cat conftest.err` 951d769e936Smrg$RM conftest* 952d769e936Smrg])# _LT_COMPILER_BOILERPLATE 9531d54945dSmrg 9541d54945dSmrg 955d769e936Smrg# _LT_LINKER_BOILERPLATE 956ec713c28Smrg# ---------------------- 957d769e936Smrg# Check for linker boilerplate output or warnings with 958d769e936Smrg# the simple link test code. 959d769e936Smrgm4_defun([_LT_LINKER_BOILERPLATE], 960d769e936Smrg[m4_require([_LT_DECL_SED])dnl 961d769e936Smrgac_outfile=conftest.$ac_objext 962d769e936Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 963d769e936Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 964d769e936Smrg_lt_linker_boilerplate=`cat conftest.err` 965d769e936Smrg$RM -r conftest* 966d769e936Smrg])# _LT_LINKER_BOILERPLATE 9671d54945dSmrg 968d769e936Smrg# _LT_REQUIRED_DARWIN_CHECKS 969d769e936Smrg# ------------------------- 970d769e936Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9711d54945dSmrg case $host_os in 972d769e936Smrg rhapsody* | darwin*) 973d769e936Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 974d769e936Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 975d769e936Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 976d769e936Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 977d769e936Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 978d769e936Smrg _LT_DECL([], [DSYMUTIL], [1], 979d769e936Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 980d769e936Smrg _LT_DECL([], [NMEDIT], [1], 981d769e936Smrg [Tool to change global to local symbols on Mac OS X]) 982d769e936Smrg _LT_DECL([], [LIPO], [1], 983d769e936Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 984d769e936Smrg _LT_DECL([], [OTOOL], [1], 985d769e936Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 986d769e936Smrg _LT_DECL([], [OTOOL64], [1], 987d769e936Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9881d54945dSmrg 989d769e936Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 990d769e936Smrg [lt_cv_apple_cc_single_mod=no 991d769e936Smrg if test -z "${LT_MULTI_MODULE}"; then 992d769e936Smrg # By default we will add the -single_module flag. You can override 993d769e936Smrg # by either setting the environment variable LT_MULTI_MODULE 994d769e936Smrg # non-empty at configure time, or by adding -multi_module to the 995d769e936Smrg # link flags. 996d769e936Smrg rm -rf libconftest.dylib* 997d769e936Smrg echo "int foo(void){return 1;}" > conftest.c 998d769e936Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 999d769e936Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1000d769e936Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1001d769e936Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1002d769e936Smrg _lt_result=$? 1003d769e936Smrg # If there is a non-empty error log, and "single_module" 1004d769e936Smrg # appears in it, assume the flag caused a linker warning 1005d769e936Smrg if test -s conftest.err && $GREP single_module conftest.err; then 1006d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1007d769e936Smrg # Otherwise, if the output was created with a 0 exit code from 1008d769e936Smrg # the compiler, it worked. 1009d769e936Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 1010d769e936Smrg lt_cv_apple_cc_single_mod=yes 1011d769e936Smrg else 1012d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1013d769e936Smrg fi 1014d769e936Smrg rm -rf libconftest.dylib* 1015d769e936Smrg rm -f conftest.* 1016d769e936Smrg fi]) 10171d54945dSmrg 1018d769e936Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1019d769e936Smrg [lt_cv_ld_exported_symbols_list], 1020d769e936Smrg [lt_cv_ld_exported_symbols_list=no 1021d769e936Smrg save_LDFLAGS=$LDFLAGS 1022d769e936Smrg echo "_main" > conftest.sym 1023d769e936Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1024d769e936Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1025d769e936Smrg [lt_cv_ld_exported_symbols_list=yes], 1026d769e936Smrg [lt_cv_ld_exported_symbols_list=no]) 1027d769e936Smrg LDFLAGS="$save_LDFLAGS" 10281d54945dSmrg ]) 10291d54945dSmrg 1030d769e936Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1031d769e936Smrg [lt_cv_ld_force_load=no 1032d769e936Smrg cat > conftest.c << _LT_EOF 1033d769e936Smrgint forced_loaded() { return 2;} 1034d769e936Smrg_LT_EOF 1035d769e936Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1036d769e936Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1037d769e936Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1038d769e936Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1039d769e936Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1040d769e936Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1041d769e936Smrg cat > conftest.c << _LT_EOF 1042d769e936Smrgint main() { return 0;} 1043d769e936Smrg_LT_EOF 1044d769e936Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1045d769e936Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1046d769e936Smrg _lt_result=$? 1047d769e936Smrg if test -s conftest.err && $GREP force_load conftest.err; then 1048d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1049d769e936Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 1050d769e936Smrg lt_cv_ld_force_load=yes 1051d769e936Smrg else 1052d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1053d769e936Smrg fi 1054d769e936Smrg rm -f conftest.err libconftest.a conftest conftest.c 1055d769e936Smrg rm -rf conftest.dSYM 1056d769e936Smrg ]) 1057d769e936Smrg case $host_os in 1058d769e936Smrg rhapsody* | darwin1.[[012]]) 1059d769e936Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 1060d769e936Smrg darwin1.*) 1061d769e936Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1062d769e936Smrg darwin*) # darwin 5.x on 1063d769e936Smrg # if running on 10.5 or later, the deployment target defaults 1064d769e936Smrg # to the OS version, if on x86, and 10.4, the deployment 1065d769e936Smrg # target defaults to 10.4. Don't you love it? 1066d769e936Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1067d769e936Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1068d769e936Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1069d769e936Smrg 10.[[012]]*) 1070d769e936Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1071d769e936Smrg 10.*) 1072d769e936Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1073d769e936Smrg esac 1074d769e936Smrg ;; 1075d769e936Smrg esac 1076d769e936Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 1077d769e936Smrg _lt_dar_single_mod='$single_module' 1078d769e936Smrg fi 1079d769e936Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 1080d769e936Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 1081d769e936Smrg else 1082d769e936Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 1083d769e936Smrg fi 1084d769e936Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1085d769e936Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1086d769e936Smrg else 1087d769e936Smrg _lt_dsymutil= 1088d769e936Smrg fi 10891d54945dSmrg ;; 10901d54945dSmrg esac 1091d769e936Smrg]) 10921d54945dSmrg 1093d769e936Smrg 1094d769e936Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1095d769e936Smrg# --------------------------------- 1096d769e936Smrg# Checks for linker and compiler features on darwin 1097d769e936Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1098d769e936Smrg[ 1099d769e936Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1100d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1101d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1102d769e936Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1103d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1104d769e936Smrg if test "$lt_cv_ld_force_load" = "yes"; then 1105d769e936Smrg _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\"`' 1106d769e936Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1107d769e936Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 11081d54945dSmrg else 1109d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 11101d54945dSmrg fi 1111d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1112d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1113d769e936Smrg case $cc_basename in 1114d769e936Smrg ifort*) _lt_dar_can_shared=yes ;; 1115d769e936Smrg *) _lt_dar_can_shared=$GCC ;; 1116d769e936Smrg esac 1117d769e936Smrg if test "$_lt_dar_can_shared" = "yes"; then 1118d769e936Smrg output_verbose_link_cmd=func_echo_all 1119d769e936Smrg _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}" 1120d769e936Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1121d769e936Smrg _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}" 1122d769e936Smrg _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}" 1123d769e936Smrg m4_if([$1], [CXX], 1124d769e936Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1125d769e936Smrg _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}" 1126d769e936Smrg _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}" 1127d769e936Smrg fi 1128d769e936Smrg],[]) 1129d769e936Smrg else 1130d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1131d769e936Smrg fi 1132d769e936Smrg]) 11331d54945dSmrg 1134d769e936Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1135d769e936Smrg# ---------------------------------- 1136d769e936Smrg# Links a minimal program and checks the executable 1137d769e936Smrg# for the system default hardcoded library path. In most cases, 1138d769e936Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 1139d769e936Smrg# the location of the communication and MPI libs are included too. 1140d769e936Smrg# If we don't find anything, use the default library path according 1141d769e936Smrg# to the aix ld manual. 1142d769e936Smrg# Store the results from the different compilers for each TAGNAME. 1143d769e936Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 1144d769e936Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1145d769e936Smrg[m4_require([_LT_DECL_SED])dnl 1146d769e936Smrgif test "${lt_cv_aix_libpath+set}" = set; then 1147d769e936Smrg aix_libpath=$lt_cv_aix_libpath 1148d769e936Smrgelse 1149d769e936Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1150d769e936Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1151d769e936Smrg lt_aix_libpath_sed='[ 1152d769e936Smrg /Import File Strings/,/^$/ { 1153d769e936Smrg /^0/ { 1154d769e936Smrg s/^0 *\([^ ]*\) *$/\1/ 1155d769e936Smrg p 1156d769e936Smrg } 1157d769e936Smrg }]' 1158d769e936Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1159d769e936Smrg # Check for a 64-bit object if we didn't find anything. 1160d769e936Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1161d769e936Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1162d769e936Smrg fi],[]) 1163d769e936Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1164d769e936Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1165d769e936Smrg fi 1166d769e936Smrg ]) 1167d769e936Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1168d769e936Smrgfi 1169d769e936Smrg])# _LT_SYS_MODULE_PATH_AIX 11701d54945dSmrg 11711d54945dSmrg 1172d769e936Smrg# _LT_SHELL_INIT(ARG) 1173d769e936Smrg# ------------------- 1174d769e936Smrgm4_define([_LT_SHELL_INIT], 1175d769e936Smrg[m4_divert_text([M4SH-INIT], [$1 1176d769e936Smrg])])# _LT_SHELL_INIT 11771d54945dSmrg 1178d769e936Smrg 1179d769e936Smrg 1180d769e936Smrg# _LT_PROG_ECHO_BACKSLASH 1181d769e936Smrg# ----------------------- 1182d769e936Smrg# Find how we can fake an echo command that does not interpret backslash. 1183d769e936Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 1184d769e936Smrg# of the generated configure script which will find a shell with a builtin 1185d769e936Smrg# printf (which we can use as an echo command). 1186d769e936Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1187d769e936Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1188d769e936SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1189d769e936SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1190d769e936Smrg 1191d769e936SmrgAC_MSG_CHECKING([how to print strings]) 1192d769e936Smrg# Test print first, because it will be a builtin if present. 1193d769e936Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1194d769e936Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1195d769e936Smrg ECHO='print -r --' 1196d769e936Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1197d769e936Smrg ECHO='printf %s\n' 1198d769e936Smrgelse 1199d769e936Smrg # Use this function as a fallback that always works. 1200d769e936Smrg func_fallback_echo () 1201d769e936Smrg { 1202d769e936Smrg eval 'cat <<_LTECHO_EOF 1203d769e936Smrg$[]1 1204d769e936Smrg_LTECHO_EOF' 1205d769e936Smrg } 1206d769e936Smrg ECHO='func_fallback_echo' 1207d769e936Smrgfi 1208d769e936Smrg 1209d769e936Smrg# func_echo_all arg... 1210d769e936Smrg# Invoke $ECHO with all args, space-separated. 1211d769e936Smrgfunc_echo_all () 1212d769e936Smrg{ 1213d769e936Smrg $ECHO "$*" 1214d769e936Smrg} 1215d769e936Smrg 1216d769e936Smrgcase "$ECHO" in 1217d769e936Smrg printf*) AC_MSG_RESULT([printf]) ;; 1218d769e936Smrg print*) AC_MSG_RESULT([print -r]) ;; 1219d769e936Smrg *) AC_MSG_RESULT([cat]) ;; 1220d769e936Smrgesac 1221d769e936Smrg 1222d769e936Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 1223d769e936Smrg[_AS_DETECT_SUGGESTED([ 1224d769e936Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1225d769e936Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1226d769e936Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1227d769e936Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1228d769e936Smrg PATH=/empty FPATH=/empty; export PATH FPATH 1229d769e936Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1230d769e936Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1231d769e936Smrg 1232d769e936Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1233d769e936Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1234d769e936Smrg])# _LT_PROG_ECHO_BACKSLASH 1235d769e936Smrg 1236d769e936Smrg 1237d769e936Smrg# _LT_WITH_SYSROOT 1238d769e936Smrg# ---------------- 1239d769e936SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1240d769e936Smrg[AC_MSG_CHECKING([for sysroot]) 1241d769e936SmrgAC_ARG_WITH([sysroot], 1242d769e936Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1243d769e936Smrg (or the compiler's sysroot if not specified).], 1244d769e936Smrg[], [with_sysroot=no]) 1245d769e936Smrg 1246d769e936Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 1247d769e936Smrgdnl in case the user passed a directory name. 1248d769e936Smrglt_sysroot= 1249d769e936Smrgcase ${with_sysroot} in #( 1250d769e936Smrg yes) 1251d769e936Smrg if test "$GCC" = yes; then 1252d769e936Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1253d769e936Smrg fi 1254d769e936Smrg ;; #( 1255d769e936Smrg /*) 1256d769e936Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1257d769e936Smrg ;; #( 1258d769e936Smrg no|'') 1259d769e936Smrg ;; #( 1260d769e936Smrg *) 1261d769e936Smrg AC_MSG_RESULT([${with_sysroot}]) 1262d769e936Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1263d769e936Smrg ;; 1264d769e936Smrgesac 1265d769e936Smrg 1266d769e936Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1267d769e936Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1268d769e936Smrg[dependent libraries, and in which our libraries should be installed.])]) 1269d769e936Smrg 1270d769e936Smrg# _LT_ENABLE_LOCK 1271d769e936Smrg# --------------- 1272d769e936Smrgm4_defun([_LT_ENABLE_LOCK], 1273d769e936Smrg[AC_ARG_ENABLE([libtool-lock], 1274d769e936Smrg [AS_HELP_STRING([--disable-libtool-lock], 1275d769e936Smrg [avoid locking (might break parallel builds)])]) 1276d769e936Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1277d769e936Smrg 1278d769e936Smrg# Some flags need to be propagated to the compiler or linker for good 1279d769e936Smrg# libtool support. 1280d769e936Smrgcase $host in 1281d769e936Smrgia64-*-hpux*) 1282d769e936Smrg # Find out which ABI we are using. 1283d769e936Smrg echo 'int i;' > conftest.$ac_ext 1284d769e936Smrg if AC_TRY_EVAL(ac_compile); then 1285d769e936Smrg case `/usr/bin/file conftest.$ac_objext` in 1286d769e936Smrg *ELF-32*) 1287d769e936Smrg HPUX_IA64_MODE="32" 1288d769e936Smrg ;; 1289d769e936Smrg *ELF-64*) 1290d769e936Smrg HPUX_IA64_MODE="64" 1291d769e936Smrg ;; 1292d769e936Smrg esac 1293d769e936Smrg fi 1294d769e936Smrg rm -rf conftest* 1295d769e936Smrg ;; 1296d769e936Smrg*-*-irix6*) 1297d769e936Smrg # Find out which ABI we are using. 1298d769e936Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1299d769e936Smrg if AC_TRY_EVAL(ac_compile); then 1300d769e936Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 1301d769e936Smrg case `/usr/bin/file conftest.$ac_objext` in 1302d769e936Smrg *32-bit*) 1303d769e936Smrg LD="${LD-ld} -melf32bsmip" 1304d769e936Smrg ;; 1305d769e936Smrg *N32*) 1306d769e936Smrg LD="${LD-ld} -melf32bmipn32" 1307d769e936Smrg ;; 1308d769e936Smrg *64-bit*) 1309d769e936Smrg LD="${LD-ld} -melf64bmip" 1310d769e936Smrg ;; 1311d769e936Smrg esac 1312d769e936Smrg else 1313d769e936Smrg case `/usr/bin/file conftest.$ac_objext` in 1314d769e936Smrg *32-bit*) 1315d769e936Smrg LD="${LD-ld} -32" 1316d769e936Smrg ;; 1317d769e936Smrg *N32*) 1318d769e936Smrg LD="${LD-ld} -n32" 1319d769e936Smrg ;; 1320d769e936Smrg *64-bit*) 1321d769e936Smrg LD="${LD-ld} -64" 1322d769e936Smrg ;; 1323d769e936Smrg esac 13241d54945dSmrg fi 1325d769e936Smrg fi 1326d769e936Smrg rm -rf conftest* 1327d769e936Smrg ;; 13281d54945dSmrg 1329d769e936Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1330d769e936Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1331d769e936Smrg # Find out which ABI we are using. 1332d769e936Smrg echo 'int i;' > conftest.$ac_ext 1333d769e936Smrg if AC_TRY_EVAL(ac_compile); then 1334d769e936Smrg case `/usr/bin/file conftest.o` in 1335d769e936Smrg *32-bit*) 1336d769e936Smrg case $host in 1337d769e936Smrg x86_64-*kfreebsd*-gnu) 1338d769e936Smrg LD="${LD-ld} -m elf_i386_fbsd" 1339d769e936Smrg ;; 1340d769e936Smrg x86_64-*linux*) 1341d769e936Smrg LD="${LD-ld} -m elf_i386" 1342d769e936Smrg ;; 1343d769e936Smrg ppc64-*linux*|powerpc64-*linux*) 1344d769e936Smrg LD="${LD-ld} -m elf32ppclinux" 1345d769e936Smrg ;; 1346d769e936Smrg s390x-*linux*) 1347d769e936Smrg LD="${LD-ld} -m elf_s390" 1348d769e936Smrg ;; 1349d769e936Smrg sparc64-*linux*) 1350d769e936Smrg LD="${LD-ld} -m elf32_sparc" 1351d769e936Smrg ;; 1352d769e936Smrg esac 1353d769e936Smrg ;; 1354d769e936Smrg *64-bit*) 1355d769e936Smrg case $host in 1356d769e936Smrg x86_64-*kfreebsd*-gnu) 1357d769e936Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1358d769e936Smrg ;; 1359d769e936Smrg x86_64-*linux*) 1360d769e936Smrg LD="${LD-ld} -m elf_x86_64" 1361d769e936Smrg ;; 1362d769e936Smrg ppc*-*linux*|powerpc*-*linux*) 1363d769e936Smrg LD="${LD-ld} -m elf64ppc" 1364d769e936Smrg ;; 1365d769e936Smrg s390*-*linux*|s390*-*tpf*) 1366d769e936Smrg LD="${LD-ld} -m elf64_s390" 1367d769e936Smrg ;; 1368d769e936Smrg sparc*-*linux*) 1369d769e936Smrg LD="${LD-ld} -m elf64_sparc" 1370d769e936Smrg ;; 1371d769e936Smrg esac 1372d769e936Smrg ;; 1373d769e936Smrg esac 1374d769e936Smrg fi 1375d769e936Smrg rm -rf conftest* 1376d769e936Smrg ;; 13771d54945dSmrg 1378d769e936Smrg*-*-sco3.2v5*) 1379d769e936Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1380d769e936Smrg SAVE_CFLAGS="$CFLAGS" 1381d769e936Smrg CFLAGS="$CFLAGS -belf" 1382d769e936Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1383d769e936Smrg [AC_LANG_PUSH(C) 1384d769e936Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1385d769e936Smrg AC_LANG_POP]) 1386d769e936Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1387d769e936Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1388d769e936Smrg CFLAGS="$SAVE_CFLAGS" 1389d769e936Smrg fi 1390d769e936Smrg ;; 1391d769e936Smrg*-*solaris*) 1392d769e936Smrg # Find out which ABI we are using. 1393d769e936Smrg echo 'int i;' > conftest.$ac_ext 1394d769e936Smrg if AC_TRY_EVAL(ac_compile); then 1395d769e936Smrg case `/usr/bin/file conftest.o` in 1396d769e936Smrg *64-bit*) 1397d769e936Smrg case $lt_cv_prog_gnu_ld in 1398d769e936Smrg yes*) 1399d769e936Smrg case $host in 1400d769e936Smrg i?86-*-solaris*) 1401d769e936Smrg LD="${LD-ld} -m elf_x86_64" 1402d769e936Smrg ;; 1403d769e936Smrg sparc*-*-solaris*) 1404d769e936Smrg LD="${LD-ld} -m elf64_sparc" 1405d769e936Smrg ;; 1406d769e936Smrg esac 1407d769e936Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1408d769e936Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1409d769e936Smrg LD="${LD-ld}_sol2" 1410d769e936Smrg fi 1411d769e936Smrg ;; 1412d769e936Smrg *) 1413d769e936Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1414d769e936Smrg LD="${LD-ld} -64" 1415d769e936Smrg fi 1416d769e936Smrg ;; 1417d769e936Smrg esac 1418d769e936Smrg ;; 1419d769e936Smrg esac 1420d769e936Smrg fi 1421d769e936Smrg rm -rf conftest* 1422d769e936Smrg ;; 1423d769e936Smrgesac 14241d54945dSmrg 1425d769e936Smrgneed_locks="$enable_libtool_lock" 1426d769e936Smrg])# _LT_ENABLE_LOCK 1427d769e936Smrg 1428d769e936Smrg 1429d769e936Smrg# _LT_PROG_AR 1430d769e936Smrg# ----------- 1431d769e936Smrgm4_defun([_LT_PROG_AR], 1432d769e936Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1433d769e936Smrg: ${AR=ar} 1434d769e936Smrg: ${AR_FLAGS=cru} 1435d769e936Smrg_LT_DECL([], [AR], [1], [The archiver]) 1436d769e936Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1437d769e936Smrg 1438d769e936SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1439d769e936Smrg [lt_cv_ar_at_file=no 1440d769e936Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1441d769e936Smrg [echo conftest.$ac_objext > conftest.lst 1442d769e936Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1443d769e936Smrg AC_TRY_EVAL([lt_ar_try]) 1444d769e936Smrg if test "$ac_status" -eq 0; then 1445d769e936Smrg # Ensure the archiver fails upon bogus file names. 1446d769e936Smrg rm -f conftest.$ac_objext libconftest.a 1447d769e936Smrg AC_TRY_EVAL([lt_ar_try]) 1448d769e936Smrg if test "$ac_status" -ne 0; then 1449d769e936Smrg lt_cv_ar_at_file=@ 1450d769e936Smrg fi 1451d769e936Smrg fi 1452d769e936Smrg rm -f conftest.* libconftest.a 1453d769e936Smrg ]) 1454d769e936Smrg ]) 1455d769e936Smrg 1456d769e936Smrgif test "x$lt_cv_ar_at_file" = xno; then 1457d769e936Smrg archiver_list_spec= 1458d769e936Smrgelse 1459d769e936Smrg archiver_list_spec=$lt_cv_ar_at_file 1460d769e936Smrgfi 1461d769e936Smrg_LT_DECL([], [archiver_list_spec], [1], 1462d769e936Smrg [How to feed a file listing to the archiver]) 1463d769e936Smrg])# _LT_PROG_AR 1464d769e936Smrg 1465d769e936Smrg 1466d769e936Smrg# _LT_CMD_OLD_ARCHIVE 1467d769e936Smrg# ------------------- 1468d769e936Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1469d769e936Smrg[_LT_PROG_AR 1470d769e936Smrg 1471d769e936SmrgAC_CHECK_TOOL(STRIP, strip, :) 1472d769e936Smrgtest -z "$STRIP" && STRIP=: 1473d769e936Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1474d769e936Smrg 1475d769e936SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1476d769e936Smrgtest -z "$RANLIB" && RANLIB=: 1477d769e936Smrg_LT_DECL([], [RANLIB], [1], 1478d769e936Smrg [Commands used to install an old-style archive]) 1479d769e936Smrg 1480d769e936Smrg# Determine commands to create old-style static archives. 1481d769e936Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1482d769e936Smrgold_postinstall_cmds='chmod 644 $oldlib' 1483d769e936Smrgold_postuninstall_cmds= 1484d769e936Smrg 1485d769e936Smrgif test -n "$RANLIB"; then 1486d769e936Smrg case $host_os in 1487d769e936Smrg openbsd*) 1488d769e936Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1489d769e936Smrg ;; 1490d769e936Smrg *) 1491d769e936Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1492d769e936Smrg ;; 14931d54945dSmrg esac 1494d769e936Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 14951d54945dSmrgfi 1496d769e936Smrg 1497d769e936Smrgcase $host_os in 1498d769e936Smrg darwin*) 1499d769e936Smrg lock_old_archive_extraction=yes ;; 1500d769e936Smrg *) 1501d769e936Smrg lock_old_archive_extraction=no ;; 1502d769e936Smrgesac 1503d769e936Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1504d769e936Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1505d769e936Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1506d769e936Smrg [Commands used to build an old-style archive]) 1507d769e936Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 1508d769e936Smrg [Whether to use a lock for old archive extraction]) 1509d769e936Smrg])# _LT_CMD_OLD_ARCHIVE 15101d54945dSmrg 1511786a6f21Smrg 1512d769e936Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1513d769e936Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1514d769e936Smrg# ---------------------------------------------------------------- 1515d769e936Smrg# Check whether the given compiler option works 1516d769e936SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1517d769e936Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1518d769e936Smrgm4_require([_LT_DECL_SED])dnl 1519d769e936SmrgAC_CACHE_CHECK([$1], [$2], 1520d769e936Smrg [$2=no 1521d769e936Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1522ba85709eSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1523d769e936Smrg lt_compiler_flag="$3" 15241d54945dSmrg # Insert the option either (1) after the last *FLAGS variable, or 15251d54945dSmrg # (2) before a word containing "conftest.", or (3) at the end. 15261d54945dSmrg # Note that $ac_compile itself does not contain backslashes and begins 15271d54945dSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1528d769e936Smrg # The option is referenced via a variable to avoid confusing sed. 15291d54945dSmrg lt_compile=`echo "$ac_compile" | $SED \ 15301d54945dSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 15311d54945dSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 15321d54945dSmrg -e 's:$: $lt_compiler_flag:'` 1533d769e936Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1534d769e936Smrg (eval "$lt_compile" 2>conftest.err) 15351d54945dSmrg ac_status=$? 1536d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1537d769e936Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1538d769e936Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 15391d54945dSmrg # The compiler can only warn and ignore the option if not recognized 1540d769e936Smrg # So say no if there are warnings other than the usual output. 1541d769e936Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1542d769e936Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1543d769e936Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1544d769e936Smrg $2=yes 15451d54945dSmrg fi 15461d54945dSmrg fi 1547d769e936Smrg $RM conftest* 15481d54945dSmrg]) 15491d54945dSmrg 1550d769e936Smrgif test x"[$]$2" = xyes; then 1551d769e936Smrg m4_if([$5], , :, [$5]) 15521d54945dSmrgelse 1553d769e936Smrg m4_if([$6], , :, [$6]) 15541d54945dSmrgfi 1555d769e936Smrg])# _LT_COMPILER_OPTION 15561d54945dSmrg 1557d769e936Smrg# Old name: 1558d769e936SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1559d769e936Smrgdnl aclocal-1.4 backwards compatibility: 1560d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 15611d54945dSmrg 1562d769e936Smrg 1563d769e936Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1564d769e936Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1565d769e936Smrg# ---------------------------------------------------- 1566d769e936Smrg# Check whether the given linker option works 1567d769e936SmrgAC_DEFUN([_LT_LINKER_OPTION], 1568d769e936Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1569d769e936Smrgm4_require([_LT_DECL_SED])dnl 1570d769e936SmrgAC_CACHE_CHECK([$1], [$2], 1571d769e936Smrg [$2=no 1572d769e936Smrg save_LDFLAGS="$LDFLAGS" 1573d769e936Smrg LDFLAGS="$LDFLAGS $3" 1574d769e936Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1575d769e936Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1576d769e936Smrg # The linker can only warn and ignore the option if not recognized 1577d769e936Smrg # So say no if there are warnings 1578d769e936Smrg if test -s conftest.err; then 1579d769e936Smrg # Append any errors to the config.log. 1580d769e936Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1581d769e936Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1582d769e936Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1583d769e936Smrg if diff conftest.exp conftest.er2 >/dev/null; then 1584d769e936Smrg $2=yes 1585d769e936Smrg fi 1586d769e936Smrg else 1587d769e936Smrg $2=yes 1588d769e936Smrg fi 1589d769e936Smrg fi 1590d769e936Smrg $RM -r conftest* 1591d769e936Smrg LDFLAGS="$save_LDFLAGS" 1592d769e936Smrg]) 1593d769e936Smrg 1594d769e936Smrgif test x"[$]$2" = xyes; then 1595d769e936Smrg m4_if([$4], , :, [$4]) 1596d769e936Smrgelse 1597d769e936Smrg m4_if([$5], , :, [$5]) 1598d769e936Smrgfi 1599d769e936Smrg])# _LT_LINKER_OPTION 1600d769e936Smrg 1601d769e936Smrg# Old name: 1602d769e936SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1603d769e936Smrgdnl aclocal-1.4 backwards compatibility: 1604d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1605d769e936Smrg 1606d769e936Smrg 1607d769e936Smrg# LT_CMD_MAX_LEN 1608d769e936Smrg#--------------- 1609d769e936SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1610d769e936Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1611d769e936Smrg# find the maximum length of command line arguments 1612d769e936SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1613d769e936SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1614d769e936Smrg i=0 1615d769e936Smrg teststring="ABCD" 1616d769e936Smrg 1617d769e936Smrg case $build_os in 1618d769e936Smrg msdosdjgpp*) 1619d769e936Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1620d769e936Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1621d769e936Smrg # during glob expansion). Even if it were fixed, the result of this 1622d769e936Smrg # check would be larger than it should be. 1623d769e936Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1624d769e936Smrg ;; 1625d769e936Smrg 1626d769e936Smrg gnu*) 1627d769e936Smrg # Under GNU Hurd, this test is not required because there is 1628d769e936Smrg # no limit to the length of command line arguments. 1629d769e936Smrg # Libtool will interpret -1 as no limit whatsoever 1630d769e936Smrg lt_cv_sys_max_cmd_len=-1; 1631d769e936Smrg ;; 1632d769e936Smrg 1633d769e936Smrg cygwin* | mingw* | cegcc*) 1634d769e936Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1635d769e936Smrg # about 5 minutes as the teststring grows exponentially. 1636d769e936Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 1637d769e936Smrg # you end up with a "frozen" computer, even though with patience 1638d769e936Smrg # the test eventually succeeds (with a max line length of 256k). 1639d769e936Smrg # Instead, let's just punt: use the minimum linelength reported by 1640d769e936Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 1641d769e936Smrg lt_cv_sys_max_cmd_len=8192; 1642d769e936Smrg ;; 1643d769e936Smrg 1644d769e936Smrg mint*) 1645d769e936Smrg # On MiNT this can take a long time and run out of memory. 1646d769e936Smrg lt_cv_sys_max_cmd_len=8192; 1647d769e936Smrg ;; 1648d769e936Smrg 1649d769e936Smrg amigaos*) 1650d769e936Smrg # On AmigaOS with pdksh, this test takes hours, literally. 1651d769e936Smrg # So we just punt and use a minimum line length of 8192. 1652d769e936Smrg lt_cv_sys_max_cmd_len=8192; 1653d769e936Smrg ;; 1654d769e936Smrg 1655d769e936Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1656d769e936Smrg # This has been around since 386BSD, at least. Likely further. 1657d769e936Smrg if test -x /sbin/sysctl; then 1658d769e936Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1659d769e936Smrg elif test -x /usr/sbin/sysctl; then 1660d769e936Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1661d769e936Smrg else 1662d769e936Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1663d769e936Smrg fi 1664d769e936Smrg # And add a safety zone 1665d769e936Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1666d769e936Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1667d769e936Smrg ;; 1668d769e936Smrg 1669d769e936Smrg interix*) 1670d769e936Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1671d769e936Smrg lt_cv_sys_max_cmd_len=196608 1672d769e936Smrg ;; 1673d769e936Smrg 1674d769e936Smrg os2*) 1675d769e936Smrg # The test takes a long time on OS/2. 1676d769e936Smrg lt_cv_sys_max_cmd_len=8192 1677d769e936Smrg ;; 1678d769e936Smrg 1679d769e936Smrg osf*) 1680d769e936Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1681d769e936Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1682d769e936Smrg # nice to cause kernel panics so lets avoid the loop below. 1683d769e936Smrg # First set a reasonable default. 1684d769e936Smrg lt_cv_sys_max_cmd_len=16384 1685d769e936Smrg # 1686d769e936Smrg if test -x /sbin/sysconfig; then 1687d769e936Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1688d769e936Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1689d769e936Smrg esac 1690d769e936Smrg fi 1691d769e936Smrg ;; 1692d769e936Smrg sco3.2v5*) 1693d769e936Smrg lt_cv_sys_max_cmd_len=102400 1694d769e936Smrg ;; 1695d769e936Smrg sysv5* | sco5v6* | sysv4.2uw2*) 1696d769e936Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1697d769e936Smrg if test -n "$kargmax"; then 1698d769e936Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1699d769e936Smrg else 1700d769e936Smrg lt_cv_sys_max_cmd_len=32768 1701d769e936Smrg fi 1702d769e936Smrg ;; 1703d769e936Smrg *) 1704d769e936Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1705d769e936Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 1706d769e936Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1707d769e936Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1708d769e936Smrg else 1709d769e936Smrg # Make teststring a little bigger before we do anything with it. 1710d769e936Smrg # a 1K string should be a reasonable start. 1711d769e936Smrg for i in 1 2 3 4 5 6 7 8 ; do 1712d769e936Smrg teststring=$teststring$teststring 1713d769e936Smrg done 1714d769e936Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1715d769e936Smrg # If test is not a shell built-in, we'll probably end up computing a 1716d769e936Smrg # maximum length that is only half of the actual maximum length, but 1717d769e936Smrg # we can't tell. 1718d769e936Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 1719d769e936Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1720d769e936Smrg test $i != 17 # 1/2 MB should be enough 1721d769e936Smrg do 1722d769e936Smrg i=`expr $i + 1` 1723d769e936Smrg teststring=$teststring$teststring 1724d769e936Smrg done 1725d769e936Smrg # Only check the string length outside the loop. 1726d769e936Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1727d769e936Smrg teststring= 1728d769e936Smrg # Add a significant safety factor because C++ compilers can tack on 1729d769e936Smrg # massive amounts of additional arguments before passing them to the 1730d769e936Smrg # linker. It appears as though 1/2 is a usable value. 1731d769e936Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1732d769e936Smrg fi 1733d769e936Smrg ;; 1734d769e936Smrg esac 1735d769e936Smrg]) 1736d769e936Smrgif test -n $lt_cv_sys_max_cmd_len ; then 1737d769e936Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1738d769e936Smrgelse 1739d769e936Smrg AC_MSG_RESULT(none) 1740d769e936Smrgfi 1741d769e936Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1742d769e936Smrg_LT_DECL([], [max_cmd_len], [0], 1743d769e936Smrg [What is the maximum length of a command?]) 1744d769e936Smrg])# LT_CMD_MAX_LEN 1745d769e936Smrg 1746d769e936Smrg# Old name: 1747d769e936SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1748d769e936Smrgdnl aclocal-1.4 backwards compatibility: 1749d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1750d769e936Smrg 1751d769e936Smrg 1752d769e936Smrg# _LT_HEADER_DLFCN 1753d769e936Smrg# ---------------- 1754d769e936Smrgm4_defun([_LT_HEADER_DLFCN], 1755d769e936Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1756d769e936Smrg])# _LT_HEADER_DLFCN 1757d769e936Smrg 1758d769e936Smrg 1759d769e936Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1760d769e936Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1761d769e936Smrg# ---------------------------------------------------------------- 1762d769e936Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1763d769e936Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1764d769e936Smrgif test "$cross_compiling" = yes; then : 1765d769e936Smrg [$4] 1766d769e936Smrgelse 1767d769e936Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1768d769e936Smrg lt_status=$lt_dlunknown 1769d769e936Smrg cat > conftest.$ac_ext <<_LT_EOF 1770d769e936Smrg[#line $LINENO "configure" 1771d769e936Smrg#include "confdefs.h" 1772d769e936Smrg 1773d769e936Smrg#if HAVE_DLFCN_H 1774d769e936Smrg#include <dlfcn.h> 1775d769e936Smrg#endif 1776d769e936Smrg 1777d769e936Smrg#include <stdio.h> 1778d769e936Smrg 1779d769e936Smrg#ifdef RTLD_GLOBAL 1780d769e936Smrg# define LT_DLGLOBAL RTLD_GLOBAL 1781d769e936Smrg#else 1782d769e936Smrg# ifdef DL_GLOBAL 1783d769e936Smrg# define LT_DLGLOBAL DL_GLOBAL 1784d769e936Smrg# else 1785d769e936Smrg# define LT_DLGLOBAL 0 1786d769e936Smrg# endif 1787d769e936Smrg#endif 1788d769e936Smrg 1789d769e936Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1790d769e936Smrg find out it does not work in some platform. */ 1791d769e936Smrg#ifndef LT_DLLAZY_OR_NOW 1792d769e936Smrg# ifdef RTLD_LAZY 1793d769e936Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1794d769e936Smrg# else 1795d769e936Smrg# ifdef DL_LAZY 1796d769e936Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 1797d769e936Smrg# else 1798d769e936Smrg# ifdef RTLD_NOW 1799d769e936Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1800d769e936Smrg# else 1801d769e936Smrg# ifdef DL_NOW 1802d769e936Smrg# define LT_DLLAZY_OR_NOW DL_NOW 1803d769e936Smrg# else 1804d769e936Smrg# define LT_DLLAZY_OR_NOW 0 1805d769e936Smrg# endif 1806d769e936Smrg# endif 1807d769e936Smrg# endif 1808d769e936Smrg# endif 1809d769e936Smrg#endif 1810d769e936Smrg 1811d769e936Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 1812d769e936Smrg correspondingly for the symbols needed. */ 1813d769e936Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1814d769e936Smrgint fnord () __attribute__((visibility("default"))); 1815d769e936Smrg#endif 1816d769e936Smrg 1817d769e936Smrgint fnord () { return 42; } 1818d769e936Smrgint main () 1819d769e936Smrg{ 1820d769e936Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1821d769e936Smrg int status = $lt_dlunknown; 1822d769e936Smrg 1823d769e936Smrg if (self) 1824d769e936Smrg { 1825d769e936Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1826d769e936Smrg else 1827d769e936Smrg { 1828d769e936Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1829d769e936Smrg else puts (dlerror ()); 1830d769e936Smrg } 1831d769e936Smrg /* dlclose (self); */ 1832d769e936Smrg } 1833d769e936Smrg else 1834d769e936Smrg puts (dlerror ()); 1835d769e936Smrg 1836d769e936Smrg return status; 1837d769e936Smrg}] 1838d769e936Smrg_LT_EOF 1839d769e936Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1840d769e936Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1841d769e936Smrg lt_status=$? 1842d769e936Smrg case x$lt_status in 1843d769e936Smrg x$lt_dlno_uscore) $1 ;; 1844d769e936Smrg x$lt_dlneed_uscore) $2 ;; 1845d769e936Smrg x$lt_dlunknown|x*) $3 ;; 1846d769e936Smrg esac 1847d769e936Smrg else : 1848d769e936Smrg # compilation failed 1849d769e936Smrg $3 1850d769e936Smrg fi 1851d769e936Smrgfi 1852d769e936Smrgrm -fr conftest* 1853d769e936Smrg])# _LT_TRY_DLOPEN_SELF 1854d769e936Smrg 1855d769e936Smrg 1856d769e936Smrg# LT_SYS_DLOPEN_SELF 1857d769e936Smrg# ------------------ 1858d769e936SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1859d769e936Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1860d769e936Smrgif test "x$enable_dlopen" != xyes; then 1861d769e936Smrg enable_dlopen=unknown 1862d769e936Smrg enable_dlopen_self=unknown 1863d769e936Smrg enable_dlopen_self_static=unknown 1864d769e936Smrgelse 1865d769e936Smrg lt_cv_dlopen=no 1866d769e936Smrg lt_cv_dlopen_libs= 1867d769e936Smrg 1868d769e936Smrg case $host_os in 1869d769e936Smrg beos*) 1870d769e936Smrg lt_cv_dlopen="load_add_on" 1871d769e936Smrg lt_cv_dlopen_libs= 1872d769e936Smrg lt_cv_dlopen_self=yes 1873d769e936Smrg ;; 1874d769e936Smrg 1875d769e936Smrg mingw* | pw32* | cegcc*) 1876d769e936Smrg lt_cv_dlopen="LoadLibrary" 1877d769e936Smrg lt_cv_dlopen_libs= 1878d769e936Smrg ;; 1879d769e936Smrg 1880d769e936Smrg cygwin*) 1881d769e936Smrg lt_cv_dlopen="dlopen" 1882d769e936Smrg lt_cv_dlopen_libs= 1883d769e936Smrg ;; 1884d769e936Smrg 1885d769e936Smrg darwin*) 1886d769e936Smrg # if libdl is installed we need to link against it 1887d769e936Smrg AC_CHECK_LIB([dl], [dlopen], 1888d769e936Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1889d769e936Smrg lt_cv_dlopen="dyld" 1890d769e936Smrg lt_cv_dlopen_libs= 1891d769e936Smrg lt_cv_dlopen_self=yes 1892d769e936Smrg ]) 1893d769e936Smrg ;; 1894d769e936Smrg 1895d769e936Smrg *) 1896d769e936Smrg AC_CHECK_FUNC([shl_load], 1897d769e936Smrg [lt_cv_dlopen="shl_load"], 1898d769e936Smrg [AC_CHECK_LIB([dld], [shl_load], 1899d769e936Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1900d769e936Smrg [AC_CHECK_FUNC([dlopen], 1901d769e936Smrg [lt_cv_dlopen="dlopen"], 1902d769e936Smrg [AC_CHECK_LIB([dl], [dlopen], 1903d769e936Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1904d769e936Smrg [AC_CHECK_LIB([svld], [dlopen], 1905d769e936Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1906d769e936Smrg [AC_CHECK_LIB([dld], [dld_link], 1907d769e936Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1908d769e936Smrg ]) 1909d769e936Smrg ]) 1910d769e936Smrg ]) 1911d769e936Smrg ]) 1912d769e936Smrg ]) 1913d769e936Smrg ;; 1914d769e936Smrg esac 1915d769e936Smrg 1916d769e936Smrg if test "x$lt_cv_dlopen" != xno; then 1917d769e936Smrg enable_dlopen=yes 1918d769e936Smrg else 1919d769e936Smrg enable_dlopen=no 1920d769e936Smrg fi 1921d769e936Smrg 1922d769e936Smrg case $lt_cv_dlopen in 1923d769e936Smrg dlopen) 1924d769e936Smrg save_CPPFLAGS="$CPPFLAGS" 1925d769e936Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1926d769e936Smrg 1927d769e936Smrg save_LDFLAGS="$LDFLAGS" 1928d769e936Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1929d769e936Smrg 1930d769e936Smrg save_LIBS="$LIBS" 1931d769e936Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 1932d769e936Smrg 1933d769e936Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 1934d769e936Smrg lt_cv_dlopen_self, [dnl 1935d769e936Smrg _LT_TRY_DLOPEN_SELF( 1936d769e936Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1937d769e936Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1938d769e936Smrg ]) 1939d769e936Smrg 1940d769e936Smrg if test "x$lt_cv_dlopen_self" = xyes; then 1941d769e936Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1942d769e936Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1943d769e936Smrg lt_cv_dlopen_self_static, [dnl 1944d769e936Smrg _LT_TRY_DLOPEN_SELF( 1945d769e936Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1946d769e936Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1947d769e936Smrg ]) 1948d769e936Smrg fi 1949d769e936Smrg 1950d769e936Smrg CPPFLAGS="$save_CPPFLAGS" 1951d769e936Smrg LDFLAGS="$save_LDFLAGS" 1952d769e936Smrg LIBS="$save_LIBS" 1953d769e936Smrg ;; 1954d769e936Smrg esac 1955d769e936Smrg 1956d769e936Smrg case $lt_cv_dlopen_self in 1957d769e936Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1958d769e936Smrg *) enable_dlopen_self=unknown ;; 1959d769e936Smrg esac 1960d769e936Smrg 1961d769e936Smrg case $lt_cv_dlopen_self_static in 1962d769e936Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1963d769e936Smrg *) enable_dlopen_self_static=unknown ;; 1964d769e936Smrg esac 1965d769e936Smrgfi 1966d769e936Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1967d769e936Smrg [Whether dlopen is supported]) 1968d769e936Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1969d769e936Smrg [Whether dlopen of programs is supported]) 1970d769e936Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1971d769e936Smrg [Whether dlopen of statically linked programs is supported]) 1972d769e936Smrg])# LT_SYS_DLOPEN_SELF 1973d769e936Smrg 1974d769e936Smrg# Old name: 1975d769e936SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1976d769e936Smrgdnl aclocal-1.4 backwards compatibility: 1977d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1978d769e936Smrg 1979d769e936Smrg 1980d769e936Smrg# _LT_COMPILER_C_O([TAGNAME]) 1981d769e936Smrg# --------------------------- 1982d769e936Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 1983d769e936Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1984d769e936Smrgm4_defun([_LT_COMPILER_C_O], 1985d769e936Smrg[m4_require([_LT_DECL_SED])dnl 1986d769e936Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1987d769e936Smrgm4_require([_LT_TAG_COMPILER])dnl 1988d769e936SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1989d769e936Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1990d769e936Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1991d769e936Smrg $RM -r conftest 2>/dev/null 1992d769e936Smrg mkdir conftest 1993d769e936Smrg cd conftest 1994d769e936Smrg mkdir out 1995d769e936Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1996d769e936Smrg 1997d769e936Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1998d769e936Smrg # Insert the option either (1) after the last *FLAGS variable, or 1999d769e936Smrg # (2) before a word containing "conftest.", or (3) at the end. 2000d769e936Smrg # Note that $ac_compile itself does not contain backslashes and begins 2001d769e936Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2002d769e936Smrg lt_compile=`echo "$ac_compile" | $SED \ 2003d769e936Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2004d769e936Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2005d769e936Smrg -e 's:$: $lt_compiler_flag:'` 2006d769e936Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2007d769e936Smrg (eval "$lt_compile" 2>out/conftest.err) 2008d769e936Smrg ac_status=$? 2009d769e936Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2010d769e936Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2011d769e936Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2012d769e936Smrg then 2013d769e936Smrg # The compiler can only warn and ignore the option if not recognized 2014d769e936Smrg # So say no if there are warnings 2015d769e936Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2016d769e936Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2017d769e936Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2018d769e936Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2019d769e936Smrg fi 2020d769e936Smrg fi 2021d769e936Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2022d769e936Smrg $RM conftest* 2023d769e936Smrg # SGI C++ compiler will create directory out/ii_files/ for 2024d769e936Smrg # template instantiation 2025d769e936Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2026d769e936Smrg $RM out/* && rmdir out 2027d769e936Smrg cd .. 2028d769e936Smrg $RM -r conftest 2029d769e936Smrg $RM conftest* 2030d769e936Smrg]) 2031d769e936Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2032d769e936Smrg [Does compiler simultaneously support -c and -o options?]) 2033d769e936Smrg])# _LT_COMPILER_C_O 2034d769e936Smrg 2035d769e936Smrg 2036d769e936Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2037d769e936Smrg# ---------------------------------- 2038d769e936Smrg# Check to see if we can do hard links to lock some files if needed 2039d769e936Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2040d769e936Smrg[m4_require([_LT_ENABLE_LOCK])dnl 2041d769e936Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2042d769e936Smrg_LT_COMPILER_C_O([$1]) 2043d769e936Smrg 2044d769e936Smrghard_links="nottested" 2045d769e936Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 2046d769e936Smrg # do not overwrite the value of need_locks provided by the user 2047d769e936Smrg AC_MSG_CHECKING([if we can lock with hard links]) 2048d769e936Smrg hard_links=yes 2049d769e936Smrg $RM conftest* 2050d769e936Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2051d769e936Smrg touch conftest.a 2052d769e936Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 2053d769e936Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2054d769e936Smrg AC_MSG_RESULT([$hard_links]) 2055d769e936Smrg if test "$hard_links" = no; then 2056d769e936Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 2057d769e936Smrg need_locks=warn 2058d769e936Smrg fi 2059d769e936Smrgelse 2060d769e936Smrg need_locks=no 2061d769e936Smrgfi 2062d769e936Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2063d769e936Smrg])# _LT_COMPILER_FILE_LOCKS 2064d769e936Smrg 2065d769e936Smrg 2066d769e936Smrg# _LT_CHECK_OBJDIR 2067d769e936Smrg# ---------------- 2068d769e936Smrgm4_defun([_LT_CHECK_OBJDIR], 2069d769e936Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2070d769e936Smrg[rm -f .libs 2>/dev/null 2071d769e936Smrgmkdir .libs 2>/dev/null 2072d769e936Smrgif test -d .libs; then 2073d769e936Smrg lt_cv_objdir=.libs 2074d769e936Smrgelse 2075d769e936Smrg # MS-DOS does not allow filenames that begin with a dot. 2076d769e936Smrg lt_cv_objdir=_libs 2077d769e936Smrgfi 20781d54945dSmrgrmdir .libs 2>/dev/null]) 20791d54945dSmrgobjdir=$lt_cv_objdir 2080d769e936Smrg_LT_DECL([], [objdir], [0], 2081d769e936Smrg [The name of the directory that contains temporary libtool files])dnl 2082d769e936Smrgm4_pattern_allow([LT_OBJDIR])dnl 2083d769e936SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2084d769e936Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2085d769e936Smrg])# _LT_CHECK_OBJDIR 20861d54945dSmrg 20871d54945dSmrg 2088d769e936Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2089d769e936Smrg# -------------------------------------- 20901d54945dSmrg# Check hardcoding attributes. 2091d769e936Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 20921d54945dSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2093d769e936Smrg_LT_TAGVAR(hardcode_action, $1)= 2094d769e936Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2095d769e936Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2096d769e936Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 20971d54945dSmrg 2098d769e936Smrg # We can hardcode non-existent directories. 2099d769e936Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 21001d54945dSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 21011d54945dSmrg # have to relink, otherwise we might link with an installed library 21021d54945dSmrg # when we should be linking with a yet-to-be-installed one 2103d769e936Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2104d769e936Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 21051d54945dSmrg # Linking always hardcodes the temporary library directory. 2106d769e936Smrg _LT_TAGVAR(hardcode_action, $1)=relink 21071d54945dSmrg else 21081d54945dSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2109d769e936Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 21101d54945dSmrg fi 21111d54945dSmrgelse 21121d54945dSmrg # We cannot hardcode anything, or else we can only hardcode existing 21131d54945dSmrg # directories. 2114d769e936Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 21151d54945dSmrgfi 2116d769e936SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 21171d54945dSmrg 2118d769e936Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2119d769e936Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 21201d54945dSmrg # Fast installation is not supported 21211d54945dSmrg enable_fast_install=no 21221d54945dSmrgelif test "$shlibpath_overrides_runpath" = yes || 21231d54945dSmrg test "$enable_shared" = no; then 21241d54945dSmrg # Fast installation is not necessary 21251d54945dSmrg enable_fast_install=needless 21261d54945dSmrgfi 2127d769e936Smrg_LT_TAGDECL([], [hardcode_action], [0], 2128d769e936Smrg [How to hardcode a shared library path into an executable]) 2129d769e936Smrg])# _LT_LINKER_HARDCODE_LIBPATH 21301d54945dSmrg 21311d54945dSmrg 2132d769e936Smrg# _LT_CMD_STRIPLIB 2133d769e936Smrg# ---------------- 2134d769e936Smrgm4_defun([_LT_CMD_STRIPLIB], 2135d769e936Smrg[m4_require([_LT_DECL_EGREP]) 2136d769e936Smrgstriplib= 21371d54945dSmrgold_striplib= 21381d54945dSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2139d769e936Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 21401d54945dSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 21411d54945dSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 21421d54945dSmrg AC_MSG_RESULT([yes]) 21431d54945dSmrgelse 21441d54945dSmrg# FIXME - insert some real tests, host_os isn't really good enough 21451d54945dSmrg case $host_os in 2146d769e936Smrg darwin*) 2147d769e936Smrg if test -n "$STRIP" ; then 2148d769e936Smrg striplib="$STRIP -x" 2149d769e936Smrg old_striplib="$STRIP -S" 2150d769e936Smrg AC_MSG_RESULT([yes]) 2151d769e936Smrg else 2152d769e936Smrg AC_MSG_RESULT([no]) 2153d769e936Smrg fi 2154d769e936Smrg ;; 2155d769e936Smrg *) 2156d769e936Smrg AC_MSG_RESULT([no]) 2157d769e936Smrg ;; 2158d769e936Smrg esac 2159d769e936Smrgfi 2160d769e936Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2161d769e936Smrg_LT_DECL([], [striplib], [1]) 2162d769e936Smrg])# _LT_CMD_STRIPLIB 2163d769e936Smrg 2164d769e936Smrg 2165d769e936Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2166d769e936Smrg# ----------------------------- 2167d769e936Smrg# PORTME Fill in your ld.so characteristics 2168d769e936Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2169d769e936Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2170d769e936Smrgm4_require([_LT_DECL_EGREP])dnl 2171d769e936Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2172d769e936Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2173d769e936Smrgm4_require([_LT_DECL_SED])dnl 2174d769e936Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2175d769e936SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2176d769e936Smrgm4_if([$1], 2177d769e936Smrg [], [ 21781d54945dSmrgif test "$GCC" = yes; then 2179ba85709eSmrg case $host_os in 2180ba85709eSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2181ba85709eSmrg *) lt_awk_arg="/^libraries:/" ;; 2182ba85709eSmrg esac 2183d769e936Smrg case $host_os in 2184d769e936Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2185d769e936Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 2186d769e936Smrg esac 2187d769e936Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2188d769e936Smrg case $lt_search_path_spec in 2189d769e936Smrg *\;*) 21901d54945dSmrg # if the path contains ";" then we assume it to be the separator 21911d54945dSmrg # otherwise default to the standard path separator (i.e. ":") - it is 21921d54945dSmrg # assumed that no part of a normal pathname contains ";" but that should 21931d54945dSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2194d769e936Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2195d769e936Smrg ;; 2196d769e936Smrg *) 2197d769e936Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2198d769e936Smrg ;; 2199d769e936Smrg esac 2200ba85709eSmrg # Ok, now we have the path, separated by spaces, we can step through it 2201ba85709eSmrg # and add multilib dir if necessary. 2202ba85709eSmrg lt_tmp_lt_search_path_spec= 2203ba85709eSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2204ba85709eSmrg for lt_sys_path in $lt_search_path_spec; do 2205ba85709eSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2206ba85709eSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2207ba85709eSmrg else 2208ba85709eSmrg test -d "$lt_sys_path" && \ 2209ba85709eSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2210ba85709eSmrg fi 2211ba85709eSmrg done 2212d769e936Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2213ba85709eSmrgBEGIN {RS=" "; FS="/|\n";} { 2214ba85709eSmrg lt_foo=""; 2215ba85709eSmrg lt_count=0; 2216ba85709eSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 2217ba85709eSmrg if ($lt_i != "" && $lt_i != ".") { 2218ba85709eSmrg if ($lt_i == "..") { 2219ba85709eSmrg lt_count++; 2220ba85709eSmrg } else { 2221ba85709eSmrg if (lt_count == 0) { 2222ba85709eSmrg lt_foo="/" $lt_i lt_foo; 2223ba85709eSmrg } else { 2224ba85709eSmrg lt_count--; 2225ba85709eSmrg } 2226ba85709eSmrg } 2227ba85709eSmrg } 2228ba85709eSmrg } 2229ba85709eSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2230ba85709eSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2231ba85709eSmrg}'` 2232d769e936Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 2233d769e936Smrg # for these hosts. 2234d769e936Smrg case $host_os in 2235d769e936Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2236d769e936Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2237d769e936Smrg esac 2238d769e936Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 22391d54945dSmrgelse 22401d54945dSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2241ba85709eSmrgfi]) 2242d769e936Smrglibrary_names_spec= 2243d769e936Smrglibname_spec='lib$name' 2244d769e936Smrgsoname_spec= 2245d769e936Smrgshrext_cmds=".so" 2246d769e936Smrgpostinstall_cmds= 2247d769e936Smrgpostuninstall_cmds= 2248d769e936Smrgfinish_cmds= 2249d769e936Smrgfinish_eval= 2250d769e936Smrgshlibpath_var= 2251d769e936Smrgshlibpath_overrides_runpath=unknown 2252d769e936Smrgversion_type=none 2253d769e936Smrgdynamic_linker="$host_os ld.so" 2254d769e936Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 22551d54945dSmrgneed_lib_prefix=unknown 22561d54945dSmrghardcode_into_libs=no 22571d54945dSmrg 22581d54945dSmrg# when you set need_version to no, make sure it does not cause -set_version 22591d54945dSmrg# flags to be left without arguments 22601d54945dSmrgneed_version=unknown 22611d54945dSmrg 22621d54945dSmrgcase $host_os in 22631d54945dSmrgaix3*) 2264d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 22651d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 22661d54945dSmrg shlibpath_var=LIBPATH 22671d54945dSmrg 22681d54945dSmrg # AIX 3 has no versioning support, so we append a major version to the name. 22691d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 22701d54945dSmrg ;; 22711d54945dSmrg 2272ba85709eSmrgaix[[4-9]]*) 2273d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 22741d54945dSmrg need_lib_prefix=no 22751d54945dSmrg need_version=no 22761d54945dSmrg hardcode_into_libs=yes 22771d54945dSmrg if test "$host_cpu" = ia64; then 22781d54945dSmrg # AIX 5 supports IA64 22791d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 22801d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 22811d54945dSmrg else 22821d54945dSmrg # With GCC up to 2.95.x, collect2 would create an import file 22831d54945dSmrg # for dependence libraries. The import file would start with 22841d54945dSmrg # the line `#! .'. This would cause the generated library to 22851d54945dSmrg # depend on `.', always an invalid library. This was fixed in 22861d54945dSmrg # development snapshots of GCC prior to 3.0. 22871d54945dSmrg case $host_os in 22881d54945dSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 22891d54945dSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 22901d54945dSmrg echo ' yes ' 2291d769e936Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 22921d54945dSmrg : 22931d54945dSmrg else 22941d54945dSmrg can_build_shared=no 22951d54945dSmrg fi 22961d54945dSmrg ;; 22971d54945dSmrg esac 22981d54945dSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 22991d54945dSmrg # soname into executable. Probably we can add versioning support to 23001d54945dSmrg # collect2, so additional links can be useful in future. 23011d54945dSmrg if test "$aix_use_runtimelinking" = yes; then 23021d54945dSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 23031d54945dSmrg # instead of lib<name>.a to let people know that these are not 23041d54945dSmrg # typical AIX shared libraries. 23051d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23061d54945dSmrg else 23071d54945dSmrg # We preserve .a as extension for shared libraries through AIX4.2 23081d54945dSmrg # and later when we are not doing run time linking. 23091d54945dSmrg library_names_spec='${libname}${release}.a $libname.a' 23101d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 23111d54945dSmrg fi 23121d54945dSmrg shlibpath_var=LIBPATH 23131d54945dSmrg fi 23141d54945dSmrg ;; 23151d54945dSmrg 23161d54945dSmrgamigaos*) 2317d769e936Smrg case $host_cpu in 2318d769e936Smrg powerpc) 2319d769e936Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2320d769e936Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2321d769e936Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2322d769e936Smrg ;; 2323d769e936Smrg m68k) 2324d769e936Smrg library_names_spec='$libname.ixlibrary $libname.a' 2325d769e936Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2326d769e936Smrg 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' 2327d769e936Smrg ;; 2328d769e936Smrg esac 23291d54945dSmrg ;; 23301d54945dSmrg 23311d54945dSmrgbeos*) 23321d54945dSmrg library_names_spec='${libname}${shared_ext}' 23331d54945dSmrg dynamic_linker="$host_os ld.so" 23341d54945dSmrg shlibpath_var=LIBRARY_PATH 23351d54945dSmrg ;; 23361d54945dSmrg 23371d54945dSmrgbsdi[[45]]*) 2338d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 23391d54945dSmrg need_version=no 23401d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23411d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 23421d54945dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 23431d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 23441d54945dSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 23451d54945dSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 23461d54945dSmrg # the default ld.so.conf also contains /usr/contrib/lib and 23471d54945dSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 23481d54945dSmrg # libtool to hard-code these into programs 23491d54945dSmrg ;; 23501d54945dSmrg 2351d769e936Smrgcygwin* | mingw* | pw32* | cegcc*) 23521d54945dSmrg version_type=windows 23531d54945dSmrg shrext_cmds=".dll" 23541d54945dSmrg need_version=no 23551d54945dSmrg need_lib_prefix=no 23561d54945dSmrg 2357d769e936Smrg case $GCC,$cc_basename in 2358d769e936Smrg yes,*) 2359d769e936Smrg # gcc 23601d54945dSmrg library_names_spec='$libname.dll.a' 23611d54945dSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 23621d54945dSmrg postinstall_cmds='base_file=`basename \${file}`~ 2363d769e936Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 23641d54945dSmrg dldir=$destdir/`dirname \$dlpath`~ 23651d54945dSmrg test -d \$dldir || mkdir -p \$dldir~ 23661d54945dSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2367d769e936Smrg chmod a+x \$dldir/$dlname~ 2368d769e936Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2369d769e936Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2370d769e936Smrg fi' 23711d54945dSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 23721d54945dSmrg dlpath=$dir/\$dldll~ 2373d769e936Smrg $RM \$dlpath' 23741d54945dSmrg shlibpath_overrides_runpath=yes 23751d54945dSmrg 23761d54945dSmrg case $host_os in 23771d54945dSmrg cygwin*) 23781d54945dSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 23791d54945dSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2380d769e936Smrgm4_if([$1], [],[ 2381d769e936Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 23821d54945dSmrg ;; 2383d769e936Smrg mingw* | cegcc*) 23841d54945dSmrg # MinGW DLLs use traditional 'lib' prefix 23851d54945dSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23861d54945dSmrg ;; 23871d54945dSmrg pw32*) 23881d54945dSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 23891d54945dSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23901d54945dSmrg ;; 23911d54945dSmrg esac 2392d769e936Smrg dynamic_linker='Win32 ld.exe' 2393d769e936Smrg ;; 2394d769e936Smrg 2395d769e936Smrg *,cl*) 2396d769e936Smrg # Native MSVC 2397d769e936Smrg libname_spec='$name' 2398d769e936Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2399d769e936Smrg library_names_spec='${libname}.dll.lib' 2400d769e936Smrg 2401d769e936Smrg case $build_os in 2402d769e936Smrg mingw*) 2403d769e936Smrg sys_lib_search_path_spec= 2404d769e936Smrg lt_save_ifs=$IFS 2405d769e936Smrg IFS=';' 2406d769e936Smrg for lt_path in $LIB 2407d769e936Smrg do 2408d769e936Smrg IFS=$lt_save_ifs 2409d769e936Smrg # Let DOS variable expansion print the short 8.3 style file name. 2410d769e936Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2411d769e936Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2412d769e936Smrg done 2413d769e936Smrg IFS=$lt_save_ifs 2414d769e936Smrg # Convert to MSYS style. 2415d769e936Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2416d769e936Smrg ;; 2417d769e936Smrg cygwin*) 2418d769e936Smrg # Convert to unix form, then to dos form, then back to unix form 2419d769e936Smrg # but this time dos style (no spaces!) so that the unix form looks 2420d769e936Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2421d769e936Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2422d769e936Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2423d769e936Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2424d769e936Smrg ;; 2425d769e936Smrg *) 2426d769e936Smrg sys_lib_search_path_spec="$LIB" 2427d769e936Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2428d769e936Smrg # It is most probably a Windows format PATH. 2429d769e936Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2430d769e936Smrg else 2431d769e936Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2432d769e936Smrg fi 2433d769e936Smrg # FIXME: find the short name or the path components, as spaces are 2434d769e936Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2435d769e936Smrg ;; 2436d769e936Smrg esac 2437d769e936Smrg 2438d769e936Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2439d769e936Smrg postinstall_cmds='base_file=`basename \${file}`~ 2440d769e936Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2441d769e936Smrg dldir=$destdir/`dirname \$dlpath`~ 2442d769e936Smrg test -d \$dldir || mkdir -p \$dldir~ 2443d769e936Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2444d769e936Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2445d769e936Smrg dlpath=$dir/\$dldll~ 2446d769e936Smrg $RM \$dlpath' 2447d769e936Smrg shlibpath_overrides_runpath=yes 2448d769e936Smrg dynamic_linker='Win32 link.exe' 24491d54945dSmrg ;; 24501d54945dSmrg 24511d54945dSmrg *) 2452d769e936Smrg # Assume MSVC wrapper 24531d54945dSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2454d769e936Smrg dynamic_linker='Win32 ld.exe' 24551d54945dSmrg ;; 24561d54945dSmrg esac 24571d54945dSmrg # FIXME: first we should search . and the directory the executable is in 24581d54945dSmrg shlibpath_var=PATH 24591d54945dSmrg ;; 24601d54945dSmrg 24611d54945dSmrgdarwin* | rhapsody*) 24621d54945dSmrg dynamic_linker="$host_os dyld" 24631d54945dSmrg version_type=darwin 24641d54945dSmrg need_lib_prefix=no 24651d54945dSmrg need_version=no 2466d769e936Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 24671d54945dSmrg soname_spec='${libname}${release}${major}$shared_ext' 24681d54945dSmrg shlibpath_overrides_runpath=yes 24691d54945dSmrg shlibpath_var=DYLD_LIBRARY_PATH 24701d54945dSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2471d769e936Smrgm4_if([$1], [],[ 2472d769e936Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 24731d54945dSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 24741d54945dSmrg ;; 24751d54945dSmrg 24761d54945dSmrgdgux*) 2477d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 24781d54945dSmrg need_lib_prefix=no 24791d54945dSmrg need_version=no 24801d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 24811d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 24821d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 24831d54945dSmrg ;; 24841d54945dSmrg 24851d54945dSmrgfreebsd* | dragonfly*) 24861d54945dSmrg # DragonFly does not have aout. When/if they implement a new 24871d54945dSmrg # versioning mechanism, adjust this. 24881d54945dSmrg if test -x /usr/bin/objformat; then 24891d54945dSmrg objformat=`/usr/bin/objformat` 24901d54945dSmrg else 24911d54945dSmrg case $host_os in 2492d769e936Smrg freebsd[[23]].*) objformat=aout ;; 24931d54945dSmrg *) objformat=elf ;; 24941d54945dSmrg esac 24951d54945dSmrg fi 24961d54945dSmrg version_type=freebsd-$objformat 24971d54945dSmrg case $version_type in 24981d54945dSmrg freebsd-elf*) 24991d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 25001d54945dSmrg need_version=no 25011d54945dSmrg need_lib_prefix=no 25021d54945dSmrg ;; 25031d54945dSmrg freebsd-*) 25041d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 25051d54945dSmrg need_version=yes 25061d54945dSmrg ;; 25071d54945dSmrg esac 25081d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 25091d54945dSmrg case $host_os in 2510d769e936Smrg freebsd2.*) 25111d54945dSmrg shlibpath_overrides_runpath=yes 25121d54945dSmrg ;; 25131d54945dSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 25141d54945dSmrg shlibpath_overrides_runpath=yes 25151d54945dSmrg hardcode_into_libs=yes 25161d54945dSmrg ;; 25171d54945dSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 25181d54945dSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 25191d54945dSmrg shlibpath_overrides_runpath=no 25201d54945dSmrg hardcode_into_libs=yes 25211d54945dSmrg ;; 2522ba85709eSmrg *) # from 4.6 on, and DragonFly 25231d54945dSmrg shlibpath_overrides_runpath=yes 25241d54945dSmrg hardcode_into_libs=yes 25251d54945dSmrg ;; 25261d54945dSmrg esac 25271d54945dSmrg ;; 25281d54945dSmrg 25291d54945dSmrggnu*) 2530d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 25311d54945dSmrg need_lib_prefix=no 25321d54945dSmrg need_version=no 25331d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 25341d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 25351d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 2536d769e936Smrg shlibpath_overrides_runpath=no 2537d769e936Smrg hardcode_into_libs=yes 2538d769e936Smrg ;; 2539d769e936Smrg 2540d769e936Smrghaiku*) 2541d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 2542d769e936Smrg need_lib_prefix=no 2543d769e936Smrg need_version=no 2544d769e936Smrg dynamic_linker="$host_os runtime_loader" 2545d769e936Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2546d769e936Smrg soname_spec='${libname}${release}${shared_ext}$major' 2547d769e936Smrg shlibpath_var=LIBRARY_PATH 2548d769e936Smrg shlibpath_overrides_runpath=yes 2549d769e936Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 25501d54945dSmrg hardcode_into_libs=yes 25511d54945dSmrg ;; 25521d54945dSmrg 25531d54945dSmrghpux9* | hpux10* | hpux11*) 25541d54945dSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 25551d54945dSmrg # link against other versions. 25561d54945dSmrg version_type=sunos 25571d54945dSmrg need_lib_prefix=no 25581d54945dSmrg need_version=no 25591d54945dSmrg case $host_cpu in 25601d54945dSmrg ia64*) 25611d54945dSmrg shrext_cmds='.so' 25621d54945dSmrg hardcode_into_libs=yes 25631d54945dSmrg dynamic_linker="$host_os dld.so" 25641d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 25651d54945dSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25661d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25671d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 25681d54945dSmrg if test "X$HPUX_IA64_MODE" = X32; then 25691d54945dSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 25701d54945dSmrg else 25711d54945dSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 25721d54945dSmrg fi 25731d54945dSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25741d54945dSmrg ;; 2575d769e936Smrg hppa*64*) 2576d769e936Smrg shrext_cmds='.sl' 2577d769e936Smrg hardcode_into_libs=yes 2578d769e936Smrg dynamic_linker="$host_os dld.sl" 2579d769e936Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2580d769e936Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2581d769e936Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2582d769e936Smrg soname_spec='${libname}${release}${shared_ext}$major' 2583d769e936Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2584d769e936Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2585d769e936Smrg ;; 2586d769e936Smrg *) 25871d54945dSmrg shrext_cmds='.sl' 25881d54945dSmrg dynamic_linker="$host_os dld.sl" 25891d54945dSmrg shlibpath_var=SHLIB_PATH 25901d54945dSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 25911d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25921d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 25931d54945dSmrg ;; 25941d54945dSmrg esac 2595d769e936Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 25961d54945dSmrg postinstall_cmds='chmod 555 $lib' 2597d769e936Smrg # or fails outright, so override atomically: 2598d769e936Smrg install_override_mode=555 25991d54945dSmrg ;; 26001d54945dSmrg 2601ba85709eSmrginterix[[3-9]]*) 2602d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 26031d54945dSmrg need_lib_prefix=no 26041d54945dSmrg need_version=no 26051d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 26061d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 26071d54945dSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 26081d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 26091d54945dSmrg shlibpath_overrides_runpath=no 26101d54945dSmrg hardcode_into_libs=yes 26111d54945dSmrg ;; 26121d54945dSmrg 26131d54945dSmrgirix5* | irix6* | nonstopux*) 26141d54945dSmrg case $host_os in 26151d54945dSmrg nonstopux*) version_type=nonstopux ;; 26161d54945dSmrg *) 26171d54945dSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 2618d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 26191d54945dSmrg else 26201d54945dSmrg version_type=irix 26211d54945dSmrg fi ;; 26221d54945dSmrg esac 26231d54945dSmrg need_lib_prefix=no 26241d54945dSmrg need_version=no 26251d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 26261d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 26271d54945dSmrg case $host_os in 26281d54945dSmrg irix5* | nonstopux*) 26291d54945dSmrg libsuff= shlibsuff= 26301d54945dSmrg ;; 26311d54945dSmrg *) 26321d54945dSmrg case $LD in # libtool.m4 will add one of these switches to LD 26331d54945dSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 26341d54945dSmrg libsuff= shlibsuff= libmagic=32-bit;; 26351d54945dSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 26361d54945dSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 26371d54945dSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 26381d54945dSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 26391d54945dSmrg *) libsuff= shlibsuff= libmagic=never-match;; 26401d54945dSmrg esac 26411d54945dSmrg ;; 26421d54945dSmrg esac 26431d54945dSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 26441d54945dSmrg shlibpath_overrides_runpath=no 26451d54945dSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 26461d54945dSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 26471d54945dSmrg hardcode_into_libs=yes 26481d54945dSmrg ;; 26491d54945dSmrg 26501d54945dSmrg# No shared lib support for Linux oldld, aout, or coff. 26511d54945dSmrglinux*oldld* | linux*aout* | linux*coff*) 26521d54945dSmrg dynamic_linker=no 26531d54945dSmrg ;; 26541d54945dSmrg 2655d769e936Smrg# This must be glibc/ELF. 2656d769e936Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 2657d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 26581d54945dSmrg need_lib_prefix=no 26591d54945dSmrg need_version=no 26601d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26611d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 26621d54945dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 26631d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 26641d54945dSmrg shlibpath_overrides_runpath=no 2665d769e936Smrg 2666d769e936Smrg # Some binutils ld are patched to set DT_RUNPATH 2667d769e936Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2668d769e936Smrg [lt_cv_shlibpath_overrides_runpath=no 2669d769e936Smrg save_LDFLAGS=$LDFLAGS 2670d769e936Smrg save_libdir=$libdir 2671d769e936Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2672d769e936Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2673d769e936Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2674d769e936Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2675d769e936Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2676d769e936Smrg LDFLAGS=$save_LDFLAGS 2677d769e936Smrg libdir=$save_libdir 2678d769e936Smrg ]) 2679d769e936Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2680d769e936Smrg 26811d54945dSmrg # This implies no fast_install, which is unacceptable. 26821d54945dSmrg # Some rework will be needed to allow for fast_install 26831d54945dSmrg # before this can be enabled. 26841d54945dSmrg hardcode_into_libs=yes 2685d769e936Smrg 2686d769e936Smrg # Add ABI-specific directories to the system library path. 2687d769e936Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 26881d54945dSmrg 26891d54945dSmrg # Append ld.so.conf contents to the search path 26901d54945dSmrg if test -f /etc/ld.so.conf; then 2691d769e936Smrg 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' ' '` 2692ba85709eSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2693d769e936Smrg 26941d54945dSmrg fi 26951d54945dSmrg 26961d54945dSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 26971d54945dSmrg # powerpc, because MkLinux only supported shared libraries with the 26981d54945dSmrg # GNU dynamic linker. Since this was broken with cross compilers, 26991d54945dSmrg # most powerpc-linux boxes support dynamic linking these days and 27001d54945dSmrg # people can always --disable-shared, the test was removed, and we 27011d54945dSmrg # assume the GNU/Linux dynamic linker is in use. 27021d54945dSmrg dynamic_linker='GNU/Linux ld.so' 27031d54945dSmrg ;; 27041d54945dSmrg 27051d54945dSmrgnetbsd*) 27061d54945dSmrg version_type=sunos 27071d54945dSmrg need_lib_prefix=no 27081d54945dSmrg need_version=no 2709d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 27101d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 27111d54945dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 27121d54945dSmrg dynamic_linker='NetBSD (a.out) ld.so' 27131d54945dSmrg else 27141d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 27151d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 27161d54945dSmrg dynamic_linker='NetBSD ld.elf_so' 27171d54945dSmrg fi 27181d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 27191d54945dSmrg shlibpath_overrides_runpath=yes 27201d54945dSmrg hardcode_into_libs=yes 27211d54945dSmrg ;; 27221d54945dSmrg 27231d54945dSmrgnewsos6) 2724d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 27251d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27261d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 27271d54945dSmrg shlibpath_overrides_runpath=yes 27281d54945dSmrg ;; 27291d54945dSmrg 2730d769e936Smrg*nto* | *qnx*) 2731d769e936Smrg version_type=qnx 27321d54945dSmrg need_lib_prefix=no 27331d54945dSmrg need_version=no 27341d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27351d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 27361d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 2737d769e936Smrg shlibpath_overrides_runpath=no 2738d769e936Smrg hardcode_into_libs=yes 2739d769e936Smrg dynamic_linker='ldqnx.so' 27401d54945dSmrg ;; 27411d54945dSmrg 27421d54945dSmrgopenbsd*) 27431d54945dSmrg version_type=sunos 27441d54945dSmrg sys_lib_dlsearch_path_spec="/usr/lib" 27451d54945dSmrg need_lib_prefix=no 27461d54945dSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 27471d54945dSmrg case $host_os in 2748d769e936Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2749d769e936Smrg *) need_version=no ;; 27501d54945dSmrg esac 27511d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 27521d54945dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 27531d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 2754d769e936Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 27551d54945dSmrg case $host_os in 27561d54945dSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 27571d54945dSmrg shlibpath_overrides_runpath=no 27581d54945dSmrg ;; 27591d54945dSmrg *) 27601d54945dSmrg shlibpath_overrides_runpath=yes 27611d54945dSmrg ;; 27621d54945dSmrg esac 27631d54945dSmrg else 27641d54945dSmrg shlibpath_overrides_runpath=yes 27651d54945dSmrg fi 27661d54945dSmrg ;; 27671d54945dSmrg 27681d54945dSmrgos2*) 27691d54945dSmrg libname_spec='$name' 27701d54945dSmrg shrext_cmds=".dll" 27711d54945dSmrg need_lib_prefix=no 27721d54945dSmrg library_names_spec='$libname${shared_ext} $libname.a' 27731d54945dSmrg dynamic_linker='OS/2 ld.exe' 27741d54945dSmrg shlibpath_var=LIBPATH 27751d54945dSmrg ;; 27761d54945dSmrg 27771d54945dSmrgosf3* | osf4* | osf5*) 27781d54945dSmrg version_type=osf 27791d54945dSmrg need_lib_prefix=no 27801d54945dSmrg need_version=no 27811d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 27821d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27831d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 27841d54945dSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 27851d54945dSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 27861d54945dSmrg ;; 27871d54945dSmrg 2788ba85709eSmrgrdos*) 2789ba85709eSmrg dynamic_linker=no 2790ba85709eSmrg ;; 2791ba85709eSmrg 27921d54945dSmrgsolaris*) 2793d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 27941d54945dSmrg need_lib_prefix=no 27951d54945dSmrg need_version=no 27961d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27971d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 27981d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 27991d54945dSmrg shlibpath_overrides_runpath=yes 28001d54945dSmrg hardcode_into_libs=yes 28011d54945dSmrg # ldd complains unless libraries are executable 28021d54945dSmrg postinstall_cmds='chmod +x $lib' 28031d54945dSmrg ;; 28041d54945dSmrg 28051d54945dSmrgsunos4*) 28061d54945dSmrg version_type=sunos 28071d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 28081d54945dSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 28091d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 28101d54945dSmrg shlibpath_overrides_runpath=yes 28111d54945dSmrg if test "$with_gnu_ld" = yes; then 28121d54945dSmrg need_lib_prefix=no 28131d54945dSmrg fi 28141d54945dSmrg need_version=yes 28151d54945dSmrg ;; 28161d54945dSmrg 28171d54945dSmrgsysv4 | sysv4.3*) 2818d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 28191d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28201d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 28211d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 28221d54945dSmrg case $host_vendor in 28231d54945dSmrg sni) 28241d54945dSmrg shlibpath_overrides_runpath=no 28251d54945dSmrg need_lib_prefix=no 28261d54945dSmrg runpath_var=LD_RUN_PATH 28271d54945dSmrg ;; 28281d54945dSmrg siemens) 28291d54945dSmrg need_lib_prefix=no 28301d54945dSmrg ;; 28311d54945dSmrg motorola) 28321d54945dSmrg need_lib_prefix=no 28331d54945dSmrg need_version=no 28341d54945dSmrg shlibpath_overrides_runpath=no 28351d54945dSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 28361d54945dSmrg ;; 28371d54945dSmrg esac 28381d54945dSmrg ;; 28391d54945dSmrg 28401d54945dSmrgsysv4*MP*) 28411d54945dSmrg if test -d /usr/nec ;then 2842d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 28431d54945dSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 28441d54945dSmrg soname_spec='$libname${shared_ext}.$major' 28451d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 28461d54945dSmrg fi 28471d54945dSmrg ;; 28481d54945dSmrg 28491d54945dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 28501d54945dSmrg version_type=freebsd-elf 28511d54945dSmrg need_lib_prefix=no 28521d54945dSmrg need_version=no 28531d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 28541d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 28551d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 2856d769e936Smrg shlibpath_overrides_runpath=yes 28571d54945dSmrg hardcode_into_libs=yes 28581d54945dSmrg if test "$with_gnu_ld" = yes; then 28591d54945dSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 28601d54945dSmrg else 28611d54945dSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 28621d54945dSmrg case $host_os in 28631d54945dSmrg sco3.2v5*) 28641d54945dSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 28651d54945dSmrg ;; 28661d54945dSmrg esac 28671d54945dSmrg fi 28681d54945dSmrg sys_lib_dlsearch_path_spec='/usr/lib' 28691d54945dSmrg ;; 28701d54945dSmrg 2871d769e936Smrgtpf*) 2872d769e936Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2873d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 2874d769e936Smrg need_lib_prefix=no 2875d769e936Smrg need_version=no 2876d769e936Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2877d769e936Smrg shlibpath_var=LD_LIBRARY_PATH 2878d769e936Smrg shlibpath_overrides_runpath=no 2879d769e936Smrg hardcode_into_libs=yes 2880d769e936Smrg ;; 2881d769e936Smrg 28821d54945dSmrguts4*) 2883d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 28841d54945dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28851d54945dSmrg soname_spec='${libname}${release}${shared_ext}$major' 28861d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 28871d54945dSmrg ;; 28881d54945dSmrg 28891d54945dSmrg*) 28901d54945dSmrg dynamic_linker=no 28911d54945dSmrg ;; 28921d54945dSmrgesac 28931d54945dSmrgAC_MSG_RESULT([$dynamic_linker]) 28941d54945dSmrgtest "$dynamic_linker" = no && can_build_shared=no 28951d54945dSmrg 28961d54945dSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 28971d54945dSmrgif test "$GCC" = yes; then 28981d54945dSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 28991d54945dSmrgfi 2900ec713c28Smrg 2901d769e936Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2902d769e936Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2903d769e936Smrgfi 2904d769e936Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2905d769e936Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2906ec713c28Smrgfi 2907ec713c28Smrg 2908d769e936Smrg_LT_DECL([], [variables_saved_for_relink], [1], 2909d769e936Smrg [Variables whose values should be saved in libtool wrapper scripts and 2910d769e936Smrg restored at link time]) 2911d769e936Smrg_LT_DECL([], [need_lib_prefix], [0], 2912d769e936Smrg [Do we need the "lib" prefix for modules?]) 2913d769e936Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2914d769e936Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2915d769e936Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2916d769e936Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2917d769e936Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2918d769e936Smrg [Is shlibpath searched before the hard-coded library search path?]) 2919d769e936Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2920d769e936Smrg_LT_DECL([], [library_names_spec], [1], 2921d769e936Smrg [[List of archive names. First name is the real one, the rest are links. 2922d769e936Smrg The last name is the one that the linker finds with -lNAME]]) 2923d769e936Smrg_LT_DECL([], [soname_spec], [1], 2924d769e936Smrg [[The coded name of the library, if different from the real name]]) 2925d769e936Smrg_LT_DECL([], [install_override_mode], [1], 2926d769e936Smrg [Permission mode override for installation of shared libraries]) 2927d769e936Smrg_LT_DECL([], [postinstall_cmds], [2], 2928d769e936Smrg [Command to use after installation of a shared archive]) 2929d769e936Smrg_LT_DECL([], [postuninstall_cmds], [2], 2930d769e936Smrg [Command to use after uninstallation of a shared archive]) 2931d769e936Smrg_LT_DECL([], [finish_cmds], [2], 2932d769e936Smrg [Commands used to finish a libtool library installation in a directory]) 2933d769e936Smrg_LT_DECL([], [finish_eval], [1], 2934d769e936Smrg [[As "finish_cmds", except a single script fragment to be evaled but 2935d769e936Smrg not shown]]) 2936d769e936Smrg_LT_DECL([], [hardcode_into_libs], [0], 2937d769e936Smrg [Whether we should hardcode library paths into libraries]) 2938d769e936Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2939d769e936Smrg [Compile-time system search path for libraries]) 2940d769e936Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2941d769e936Smrg [Run-time system search path for libraries]) 2942d769e936Smrg])# _LT_SYS_DYNAMIC_LINKER 2943d769e936Smrg 2944d769e936Smrg 2945d769e936Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 2946ec713c28Smrg# -------------------------- 2947ec713c28Smrg# find a file program which can recognize shared library 2948d769e936SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2949d769e936Smrg[m4_require([_LT_DECL_EGREP])dnl 2950ec713c28SmrgAC_MSG_CHECKING([for $1]) 2951ec713c28SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2952ec713c28Smrg[case $MAGIC_CMD in 29531d54945dSmrg[[\\/*] | ?:[\\/]*]) 29541d54945dSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 29551d54945dSmrg ;; 29561d54945dSmrg*) 29571d54945dSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 29581d54945dSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 29591d54945dSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 29601d54945dSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 29611d54945dSmrgdnl not every word. This closes a longstanding sh security hole. 2962d769e936Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 29631d54945dSmrg for ac_dir in $ac_dummy; do 29641d54945dSmrg IFS="$lt_save_ifs" 29651d54945dSmrg test -z "$ac_dir" && ac_dir=. 29661d54945dSmrg if test -f $ac_dir/$1; then 29671d54945dSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 29681d54945dSmrg if test -n "$file_magic_test_file"; then 29691d54945dSmrg case $deplibs_check_method in 29701d54945dSmrg "file_magic "*) 29711d54945dSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 29721d54945dSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 29731d54945dSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 29741d54945dSmrg $EGREP "$file_magic_regex" > /dev/null; then 29751d54945dSmrg : 29761d54945dSmrg else 2977d769e936Smrg cat <<_LT_EOF 1>&2 29781d54945dSmrg 29791d54945dSmrg*** Warning: the command libtool uses to detect shared libraries, 29801d54945dSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 29811d54945dSmrg*** The result is that libtool may fail to recognize shared libraries 29821d54945dSmrg*** as such. This will affect the creation of libtool libraries that 29831d54945dSmrg*** depend on shared libraries, but programs linked with such libtool 29841d54945dSmrg*** libraries will work regardless of this problem. Nevertheless, you 29851d54945dSmrg*** may want to report the problem to your system manager and/or to 29861d54945dSmrg*** bug-libtool@gnu.org 29871d54945dSmrg 2988d769e936Smrg_LT_EOF 29891d54945dSmrg fi ;; 29901d54945dSmrg esac 29911d54945dSmrg fi 29921d54945dSmrg break 29931d54945dSmrg fi 29941d54945dSmrg done 29951d54945dSmrg IFS="$lt_save_ifs" 29961d54945dSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 29971d54945dSmrg ;; 29981d54945dSmrgesac]) 29991d54945dSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 30001d54945dSmrgif test -n "$MAGIC_CMD"; then 30011d54945dSmrg AC_MSG_RESULT($MAGIC_CMD) 30021d54945dSmrgelse 30031d54945dSmrg AC_MSG_RESULT(no) 30041d54945dSmrgfi 3005d769e936Smrg_LT_DECL([], [MAGIC_CMD], [0], 3006d769e936Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3007d769e936Smrg])# _LT_PATH_TOOL_PREFIX 30081d54945dSmrg 3009d769e936Smrg# Old name: 3010d769e936SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3011d769e936Smrgdnl aclocal-1.4 backwards compatibility: 3012d769e936Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3013786a6f21Smrg 3014d769e936Smrg 3015d769e936Smrg# _LT_PATH_MAGIC 3016d769e936Smrg# -------------- 3017ba85709eSmrg# find a file program which can recognize a shared library 3018d769e936Smrgm4_defun([_LT_PATH_MAGIC], 3019d769e936Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 30201d54945dSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 30211d54945dSmrg if test -n "$ac_tool_prefix"; then 3022d769e936Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 30231d54945dSmrg else 30241d54945dSmrg MAGIC_CMD=: 30251d54945dSmrg fi 30261d54945dSmrgfi 3027d769e936Smrg])# _LT_PATH_MAGIC 30281d54945dSmrg 30291d54945dSmrg 3030d769e936Smrg# LT_PATH_LD 30311d54945dSmrg# ---------- 30321d54945dSmrg# find the pathname to the GNU or non-GNU linker 3033d769e936SmrgAC_DEFUN([LT_PATH_LD], 3034d769e936Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3035ec713c28SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3036ec713c28SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3037d769e936Smrgm4_require([_LT_DECL_SED])dnl 3038d769e936Smrgm4_require([_LT_DECL_EGREP])dnl 3039d769e936Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3040d769e936Smrg 3041d769e936SmrgAC_ARG_WITH([gnu-ld], 3042d769e936Smrg [AS_HELP_STRING([--with-gnu-ld], 3043d769e936Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3044d769e936Smrg [test "$withval" = no || with_gnu_ld=yes], 3045d769e936Smrg [with_gnu_ld=no])dnl 3046d769e936Smrg 30471d54945dSmrgac_prog=ld 30481d54945dSmrgif test "$GCC" = yes; then 30491d54945dSmrg # Check if gcc -print-prog-name=ld gives a path. 30501d54945dSmrg AC_MSG_CHECKING([for ld used by $CC]) 30511d54945dSmrg case $host in 30521d54945dSmrg *-*-mingw*) 30531d54945dSmrg # gcc leaves a trailing carriage return which upsets mingw 30541d54945dSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 30551d54945dSmrg *) 30561d54945dSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 30571d54945dSmrg esac 30581d54945dSmrg case $ac_prog in 30591d54945dSmrg # Accept absolute paths. 30601d54945dSmrg [[\\/]]* | ?:[[\\/]]*) 30611d54945dSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 30621d54945dSmrg # Canonicalize the pathname of ld 3063d769e936Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3064d769e936Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3065d769e936Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 30661d54945dSmrg done 30671d54945dSmrg test -z "$LD" && LD="$ac_prog" 30681d54945dSmrg ;; 30691d54945dSmrg "") 30701d54945dSmrg # If it fails, then pretend we aren't using GCC. 30711d54945dSmrg ac_prog=ld 30721d54945dSmrg ;; 30731d54945dSmrg *) 30741d54945dSmrg # If it is relative, then search for the first ld in PATH. 30751d54945dSmrg with_gnu_ld=unknown 30761d54945dSmrg ;; 30771d54945dSmrg esac 30781d54945dSmrgelif test "$with_gnu_ld" = yes; then 30791d54945dSmrg AC_MSG_CHECKING([for GNU ld]) 30801d54945dSmrgelse 30811d54945dSmrg AC_MSG_CHECKING([for non-GNU ld]) 30821d54945dSmrgfi 30831d54945dSmrgAC_CACHE_VAL(lt_cv_path_LD, 30841d54945dSmrg[if test -z "$LD"; then 30851d54945dSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 30861d54945dSmrg for ac_dir in $PATH; do 30871d54945dSmrg IFS="$lt_save_ifs" 30881d54945dSmrg test -z "$ac_dir" && ac_dir=. 30891d54945dSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 30901d54945dSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 30911d54945dSmrg # Check to see if the program is GNU ld. I'd rather use --version, 30921d54945dSmrg # but apparently some variants of GNU ld only accept -v. 30931d54945dSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 30941d54945dSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 30951d54945dSmrg *GNU* | *'with BFD'*) 30961d54945dSmrg test "$with_gnu_ld" != no && break 30971d54945dSmrg ;; 30981d54945dSmrg *) 30991d54945dSmrg test "$with_gnu_ld" != yes && break 31001d54945dSmrg ;; 31011d54945dSmrg esac 31021d54945dSmrg fi 31031d54945dSmrg done 31041d54945dSmrg IFS="$lt_save_ifs" 31051d54945dSmrgelse 31061d54945dSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 31071d54945dSmrgfi]) 31081d54945dSmrgLD="$lt_cv_path_LD" 31091d54945dSmrgif test -n "$LD"; then 31101d54945dSmrg AC_MSG_RESULT($LD) 31111d54945dSmrgelse 31121d54945dSmrg AC_MSG_RESULT(no) 31131d54945dSmrgfi 31141d54945dSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3115d769e936Smrg_LT_PATH_LD_GNU 3116d769e936SmrgAC_SUBST([LD]) 31171d54945dSmrg 3118d769e936Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3119d769e936Smrg])# LT_PATH_LD 31201d54945dSmrg 3121d769e936Smrg# Old names: 3122d769e936SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3123d769e936SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3124d769e936Smrgdnl aclocal-1.4 backwards compatibility: 3125d769e936Smrgdnl AC_DEFUN([AM_PROG_LD], []) 3126d769e936Smrgdnl AC_DEFUN([AC_PROG_LD], []) 3127d769e936Smrg 3128d769e936Smrg 3129d769e936Smrg# _LT_PATH_LD_GNU 3130d769e936Smrg#- -------------- 3131d769e936Smrgm4_defun([_LT_PATH_LD_GNU], 3132d769e936Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 31331d54945dSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 31341d54945dSmrgcase `$LD -v 2>&1 </dev/null` in 31351d54945dSmrg*GNU* | *'with BFD'*) 31361d54945dSmrg lt_cv_prog_gnu_ld=yes 31371d54945dSmrg ;; 31381d54945dSmrg*) 31391d54945dSmrg lt_cv_prog_gnu_ld=no 31401d54945dSmrg ;; 31411d54945dSmrgesac]) 31421d54945dSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3143d769e936Smrg])# _LT_PATH_LD_GNU 31441d54945dSmrg 31451d54945dSmrg 3146d769e936Smrg# _LT_CMD_RELOAD 3147d769e936Smrg# -------------- 31481d54945dSmrg# find reload flag for linker 31491d54945dSmrg# -- PORTME Some linkers may need a different reload flag. 3150d769e936Smrgm4_defun([_LT_CMD_RELOAD], 31511d54945dSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 31521d54945dSmrg lt_cv_ld_reload_flag, 31531d54945dSmrg [lt_cv_ld_reload_flag='-r']) 31541d54945dSmrgreload_flag=$lt_cv_ld_reload_flag 31551d54945dSmrgcase $reload_flag in 31561d54945dSmrg"" | " "*) ;; 31571d54945dSmrg*) reload_flag=" $reload_flag" ;; 31581d54945dSmrgesac 31591d54945dSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 31601d54945dSmrgcase $host_os in 3161d769e936Smrg cygwin* | mingw* | pw32* | cegcc*) 3162d769e936Smrg if test "$GCC" != yes; then 3163d769e936Smrg reload_cmds=false 3164d769e936Smrg fi 3165d769e936Smrg ;; 31661d54945dSmrg darwin*) 31671d54945dSmrg if test "$GCC" = yes; then 31681d54945dSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 31691d54945dSmrg else 31701d54945dSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 31711d54945dSmrg fi 31721d54945dSmrg ;; 31731d54945dSmrgesac 3174d769e936Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3175d769e936Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3176d769e936Smrg])# _LT_CMD_RELOAD 31771d54945dSmrg 31781d54945dSmrg 3179d769e936Smrg# _LT_CHECK_MAGIC_METHOD 3180d769e936Smrg# ---------------------- 31811d54945dSmrg# how to check for library dependencies 31821d54945dSmrg# -- PORTME fill in with the dynamic library characteristics 3183d769e936Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3184d769e936Smrg[m4_require([_LT_DECL_EGREP]) 3185d769e936Smrgm4_require([_LT_DECL_OBJDUMP]) 3186d769e936SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 31871d54945dSmrglt_cv_deplibs_check_method, 31881d54945dSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 31891d54945dSmrglt_cv_file_magic_test_file= 31901d54945dSmrglt_cv_deplibs_check_method='unknown' 31911d54945dSmrg# Need to set the preceding variable on all platforms that support 31921d54945dSmrg# interlibrary dependencies. 31931d54945dSmrg# 'none' -- dependencies not supported. 31941d54945dSmrg# `unknown' -- same as none, but documents that we really don't know. 31951d54945dSmrg# 'pass_all' -- all dependencies passed with no checks. 31961d54945dSmrg# 'test_compile' -- check by making test program. 31971d54945dSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 31981d54945dSmrg# which responds to the $file_magic_cmd with a given extended regex. 31991d54945dSmrg# If you have `file' or equivalent on your system and you're not sure 32001d54945dSmrg# whether `pass_all' will *always* work, you probably want this one. 32011d54945dSmrg 32021d54945dSmrgcase $host_os in 3203ba85709eSmrgaix[[4-9]]*) 32041d54945dSmrg lt_cv_deplibs_check_method=pass_all 32051d54945dSmrg ;; 32061d54945dSmrg 32071d54945dSmrgbeos*) 32081d54945dSmrg lt_cv_deplibs_check_method=pass_all 32091d54945dSmrg ;; 32101d54945dSmrg 32111d54945dSmrgbsdi[[45]]*) 32121d54945dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 32131d54945dSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 32141d54945dSmrg lt_cv_file_magic_test_file=/shlib/libc.so 32151d54945dSmrg ;; 32161d54945dSmrg 32171d54945dSmrgcygwin*) 32181d54945dSmrg # func_win32_libid is a shell function defined in ltmain.sh 32191d54945dSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 32201d54945dSmrg lt_cv_file_magic_cmd='func_win32_libid' 32211d54945dSmrg ;; 32221d54945dSmrg 32231d54945dSmrgmingw* | pw32*) 32241d54945dSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3225ba85709eSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3226ba85709eSmrg # unless we find 'file', for example because we are cross-compiling. 3227d769e936Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3228d769e936Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3229ba85709eSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3230ba85709eSmrg lt_cv_file_magic_cmd='func_win32_libid' 3231ba85709eSmrg else 3232d769e936Smrg # Keep this pattern in sync with the one in func_win32_libid. 3233d769e936Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3234ba85709eSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3235ba85709eSmrg fi 32361d54945dSmrg ;; 32371d54945dSmrg 3238d769e936Smrgcegcc*) 3239d769e936Smrg # use the weaker test based on 'objdump'. See mingw*. 3240d769e936Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3241d769e936Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3242d769e936Smrg ;; 3243d769e936Smrg 32441d54945dSmrgdarwin* | rhapsody*) 32451d54945dSmrg lt_cv_deplibs_check_method=pass_all 32461d54945dSmrg ;; 32471d54945dSmrg 3248ba85709eSmrgfreebsd* | dragonfly*) 3249d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 32501d54945dSmrg case $host_cpu in 32511d54945dSmrg i*86 ) 32521d54945dSmrg # Not sure whether the presence of OpenBSD here was a mistake. 32531d54945dSmrg # Let's accept both of them until this is cleared up. 32541d54945dSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 32551d54945dSmrg lt_cv_file_magic_cmd=/usr/bin/file 32561d54945dSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 32571d54945dSmrg ;; 32581d54945dSmrg esac 32591d54945dSmrg else 32601d54945dSmrg lt_cv_deplibs_check_method=pass_all 32611d54945dSmrg fi 32621d54945dSmrg ;; 32631d54945dSmrg 32641d54945dSmrggnu*) 32651d54945dSmrg lt_cv_deplibs_check_method=pass_all 32661d54945dSmrg ;; 32671d54945dSmrg 3268d769e936Smrghaiku*) 3269d769e936Smrg lt_cv_deplibs_check_method=pass_all 3270d769e936Smrg ;; 3271d769e936Smrg 32721d54945dSmrghpux10.20* | hpux11*) 32731d54945dSmrg lt_cv_file_magic_cmd=/usr/bin/file 32741d54945dSmrg case $host_cpu in 32751d54945dSmrg ia64*) 32761d54945dSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 32771d54945dSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 32781d54945dSmrg ;; 32791d54945dSmrg hppa*64*) 3280d769e936Smrg [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]'] 32811d54945dSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 32821d54945dSmrg ;; 32831d54945dSmrg *) 3284d769e936Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 32851d54945dSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 32861d54945dSmrg ;; 32871d54945dSmrg esac 32881d54945dSmrg ;; 32891d54945dSmrg 3290ba85709eSmrginterix[[3-9]]*) 32911d54945dSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 32921d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 32931d54945dSmrg ;; 32941d54945dSmrg 32951d54945dSmrgirix5* | irix6* | nonstopux*) 32961d54945dSmrg case $LD in 32971d54945dSmrg *-32|*"-32 ") libmagic=32-bit;; 32981d54945dSmrg *-n32|*"-n32 ") libmagic=N32;; 32991d54945dSmrg *-64|*"-64 ") libmagic=64-bit;; 33001d54945dSmrg *) libmagic=never-match;; 33011d54945dSmrg esac 33021d54945dSmrg lt_cv_deplibs_check_method=pass_all 33031d54945dSmrg ;; 33041d54945dSmrg 3305d769e936Smrg# This must be glibc/ELF. 3306d769e936Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 33071d54945dSmrg lt_cv_deplibs_check_method=pass_all 33081d54945dSmrg ;; 33091d54945dSmrg 33101d54945dSmrgnetbsd*) 3311d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 33121d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 33131d54945dSmrg else 33141d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 33151d54945dSmrg fi 33161d54945dSmrg ;; 33171d54945dSmrg 33181d54945dSmrgnewos6*) 33191d54945dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 33201d54945dSmrg lt_cv_file_magic_cmd=/usr/bin/file 33211d54945dSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 33221d54945dSmrg ;; 33231d54945dSmrg 3324d769e936Smrg*nto* | *qnx*) 3325d769e936Smrg lt_cv_deplibs_check_method=pass_all 33261d54945dSmrg ;; 33271d54945dSmrg 33281d54945dSmrgopenbsd*) 3329d769e936Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 33301d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 33311d54945dSmrg else 33321d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 33331d54945dSmrg fi 33341d54945dSmrg ;; 33351d54945dSmrg 33361d54945dSmrgosf3* | osf4* | osf5*) 33371d54945dSmrg lt_cv_deplibs_check_method=pass_all 33381d54945dSmrg ;; 33391d54945dSmrg 3340ba85709eSmrgrdos*) 3341ba85709eSmrg lt_cv_deplibs_check_method=pass_all 3342ba85709eSmrg ;; 3343ba85709eSmrg 33441d54945dSmrgsolaris*) 33451d54945dSmrg lt_cv_deplibs_check_method=pass_all 33461d54945dSmrg ;; 33471d54945dSmrg 3348d769e936Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3349d769e936Smrg lt_cv_deplibs_check_method=pass_all 3350d769e936Smrg ;; 3351d769e936Smrg 33521d54945dSmrgsysv4 | sysv4.3*) 33531d54945dSmrg case $host_vendor in 33541d54945dSmrg motorola) 33551d54945dSmrg 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]]' 33561d54945dSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 33571d54945dSmrg ;; 33581d54945dSmrg ncr) 33591d54945dSmrg lt_cv_deplibs_check_method=pass_all 33601d54945dSmrg ;; 33611d54945dSmrg sequent) 33621d54945dSmrg lt_cv_file_magic_cmd='/bin/file' 33631d54945dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 33641d54945dSmrg ;; 33651d54945dSmrg sni) 33661d54945dSmrg lt_cv_file_magic_cmd='/bin/file' 33671d54945dSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 33681d54945dSmrg lt_cv_file_magic_test_file=/lib/libc.so 33691d54945dSmrg ;; 33701d54945dSmrg siemens) 33711d54945dSmrg lt_cv_deplibs_check_method=pass_all 33721d54945dSmrg ;; 33731d54945dSmrg pc) 33741d54945dSmrg lt_cv_deplibs_check_method=pass_all 33751d54945dSmrg ;; 33761d54945dSmrg esac 33771d54945dSmrg ;; 33781d54945dSmrg 3379d769e936Smrgtpf*) 33801d54945dSmrg lt_cv_deplibs_check_method=pass_all 33811d54945dSmrg ;; 33821d54945dSmrgesac 33831d54945dSmrg]) 3384d769e936Smrg 3385d769e936Smrgfile_magic_glob= 3386d769e936Smrgwant_nocaseglob=no 3387d769e936Smrgif test "$build" = "$host"; then 3388d769e936Smrg case $host_os in 3389d769e936Smrg mingw* | pw32*) 3390d769e936Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3391d769e936Smrg want_nocaseglob=yes 3392d769e936Smrg else 3393d769e936Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3394d769e936Smrg fi 3395d769e936Smrg ;; 3396d769e936Smrg esac 3397d769e936Smrgfi 3398d769e936Smrg 33991d54945dSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 34001d54945dSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 34011d54945dSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 34021d54945dSmrg 3403d769e936Smrg_LT_DECL([], [deplibs_check_method], [1], 3404d769e936Smrg [Method to check whether dependent libraries are shared objects]) 3405d769e936Smrg_LT_DECL([], [file_magic_cmd], [1], 3406d769e936Smrg [Command to use when deplibs_check_method = "file_magic"]) 3407d769e936Smrg_LT_DECL([], [file_magic_glob], [1], 3408d769e936Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3409d769e936Smrg_LT_DECL([], [want_nocaseglob], [1], 3410d769e936Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3411d769e936Smrg])# _LT_CHECK_MAGIC_METHOD 34121d54945dSmrg 3413d769e936Smrg 3414d769e936Smrg# LT_PATH_NM 34151d54945dSmrg# ---------- 3416d769e936Smrg# find the pathname to a BSD- or MS-compatible name lister 3417d769e936SmrgAC_DEFUN([LT_PATH_NM], 3418d769e936Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3419d769e936SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 34201d54945dSmrg[if test -n "$NM"; then 34211d54945dSmrg # Let the user override the test. 34221d54945dSmrg lt_cv_path_NM="$NM" 34231d54945dSmrgelse 34241d54945dSmrg lt_nm_to_check="${ac_tool_prefix}nm" 3425ba85709eSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 34261d54945dSmrg lt_nm_to_check="$lt_nm_to_check nm" 34271d54945dSmrg fi 34281d54945dSmrg for lt_tmp_nm in $lt_nm_to_check; do 34291d54945dSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 34301d54945dSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 34311d54945dSmrg IFS="$lt_save_ifs" 34321d54945dSmrg test -z "$ac_dir" && ac_dir=. 34331d54945dSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 34341d54945dSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 34351d54945dSmrg # Check to see if the nm accepts a BSD-compat flag. 34361d54945dSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 34371d54945dSmrg # nm: unknown option "B" ignored 34381d54945dSmrg # Tru64's nm complains that /dev/null is an invalid object file 34391d54945dSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 34401d54945dSmrg */dev/null* | *'Invalid file or object type'*) 34411d54945dSmrg lt_cv_path_NM="$tmp_nm -B" 34421d54945dSmrg break 34431d54945dSmrg ;; 34441d54945dSmrg *) 34451d54945dSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 34461d54945dSmrg */dev/null*) 34471d54945dSmrg lt_cv_path_NM="$tmp_nm -p" 34481d54945dSmrg break 34491d54945dSmrg ;; 34501d54945dSmrg *) 34511d54945dSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 34521d54945dSmrg continue # so that we can try to find one that supports BSD flags 34531d54945dSmrg ;; 34541d54945dSmrg esac 34551d54945dSmrg ;; 34561d54945dSmrg esac 34571d54945dSmrg fi 34581d54945dSmrg done 34591d54945dSmrg IFS="$lt_save_ifs" 34601d54945dSmrg done 3461d769e936Smrg : ${lt_cv_path_NM=no} 34621d54945dSmrgfi]) 3463d769e936Smrgif test "$lt_cv_path_NM" != "no"; then 3464d769e936Smrg NM="$lt_cv_path_NM" 3465d769e936Smrgelse 3466d769e936Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3467d769e936Smrg if test -n "$DUMPBIN"; then : 3468d769e936Smrg # Let the user override the test. 3469d769e936Smrg else 3470d769e936Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3471d769e936Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3472d769e936Smrg *COFF*) 3473d769e936Smrg DUMPBIN="$DUMPBIN -symbols" 3474d769e936Smrg ;; 3475d769e936Smrg *) 3476d769e936Smrg DUMPBIN=: 3477d769e936Smrg ;; 3478d769e936Smrg esac 3479d769e936Smrg fi 3480d769e936Smrg AC_SUBST([DUMPBIN]) 3481d769e936Smrg if test "$DUMPBIN" != ":"; then 3482d769e936Smrg NM="$DUMPBIN" 3483d769e936Smrg fi 3484d769e936Smrgfi 3485d769e936Smrgtest -z "$NM" && NM=nm 3486d769e936SmrgAC_SUBST([NM]) 3487d769e936Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3488d769e936Smrg 3489d769e936SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3490d769e936Smrg [lt_cv_nm_interface="BSD nm" 3491d769e936Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3492d769e936Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3493d769e936Smrg (eval "$ac_compile" 2>conftest.err) 3494d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3495d769e936Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3496d769e936Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3497d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3498d769e936Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3499d769e936Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3500d769e936Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3501d769e936Smrg lt_cv_nm_interface="MS dumpbin" 3502d769e936Smrg fi 3503d769e936Smrg rm -f conftest*]) 3504d769e936Smrg])# LT_PATH_NM 3505d769e936Smrg 3506d769e936Smrg# Old names: 3507d769e936SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3508d769e936SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3509d769e936Smrgdnl aclocal-1.4 backwards compatibility: 3510d769e936Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3511d769e936Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3512d769e936Smrg 3513d769e936Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3514d769e936Smrg# -------------------------------- 3515d769e936Smrg# how to determine the name of the shared library 3516d769e936Smrg# associated with a specific link library. 3517d769e936Smrg# -- PORTME fill in with the dynamic library characteristics 3518d769e936Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3519d769e936Smrg[m4_require([_LT_DECL_EGREP]) 3520d769e936Smrgm4_require([_LT_DECL_OBJDUMP]) 3521d769e936Smrgm4_require([_LT_DECL_DLLTOOL]) 3522d769e936SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3523d769e936Smrglt_cv_sharedlib_from_linklib_cmd, 3524d769e936Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 35251d54945dSmrg 3526d769e936Smrgcase $host_os in 3527d769e936Smrgcygwin* | mingw* | pw32* | cegcc*) 3528d769e936Smrg # two different shell functions defined in ltmain.sh 3529d769e936Smrg # decide which to use based on capabilities of $DLLTOOL 3530d769e936Smrg case `$DLLTOOL --help 2>&1` in 3531d769e936Smrg *--identify-strict*) 3532d769e936Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3533d769e936Smrg ;; 3534d769e936Smrg *) 3535d769e936Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3536d769e936Smrg ;; 3537d769e936Smrg esac 3538d769e936Smrg ;; 3539d769e936Smrg*) 3540d769e936Smrg # fallback: assume linklib IS sharedlib 3541d769e936Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3542d769e936Smrg ;; 3543d769e936Smrgesac 3544d769e936Smrg]) 3545d769e936Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3546d769e936Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3547786a6f21Smrg 3548d769e936Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3549d769e936Smrg [Command to associate shared and link libraries]) 3550d769e936Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3551d769e936Smrg 3552d769e936Smrg 3553d769e936Smrg# _LT_PATH_MANIFEST_TOOL 3554d769e936Smrg# ---------------------- 3555d769e936Smrg# locate the manifest tool 3556d769e936Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3557d769e936Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3558d769e936Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3559d769e936SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3560d769e936Smrg [lt_cv_path_mainfest_tool=no 3561d769e936Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3562d769e936Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3563d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3564d769e936Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3565d769e936Smrg lt_cv_path_mainfest_tool=yes 3566d769e936Smrg fi 3567d769e936Smrg rm -f conftest*]) 3568d769e936Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 3569d769e936Smrg MANIFEST_TOOL=: 3570d769e936Smrgfi 3571d769e936Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3572d769e936Smrg])# _LT_PATH_MANIFEST_TOOL 3573d769e936Smrg 3574d769e936Smrg 3575d769e936Smrg# LT_LIB_M 3576d769e936Smrg# -------- 35771d54945dSmrg# check for math library 3578d769e936SmrgAC_DEFUN([LT_LIB_M], 35791d54945dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 35801d54945dSmrgLIBM= 35811d54945dSmrgcase $host in 3582d769e936Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 35831d54945dSmrg # These system don't have libm, or don't need it 35841d54945dSmrg ;; 35851d54945dSmrg*-ncr-sysv4.3*) 35861d54945dSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 35871d54945dSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 35881d54945dSmrg ;; 35891d54945dSmrg*) 35901d54945dSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 35911d54945dSmrg ;; 35921d54945dSmrgesac 3593d769e936SmrgAC_SUBST([LIBM]) 3594d769e936Smrg])# LT_LIB_M 35951d54945dSmrg 3596d769e936Smrg# Old name: 3597d769e936SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3598d769e936Smrgdnl aclocal-1.4 backwards compatibility: 3599d769e936Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 36001d54945dSmrg 36011d54945dSmrg 3602d769e936Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3603d769e936Smrg# ------------------------------- 3604d769e936Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3605d769e936Smrg[m4_require([_LT_TAG_COMPILER])dnl 36061d54945dSmrg 3607d769e936Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 36081d54945dSmrg 3609d769e936Smrgif test "$GCC" = yes; then 3610d769e936Smrg case $cc_basename in 3611d769e936Smrg nvcc*) 3612d769e936Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3613d769e936Smrg *) 3614d769e936Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3615d769e936Smrg esac 36161d54945dSmrg 3617d769e936Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3618d769e936Smrg lt_cv_prog_compiler_rtti_exceptions, 3619d769e936Smrg [-fno-rtti -fno-exceptions], [], 3620d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3621ec713c28Smrgfi 3622d769e936Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3623d769e936Smrg [Compiler flag to turn off builtin functions]) 3624d769e936Smrg])# _LT_COMPILER_NO_RTTI 36251d54945dSmrg 36261d54945dSmrg 3627d769e936Smrg# _LT_CMD_GLOBAL_SYMBOLS 3628d769e936Smrg# ---------------------- 3629d769e936Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3630d769e936Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3631d769e936SmrgAC_REQUIRE([AC_PROG_CC])dnl 3632d769e936SmrgAC_REQUIRE([AC_PROG_AWK])dnl 3633d769e936SmrgAC_REQUIRE([LT_PATH_NM])dnl 3634d769e936SmrgAC_REQUIRE([LT_PATH_LD])dnl 3635d769e936Smrgm4_require([_LT_DECL_SED])dnl 3636d769e936Smrgm4_require([_LT_DECL_EGREP])dnl 3637d769e936Smrgm4_require([_LT_TAG_COMPILER])dnl 3638ec713c28Smrg 3639d769e936Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3640d769e936SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3641d769e936SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3642d769e936Smrg[ 3643d769e936Smrg# These are sane defaults that work on at least a few old systems. 3644d769e936Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3645ec713c28Smrg 3646d769e936Smrg# Character class describing NM global symbol codes. 3647d769e936Smrgsymcode='[[BCDEGRST]]' 3648ec713c28Smrg 3649d769e936Smrg# Regexp to match symbols that can be accessed directly from C. 3650d769e936Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3651ec713c28Smrg 3652d769e936Smrg# Define system-specific variables. 3653ec713c28Smrgcase $host_os in 3654d769e936Smrgaix*) 3655d769e936Smrg symcode='[[BCDT]]' 3656ec713c28Smrg ;; 3657d769e936Smrgcygwin* | mingw* | pw32* | cegcc*) 3658d769e936Smrg symcode='[[ABCDGISTW]]' 3659d769e936Smrg ;; 3660d769e936Smrghpux*) 3661d769e936Smrg if test "$host_cpu" = ia64; then 3662d769e936Smrg symcode='[[ABCDEGRST]]' 3663ec713c28Smrg fi 3664d769e936Smrg ;; 3665d769e936Smrgirix* | nonstopux*) 3666d769e936Smrg symcode='[[BCDEGRST]]' 3667d769e936Smrg ;; 3668d769e936Smrgosf*) 3669d769e936Smrg symcode='[[BCDEGQRST]]' 3670d769e936Smrg ;; 3671d769e936Smrgsolaris*) 3672d769e936Smrg symcode='[[BDRT]]' 3673d769e936Smrg ;; 3674d769e936Smrgsco3.2v5*) 3675d769e936Smrg symcode='[[DT]]' 3676d769e936Smrg ;; 3677d769e936Smrgsysv4.2uw2*) 3678d769e936Smrg symcode='[[DT]]' 3679d769e936Smrg ;; 3680d769e936Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3681d769e936Smrg symcode='[[ABDT]]' 3682d769e936Smrg ;; 3683d769e936Smrgsysv4) 3684d769e936Smrg symcode='[[DFNSTU]]' 3685d769e936Smrg ;; 3686ec713c28Smrgesac 3687ec713c28Smrg 3688d769e936Smrg# If we're using GNU nm, then use its standard symbol codes. 3689d769e936Smrgcase `$NM -V 2>&1` in 3690d769e936Smrg*GNU* | *'with BFD'*) 3691d769e936Smrg symcode='[[ABCDGIRSTW]]' ;; 3692d769e936Smrgesac 3693ec713c28Smrg 3694d769e936Smrg# Transform an extracted symbol line into a proper C declaration. 3695d769e936Smrg# Some systems (esp. on ia64) link data and code symbols differently, 3696d769e936Smrg# so use this general approach. 3697d769e936Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3698ec713c28Smrg 3699d769e936Smrg# Transform an extracted symbol line into symbol name and symbol address 3700d769e936Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3701d769e936Smrglt_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'" 3702ec713c28Smrg 3703d769e936Smrg# Handle CRLF in mingw tool chain 3704d769e936Smrgopt_cr= 3705d769e936Smrgcase $build_os in 3706d769e936Smrgmingw*) 3707d769e936Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3708d769e936Smrg ;; 3709d769e936Smrgesac 3710ec713c28Smrg 3711d769e936Smrg# Try without a prefix underscore, then with it. 3712d769e936Smrgfor ac_symprfx in "" "_"; do 3713ec713c28Smrg 3714d769e936Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3715d769e936Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3716ec713c28Smrg 3717d769e936Smrg # Write the raw and C identifiers. 3718d769e936Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3719d769e936Smrg # Fake it for dumpbin and say T for any non-static function 3720d769e936Smrg # and D for any global variable. 3721d769e936Smrg # Also find C++ and __fastcall symbols from MSVC++, 3722d769e936Smrg # which start with @ or ?. 3723d769e936Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3724d769e936Smrg" {last_section=section; section=\$ 3};"\ 3725d769e936Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 3726d769e936Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3727d769e936Smrg" \$ 0!~/External *\|/{next};"\ 3728d769e936Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3729d769e936Smrg" {if(hide[section]) next};"\ 3730d769e936Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3731d769e936Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3732d769e936Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3733d769e936Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3734d769e936Smrg" ' prfx=^$ac_symprfx]" 3735d769e936Smrg else 3736d769e936Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3737d769e936Smrg fi 3738d769e936Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3739ec713c28Smrg 3740d769e936Smrg # Check to see that the pipe works correctly. 3741d769e936Smrg pipe_works=no 3742ec713c28Smrg 3743d769e936Smrg rm -f conftest* 3744d769e936Smrg cat > conftest.$ac_ext <<_LT_EOF 3745d769e936Smrg#ifdef __cplusplus 3746d769e936Smrgextern "C" { 3747d769e936Smrg#endif 3748d769e936Smrgchar nm_test_var; 3749d769e936Smrgvoid nm_test_func(void); 3750d769e936Smrgvoid nm_test_func(void){} 3751d769e936Smrg#ifdef __cplusplus 3752d769e936Smrg} 3753d769e936Smrg#endif 3754d769e936Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 3755d769e936Smrg_LT_EOF 3756ec713c28Smrg 3757d769e936Smrg if AC_TRY_EVAL(ac_compile); then 3758d769e936Smrg # Now try to grab the symbols. 3759d769e936Smrg nlist=conftest.nm 3760d769e936Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3761d769e936Smrg # Try sorting and uniquifying the output. 3762d769e936Smrg if sort "$nlist" | uniq > "$nlist"T; then 3763d769e936Smrg mv -f "$nlist"T "$nlist" 3764d769e936Smrg else 3765d769e936Smrg rm -f "$nlist"T 3766d769e936Smrg fi 37671d54945dSmrg 3768d769e936Smrg # Make sure that we snagged all the symbols we need. 3769d769e936Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3770d769e936Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3771d769e936Smrg cat <<_LT_EOF > conftest.$ac_ext 3772d769e936Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3773d769e936Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3774d769e936Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 3775d769e936Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 3776d769e936Smrg# define LT@&t@_DLSYM_CONST 3777d769e936Smrg#elif defined(__osf__) 3778d769e936Smrg/* This system does not cope well with relocations in const data. */ 3779d769e936Smrg# define LT@&t@_DLSYM_CONST 3780d769e936Smrg#else 3781d769e936Smrg# define LT@&t@_DLSYM_CONST const 3782d769e936Smrg#endif 3783ec713c28Smrg 3784d769e936Smrg#ifdef __cplusplus 3785d769e936Smrgextern "C" { 3786d769e936Smrg#endif 37871d54945dSmrg 3788d769e936Smrg_LT_EOF 3789d769e936Smrg # Now generate the symbol file. 3790d769e936Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 37911d54945dSmrg 3792d769e936Smrg cat <<_LT_EOF >> conftest.$ac_ext 37931d54945dSmrg 3794d769e936Smrg/* The mapping between symbol names and symbols. */ 3795d769e936SmrgLT@&t@_DLSYM_CONST struct { 3796d769e936Smrg const char *name; 3797d769e936Smrg void *address; 3798d769e936Smrg} 3799d769e936Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3800d769e936Smrg{ 3801d769e936Smrg { "@PROGRAM@", (void *) 0 }, 3802d769e936Smrg_LT_EOF 3803d769e936Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3804d769e936Smrg cat <<\_LT_EOF >> conftest.$ac_ext 3805d769e936Smrg {0, (void *) 0} 3806d769e936Smrg}; 38071d54945dSmrg 3808d769e936Smrg/* This works around a problem in FreeBSD linker */ 3809d769e936Smrg#ifdef FREEBSD_WORKAROUND 3810d769e936Smrgstatic const void *lt_preloaded_setup() { 3811d769e936Smrg return lt__PROGRAM__LTX_preloaded_symbols; 3812d769e936Smrg} 3813d769e936Smrg#endif 38141d54945dSmrg 3815d769e936Smrg#ifdef __cplusplus 3816d769e936Smrg} 3817d769e936Smrg#endif 3818d769e936Smrg_LT_EOF 3819d769e936Smrg # Now try linking the two files. 3820d769e936Smrg mv conftest.$ac_objext conftstm.$ac_objext 3821d769e936Smrg lt_globsym_save_LIBS=$LIBS 3822d769e936Smrg lt_globsym_save_CFLAGS=$CFLAGS 3823d769e936Smrg LIBS="conftstm.$ac_objext" 3824d769e936Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3825d769e936Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3826d769e936Smrg pipe_works=yes 3827d769e936Smrg fi 3828d769e936Smrg LIBS=$lt_globsym_save_LIBS 3829d769e936Smrg CFLAGS=$lt_globsym_save_CFLAGS 3830ec713c28Smrg else 3831d769e936Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3832ec713c28Smrg fi 3833ec713c28Smrg else 3834d769e936Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3835ec713c28Smrg fi 3836ec713c28Smrg else 3837d769e936Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3838ec713c28Smrg fi 3839d769e936Smrg else 3840d769e936Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3841d769e936Smrg cat conftest.$ac_ext >&5 3842d769e936Smrg fi 3843d769e936Smrg rm -rf conftest* conftst* 3844ec713c28Smrg 3845d769e936Smrg # Do not use the global_symbol_pipe unless it works. 3846d769e936Smrg if test "$pipe_works" = yes; then 3847d769e936Smrg break 3848d769e936Smrg else 3849d769e936Smrg lt_cv_sys_global_symbol_pipe= 3850d769e936Smrg fi 3851d769e936Smrgdone 3852d769e936Smrg]) 3853d769e936Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3854d769e936Smrg lt_cv_sys_global_symbol_to_cdecl= 3855d769e936Smrgfi 3856d769e936Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3857d769e936Smrg AC_MSG_RESULT(failed) 3858d769e936Smrgelse 3859d769e936Smrg AC_MSG_RESULT(ok) 3860d769e936Smrgfi 3861ec713c28Smrg 3862d769e936Smrg# Response file support. 3863d769e936Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3864d769e936Smrg nm_file_list_spec='@' 3865d769e936Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3866d769e936Smrg nm_file_list_spec='@' 3867d769e936Smrgfi 3868ec713c28Smrg 3869d769e936Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3870d769e936Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 3871d769e936Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3872d769e936Smrg [Transform the output of nm in a proper C declaration]) 3873d769e936Smrg_LT_DECL([global_symbol_to_c_name_address], 3874d769e936Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3875d769e936Smrg [Transform the output of nm in a C name address pair]) 3876d769e936Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3877d769e936Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3878d769e936Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3879d769e936Smrg_LT_DECL([], [nm_file_list_spec], [1], 3880d769e936Smrg [Specify filename containing input files for $NM]) 3881d769e936Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 3882d769e936Smrg 3883d769e936Smrg 3884d769e936Smrg# _LT_COMPILER_PIC([TAGNAME]) 3885d769e936Smrg# --------------------------- 3886d769e936Smrgm4_defun([_LT_COMPILER_PIC], 3887d769e936Smrg[m4_require([_LT_TAG_COMPILER])dnl 3888d769e936Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3889d769e936Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3890d769e936Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3891ec713c28Smrg 3892d769e936Smrgm4_if([$1], [CXX], [ 3893d769e936Smrg # C++ specific cases for pic, static, wl, etc. 3894d769e936Smrg if test "$GXX" = yes; then 3895d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3896d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3897d769e936Smrg 3898d769e936Smrg case $host_os in 3899d769e936Smrg aix*) 3900d769e936Smrg # All AIX code is PIC. 3901d769e936Smrg if test "$host_cpu" = ia64; then 3902d769e936Smrg # AIX 5 now supports IA64 processor 3903d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39041d54945dSmrg fi 3905786a6f21Smrg ;; 39061d54945dSmrg 3907d769e936Smrg amigaos*) 3908786a6f21Smrg case $host_cpu in 3909d769e936Smrg powerpc) 3910d769e936Smrg # see comment about AmigaOS4 .so support 3911d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3912d769e936Smrg ;; 3913d769e936Smrg m68k) 3914d769e936Smrg # FIXME: we need at least 68020 code to build shared libraries, but 3915d769e936Smrg # adding the `-m68020' flag to GCC prevents building anything better, 3916d769e936Smrg # like `-m68040'. 3917d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3918786a6f21Smrg ;; 3919786a6f21Smrg esac 3920ec713c28Smrg ;; 3921ec713c28Smrg 3922d769e936Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3923d769e936Smrg # PIC is the default for these OSes. 3924d769e936Smrg ;; 3925d769e936Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3926d769e936Smrg # This hack is so that the source file can tell whether it is being 3927d769e936Smrg # built for inclusion in a dll (and should export symbols for example). 3928d769e936Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3929d769e936Smrg # (--disable-auto-import) libraries 3930d769e936Smrg m4_if([$1], [GCJ], [], 3931d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3932d769e936Smrg ;; 3933d769e936Smrg darwin* | rhapsody*) 3934d769e936Smrg # PIC is the default on this platform 3935d769e936Smrg # Common symbols not allowed in MH_DYLIB files 3936d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3937d769e936Smrg ;; 3938d769e936Smrg *djgpp*) 3939d769e936Smrg # DJGPP does not support shared libraries at all 3940d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3941d769e936Smrg ;; 3942d769e936Smrg haiku*) 3943d769e936Smrg # PIC is the default for Haiku. 3944d769e936Smrg # The "-static" flag exists, but is broken. 3945d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 3946d769e936Smrg ;; 3947d769e936Smrg interix[[3-9]]*) 3948d769e936Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3949d769e936Smrg # Instead, we relocate shared libraries at runtime. 3950d769e936Smrg ;; 3951d769e936Smrg sysv4*MP*) 3952d769e936Smrg if test -d /usr/nec; then 3953d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3954d769e936Smrg fi 3955d769e936Smrg ;; 3956d769e936Smrg hpux*) 3957d769e936Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3958d769e936Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3959d769e936Smrg # sets the default TLS model and affects inlining. 3960d769e936Smrg case $host_cpu in 3961d769e936Smrg hppa*64*) 39621d54945dSmrg ;; 3963ec713c28Smrg *) 3964d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39651d54945dSmrg ;; 3966d769e936Smrg esac 3967d769e936Smrg ;; 3968d769e936Smrg *qnx* | *nto*) 3969d769e936Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3970d769e936Smrg # it will coredump. 3971d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3972d769e936Smrg ;; 3973d769e936Smrg *) 3974d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3975d769e936Smrg ;; 3976d769e936Smrg esac 3977d769e936Smrg else 3978d769e936Smrg case $host_os in 3979d769e936Smrg aix[[4-9]]*) 3980d769e936Smrg # All AIX code is PIC. 3981d769e936Smrg if test "$host_cpu" = ia64; then 3982d769e936Smrg # AIX 5 now supports IA64 processor 3983d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3984d769e936Smrg else 3985d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3986d769e936Smrg fi 39871d54945dSmrg ;; 3988d769e936Smrg chorus*) 3989d769e936Smrg case $cc_basename in 3990d769e936Smrg cxch68*) 3991d769e936Smrg # Green Hills C++ Compiler 3992d769e936Smrg # _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" 3993d769e936Smrg ;; 3994d769e936Smrg esac 39951d54945dSmrg ;; 3996d769e936Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3997d769e936Smrg # This hack is so that the source file can tell whether it is being 3998d769e936Smrg # built for inclusion in a dll (and should export symbols for example). 3999d769e936Smrg m4_if([$1], [GCJ], [], 4000d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 40011d54945dSmrg ;; 4002d769e936Smrg dgux*) 4003d769e936Smrg case $cc_basename in 4004d769e936Smrg ec++*) 4005d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4006d769e936Smrg ;; 4007d769e936Smrg ghcx*) 4008d769e936Smrg # Green Hills C++ Compiler 4009d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4010d769e936Smrg ;; 4011d769e936Smrg *) 4012d769e936Smrg ;; 4013d769e936Smrg esac 40141d54945dSmrg ;; 4015d769e936Smrg freebsd* | dragonfly*) 4016d769e936Smrg # FreeBSD uses GNU C++ 40171d54945dSmrg ;; 4018d769e936Smrg hpux9* | hpux10* | hpux11*) 4019d769e936Smrg case $cc_basename in 4020d769e936Smrg CC*) 4021d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4022d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4023d769e936Smrg if test "$host_cpu" != ia64; then 4024d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4025d769e936Smrg fi 4026d769e936Smrg ;; 4027d769e936Smrg aCC*) 4028d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4029d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4030d769e936Smrg case $host_cpu in 4031d769e936Smrg hppa*64*|ia64*) 4032d769e936Smrg # +Z the default 4033d769e936Smrg ;; 4034d769e936Smrg *) 4035d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4036d769e936Smrg ;; 4037d769e936Smrg esac 4038d769e936Smrg ;; 4039d769e936Smrg *) 4040d769e936Smrg ;; 4041d769e936Smrg esac 40421d54945dSmrg ;; 4043d769e936Smrg interix*) 4044d769e936Smrg # This is c89, which is MS Visual C++ (no shared libs) 4045d769e936Smrg # Anyone wants to do a port? 40461d54945dSmrg ;; 4047d769e936Smrg irix5* | irix6* | nonstopux*) 4048d769e936Smrg case $cc_basename in 4049d769e936Smrg CC*) 4050d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4051d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4052d769e936Smrg # CC pic flag -KPIC is the default. 4053d769e936Smrg ;; 4054d769e936Smrg *) 4055d769e936Smrg ;; 4056d769e936Smrg esac 4057ec713c28Smrg ;; 4058d769e936Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4059d769e936Smrg case $cc_basename in 4060d769e936Smrg KCC*) 4061d769e936Smrg # KAI C++ Compiler 4062d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4063d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4064d769e936Smrg ;; 4065d769e936Smrg ecpc* ) 4066d769e936Smrg # old Intel C++ for x86_64 which still supported -KPIC. 4067d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4068d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4069d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4070d769e936Smrg ;; 4071d769e936Smrg icpc* ) 4072d769e936Smrg # Intel C++, used to be incompatible with GCC. 4073d769e936Smrg # ICC 10 doesn't accept -KPIC any more. 4074d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4075d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4076d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4077d769e936Smrg ;; 4078d769e936Smrg pgCC* | pgcpp*) 4079d769e936Smrg # Portland Group C++ compiler 4080d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4081d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4082d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4083d769e936Smrg ;; 4084d769e936Smrg cxx*) 4085d769e936Smrg # Compaq C++ 4086d769e936Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4087d769e936Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4088d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4089d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4090d769e936Smrg ;; 4091d769e936Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4092d769e936Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4093d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4094d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4095d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4096d769e936Smrg ;; 4097d769e936Smrg *) 4098d769e936Smrg case `$CC -V 2>&1 | sed 5q` in 4099d769e936Smrg *Sun\ C*) 4100d769e936Smrg # Sun C++ 5.9 4101d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4102d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4103d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4104d769e936Smrg ;; 4105d769e936Smrg esac 4106d769e936Smrg ;; 4107d769e936Smrg esac 4108ec713c28Smrg ;; 4109d769e936Smrg lynxos*) 4110ec713c28Smrg ;; 4111d769e936Smrg m88k*) 4112ec713c28Smrg ;; 4113d769e936Smrg mvs*) 4114d769e936Smrg case $cc_basename in 4115d769e936Smrg cxx*) 4116d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4117d769e936Smrg ;; 4118786a6f21Smrg *) 4119786a6f21Smrg ;; 4120786a6f21Smrg esac 41211d54945dSmrg ;; 4122d769e936Smrg netbsd*) 41231d54945dSmrg ;; 4124d769e936Smrg *qnx* | *nto*) 4125d769e936Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4126d769e936Smrg # it will coredump. 4127d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4128d769e936Smrg ;; 4129d769e936Smrg osf3* | osf4* | osf5*) 4130d769e936Smrg case $cc_basename in 4131d769e936Smrg KCC*) 4132d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4133d769e936Smrg ;; 4134d769e936Smrg RCC*) 4135d769e936Smrg # Rational C++ 2.4.1 4136d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4137d769e936Smrg ;; 4138d769e936Smrg cxx*) 4139d769e936Smrg # Digital/Compaq C++ 4140d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4141d769e936Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4142d769e936Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4143d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4144d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4145d769e936Smrg ;; 4146ec713c28Smrg *) 4147ec713c28Smrg ;; 4148d769e936Smrg esac 4149ec713c28Smrg ;; 4150d769e936Smrg psos*) 4151786a6f21Smrg ;; 4152d769e936Smrg solaris*) 4153d769e936Smrg case $cc_basename in 4154d769e936Smrg CC* | sunCC*) 4155d769e936Smrg # Sun C++ 4.2, 5.x and Centerline C++ 4156d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4157d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4158d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4159d769e936Smrg ;; 4160d769e936Smrg gcx*) 4161d769e936Smrg # Green Hills C++ Compiler 4162d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4163d769e936Smrg ;; 4164d769e936Smrg *) 4165d769e936Smrg ;; 4166d769e936Smrg esac 4167786a6f21Smrg ;; 4168d769e936Smrg sunos4*) 4169d769e936Smrg case $cc_basename in 4170d769e936Smrg CC*) 4171d769e936Smrg # Sun C++ 4.x 4172d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4173d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4174d769e936Smrg ;; 4175d769e936Smrg lcc*) 4176d769e936Smrg # Lucid 4177d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4178d769e936Smrg ;; 4179d769e936Smrg *) 4180d769e936Smrg ;; 4181d769e936Smrg esac 4182786a6f21Smrg ;; 4183d769e936Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4184d769e936Smrg case $cc_basename in 4185d769e936Smrg CC*) 4186d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4187d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4188d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4189d769e936Smrg ;; 4190d769e936Smrg esac 4191786a6f21Smrg ;; 4192d769e936Smrg tandem*) 4193d769e936Smrg case $cc_basename in 4194d769e936Smrg NCC*) 4195d769e936Smrg # NonStop-UX NCC 3.20 4196d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4197d769e936Smrg ;; 4198d769e936Smrg *) 4199d769e936Smrg ;; 4200d769e936Smrg esac 4201d769e936Smrg ;; 4202d769e936Smrg vxworks*) 4203786a6f21Smrg ;; 4204786a6f21Smrg *) 4205d769e936Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4206786a6f21Smrg ;; 4207ec713c28Smrg esac 4208d769e936Smrg fi 4209d769e936Smrg], 4210d769e936Smrg[ 4211d769e936Smrg if test "$GCC" = yes; then 4212d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4213d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42141d54945dSmrg 4215d769e936Smrg case $host_os in 4216d769e936Smrg aix*) 4217d769e936Smrg # All AIX code is PIC. 4218d769e936Smrg if test "$host_cpu" = ia64; then 4219d769e936Smrg # AIX 5 now supports IA64 processor 4220d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4221d769e936Smrg fi 4222d769e936Smrg ;; 42231d54945dSmrg 4224d769e936Smrg amigaos*) 4225d769e936Smrg case $host_cpu in 4226d769e936Smrg powerpc) 4227d769e936Smrg # see comment about AmigaOS4 .so support 4228d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4229d769e936Smrg ;; 4230d769e936Smrg m68k) 4231d769e936Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4232d769e936Smrg # adding the `-m68020' flag to GCC prevents building anything better, 4233d769e936Smrg # like `-m68040'. 4234d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4235d769e936Smrg ;; 4236d769e936Smrg esac 4237d769e936Smrg ;; 42381d54945dSmrg 4239d769e936Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4240d769e936Smrg # PIC is the default for these OSes. 4241d769e936Smrg ;; 42421d54945dSmrg 4243d769e936Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4244d769e936Smrg # This hack is so that the source file can tell whether it is being 4245d769e936Smrg # built for inclusion in a dll (and should export symbols for example). 4246d769e936Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4247d769e936Smrg # (--disable-auto-import) libraries 4248d769e936Smrg m4_if([$1], [GCJ], [], 4249d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4250d769e936Smrg ;; 42511d54945dSmrg 4252d769e936Smrg darwin* | rhapsody*) 4253d769e936Smrg # PIC is the default on this platform 4254d769e936Smrg # Common symbols not allowed in MH_DYLIB files 4255d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4256d769e936Smrg ;; 4257ec713c28Smrg 4258d769e936Smrg haiku*) 4259d769e936Smrg # PIC is the default for Haiku. 4260d769e936Smrg # The "-static" flag exists, but is broken. 4261d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4262d769e936Smrg ;; 42631d54945dSmrg 4264d769e936Smrg hpux*) 4265d769e936Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4266d769e936Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4267d769e936Smrg # sets the default TLS model and affects inlining. 4268d769e936Smrg case $host_cpu in 4269d769e936Smrg hppa*64*) 4270d769e936Smrg # +Z the default 4271d769e936Smrg ;; 4272d769e936Smrg *) 4273d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4274d769e936Smrg ;; 4275d769e936Smrg esac 4276d769e936Smrg ;; 42771d54945dSmrg 4278d769e936Smrg interix[[3-9]]*) 4279d769e936Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4280d769e936Smrg # Instead, we relocate shared libraries at runtime. 4281d769e936Smrg ;; 42821d54945dSmrg 4283d769e936Smrg msdosdjgpp*) 4284d769e936Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4285d769e936Smrg # on systems that don't support them. 4286d769e936Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4287d769e936Smrg enable_shared=no 4288d769e936Smrg ;; 42891d54945dSmrg 4290d769e936Smrg *nto* | *qnx*) 4291d769e936Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4292d769e936Smrg # it will coredump. 4293d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4294d769e936Smrg ;; 42951d54945dSmrg 4296d769e936Smrg sysv4*MP*) 4297d769e936Smrg if test -d /usr/nec; then 4298d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4299d769e936Smrg fi 4300d769e936Smrg ;; 4301ec713c28Smrg 4302d769e936Smrg *) 4303d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4304ec713c28Smrg ;; 4305ec713c28Smrg esac 43061d54945dSmrg 4307d769e936Smrg case $cc_basename in 4308d769e936Smrg nvcc*) # Cuda Compiler Driver 2.2 4309d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4310d769e936Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4311d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4312d769e936Smrg fi 4313ec713c28Smrg ;; 4314ec713c28Smrg esac 4315d769e936Smrg else 4316d769e936Smrg # PORTME Check for flag to pass linker flags through the system compiler. 4317d769e936Smrg case $host_os in 4318d769e936Smrg aix*) 4319d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4320d769e936Smrg if test "$host_cpu" = ia64; then 4321d769e936Smrg # AIX 5 now supports IA64 processor 4322d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4323d769e936Smrg else 4324d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4325d769e936Smrg fi 4326d769e936Smrg ;; 4327ec713c28Smrg 4328d769e936Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4329d769e936Smrg # This hack is so that the source file can tell whether it is being 4330d769e936Smrg # built for inclusion in a dll (and should export symbols for example). 4331d769e936Smrg m4_if([$1], [GCJ], [], 4332d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4333d769e936Smrg ;; 43341d54945dSmrg 4335d769e936Smrg hpux9* | hpux10* | hpux11*) 4336d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4337d769e936Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4338d769e936Smrg # not for PA HP-UX. 4339d769e936Smrg case $host_cpu in 4340d769e936Smrg hppa*64*|ia64*) 4341d769e936Smrg # +Z the default 4342d769e936Smrg ;; 4343d769e936Smrg *) 4344d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4345d769e936Smrg ;; 4346d769e936Smrg esac 4347d769e936Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4348d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4349d769e936Smrg ;; 43501d54945dSmrg 4351d769e936Smrg irix5* | irix6* | nonstopux*) 4352d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4353d769e936Smrg # PIC (with -KPIC) is the default. 4354d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4355d769e936Smrg ;; 43561d54945dSmrg 4357d769e936Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4358d769e936Smrg case $cc_basename in 4359d769e936Smrg # old Intel for x86_64 which still supported -KPIC. 4360d769e936Smrg ecc*) 4361d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4362d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4363d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4364d769e936Smrg ;; 4365d769e936Smrg # icc used to be incompatible with GCC. 4366d769e936Smrg # ICC 10 doesn't accept -KPIC any more. 4367d769e936Smrg icc* | ifort*) 4368d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4369d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4370d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4371d769e936Smrg ;; 4372d769e936Smrg # Lahey Fortran 8.1. 4373d769e936Smrg lf95*) 4374d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4375d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4376d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4377d769e936Smrg ;; 4378d769e936Smrg nagfor*) 4379d769e936Smrg # NAG Fortran compiler 4380d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4381d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4382d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4383d769e936Smrg ;; 4384d769e936Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4385d769e936Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4386d769e936Smrg # which looks to be a dead project) 4387d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4388d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4389d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4390d769e936Smrg ;; 4391d769e936Smrg ccc*) 4392d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4393d769e936Smrg # All Alpha code is PIC. 4394d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4395d769e936Smrg ;; 4396d769e936Smrg xl* | bgxl* | bgf* | mpixl*) 4397d769e936Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4398d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4399d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4400d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4401d769e936Smrg ;; 4402d769e936Smrg *) 4403d769e936Smrg case `$CC -V 2>&1 | sed 5q` in 4404d769e936Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4405d769e936Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4406d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4407d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4408d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4409d769e936Smrg ;; 4410d769e936Smrg *Sun\ F* | *Sun*Fortran*) 4411d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4412d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4413d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4414d769e936Smrg ;; 4415d769e936Smrg *Sun\ C*) 4416d769e936Smrg # Sun C 5.9 4417d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4418d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4419d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4420d769e936Smrg ;; 4421d769e936Smrg *Intel*\ [[CF]]*Compiler*) 4422d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4423d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4424d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4425d769e936Smrg ;; 4426d769e936Smrg *Portland\ Group*) 4427d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4428d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4429d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4430d769e936Smrg ;; 4431d769e936Smrg esac 4432d769e936Smrg ;; 4433d769e936Smrg esac 4434d769e936Smrg ;; 44351d54945dSmrg 4436d769e936Smrg newsos6) 4437d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4438d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4439d769e936Smrg ;; 44401d54945dSmrg 4441d769e936Smrg *nto* | *qnx*) 4442d769e936Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4443d769e936Smrg # it will coredump. 4444d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4445d769e936Smrg ;; 44461d54945dSmrg 4447d769e936Smrg osf3* | osf4* | osf5*) 4448d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4449d769e936Smrg # All OSF/1 code is PIC. 4450d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4451d769e936Smrg ;; 44521d54945dSmrg 4453d769e936Smrg rdos*) 4454d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4455d769e936Smrg ;; 44561d54945dSmrg 4457d769e936Smrg solaris*) 4458d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4459d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4460d769e936Smrg case $cc_basename in 4461d769e936Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4462d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4463d769e936Smrg *) 4464d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4465d769e936Smrg esac 4466d769e936Smrg ;; 44671d54945dSmrg 4468d769e936Smrg sunos4*) 4469d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4470d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4471d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4472d769e936Smrg ;; 44731d54945dSmrg 4474d769e936Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4475d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4476d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4477d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4478d769e936Smrg ;; 44791d54945dSmrg 4480d769e936Smrg sysv4*MP*) 4481d769e936Smrg if test -d /usr/nec ;then 4482d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4483d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4484d769e936Smrg fi 4485d769e936Smrg ;; 44861d54945dSmrg 4487d769e936Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4488d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4489d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4490d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4491d769e936Smrg ;; 44921d54945dSmrg 4493d769e936Smrg unicos*) 4494d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4495d769e936Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4496d769e936Smrg ;; 44971d54945dSmrg 4498d769e936Smrg uts4*) 4499d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4500d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4501786a6f21Smrg ;; 4502d769e936Smrg 4503ec713c28Smrg *) 4504d769e936Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4505786a6f21Smrg ;; 4506ec713c28Smrg esac 4507d769e936Smrg fi 4508d769e936Smrg]) 4509d769e936Smrgcase $host_os in 4510d769e936Smrg # For platforms which do not support PIC, -DPIC is meaningless: 4511d769e936Smrg *djgpp*) 4512d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4513ec713c28Smrg ;; 4514d769e936Smrg *) 4515d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4516d769e936Smrg ;; 4517d769e936Smrgesac 45181d54945dSmrg 4519d769e936SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4520d769e936Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4521d769e936Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4522d769e936Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 45231d54945dSmrg 4524ec713c28Smrg# 4525d769e936Smrg# Check to make sure the PIC flag actually works. 4526ec713c28Smrg# 4527d769e936Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4528d769e936Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4529d769e936Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4530d769e936Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4531d769e936Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4532d769e936Smrg "" | " "*) ;; 4533d769e936Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4534d769e936Smrg esac], 4535d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4536d769e936Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4537d769e936Smrgfi 4538d769e936Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4539d769e936Smrg [Additional compiler flags for building library objects]) 4540d769e936Smrg 4541d769e936Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4542d769e936Smrg [How to pass a linker flag through the compiler]) 4543ec713c28Smrg# 4544d769e936Smrg# Check to make sure the static flag actually works. 4545ec713c28Smrg# 4546d769e936Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4547d769e936Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4548d769e936Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4549d769e936Smrg $lt_tmp_static_flag, 4550d769e936Smrg [], 4551d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4552d769e936Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4553d769e936Smrg [Compiler flag to prevent dynamic linking]) 4554d769e936Smrg])# _LT_COMPILER_PIC 45551d54945dSmrg 45561d54945dSmrg 4557d769e936Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 4558d769e936Smrg# ---------------------------- 4559d769e936Smrg# See if the linker supports building shared libraries. 4560d769e936Smrgm4_defun([_LT_LINKER_SHLIBS], 4561d769e936Smrg[AC_REQUIRE([LT_PATH_LD])dnl 4562d769e936SmrgAC_REQUIRE([LT_PATH_NM])dnl 4563d769e936Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4564d769e936Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4565d769e936Smrgm4_require([_LT_DECL_EGREP])dnl 4566d769e936Smrgm4_require([_LT_DECL_SED])dnl 4567d769e936Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4568d769e936Smrgm4_require([_LT_TAG_COMPILER])dnl 4569d769e936SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4570d769e936Smrgm4_if([$1], [CXX], [ 4571d769e936Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4572d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4573d769e936Smrg case $host_os in 4574d769e936Smrg aix[[4-9]]*) 4575d769e936Smrg # If we're using GNU nm, then we don't want the "-C" option. 4576d769e936Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4577d769e936Smrg # Also, AIX nm treats weak defined symbols like other global defined 4578d769e936Smrg # symbols, whereas GNU nm marks them as "W". 4579d769e936Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4580d769e936Smrg _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' 4581d769e936Smrg else 4582d769e936Smrg _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' 4583d769e936Smrg fi 4584d769e936Smrg ;; 4585d769e936Smrg pw32*) 4586d769e936Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4587d769e936Smrg ;; 4588d769e936Smrg cygwin* | mingw* | cegcc*) 4589d769e936Smrg case $cc_basename in 4590d769e936Smrg cl*) 4591d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4592d769e936Smrg ;; 4593d769e936Smrg *) 4594d769e936Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 4595d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4596d769e936Smrg ;; 4597d769e936Smrg esac 4598d769e936Smrg ;; 4599d769e936Smrg *) 4600d769e936Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4601d769e936Smrg ;; 4602d769e936Smrg esac 4603d769e936Smrg], [ 4604d769e936Smrg runpath_var= 4605d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 4606d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4607d769e936Smrg _LT_TAGVAR(archive_cmds, $1)= 4608d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4609d769e936Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 4610d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4611d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4612d769e936Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4613d769e936Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 4614d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4615d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4616d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4617d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4618d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4619d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4620d769e936Smrg _LT_TAGVAR(inherit_rpath, $1)=no 4621d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4622d769e936Smrg _LT_TAGVAR(module_cmds, $1)= 4623d769e936Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 4624d769e936Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4625d769e936Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4626d769e936Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4627d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4628d769e936Smrg # include_expsyms should be a list of space-separated symbols to be *always* 4629d769e936Smrg # included in the symbol list 4630d769e936Smrg _LT_TAGVAR(include_expsyms, $1)= 4631d769e936Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 4632d769e936Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4633d769e936Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4634d769e936Smrg # as well as any symbol that contains `d'. 4635d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4636d769e936Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4637d769e936Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 4638d769e936Smrg # the symbol is explicitly referenced. Since portable code cannot 4639d769e936Smrg # rely on this symbol name, it's probably fine to never include it in 4640d769e936Smrg # preloaded symbol tables. 4641d769e936Smrg # Exclude shared library initialization/finalization symbols. 4642d769e936Smrgdnl Note also adjust exclude_expsyms for C++ above. 4643d769e936Smrg extract_expsyms_cmds= 46441d54945dSmrg 4645d769e936Smrg case $host_os in 4646d769e936Smrg cygwin* | mingw* | pw32* | cegcc*) 4647d769e936Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4648d769e936Smrg # When not using gcc, we currently assume that we are using 4649d769e936Smrg # Microsoft Visual C++. 4650d769e936Smrg if test "$GCC" != yes; then 4651d769e936Smrg with_gnu_ld=no 4652d769e936Smrg fi 4653d769e936Smrg ;; 4654d769e936Smrg interix*) 4655d769e936Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4656d769e936Smrg with_gnu_ld=yes 4657d769e936Smrg ;; 4658d769e936Smrg openbsd*) 4659d769e936Smrg with_gnu_ld=no 4660d769e936Smrg ;; 4661d769e936Smrg esac 46621d54945dSmrg 4663d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 46641d54945dSmrg 4665d769e936Smrg # On some targets, GNU ld is compatible enough with the native linker 4666d769e936Smrg # that we're better off using the native interface for both. 4667d769e936Smrg lt_use_gnu_ld_interface=no 4668d769e936Smrg if test "$with_gnu_ld" = yes; then 4669d769e936Smrg case $host_os in 4670d769e936Smrg aix*) 4671d769e936Smrg # The AIX port of GNU ld has always aspired to compatibility 4672d769e936Smrg # with the native linker. However, as the warning in the GNU ld 4673d769e936Smrg # block says, versions before 2.19.5* couldn't really create working 4674d769e936Smrg # shared libraries, regardless of the interface used. 4675d769e936Smrg case `$LD -v 2>&1` in 4676d769e936Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4677d769e936Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4678d769e936Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4679d769e936Smrg *) 4680d769e936Smrg lt_use_gnu_ld_interface=yes 4681d769e936Smrg ;; 4682d769e936Smrg esac 4683d769e936Smrg ;; 4684d769e936Smrg *) 4685d769e936Smrg lt_use_gnu_ld_interface=yes 4686d769e936Smrg ;; 4687d769e936Smrg esac 4688d769e936Smrg fi 46891d54945dSmrg 4690d769e936Smrg if test "$lt_use_gnu_ld_interface" = yes; then 4691d769e936Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 4692d769e936Smrg wlarc='${wl}' 46931d54945dSmrg 4694d769e936Smrg # Set some defaults for GNU ld with shared library support. These 4695d769e936Smrg # are reset later if shared libraries are not supported. Putting them 4696d769e936Smrg # here allows them to be overridden if necessary. 4697d769e936Smrg runpath_var=LD_RUN_PATH 4698d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4699d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4700d769e936Smrg # ancient GNU ld didn't support --whole-archive et. al. 4701d769e936Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4702d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4703d769e936Smrg else 4704d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4705d769e936Smrg fi 4706d769e936Smrg supports_anon_versioning=no 4707d769e936Smrg case `$LD -v 2>&1` in 4708d769e936Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 4709d769e936Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4710d769e936Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4711d769e936Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4712d769e936Smrg *\ 2.11.*) ;; # other 2.11 versions 4713d769e936Smrg *) supports_anon_versioning=yes ;; 4714d769e936Smrg esac 47151d54945dSmrg 4716d769e936Smrg # See if GNU ld supports shared libraries. 4717d769e936Smrg case $host_os in 4718d769e936Smrg aix[[3-9]]*) 4719d769e936Smrg # On AIX/PPC, the GNU linker is very broken 4720d769e936Smrg if test "$host_cpu" != ia64; then 4721d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4722d769e936Smrg cat <<_LT_EOF 1>&2 47231d54945dSmrg 4724d769e936Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 4725d769e936Smrg*** to be unable to reliably create shared libraries on AIX. 4726d769e936Smrg*** Therefore, libtool is disabling shared libraries support. If you 4727d769e936Smrg*** really care for shared libraries, you may want to install binutils 4728d769e936Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4729d769e936Smrg*** You will then need to restart the configuration process. 47301d54945dSmrg 4731d769e936Smrg_LT_EOF 4732d769e936Smrg fi 4733d769e936Smrg ;; 47341d54945dSmrg 4735d769e936Smrg amigaos*) 4736d769e936Smrg case $host_cpu in 4737d769e936Smrg powerpc) 4738d769e936Smrg # see comment about AmigaOS4 .so support 4739d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4740d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4741d769e936Smrg ;; 4742d769e936Smrg m68k) 4743d769e936Smrg _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)' 4744d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4745d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4746d769e936Smrg ;; 4747d769e936Smrg esac 4748d769e936Smrg ;; 47491d54945dSmrg 4750d769e936Smrg beos*) 4751d769e936Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4752d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4753d769e936Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4754d769e936Smrg # support --undefined. This deserves some investigation. FIXME 4755d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4756d769e936Smrg else 4757d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4758d769e936Smrg fi 4759d769e936Smrg ;; 47601d54945dSmrg 4761d769e936Smrg cygwin* | mingw* | pw32* | cegcc*) 4762d769e936Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4763d769e936Smrg # as there is no search path for DLLs. 4764d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4765d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4766d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4767d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4768d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4769d769e936Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 4770d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4771d769e936Smrg 4772d769e936Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4773d769e936Smrg _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' 4774d769e936Smrg # If the export-symbols file already is a .def file (1st line 4775d769e936Smrg # is EXPORTS), use it as is; otherwise, prepend... 4776d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4777d769e936Smrg cp $export_symbols $output_objdir/$soname.def; 4778d769e936Smrg else 4779d769e936Smrg echo EXPORTS > $output_objdir/$soname.def; 4780d769e936Smrg cat $export_symbols >> $output_objdir/$soname.def; 4781d769e936Smrg fi~ 4782d769e936Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4783d769e936Smrg else 4784d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4785d769e936Smrg fi 4786d769e936Smrg ;; 47871d54945dSmrg 4788d769e936Smrg haiku*) 4789d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4790d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4791d769e936Smrg ;; 47921d54945dSmrg 4793d769e936Smrg interix[[3-9]]*) 4794d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4795d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4796d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4797d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4798d769e936Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4799d769e936Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4800d769e936Smrg # default) and relocated if they conflict, which is a slow very memory 4801d769e936Smrg # consuming and fragmenting process. To avoid this, we pick a random, 4802d769e936Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4803d769e936Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4804d769e936Smrg _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' 4805d769e936Smrg _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' 4806d769e936Smrg ;; 48071d54945dSmrg 4808d769e936Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4809d769e936Smrg tmp_diet=no 4810d769e936Smrg if test "$host_os" = linux-dietlibc; then 4811d769e936Smrg case $cc_basename in 4812d769e936Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4813d769e936Smrg esac 4814d769e936Smrg fi 4815d769e936Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4816d769e936Smrg && test "$tmp_diet" = no 4817d769e936Smrg then 4818d769e936Smrg tmp_addflag=' $pic_flag' 4819d769e936Smrg tmp_sharedflag='-shared' 4820d769e936Smrg case $cc_basename,$host_cpu in 4821d769e936Smrg pgcc*) # Portland Group C compiler 4822d769e936Smrg _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' 4823d769e936Smrg tmp_addflag=' $pic_flag' 4824d769e936Smrg ;; 4825d769e936Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 4826d769e936Smrg # Portland Group f77 and f90 compilers 4827d769e936Smrg _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' 4828d769e936Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 4829d769e936Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4830d769e936Smrg tmp_addflag=' -i_dynamic' ;; 4831d769e936Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4832d769e936Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4833d769e936Smrg ifc* | ifort*) # Intel Fortran compiler 4834d769e936Smrg tmp_addflag=' -nofor_main' ;; 4835d769e936Smrg lf95*) # Lahey Fortran 8.1 4836d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4837d769e936Smrg tmp_sharedflag='--shared' ;; 4838d769e936Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4839d769e936Smrg tmp_sharedflag='-qmkshrobj' 4840d769e936Smrg tmp_addflag= ;; 4841d769e936Smrg nvcc*) # Cuda Compiler Driver 2.2 4842d769e936Smrg _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' 4843d769e936Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4844d769e936Smrg ;; 4845d769e936Smrg esac 4846d769e936Smrg case `$CC -V 2>&1 | sed 5q` in 4847d769e936Smrg *Sun\ C*) # Sun C 5.9 4848d769e936Smrg _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' 4849d769e936Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4850d769e936Smrg tmp_sharedflag='-G' ;; 4851d769e936Smrg *Sun\ F*) # Sun Fortran 8.3 4852d769e936Smrg tmp_sharedflag='-G' ;; 4853d769e936Smrg esac 4854d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 48551d54945dSmrg 4856d769e936Smrg if test "x$supports_anon_versioning" = xyes; then 4857d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4858d769e936Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4859d769e936Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4860d769e936Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4861d769e936Smrg fi 4862ba85709eSmrg 4863d769e936Smrg case $cc_basename in 4864d769e936Smrg xlf* | bgf* | bgxlf* | mpixlf*) 4865d769e936Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4866d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4867d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4868d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4869d769e936Smrg if test "x$supports_anon_versioning" = xyes; then 4870d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4871d769e936Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4872d769e936Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4873d769e936Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4874d769e936Smrg fi 4875d769e936Smrg ;; 4876d769e936Smrg esac 4877d769e936Smrg else 4878d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4879d769e936Smrg fi 4880d769e936Smrg ;; 48811d54945dSmrg 4882d769e936Smrg netbsd*) 4883d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4884d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4885d769e936Smrg wlarc= 4886d769e936Smrg else 4887d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4888d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 4889d769e936Smrg fi 4890d769e936Smrg ;; 48911d54945dSmrg 4892d769e936Smrg solaris*) 4893d769e936Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4894d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4895d769e936Smrg cat <<_LT_EOF 1>&2 48961d54945dSmrg 4897d769e936Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4898d769e936Smrg*** create shared libraries on Solaris systems. Therefore, libtool 4899d769e936Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4900d769e936Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 4901d769e936Smrg*** your PATH or compiler configuration so that the native linker is 4902d769e936Smrg*** used, and then restart. 49031d54945dSmrg 4904d769e936Smrg_LT_EOF 4905d769e936Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4906d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4907d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 4908d769e936Smrg else 4909d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4910d769e936Smrg fi 4911d769e936Smrg ;; 49121d54945dSmrg 4913d769e936Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4914d769e936Smrg case `$LD -v 2>&1` in 4915d769e936Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4916d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4917d769e936Smrg cat <<_LT_EOF 1>&2 49181d54945dSmrg 4919d769e936Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4920d769e936Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4921d769e936Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4922d769e936Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4923d769e936Smrg*** your PATH or compiler configuration so that the native linker is 4924d769e936Smrg*** used, and then restart. 49251d54945dSmrg 4926d769e936Smrg_LT_EOF 4927d769e936Smrg ;; 4928d769e936Smrg *) 4929d769e936Smrg # For security reasons, it is highly recommended that you always 4930d769e936Smrg # use absolute paths for naming shared libraries, and exclude the 4931d769e936Smrg # DT_RUNPATH tag from executables and libraries. But doing so 4932d769e936Smrg # requires that you compile everything twice, which is a pain. 4933d769e936Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4934d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4935d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4936d769e936Smrg _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' 4937d769e936Smrg else 4938d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4939d769e936Smrg fi 4940d769e936Smrg ;; 4941d769e936Smrg esac 4942d769e936Smrg ;; 49431d54945dSmrg 4944d769e936Smrg sunos4*) 4945d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4946d769e936Smrg wlarc= 4947d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4948d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4949d769e936Smrg ;; 49501d54945dSmrg 4951d769e936Smrg *) 4952d769e936Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4953d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4954d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 4955d769e936Smrg else 4956d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4957d769e936Smrg fi 4958d769e936Smrg ;; 4959d769e936Smrg esac 49601d54945dSmrg 4961d769e936Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4962d769e936Smrg runpath_var= 4963d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4964d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4965d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4966d769e936Smrg fi 4967d769e936Smrg else 4968d769e936Smrg # PORTME fill in a description of your system's linker (not GNU ld) 4969d769e936Smrg case $host_os in 4970d769e936Smrg aix3*) 4971d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4972d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 4973d769e936Smrg _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' 4974d769e936Smrg # Note: this linker hardcodes the directories in LIBPATH if there 4975d769e936Smrg # are no directories specified by -L. 4976d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4977d769e936Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4978d769e936Smrg # Neither direct hardcoding nor static linking is supported with a 4979d769e936Smrg # broken collect2. 4980d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4981d769e936Smrg fi 4982d769e936Smrg ;; 49831d54945dSmrg 4984d769e936Smrg aix[[4-9]]*) 4985d769e936Smrg if test "$host_cpu" = ia64; then 4986d769e936Smrg # On IA64, the linker does run time linking by default, so we don't 4987d769e936Smrg # have to do anything special. 4988d769e936Smrg aix_use_runtimelinking=no 4989d769e936Smrg exp_sym_flag='-Bexport' 4990d769e936Smrg no_entry_flag="" 4991d769e936Smrg else 4992d769e936Smrg # If we're using GNU nm, then we don't want the "-C" option. 4993d769e936Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4994d769e936Smrg # Also, AIX nm treats weak defined symbols like other global 4995d769e936Smrg # defined symbols, whereas GNU nm marks them as "W". 4996d769e936Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4997d769e936Smrg _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' 4998d769e936Smrg else 4999d769e936Smrg _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' 5000d769e936Smrg fi 5001d769e936Smrg aix_use_runtimelinking=no 50021d54945dSmrg 5003d769e936Smrg # Test if we are trying to use run time linking or normal 5004d769e936Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5005d769e936Smrg # need to do runtime linking. 5006d769e936Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5007d769e936Smrg for ld_flag in $LDFLAGS; do 5008d769e936Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5009d769e936Smrg aix_use_runtimelinking=yes 5010d769e936Smrg break 5011d769e936Smrg fi 5012d769e936Smrg done 5013d769e936Smrg ;; 5014d769e936Smrg esac 50151d54945dSmrg 5016d769e936Smrg exp_sym_flag='-bexport' 5017d769e936Smrg no_entry_flag='-bnoentry' 5018d769e936Smrg fi 50191d54945dSmrg 5020d769e936Smrg # When large executables or shared objects are built, AIX ld can 5021d769e936Smrg # have problems creating the table of contents. If linking a library 5022d769e936Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5023d769e936Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5024d769e936Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 50251d54945dSmrg 5026d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='' 5027d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5028d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5029d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5030d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5031d769e936Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 50321d54945dSmrg 5033d769e936Smrg if test "$GCC" = yes; then 5034d769e936Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5035d769e936Smrg # We only want to do this on AIX 4.2 and lower, the check 5036d769e936Smrg # below for broken collect2 doesn't work under 4.3+ 5037d769e936Smrg collect2name=`${CC} -print-prog-name=collect2` 5038d769e936Smrg if test -f "$collect2name" && 5039d769e936Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5040d769e936Smrg then 5041d769e936Smrg # We have reworked collect2 5042d769e936Smrg : 5043d769e936Smrg else 5044d769e936Smrg # We have old collect2 5045d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5046d769e936Smrg # It fails to find uninstalled libraries when the uninstalled 5047d769e936Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5048d769e936Smrg # to unsupported forces relinking 5049d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5050d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5051d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5052d769e936Smrg fi 5053d769e936Smrg ;; 5054d769e936Smrg esac 5055d769e936Smrg shared_flag='-shared' 5056d769e936Smrg if test "$aix_use_runtimelinking" = yes; then 5057d769e936Smrg shared_flag="$shared_flag "'${wl}-G' 5058d769e936Smrg fi 5059d769e936Smrg else 5060d769e936Smrg # not using gcc 5061d769e936Smrg if test "$host_cpu" = ia64; then 5062d769e936Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5063d769e936Smrg # chokes on -Wl,-G. The following line is correct: 5064d769e936Smrg shared_flag='-G' 5065d769e936Smrg else 5066d769e936Smrg if test "$aix_use_runtimelinking" = yes; then 5067d769e936Smrg shared_flag='${wl}-G' 5068d769e936Smrg else 5069d769e936Smrg shared_flag='${wl}-bM:SRE' 5070d769e936Smrg fi 5071d769e936Smrg fi 5072d769e936Smrg fi 50731d54945dSmrg 5074d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5075d769e936Smrg # It seems that -bexpall does not export symbols beginning with 5076d769e936Smrg # underscore (_), so it is better to generate a list of symbols to export. 5077d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5078d769e936Smrg if test "$aix_use_runtimelinking" = yes; then 5079d769e936Smrg # Warning - without using the other runtime loading flags (-brtl), 5080d769e936Smrg # -berok will link without error, but may produce a broken library. 5081d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5082d769e936Smrg # Determine the default libpath from the value encoded in an 5083d769e936Smrg # empty executable. 5084d769e936Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5085d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5086d769e936Smrg _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" 5087d769e936Smrg else 5088d769e936Smrg if test "$host_cpu" = ia64; then 5089d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5090d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5091d769e936Smrg _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" 5092d769e936Smrg else 5093d769e936Smrg # Determine the default libpath from the value encoded in an 5094d769e936Smrg # empty executable. 5095d769e936Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5096d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5097d769e936Smrg # Warning - without using the other run time loading flags, 5098d769e936Smrg # -berok will link without error, but may produce a broken library. 5099d769e936Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5100d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5101d769e936Smrg if test "$with_gnu_ld" = yes; then 5102d769e936Smrg # We only use this code for GNU lds that support --whole-archive. 5103d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5104d769e936Smrg else 5105d769e936Smrg # Exported symbols can be pulled into shared objects from archives 5106d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5107d769e936Smrg fi 5108d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5109d769e936Smrg # This is similar to how AIX traditionally builds its shared libraries. 5110d769e936Smrg _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' 5111d769e936Smrg fi 5112d769e936Smrg fi 5113d769e936Smrg ;; 51141d54945dSmrg 5115d769e936Smrg amigaos*) 5116d769e936Smrg case $host_cpu in 5117d769e936Smrg powerpc) 5118d769e936Smrg # see comment about AmigaOS4 .so support 5119d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5120d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5121d769e936Smrg ;; 5122d769e936Smrg m68k) 5123d769e936Smrg _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)' 5124d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5125d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5126d769e936Smrg ;; 5127d769e936Smrg esac 5128d769e936Smrg ;; 51291d54945dSmrg 5130d769e936Smrg bsdi[[45]]*) 5131d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5132d769e936Smrg ;; 51331d54945dSmrg 5134d769e936Smrg cygwin* | mingw* | pw32* | cegcc*) 5135d769e936Smrg # When not using gcc, we currently assume that we are using 5136d769e936Smrg # Microsoft Visual C++. 5137d769e936Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5138d769e936Smrg # no search path for DLLs. 5139d769e936Smrg case $cc_basename in 5140d769e936Smrg cl*) 5141d769e936Smrg # Native MSVC 5142d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5143d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5144d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5145d769e936Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5146d769e936Smrg # Tell ltmain to make .lib files, not .a files. 5147d769e936Smrg libext=lib 5148d769e936Smrg # Tell ltmain to make .dll files, not .so files. 5149d769e936Smrg shrext_cmds=".dll" 5150d769e936Smrg # FIXME: Setting linknames here is a bad hack. 5151d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5152d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5153d769e936Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5154d769e936Smrg else 5155d769e936Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5156d769e936Smrg fi~ 5157d769e936Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5158d769e936Smrg linknames=' 5159d769e936Smrg # The linker will not automatically build a static lib if we build a DLL. 5160d769e936Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5161d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5162d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5163d769e936Smrg _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' 5164d769e936Smrg # Don't use ranlib 5165d769e936Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5166d769e936Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5167d769e936Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5168d769e936Smrg case $lt_outputfile in 5169d769e936Smrg *.exe|*.EXE) ;; 5170d769e936Smrg *) 5171d769e936Smrg lt_outputfile="$lt_outputfile.exe" 5172d769e936Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 5173d769e936Smrg ;; 5174d769e936Smrg esac~ 5175d769e936Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5176d769e936Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5177d769e936Smrg $RM "$lt_outputfile.manifest"; 5178d769e936Smrg fi' 5179d769e936Smrg ;; 5180d769e936Smrg *) 5181d769e936Smrg # Assume MSVC wrapper 5182d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5183d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5184d769e936Smrg # Tell ltmain to make .lib files, not .a files. 5185d769e936Smrg libext=lib 5186d769e936Smrg # Tell ltmain to make .dll files, not .so files. 5187d769e936Smrg shrext_cmds=".dll" 5188d769e936Smrg # FIXME: Setting linknames here is a bad hack. 5189d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5190d769e936Smrg # The linker will automatically build a .lib file if we build a DLL. 5191d769e936Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5192d769e936Smrg # FIXME: Should let the user specify the lib program. 5193d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5194d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5195d769e936Smrg ;; 5196d769e936Smrg esac 5197d769e936Smrg ;; 51981d54945dSmrg 5199d769e936Smrg darwin* | rhapsody*) 5200d769e936Smrg _LT_DARWIN_LINKER_FEATURES($1) 5201d769e936Smrg ;; 52021d54945dSmrg 5203d769e936Smrg dgux*) 5204d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5205d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5206d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5207d769e936Smrg ;; 52081d54945dSmrg 5209d769e936Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5210d769e936Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 5211d769e936Smrg # does not break anything, and helps significantly (at the cost of a little 5212d769e936Smrg # extra space). 5213d769e936Smrg freebsd2.2*) 5214d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5215d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5216d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5217d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5218d769e936Smrg ;; 52191d54945dSmrg 5220d769e936Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5221d769e936Smrg freebsd2.*) 5222d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5223d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5224d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5225d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5226d769e936Smrg ;; 52271d54945dSmrg 5228d769e936Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5229d769e936Smrg freebsd* | dragonfly*) 5230d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5231d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5232d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5233d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5234d769e936Smrg ;; 52351d54945dSmrg 5236d769e936Smrg hpux9*) 5237d769e936Smrg if test "$GCC" = yes; then 5238d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5239d769e936Smrg else 5240d769e936Smrg _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' 5241d769e936Smrg fi 5242d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5243d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5244d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52451d54945dSmrg 5246d769e936Smrg # hardcode_minus_L: Not really in the search PATH, 5247d769e936Smrg # but as the default location of the library. 5248d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5249d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5250d769e936Smrg ;; 52511d54945dSmrg 5252d769e936Smrg hpux10*) 5253d769e936Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5254d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5255d769e936Smrg else 5256d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5257d769e936Smrg fi 5258d769e936Smrg if test "$with_gnu_ld" = no; then 5259d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5260d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5261d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5262d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5263d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5264d769e936Smrg # hardcode_minus_L: Not really in the search PATH, 5265d769e936Smrg # but as the default location of the library. 5266d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5267d769e936Smrg fi 5268d769e936Smrg ;; 52691d54945dSmrg 5270d769e936Smrg hpux11*) 5271d769e936Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5272d769e936Smrg case $host_cpu in 5273d769e936Smrg hppa*64*) 5274d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5275d769e936Smrg ;; 5276d769e936Smrg ia64*) 5277d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5278d769e936Smrg ;; 5279d769e936Smrg *) 5280d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5281d769e936Smrg ;; 5282d769e936Smrg esac 5283d769e936Smrg else 5284d769e936Smrg case $host_cpu in 5285d769e936Smrg hppa*64*) 5286d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5287d769e936Smrg ;; 5288d769e936Smrg ia64*) 5289d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5290d769e936Smrg ;; 5291d769e936Smrg *) 5292d769e936Smrg m4_if($1, [], [ 5293d769e936Smrg # Older versions of the 11.00 compiler do not understand -b yet 5294d769e936Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5295d769e936Smrg _LT_LINKER_OPTION([if $CC understands -b], 5296d769e936Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5297d769e936Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5298d769e936Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5299d769e936Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5300d769e936Smrg ;; 5301d769e936Smrg esac 5302d769e936Smrg fi 5303d769e936Smrg if test "$with_gnu_ld" = no; then 5304d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5305d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53061d54945dSmrg 5307d769e936Smrg case $host_cpu in 5308d769e936Smrg hppa*64*|ia64*) 5309d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5310d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5311d769e936Smrg ;; 5312d769e936Smrg *) 5313d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5314d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5315d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 53161d54945dSmrg 5317d769e936Smrg # hardcode_minus_L: Not really in the search PATH, 5318d769e936Smrg # but as the default location of the library. 5319d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5320d769e936Smrg ;; 5321d769e936Smrg esac 5322d769e936Smrg fi 5323d769e936Smrg ;; 53241d54945dSmrg 5325d769e936Smrg irix5* | irix6* | nonstopux*) 5326d769e936Smrg if test "$GCC" = yes; then 5327d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 5328d769e936Smrg # Try to use the -exported_symbol ld option, if it does not 5329d769e936Smrg # work, assume that -exports_file does not work either and 5330d769e936Smrg # implicitly export all symbols. 5331d769e936Smrg # This should be the same for all languages, so no per-tag cache variable. 5332d769e936Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5333d769e936Smrg [lt_cv_irix_exported_symbol], 5334d769e936Smrg [save_LDFLAGS="$LDFLAGS" 5335d769e936Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5336d769e936Smrg AC_LINK_IFELSE( 5337d769e936Smrg [AC_LANG_SOURCE( 5338d769e936Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5339d769e936Smrg [C++], [[int foo (void) { return 0; }]], 5340d769e936Smrg [Fortran 77], [[ 5341d769e936Smrg subroutine foo 5342d769e936Smrg end]], 5343d769e936Smrg [Fortran], [[ 5344d769e936Smrg subroutine foo 5345d769e936Smrg end]])])], 5346d769e936Smrg [lt_cv_irix_exported_symbol=yes], 5347d769e936Smrg [lt_cv_irix_exported_symbol=no]) 5348d769e936Smrg LDFLAGS="$save_LDFLAGS"]) 5349d769e936Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 5350d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 5351d769e936Smrg fi 5352d769e936Smrg else 5353d769e936Smrg _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' 5354d769e936Smrg _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' 5355d769e936Smrg fi 5356d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5357d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5358d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5359d769e936Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5360d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5361d769e936Smrg ;; 53621d54945dSmrg 5363d769e936Smrg netbsd*) 5364d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5365d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5366d769e936Smrg else 5367d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5368d769e936Smrg fi 5369d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5370d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5371d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5372d769e936Smrg ;; 53731d54945dSmrg 5374d769e936Smrg newsos6) 5375d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5376d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5377d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5378d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5379d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5380d769e936Smrg ;; 53811d54945dSmrg 5382d769e936Smrg *nto* | *qnx*) 5383d769e936Smrg ;; 53841d54945dSmrg 5385d769e936Smrg openbsd*) 5386d769e936Smrg if test -f /usr/libexec/ld.so; then 5387d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5388d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5389d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5390d769e936Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5391d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5392d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5393d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5394d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5395d769e936Smrg else 5396d769e936Smrg case $host_os in 5397d769e936Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5398d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5399d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5400d769e936Smrg ;; 5401d769e936Smrg *) 5402d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5403d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5404d769e936Smrg ;; 5405d769e936Smrg esac 5406d769e936Smrg fi 5407d769e936Smrg else 5408d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5409d769e936Smrg fi 5410d769e936Smrg ;; 54111d54945dSmrg 5412d769e936Smrg os2*) 5413d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5414d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5415d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5416d769e936Smrg _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' 5417d769e936Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5418d769e936Smrg ;; 54191d54945dSmrg 5420d769e936Smrg osf3*) 5421d769e936Smrg if test "$GCC" = yes; then 5422d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5423d769e936Smrg _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' 5424d769e936Smrg else 5425d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5426d769e936Smrg _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' 5427d769e936Smrg fi 5428d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5429d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5430d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5431d769e936Smrg ;; 54321d54945dSmrg 5433d769e936Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5434d769e936Smrg if test "$GCC" = yes; then 5435d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5436d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 5437d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5438d769e936Smrg else 5439d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5440d769e936Smrg _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' 5441d769e936Smrg _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~ 5442d769e936Smrg $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' 54431d54945dSmrg 5444d769e936Smrg # Both c and cxx compiler support -rpath directly 5445d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5446d769e936Smrg fi 5447d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5448d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5449d769e936Smrg ;; 54501d54945dSmrg 5451d769e936Smrg solaris*) 5452d769e936Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5453d769e936Smrg if test "$GCC" = yes; then 5454d769e936Smrg wlarc='${wl}' 5455d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5456d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5457d769e936Smrg $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5458d769e936Smrg else 5459d769e936Smrg case `$CC -V 2>&1` in 5460d769e936Smrg *"Compilers 5.0"*) 5461d769e936Smrg wlarc='' 5462d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5463d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5464d769e936Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5465d769e936Smrg ;; 5466d769e936Smrg *) 5467d769e936Smrg wlarc='${wl}' 5468d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5469d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5470d769e936Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5471d769e936Smrg ;; 5472d769e936Smrg esac 5473d769e936Smrg fi 5474d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5475d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5476d769e936Smrg case $host_os in 5477d769e936Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5478d769e936Smrg *) 5479d769e936Smrg # The compiler driver will combine and reorder linker options, 5480d769e936Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 5481d769e936Smrg # but is careful enough not to reorder. 5482d769e936Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5483d769e936Smrg if test "$GCC" = yes; then 5484d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5485d769e936Smrg else 5486d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5487d769e936Smrg fi 5488d769e936Smrg ;; 5489d769e936Smrg esac 5490d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5491d769e936Smrg ;; 54921d54945dSmrg 5493d769e936Smrg sunos4*) 5494d769e936Smrg if test "x$host_vendor" = xsequent; then 5495d769e936Smrg # Use $CC to link under sequent, because it throws in some extra .o 5496d769e936Smrg # files that make .init and .fini sections work. 5497d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5498d769e936Smrg else 5499d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5500d769e936Smrg fi 5501d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5502d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5503d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5504d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5505d769e936Smrg ;; 55061d54945dSmrg 5507d769e936Smrg sysv4) 5508d769e936Smrg case $host_vendor in 5509d769e936Smrg sni) 5510d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5511d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5512d769e936Smrg ;; 5513d769e936Smrg siemens) 5514d769e936Smrg ## LD is ld it makes a PLAMLIB 5515d769e936Smrg ## CC just makes a GrossModule. 5516d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5517d769e936Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5518d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5519d769e936Smrg ;; 5520d769e936Smrg motorola) 5521d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5522d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5523d769e936Smrg ;; 5524d769e936Smrg esac 5525d769e936Smrg runpath_var='LD_RUN_PATH' 5526d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5527d769e936Smrg ;; 55281d54945dSmrg 5529d769e936Smrg sysv4.3*) 5530d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5531d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5532d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5533d769e936Smrg ;; 55341d54945dSmrg 5535d769e936Smrg sysv4*MP*) 5536d769e936Smrg if test -d /usr/nec; then 5537d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5538d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5539d769e936Smrg runpath_var=LD_RUN_PATH 5540d769e936Smrg hardcode_runpath_var=yes 5541d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5542d769e936Smrg fi 5543d769e936Smrg ;; 55441d54945dSmrg 5545d769e936Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5546d769e936Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5547d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5548d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5549d769e936Smrg runpath_var='LD_RUN_PATH' 55501d54945dSmrg 5551d769e936Smrg if test "$GCC" = yes; then 5552d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5553d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5554d769e936Smrg else 5555d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5556d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5557d769e936Smrg fi 5558d769e936Smrg ;; 55591d54945dSmrg 5560d769e936Smrg sysv5* | sco3.2v5* | sco5v6*) 5561d769e936Smrg # Note: We can NOT use -z defs as we might desire, because we do not 5562d769e936Smrg # link with -lc, and that would cause any symbols used from libc to 5563d769e936Smrg # always be unresolved, which means just about no library would 5564d769e936Smrg # ever link correctly. If we're not using GNU ld we use -z text 5565d769e936Smrg # though, which does catch some bad symbols but isn't as heavy-handed 5566d769e936Smrg # as -z defs. 5567d769e936Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5568d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5569d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5570d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5571d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5572d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5573d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5574d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5575d769e936Smrg runpath_var='LD_RUN_PATH' 55761d54945dSmrg 5577d769e936Smrg if test "$GCC" = yes; then 5578d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5579d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5580d769e936Smrg else 5581d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5582d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5583d769e936Smrg fi 5584d769e936Smrg ;; 55851d54945dSmrg 5586d769e936Smrg uts4*) 5587d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5588d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5589d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5590d769e936Smrg ;; 55911d54945dSmrg 5592d769e936Smrg *) 5593d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5594d769e936Smrg ;; 5595d769e936Smrg esac 55961d54945dSmrg 5597d769e936Smrg if test x$host_vendor = xsni; then 5598d769e936Smrg case $host in 5599d769e936Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5600d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5601d769e936Smrg ;; 5602d769e936Smrg esac 5603d769e936Smrg fi 5604d769e936Smrg fi 5605d769e936Smrg]) 5606d769e936SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5607d769e936Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 56081d54945dSmrg 5609d769e936Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 56101d54945dSmrg 5611d769e936Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5612d769e936Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5613d769e936Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 5614d769e936Smrg [The commands to extract the exported symbol list from a shared archive]) 56151d54945dSmrg 5616d769e936Smrg# 5617d769e936Smrg# Do we need to explicitly link libc? 5618d769e936Smrg# 5619d769e936Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5620d769e936Smrgx|xyes) 5621d769e936Smrg # Assume -lc should be added 5622d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56231d54945dSmrg 5624d769e936Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5625d769e936Smrg case $_LT_TAGVAR(archive_cmds, $1) in 5626d769e936Smrg *'~'*) 5627d769e936Smrg # FIXME: we may have to deal with multi-command sequences. 5628d769e936Smrg ;; 5629d769e936Smrg '$CC '*) 5630d769e936Smrg # Test whether the compiler implicitly links with -lc since on some 5631d769e936Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5632d769e936Smrg # to ld, don't add -lc before -lgcc. 5633d769e936Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5634d769e936Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5635d769e936Smrg [$RM conftest* 5636d769e936Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5637d769e936Smrg 5638d769e936Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5639d769e936Smrg soname=conftest 5640d769e936Smrg lib=conftest 5641d769e936Smrg libobjs=conftest.$ac_objext 5642d769e936Smrg deplibs= 5643d769e936Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5644d769e936Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5645d769e936Smrg compiler_flags=-v 5646d769e936Smrg linker_flags=-v 5647d769e936Smrg verstring= 5648d769e936Smrg output_objdir=. 5649d769e936Smrg libname=conftest 5650d769e936Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5651d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 5652d769e936Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5653d769e936Smrg then 5654d769e936Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5655d769e936Smrg else 5656d769e936Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5657d769e936Smrg fi 5658d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5659d769e936Smrg else 5660d769e936Smrg cat conftest.err 1>&5 5661d769e936Smrg fi 5662d769e936Smrg $RM conftest* 5663d769e936Smrg ]) 5664d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5665d769e936Smrg ;; 5666d769e936Smrg esac 5667d769e936Smrg fi 5668d769e936Smrg ;; 5669d769e936Smrgesac 56701d54945dSmrg 5671d769e936Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5672d769e936Smrg [Whether or not to add -lc for building shared libraries]) 5673d769e936Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5674d769e936Smrg [enable_shared_with_static_runtimes], [0], 5675d769e936Smrg [Whether or not to disallow shared libs when runtime libs are static]) 5676d769e936Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5677d769e936Smrg [Compiler flag to allow reflexive dlopens]) 5678d769e936Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5679d769e936Smrg [Compiler flag to generate shared objects directly from archives]) 5680d769e936Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 5681d769e936Smrg [Whether the compiler copes with passing no objects directly]) 5682d769e936Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5683d769e936Smrg [Create an old-style archive from a shared archive]) 5684d769e936Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5685d769e936Smrg [Create a temporary old-style archive to link instead of a shared archive]) 5686d769e936Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5687d769e936Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5688d769e936Smrg_LT_TAGDECL([], [module_cmds], [2], 5689d769e936Smrg [Commands used to build a loadable module if different from building 5690d769e936Smrg a shared archive.]) 5691d769e936Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5692d769e936Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 5693d769e936Smrg [Whether we are building with GNU ld or not]) 5694d769e936Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5695d769e936Smrg [Flag that allows shared libraries with undefined symbols to be built]) 5696d769e936Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 5697d769e936Smrg [Flag that enforces no undefined symbols]) 5698d769e936Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5699d769e936Smrg [Flag to hardcode $libdir into a binary during linking. 5700d769e936Smrg This must work even if $libdir does not exist]) 5701d769e936Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5702d769e936Smrg [Whether we need a single "-rpath" flag with a separated argument]) 5703d769e936Smrg_LT_TAGDECL([], [hardcode_direct], [0], 5704d769e936Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5705d769e936Smrg DIR into the resulting binary]) 5706d769e936Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5707d769e936Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5708d769e936Smrg DIR into the resulting binary and the resulting library dependency is 5709d769e936Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5710d769e936Smrg library is relocated]) 5711d769e936Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5712d769e936Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5713d769e936Smrg into the resulting binary]) 5714d769e936Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5715d769e936Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5716d769e936Smrg into the resulting binary]) 5717d769e936Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 5718d769e936Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 5719d769e936Smrg into the library and all subsequent libraries and executables linked 5720d769e936Smrg against it]) 5721d769e936Smrg_LT_TAGDECL([], [inherit_rpath], [0], 5722d769e936Smrg [Set to yes if linker adds runtime paths of dependent libraries 5723d769e936Smrg to runtime path list]) 5724d769e936Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 5725d769e936Smrg [Whether libtool must link a program against all its dependency libraries]) 5726d769e936Smrg_LT_TAGDECL([], [always_export_symbols], [0], 5727d769e936Smrg [Set to "yes" if exported symbols are required]) 5728d769e936Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5729d769e936Smrg [The commands to list exported symbols]) 5730d769e936Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 5731d769e936Smrg [Symbols that should not be listed in the preloaded symbols]) 5732d769e936Smrg_LT_TAGDECL([], [include_expsyms], [1], 5733d769e936Smrg [Symbols that must always be exported]) 5734d769e936Smrg_LT_TAGDECL([], [prelink_cmds], [2], 5735d769e936Smrg [Commands necessary for linking programs (against libraries) with templates]) 5736d769e936Smrg_LT_TAGDECL([], [postlink_cmds], [2], 5737d769e936Smrg [Commands necessary for finishing linking programs]) 5738d769e936Smrg_LT_TAGDECL([], [file_list_spec], [1], 5739d769e936Smrg [Specify filename containing input files]) 5740d769e936Smrgdnl FIXME: Not yet implemented 5741d769e936Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5742d769e936Smrgdnl [Compiler flag to generate thread safe objects]) 5743d769e936Smrg])# _LT_LINKER_SHLIBS 5744d769e936Smrg 5745d769e936Smrg 5746d769e936Smrg# _LT_LANG_C_CONFIG([TAG]) 5747d769e936Smrg# ------------------------ 5748d769e936Smrg# Ensure that the configuration variables for a C compiler are suitably 5749d769e936Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5750d769e936Smrg# the compiler configuration to `libtool'. 5751d769e936Smrgm4_defun([_LT_LANG_C_CONFIG], 5752d769e936Smrg[m4_require([_LT_DECL_EGREP])dnl 5753d769e936Smrglt_save_CC="$CC" 5754d769e936SmrgAC_LANG_PUSH(C) 57551d54945dSmrg 5756d769e936Smrg# Source file extension for C test sources. 5757d769e936Smrgac_ext=c 57581d54945dSmrg 5759d769e936Smrg# Object file extension for compiled C test sources. 5760d769e936Smrgobjext=o 5761d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 57621d54945dSmrg 5763d769e936Smrg# Code to be used in simple compile tests 5764d769e936Smrglt_simple_compile_test_code="int some_variable = 0;" 5765786a6f21Smrg 5766d769e936Smrg# Code to be used in simple link tests 5767d769e936Smrglt_simple_link_test_code='int main(){return(0);}' 5768786a6f21Smrg 5769d769e936Smrg_LT_TAG_COMPILER 5770d769e936Smrg# Save the default compiler, since it gets overwritten when the other 5771d769e936Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5772d769e936Smrgcompiler_DEFAULT=$CC 5773786a6f21Smrg 5774d769e936Smrg# save warnings/boilerplate of simple test code 5775d769e936Smrg_LT_COMPILER_BOILERPLATE 5776d769e936Smrg_LT_LINKER_BOILERPLATE 5777786a6f21Smrg 5778d769e936Smrgif test -n "$compiler"; then 5779d769e936Smrg _LT_COMPILER_NO_RTTI($1) 5780d769e936Smrg _LT_COMPILER_PIC($1) 5781d769e936Smrg _LT_COMPILER_C_O($1) 5782d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 5783d769e936Smrg _LT_LINKER_SHLIBS($1) 5784d769e936Smrg _LT_SYS_DYNAMIC_LINKER($1) 5785d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 5786d769e936Smrg LT_SYS_DLOPEN_SELF 5787d769e936Smrg _LT_CMD_STRIPLIB 5788d769e936Smrg 5789d769e936Smrg # Report which library types will actually be built 5790d769e936Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5791d769e936Smrg AC_MSG_RESULT([$can_build_shared]) 5792d769e936Smrg 5793d769e936Smrg AC_MSG_CHECKING([whether to build shared libraries]) 5794d769e936Smrg test "$can_build_shared" = "no" && enable_shared=no 5795d769e936Smrg 5796d769e936Smrg # On AIX, shared libraries and static libraries use the same namespace, and 5797d769e936Smrg # are all built from PIC. 5798ec713c28Smrg case $host_os in 5799ec713c28Smrg aix3*) 5800d769e936Smrg test "$enable_shared" = yes && enable_static=no 5801d769e936Smrg if test -n "$RANLIB"; then 5802d769e936Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5803d769e936Smrg postinstall_cmds='$RANLIB $lib' 5804d769e936Smrg fi 5805d769e936Smrg ;; 5806786a6f21Smrg 5807d769e936Smrg aix[[4-9]]*) 5808d769e936Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5809d769e936Smrg test "$enable_shared" = yes && enable_static=no 5810d769e936Smrg fi 5811ec713c28Smrg ;; 5812ec713c28Smrg esac 5813d769e936Smrg AC_MSG_RESULT([$enable_shared]) 5814786a6f21Smrg 5815d769e936Smrg AC_MSG_CHECKING([whether to build static libraries]) 5816d769e936Smrg # Make sure either enable_shared or enable_static is yes. 5817d769e936Smrg test "$enable_shared" = yes || enable_static=yes 5818d769e936Smrg AC_MSG_RESULT([$enable_static]) 58191d54945dSmrg 5820d769e936Smrg _LT_CONFIG($1) 5821786a6f21Smrgfi 5822d769e936SmrgAC_LANG_POP 5823d769e936SmrgCC="$lt_save_CC" 5824d769e936Smrg])# _LT_LANG_C_CONFIG 5825786a6f21Smrg 5826786a6f21Smrg 5827d769e936Smrg# _LT_LANG_CXX_CONFIG([TAG]) 5828d769e936Smrg# -------------------------- 5829d769e936Smrg# Ensure that the configuration variables for a C++ compiler are suitably 5830d769e936Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5831d769e936Smrg# the compiler configuration to `libtool'. 5832d769e936Smrgm4_defun([_LT_LANG_CXX_CONFIG], 5833d769e936Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5834d769e936Smrgm4_require([_LT_DECL_EGREP])dnl 5835d769e936Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5836d769e936Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5837d769e936Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5838d769e936Smrg (test "X$CXX" != "Xg++"))) ; then 5839d769e936Smrg AC_PROG_CXXCPP 5840d769e936Smrgelse 5841d769e936Smrg _lt_caught_CXX_error=yes 5842d769e936Smrgfi 5843786a6f21Smrg 5844d769e936SmrgAC_LANG_PUSH(C++) 5845d769e936Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5846d769e936Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 5847d769e936Smrg_LT_TAGVAR(always_export_symbols, $1)=no 5848d769e936Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5849d769e936Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 5850d769e936Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5851d769e936Smrg_LT_TAGVAR(hardcode_direct, $1)=no 5852d769e936Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5853d769e936Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5854d769e936Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5855d769e936Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5856d769e936Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5857d769e936Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 5858d769e936Smrg_LT_TAGVAR(inherit_rpath, $1)=no 5859d769e936Smrg_LT_TAGVAR(module_cmds, $1)= 5860d769e936Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 5861d769e936Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5862d769e936Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5863d769e936Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 5864d769e936Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5865d769e936Smrg_LT_TAGVAR(no_undefined_flag, $1)= 5866d769e936Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5867d769e936Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5868786a6f21Smrg 5869d769e936Smrg# Source file extension for C++ test sources. 5870d769e936Smrgac_ext=cpp 58711d54945dSmrg 5872d769e936Smrg# Object file extension for compiled C++ test sources. 5873d769e936Smrgobjext=o 5874d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 5875d769e936Smrg 5876d769e936Smrg# No sense in running all these tests if we already determined that 5877d769e936Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 5878d769e936Smrg# are currently assumed to apply to all compilers on this platform, 5879d769e936Smrg# and will be corrupted by setting them based on a non-working compiler. 5880d769e936Smrgif test "$_lt_caught_CXX_error" != yes; then 5881d769e936Smrg # Code to be used in simple compile tests 5882d769e936Smrg lt_simple_compile_test_code="int some_variable = 0;" 5883d769e936Smrg 5884d769e936Smrg # Code to be used in simple link tests 5885d769e936Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5886d769e936Smrg 5887d769e936Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5888d769e936Smrg _LT_TAG_COMPILER 5889d769e936Smrg 5890d769e936Smrg # save warnings/boilerplate of simple test code 5891d769e936Smrg _LT_COMPILER_BOILERPLATE 5892d769e936Smrg _LT_LINKER_BOILERPLATE 5893d769e936Smrg 5894d769e936Smrg # Allow CC to be a program name with arguments. 5895d769e936Smrg lt_save_CC=$CC 5896d769e936Smrg lt_save_CFLAGS=$CFLAGS 5897d769e936Smrg lt_save_LD=$LD 5898d769e936Smrg lt_save_GCC=$GCC 5899d769e936Smrg GCC=$GXX 5900d769e936Smrg lt_save_with_gnu_ld=$with_gnu_ld 5901d769e936Smrg lt_save_path_LD=$lt_cv_path_LD 5902d769e936Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5903d769e936Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5904d769e936Smrg else 5905d769e936Smrg $as_unset lt_cv_prog_gnu_ld 5906d769e936Smrg fi 5907d769e936Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 5908d769e936Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 5909d769e936Smrg else 5910d769e936Smrg $as_unset lt_cv_path_LD 5911d769e936Smrg fi 5912d769e936Smrg test -z "${LDCXX+set}" || LD=$LDCXX 5913d769e936Smrg CC=${CXX-"c++"} 5914d769e936Smrg CFLAGS=$CXXFLAGS 5915d769e936Smrg compiler=$CC 5916d769e936Smrg _LT_TAGVAR(compiler, $1)=$CC 5917d769e936Smrg _LT_CC_BASENAME([$compiler]) 5918786a6f21Smrg 5919d769e936Smrg if test -n "$compiler"; then 5920d769e936Smrg # We don't want -fno-exception when compiling C++ code, so set the 5921d769e936Smrg # no_builtin_flag separately 5922d769e936Smrg if test "$GXX" = yes; then 5923d769e936Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5924d769e936Smrg else 5925d769e936Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5926d769e936Smrg fi 5927786a6f21Smrg 5928d769e936Smrg if test "$GXX" = yes; then 5929d769e936Smrg # Set up default GNU C++ configuration 5930786a6f21Smrg 5931d769e936Smrg LT_PATH_LD 5932786a6f21Smrg 5933d769e936Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5934d769e936Smrg # archiving commands below assume that GNU ld is being used. 5935d769e936Smrg if test "$with_gnu_ld" = yes; then 5936d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5937d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 5938786a6f21Smrg 5939d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5940d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5941786a6f21Smrg 5942d769e936Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5943d769e936Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5944d769e936Smrg # investigate it a little bit more. (MM) 5945d769e936Smrg wlarc='${wl}' 5946786a6f21Smrg 5947d769e936Smrg # ancient GNU ld didn't support --whole-archive et. al. 5948d769e936Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5949d769e936Smrg $GREP 'no-whole-archive' > /dev/null; then 5950d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5951d769e936Smrg else 5952d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5953d769e936Smrg fi 5954ec713c28Smrg else 5955d769e936Smrg with_gnu_ld=no 5956d769e936Smrg wlarc= 5957d769e936Smrg 5958d769e936Smrg # A generic and very simple default shared library creation 5959d769e936Smrg # command for GNU C++ for the case where it uses the native 5960d769e936Smrg # linker, instead of GNU ld. If possible, this setting should 5961d769e936Smrg # overridden to take advantage of the native linker features on 5962d769e936Smrg # the platform it is being used on. 5963d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5964ec713c28Smrg fi 5965d769e936Smrg 5966d769e936Smrg # Commands to make compiler produce verbose output that lists 5967d769e936Smrg # what "hidden" libraries, object files and flags are used when 5968d769e936Smrg # linking a shared library. 5969d769e936Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5970d769e936Smrg 5971ec713c28Smrg else 5972d769e936Smrg GXX=no 5973d769e936Smrg with_gnu_ld=no 5974d769e936Smrg wlarc= 5975ec713c28Smrg fi 59761d54945dSmrg 5977d769e936Smrg # PORTME: fill in a description of your system's C++ link characteristics 5978d769e936Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5979d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5980d769e936Smrg case $host_os in 5981d769e936Smrg aix3*) 5982d769e936Smrg # FIXME: insert proper C++ library support 5983d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5984d769e936Smrg ;; 5985d769e936Smrg aix[[4-9]]*) 5986d769e936Smrg if test "$host_cpu" = ia64; then 5987d769e936Smrg # On IA64, the linker does run time linking by default, so we don't 5988d769e936Smrg # have to do anything special. 5989d769e936Smrg aix_use_runtimelinking=no 5990d769e936Smrg exp_sym_flag='-Bexport' 5991d769e936Smrg no_entry_flag="" 5992d769e936Smrg else 5993d769e936Smrg aix_use_runtimelinking=no 5994d769e936Smrg 5995d769e936Smrg # Test if we are trying to use run time linking or normal 5996d769e936Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5997d769e936Smrg # need to do runtime linking. 5998d769e936Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5999d769e936Smrg for ld_flag in $LDFLAGS; do 6000d769e936Smrg case $ld_flag in 6001d769e936Smrg *-brtl*) 6002d769e936Smrg aix_use_runtimelinking=yes 6003d769e936Smrg break 6004d769e936Smrg ;; 6005d769e936Smrg esac 6006d769e936Smrg done 6007d769e936Smrg ;; 6008d769e936Smrg esac 60091d54945dSmrg 6010d769e936Smrg exp_sym_flag='-bexport' 6011d769e936Smrg no_entry_flag='-bnoentry' 6012d769e936Smrg fi 60131d54945dSmrg 6014d769e936Smrg # When large executables or shared objects are built, AIX ld can 6015d769e936Smrg # have problems creating the table of contents. If linking a library 6016d769e936Smrg # or program results in "error TOC overflow" add -mminimal-toc to 6017d769e936Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6018d769e936Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6019d769e936Smrg 6020d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='' 6021d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6022d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6023d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6024d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6025d769e936Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6026d769e936Smrg 6027d769e936Smrg if test "$GXX" = yes; then 6028d769e936Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6029d769e936Smrg # We only want to do this on AIX 4.2 and lower, the check 6030d769e936Smrg # below for broken collect2 doesn't work under 4.3+ 6031d769e936Smrg collect2name=`${CC} -print-prog-name=collect2` 6032d769e936Smrg if test -f "$collect2name" && 6033d769e936Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6034d769e936Smrg then 6035d769e936Smrg # We have reworked collect2 6036d769e936Smrg : 6037d769e936Smrg else 6038d769e936Smrg # We have old collect2 6039d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6040d769e936Smrg # It fails to find uninstalled libraries when the uninstalled 6041d769e936Smrg # path is not listed in the libpath. Setting hardcode_minus_L 6042d769e936Smrg # to unsupported forces relinking 6043d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6044d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6045d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6046d769e936Smrg fi 6047d769e936Smrg esac 6048d769e936Smrg shared_flag='-shared' 6049d769e936Smrg if test "$aix_use_runtimelinking" = yes; then 6050d769e936Smrg shared_flag="$shared_flag "'${wl}-G' 6051d769e936Smrg fi 6052d769e936Smrg else 6053d769e936Smrg # not using gcc 6054d769e936Smrg if test "$host_cpu" = ia64; then 6055d769e936Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6056d769e936Smrg # chokes on -Wl,-G. The following line is correct: 6057d769e936Smrg shared_flag='-G' 6058d769e936Smrg else 6059d769e936Smrg if test "$aix_use_runtimelinking" = yes; then 6060d769e936Smrg shared_flag='${wl}-G' 6061d769e936Smrg else 6062d769e936Smrg shared_flag='${wl}-bM:SRE' 6063d769e936Smrg fi 6064d769e936Smrg fi 6065d769e936Smrg fi 60661d54945dSmrg 6067d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6068d769e936Smrg # It seems that -bexpall does not export symbols beginning with 6069d769e936Smrg # underscore (_), so it is better to generate a list of symbols to 6070d769e936Smrg # export. 6071d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6072d769e936Smrg if test "$aix_use_runtimelinking" = yes; then 6073d769e936Smrg # Warning - without using the other runtime loading flags (-brtl), 6074d769e936Smrg # -berok will link without error, but may produce a broken library. 6075d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6076d769e936Smrg # Determine the default libpath from the value encoded in an empty 6077d769e936Smrg # executable. 6078d769e936Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6079d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6080d769e936Smrg 6081d769e936Smrg _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" 6082d769e936Smrg else 6083d769e936Smrg if test "$host_cpu" = ia64; then 6084d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6085d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6086d769e936Smrg _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" 6087d769e936Smrg else 6088d769e936Smrg # Determine the default libpath from the value encoded in an 6089d769e936Smrg # empty executable. 6090d769e936Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6091d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6092d769e936Smrg # Warning - without using the other run time loading flags, 6093d769e936Smrg # -berok will link without error, but may produce a broken library. 6094d769e936Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6095d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6096d769e936Smrg if test "$with_gnu_ld" = yes; then 6097d769e936Smrg # We only use this code for GNU lds that support --whole-archive. 6098d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6099d769e936Smrg else 6100d769e936Smrg # Exported symbols can be pulled into shared objects from archives 6101d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6102d769e936Smrg fi 6103d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6104d769e936Smrg # This is similar to how AIX traditionally builds its shared 6105d769e936Smrg # libraries. 6106d769e936Smrg _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' 6107d769e936Smrg fi 6108d769e936Smrg fi 6109d769e936Smrg ;; 61101d54945dSmrg 6111d769e936Smrg beos*) 6112d769e936Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6113d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6114d769e936Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6115d769e936Smrg # support --undefined. This deserves some investigation. FIXME 6116d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6117ec713c28Smrg else 6118d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6119ec713c28Smrg fi 6120ec713c28Smrg ;; 6121d769e936Smrg 6122ec713c28Smrg chorus*) 6123d769e936Smrg case $cc_basename in 6124d769e936Smrg *) 6125d769e936Smrg # FIXME: insert proper C++ library support 6126d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6127d769e936Smrg ;; 6128d769e936Smrg esac 6129d769e936Smrg ;; 6130d769e936Smrg 6131d769e936Smrg cygwin* | mingw* | pw32* | cegcc*) 6132d769e936Smrg case $GXX,$cc_basename in 6133d769e936Smrg ,cl* | no,cl*) 6134d769e936Smrg # Native MSVC 6135d769e936Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6136d769e936Smrg # no search path for DLLs. 6137d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6138d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6139d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6140d769e936Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6141d769e936Smrg # Tell ltmain to make .lib files, not .a files. 6142d769e936Smrg libext=lib 6143d769e936Smrg # Tell ltmain to make .dll files, not .so files. 6144d769e936Smrg shrext_cmds=".dll" 6145d769e936Smrg # FIXME: Setting linknames here is a bad hack. 6146d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6147d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6148d769e936Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6149d769e936Smrg else 6150d769e936Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6151d769e936Smrg fi~ 6152d769e936Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6153d769e936Smrg linknames=' 6154d769e936Smrg # The linker will not automatically build a static lib if we build a DLL. 6155d769e936Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6156d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6157d769e936Smrg # Don't use ranlib 6158d769e936Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6159d769e936Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6160d769e936Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6161d769e936Smrg case $lt_outputfile in 6162d769e936Smrg *.exe|*.EXE) ;; 6163d769e936Smrg *) 6164d769e936Smrg lt_outputfile="$lt_outputfile.exe" 6165d769e936Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6166d769e936Smrg ;; 6167d769e936Smrg esac~ 6168d769e936Smrg func_to_tool_file "$lt_outputfile"~ 6169d769e936Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6170d769e936Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6171d769e936Smrg $RM "$lt_outputfile.manifest"; 6172d769e936Smrg fi' 6173d769e936Smrg ;; 6174d769e936Smrg *) 6175d769e936Smrg # g++ 6176d769e936Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6177d769e936Smrg # as there is no search path for DLLs. 6178d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6179d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6180d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6181d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6182d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6183d769e936Smrg 6184d769e936Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6185d769e936Smrg _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' 6186d769e936Smrg # If the export-symbols file already is a .def file (1st line 6187d769e936Smrg # is EXPORTS), use it as is; otherwise, prepend... 6188d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6189d769e936Smrg cp $export_symbols $output_objdir/$soname.def; 6190d769e936Smrg else 6191d769e936Smrg echo EXPORTS > $output_objdir/$soname.def; 6192d769e936Smrg cat $export_symbols >> $output_objdir/$soname.def; 6193d769e936Smrg fi~ 6194d769e936Smrg $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' 6195d769e936Smrg else 6196d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6197d769e936Smrg fi 6198ec713c28Smrg ;; 6199ec713c28Smrg esac 6200ec713c28Smrg ;; 6201d769e936Smrg darwin* | rhapsody*) 6202d769e936Smrg _LT_DARWIN_LINKER_FEATURES($1) 6203d769e936Smrg ;; 6204d769e936Smrg 6205ec713c28Smrg dgux*) 6206d769e936Smrg case $cc_basename in 6207d769e936Smrg ec++*) 6208d769e936Smrg # FIXME: insert proper C++ library support 6209d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6210ec713c28Smrg ;; 6211d769e936Smrg ghcx*) 6212ec713c28Smrg # Green Hills C++ Compiler 6213d769e936Smrg # FIXME: insert proper C++ library support 6214d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6215ec713c28Smrg ;; 6216d769e936Smrg *) 6217d769e936Smrg # FIXME: insert proper C++ library support 6218d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6219ec713c28Smrg ;; 6220d769e936Smrg esac 6221d769e936Smrg ;; 6222d769e936Smrg 6223d769e936Smrg freebsd2.*) 6224d769e936Smrg # C++ shared libraries reported to be fairly broken before 6225d769e936Smrg # switch to ELF 6226d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6227d769e936Smrg ;; 6228d769e936Smrg 6229d769e936Smrg freebsd-elf*) 6230d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6231d769e936Smrg ;; 6232d769e936Smrg 6233ec713c28Smrg freebsd* | dragonfly*) 6234d769e936Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6235d769e936Smrg # conventions 6236d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6237d769e936Smrg ;; 6238d769e936Smrg 6239d769e936Smrg gnu*) 6240d769e936Smrg ;; 6241d769e936Smrg 6242d769e936Smrg haiku*) 6243d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6244d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6245d769e936Smrg ;; 6246d769e936Smrg 6247d769e936Smrg hpux9*) 6248d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6249d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6250d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6251d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6252d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6253d769e936Smrg # but as the default 6254d769e936Smrg # location of the library. 6255d769e936Smrg 6256d769e936Smrg case $cc_basename in 6257d769e936Smrg CC*) 6258d769e936Smrg # FIXME: insert proper C++ library support 6259d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6260d769e936Smrg ;; 6261d769e936Smrg aCC*) 6262d769e936Smrg _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' 6263d769e936Smrg # Commands to make compiler produce verbose output that lists 6264d769e936Smrg # what "hidden" libraries, object files and flags are used when 6265d769e936Smrg # linking a shared library. 6266d769e936Smrg # 6267d769e936Smrg # There doesn't appear to be a way to prevent this compiler from 6268d769e936Smrg # explicitly linking system object files so we need to strip them 6269d769e936Smrg # from the output so that they don't get included in the library 6270d769e936Smrg # dependencies. 6271d769e936Smrg 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"' 6272d769e936Smrg ;; 6273d769e936Smrg *) 6274d769e936Smrg if test "$GXX" = yes; then 6275d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6276d769e936Smrg else 6277d769e936Smrg # FIXME: insert proper C++ library support 6278d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6279d769e936Smrg fi 6280d769e936Smrg ;; 6281d769e936Smrg esac 6282d769e936Smrg ;; 6283d769e936Smrg 6284d769e936Smrg hpux10*|hpux11*) 6285d769e936Smrg if test $with_gnu_ld = no; then 6286d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6287d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6288d769e936Smrg 6289d769e936Smrg case $host_cpu in 6290d769e936Smrg hppa*64*|ia64*) 6291d769e936Smrg ;; 6292d769e936Smrg *) 6293d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6294d769e936Smrg ;; 6295d769e936Smrg esac 6296d769e936Smrg fi 6297d769e936Smrg case $host_cpu in 6298d769e936Smrg hppa*64*|ia64*) 6299d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6300d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6301d769e936Smrg ;; 6302d769e936Smrg *) 6303d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6304d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6305d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6306d769e936Smrg # but as the default 6307d769e936Smrg # location of the library. 6308d769e936Smrg ;; 6309d769e936Smrg esac 6310d769e936Smrg 6311d769e936Smrg case $cc_basename in 6312d769e936Smrg CC*) 6313d769e936Smrg # FIXME: insert proper C++ library support 6314d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6315ec713c28Smrg ;; 6316d769e936Smrg aCC*) 6317ec713c28Smrg case $host_cpu in 6318d769e936Smrg hppa*64*) 6319d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6320d769e936Smrg ;; 6321d769e936Smrg ia64*) 6322d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6323d769e936Smrg ;; 6324d769e936Smrg *) 6325d769e936Smrg _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' 6326d769e936Smrg ;; 6327ec713c28Smrg esac 6328d769e936Smrg # Commands to make compiler produce verbose output that lists 6329d769e936Smrg # what "hidden" libraries, object files and flags are used when 6330d769e936Smrg # linking a shared library. 6331d769e936Smrg # 6332d769e936Smrg # There doesn't appear to be a way to prevent this compiler from 6333d769e936Smrg # explicitly linking system object files so we need to strip them 6334d769e936Smrg # from the output so that they don't get included in the library 6335d769e936Smrg # dependencies. 6336d769e936Smrg 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"' 6337ec713c28Smrg ;; 6338d769e936Smrg *) 6339d769e936Smrg if test "$GXX" = yes; then 6340d769e936Smrg if test $with_gnu_ld = no; then 6341d769e936Smrg case $host_cpu in 6342d769e936Smrg hppa*64*) 6343d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6344d769e936Smrg ;; 6345d769e936Smrg ia64*) 6346d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6347d769e936Smrg ;; 6348d769e936Smrg *) 6349d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6350d769e936Smrg ;; 6351d769e936Smrg esac 6352d769e936Smrg fi 6353d769e936Smrg else 6354d769e936Smrg # FIXME: insert proper C++ library support 6355d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6356d769e936Smrg fi 6357ec713c28Smrg ;; 6358d769e936Smrg esac 6359d769e936Smrg ;; 6360d769e936Smrg 6361d769e936Smrg interix[[3-9]]*) 6362d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6363d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6364d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6365d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6366d769e936Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6367d769e936Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6368d769e936Smrg # default) and relocated if they conflict, which is a slow very memory 6369d769e936Smrg # consuming and fragmenting process. To avoid this, we pick a random, 6370d769e936Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6371d769e936Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6372d769e936Smrg _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' 6373d769e936Smrg _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' 6374ec713c28Smrg ;; 6375d769e936Smrg irix5* | irix6*) 6376d769e936Smrg case $cc_basename in 6377d769e936Smrg CC*) 6378d769e936Smrg # SGI C++ 6379d769e936Smrg _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' 6380d769e936Smrg 6381d769e936Smrg # Archives containing C++ object files must be created using 6382d769e936Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6383d769e936Smrg # necessary to make sure instantiated templates are included 6384d769e936Smrg # in the archive. 6385d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6386ec713c28Smrg ;; 6387d769e936Smrg *) 6388d769e936Smrg if test "$GXX" = yes; then 6389d769e936Smrg if test "$with_gnu_ld" = no; then 6390d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6391d769e936Smrg else 6392d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' 6393d769e936Smrg fi 6394d769e936Smrg fi 6395d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6396ec713c28Smrg ;; 6397d769e936Smrg esac 6398d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6399d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6400d769e936Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 6401d769e936Smrg ;; 6402d769e936Smrg 6403d769e936Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6404d769e936Smrg case $cc_basename in 6405d769e936Smrg KCC*) 6406d769e936Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6407d769e936Smrg 6408d769e936Smrg # KCC will only create a shared library if the output file 6409d769e936Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6410d769e936Smrg # to its proper name (with version) after linking. 6411d769e936Smrg _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' 6412d769e936Smrg _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' 6413d769e936Smrg # Commands to make compiler produce verbose output that lists 6414d769e936Smrg # what "hidden" libraries, object files and flags are used when 6415d769e936Smrg # linking a shared library. 6416d769e936Smrg # 6417d769e936Smrg # There doesn't appear to be a way to prevent this compiler from 6418d769e936Smrg # explicitly linking system object files so we need to strip them 6419d769e936Smrg # from the output so that they don't get included in the library 6420d769e936Smrg # dependencies. 6421d769e936Smrg 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"' 6422d769e936Smrg 6423d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6424d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6425d769e936Smrg 6426d769e936Smrg # Archives containing C++ object files must be created using 6427d769e936Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6428d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6429ec713c28Smrg ;; 6430d769e936Smrg icpc* | ecpc* ) 6431ec713c28Smrg # Intel C++ 6432d769e936Smrg with_gnu_ld=yes 6433d769e936Smrg # version 8.0 and above of icpc choke on multiply defined symbols 6434d769e936Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6435d769e936Smrg # earlier do not add the objects themselves. 6436d769e936Smrg case `$CC -V 2>&1` in 6437d769e936Smrg *"Version 7."*) 6438d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6439d769e936Smrg _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' 6440d769e936Smrg ;; 6441d769e936Smrg *) # Version 8.0 or newer 6442d769e936Smrg tmp_idyn= 6443d769e936Smrg case $host_cpu in 6444d769e936Smrg ia64*) tmp_idyn=' -i_dynamic';; 6445d769e936Smrg esac 6446d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6447d769e936Smrg _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' 6448d769e936Smrg ;; 6449d769e936Smrg esac 6450d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6451d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6452d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6453d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6454ec713c28Smrg ;; 6455d769e936Smrg pgCC* | pgcpp*) 6456d769e936Smrg # Portland Group C++ compiler 6457d769e936Smrg case `$CC -V` in 6458d769e936Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6459d769e936Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6460d769e936Smrg rm -rf $tpldir~ 6461d769e936Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6462d769e936Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6463d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6464d769e936Smrg rm -rf $tpldir~ 6465d769e936Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6466d769e936Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6467d769e936Smrg $RANLIB $oldlib' 6468d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6469d769e936Smrg rm -rf $tpldir~ 6470d769e936Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6471d769e936Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6472d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6473d769e936Smrg rm -rf $tpldir~ 6474d769e936Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6475d769e936Smrg $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' 6476d769e936Smrg ;; 6477d769e936Smrg *) # Version 6 and above use weak symbols 6478d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6479d769e936Smrg _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' 6480d769e936Smrg ;; 6481d769e936Smrg esac 6482d769e936Smrg 6483d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6484d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6485d769e936Smrg _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' 6486d769e936Smrg ;; 6487ec713c28Smrg cxx*) 6488ec713c28Smrg # Compaq C++ 6489d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6490d769e936Smrg _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' 6491d769e936Smrg 6492d769e936Smrg runpath_var=LD_RUN_PATH 6493d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6494d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6495d769e936Smrg 6496d769e936Smrg # Commands to make compiler produce verbose output that lists 6497d769e936Smrg # what "hidden" libraries, object files and flags are used when 6498d769e936Smrg # linking a shared library. 6499d769e936Smrg # 6500d769e936Smrg # There doesn't appear to be a way to prevent this compiler from 6501d769e936Smrg # explicitly linking system object files so we need to strip them 6502d769e936Smrg # from the output so that they don't get included in the library 6503d769e936Smrg # dependencies. 6504d769e936Smrg 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' 6505d769e936Smrg ;; 6506d769e936Smrg xl* | mpixl* | bgxl*) 6507d769e936Smrg # IBM XL 8.0 on PPC, with GNU ld 6508d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6509d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6510d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6511d769e936Smrg if test "x$supports_anon_versioning" = xyes; then 6512d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6513d769e936Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6514d769e936Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6515d769e936Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6516d769e936Smrg fi 6517ec713c28Smrg ;; 6518ec713c28Smrg *) 6519ec713c28Smrg case `$CC -V 2>&1 | sed 5q` in 6520ec713c28Smrg *Sun\ C*) 6521ec713c28Smrg # Sun C++ 5.9 6522d769e936Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6523d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6524d769e936Smrg _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' 6525d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6526d769e936Smrg _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' 6527d769e936Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6528d769e936Smrg 6529d769e936Smrg # Not sure whether something based on 6530d769e936Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6531d769e936Smrg # would be better. 6532d769e936Smrg output_verbose_link_cmd='func_echo_all' 6533d769e936Smrg 6534d769e936Smrg # Archives containing C++ object files must be created using 6535d769e936Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6536d769e936Smrg # necessary to make sure instantiated templates are included 6537d769e936Smrg # in the archive. 6538d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6539ec713c28Smrg ;; 6540ec713c28Smrg esac 6541ec713c28Smrg ;; 6542ec713c28Smrg esac 6543ec713c28Smrg ;; 6544d769e936Smrg 6545ec713c28Smrg lynxos*) 6546d769e936Smrg # FIXME: insert proper C++ library support 6547d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6548ec713c28Smrg ;; 6549d769e936Smrg 6550ec713c28Smrg m88k*) 6551d769e936Smrg # FIXME: insert proper C++ library support 6552d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6553ec713c28Smrg ;; 6554d769e936Smrg 6555ec713c28Smrg mvs*) 6556d769e936Smrg case $cc_basename in 6557d769e936Smrg cxx*) 6558d769e936Smrg # FIXME: insert proper C++ library support 6559d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6560ec713c28Smrg ;; 6561ec713c28Smrg *) 6562d769e936Smrg # FIXME: insert proper C++ library support 6563d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6564ec713c28Smrg ;; 6565ec713c28Smrg esac 6566ec713c28Smrg ;; 6567d769e936Smrg 6568ec713c28Smrg netbsd*) 6569d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6570d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6571d769e936Smrg wlarc= 6572d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6573d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6574d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6575d769e936Smrg fi 6576d769e936Smrg # Workaround some broken pre-1.5 toolchains 6577d769e936Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6578d769e936Smrg ;; 6579d769e936Smrg 6580d769e936Smrg *nto* | *qnx*) 6581d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6582d769e936Smrg ;; 6583d769e936Smrg 6584d769e936Smrg openbsd2*) 6585d769e936Smrg # C++ shared libraries are fairly broken 6586d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6587d769e936Smrg ;; 6588d769e936Smrg 6589d769e936Smrg openbsd*) 6590d769e936Smrg if test -f /usr/libexec/ld.so; then 6591d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6592d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6593d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6594d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6595d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6596d769e936Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6597d769e936Smrg _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' 6598d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6599d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6600d769e936Smrg fi 6601d769e936Smrg output_verbose_link_cmd=func_echo_all 6602d769e936Smrg else 6603d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6604d769e936Smrg fi 6605ec713c28Smrg ;; 6606d769e936Smrg 6607ec713c28Smrg osf3* | osf4* | osf5*) 6608d769e936Smrg case $cc_basename in 6609d769e936Smrg KCC*) 6610d769e936Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6611d769e936Smrg 6612d769e936Smrg # KCC will only create a shared library if the output file 6613d769e936Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6614d769e936Smrg # to its proper name (with version) after linking. 6615d769e936Smrg _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' 6616d769e936Smrg 6617d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6618d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6619d769e936Smrg 6620d769e936Smrg # Archives containing C++ object files must be created using 6621d769e936Smrg # the KAI C++ compiler. 6622d769e936Smrg case $host in 6623d769e936Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6624d769e936Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6625d769e936Smrg esac 6626ec713c28Smrg ;; 6627d769e936Smrg RCC*) 6628ec713c28Smrg # Rational C++ 2.4.1 6629d769e936Smrg # FIXME: insert proper C++ library support 6630d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6631ec713c28Smrg ;; 6632d769e936Smrg cxx*) 6633d769e936Smrg case $host in 6634d769e936Smrg osf3*) 6635d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6636d769e936Smrg _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' 6637d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6638d769e936Smrg ;; 6639d769e936Smrg *) 6640d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6641d769e936Smrg _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' 6642d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6643d769e936Smrg echo "-hidden">> $lib.exp~ 6644d769e936Smrg $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~ 6645d769e936Smrg $RM $lib.exp' 6646d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6647d769e936Smrg ;; 6648d769e936Smrg esac 6649d769e936Smrg 6650d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6651d769e936Smrg 6652d769e936Smrg # Commands to make compiler produce verbose output that lists 6653d769e936Smrg # what "hidden" libraries, object files and flags are used when 6654d769e936Smrg # linking a shared library. 6655d769e936Smrg # 6656d769e936Smrg # There doesn't appear to be a way to prevent this compiler from 6657d769e936Smrg # explicitly linking system object files so we need to strip them 6658d769e936Smrg # from the output so that they don't get included in the library 6659d769e936Smrg # dependencies. 6660d769e936Smrg 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"' 6661ec713c28Smrg ;; 6662ec713c28Smrg *) 6663d769e936Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6664d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6665d769e936Smrg case $host in 6666d769e936Smrg osf3*) 6667d769e936Smrg _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' 6668d769e936Smrg ;; 6669d769e936Smrg *) 6670d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6671d769e936Smrg ;; 6672d769e936Smrg esac 6673d769e936Smrg 6674d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6675d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6676d769e936Smrg 6677d769e936Smrg # Commands to make compiler produce verbose output that lists 6678d769e936Smrg # what "hidden" libraries, object files and flags are used when 6679d769e936Smrg # linking a shared library. 6680d769e936Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6681d769e936Smrg 6682d769e936Smrg else 6683d769e936Smrg # FIXME: insert proper C++ library support 6684d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6685d769e936Smrg fi 6686ec713c28Smrg ;; 6687d769e936Smrg esac 6688d769e936Smrg ;; 6689d769e936Smrg 6690ec713c28Smrg psos*) 6691d769e936Smrg # FIXME: insert proper C++ library support 6692d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6693d769e936Smrg ;; 6694d769e936Smrg 6695ec713c28Smrg sunos4*) 6696d769e936Smrg case $cc_basename in 6697d769e936Smrg CC*) 6698ec713c28Smrg # Sun C++ 4.x 6699d769e936Smrg # FIXME: insert proper C++ library support 6700d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6701ec713c28Smrg ;; 6702d769e936Smrg lcc*) 6703ec713c28Smrg # Lucid 6704d769e936Smrg # FIXME: insert proper C++ library support 6705d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6706ec713c28Smrg ;; 6707d769e936Smrg *) 6708d769e936Smrg # FIXME: insert proper C++ library support 6709d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6710ec713c28Smrg ;; 6711d769e936Smrg esac 6712d769e936Smrg ;; 67131d54945dSmrg 6714d769e936Smrg solaris*) 6715d769e936Smrg case $cc_basename in 6716d769e936Smrg CC* | sunCC*) 6717d769e936Smrg # Sun C++ 4.2, 5.x and Centerline C++ 6718d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6719d769e936Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6720d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6721d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6722d769e936Smrg $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' 6723d769e936Smrg 6724d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6725d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6726d769e936Smrg case $host_os in 6727d769e936Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6728d769e936Smrg *) 6729d769e936Smrg # The compiler driver will combine and reorder linker options, 6730d769e936Smrg # but understands `-z linker_flag'. 6731d769e936Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6732d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6733d769e936Smrg ;; 6734d769e936Smrg esac 6735d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 67361d54945dSmrg 6737d769e936Smrg output_verbose_link_cmd='func_echo_all' 67381d54945dSmrg 6739d769e936Smrg # Archives containing C++ object files must be created using 6740d769e936Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6741d769e936Smrg # necessary to make sure instantiated templates are included 6742d769e936Smrg # in the archive. 6743d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6744d769e936Smrg ;; 6745d769e936Smrg gcx*) 6746d769e936Smrg # Green Hills C++ Compiler 6747d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67481d54945dSmrg 6749d769e936Smrg # The C++ compiler must be used to create the archive. 6750d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6751d769e936Smrg ;; 6752d769e936Smrg *) 6753d769e936Smrg # GNU C++ compiler with Solaris linker 6754d769e936Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6755d769e936Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6756d769e936Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6757d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6758d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6759d769e936Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6760d769e936Smrg 6761d769e936Smrg # Commands to make compiler produce verbose output that lists 6762d769e936Smrg # what "hidden" libraries, object files and flags are used when 6763d769e936Smrg # linking a shared library. 6764d769e936Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6765d769e936Smrg else 6766d769e936Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6767d769e936Smrg # platform. 6768d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6769d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6770d769e936Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6771d769e936Smrg 6772d769e936Smrg # Commands to make compiler produce verbose output that lists 6773d769e936Smrg # what "hidden" libraries, object files and flags are used when 6774d769e936Smrg # linking a shared library. 6775d769e936Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6776d769e936Smrg fi 6777d769e936Smrg 6778d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6779d769e936Smrg case $host_os in 6780d769e936Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6781d769e936Smrg *) 6782d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6783d769e936Smrg ;; 6784d769e936Smrg esac 6785d769e936Smrg fi 6786d769e936Smrg ;; 6787d769e936Smrg esac 6788d769e936Smrg ;; 67891d54945dSmrg 6790d769e936Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6791d769e936Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6792d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6793d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6794d769e936Smrg runpath_var='LD_RUN_PATH' 67951d54945dSmrg 6796ec713c28Smrg case $cc_basename in 6797d769e936Smrg CC*) 6798d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6799d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6800ec713c28Smrg ;; 6801d769e936Smrg *) 6802d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6803d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6804ec713c28Smrg ;; 6805ec713c28Smrg esac 6806ec713c28Smrg ;; 68071d54945dSmrg 6808d769e936Smrg sysv5* | sco3.2v5* | sco5v6*) 6809d769e936Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6810d769e936Smrg # link with -lc, and that would cause any symbols used from libc to 6811d769e936Smrg # always be unresolved, which means just about no library would 6812d769e936Smrg # ever link correctly. If we're not using GNU ld we use -z text 6813d769e936Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6814d769e936Smrg # as -z defs. 6815d769e936Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6816d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6817d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6818d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6819d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6820d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6821d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6822d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6823d769e936Smrg runpath_var='LD_RUN_PATH' 68241d54945dSmrg 6825d769e936Smrg case $cc_basename in 6826d769e936Smrg CC*) 6827d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6828d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6829d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6830d769e936Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 6831d769e936Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6832d769e936Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 6833d769e936Smrg ;; 6834d769e936Smrg *) 6835d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6836d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6837d769e936Smrg ;; 6838d769e936Smrg esac 6839ec713c28Smrg ;; 6840ba85709eSmrg 6841d769e936Smrg tandem*) 6842d769e936Smrg case $cc_basename in 6843d769e936Smrg NCC*) 6844d769e936Smrg # NonStop-UX NCC 3.20 6845d769e936Smrg # FIXME: insert proper C++ library support 6846d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6847d769e936Smrg ;; 6848d769e936Smrg *) 6849d769e936Smrg # FIXME: insert proper C++ library support 6850d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6851d769e936Smrg ;; 6852d769e936Smrg esac 6853d769e936Smrg ;; 68541d54945dSmrg 6855d769e936Smrg vxworks*) 6856d769e936Smrg # FIXME: insert proper C++ library support 6857d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6858d769e936Smrg ;; 68591d54945dSmrg 6860d769e936Smrg *) 6861d769e936Smrg # FIXME: insert proper C++ library support 6862d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6863d769e936Smrg ;; 6864d769e936Smrg esac 68651d54945dSmrg 6866d769e936Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6867d769e936Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6868d769e936Smrg 6869d769e936Smrg _LT_TAGVAR(GCC, $1)="$GXX" 6870d769e936Smrg _LT_TAGVAR(LD, $1)="$LD" 6871d769e936Smrg 6872d769e936Smrg ## CAVEAT EMPTOR: 6873d769e936Smrg ## There is no encapsulation within the following macros, do not change 6874d769e936Smrg ## the running order or otherwise move them around unless you know exactly 6875d769e936Smrg ## what you are doing... 6876d769e936Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 6877d769e936Smrg _LT_COMPILER_PIC($1) 6878d769e936Smrg _LT_COMPILER_C_O($1) 6879d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 6880d769e936Smrg _LT_LINKER_SHLIBS($1) 6881d769e936Smrg _LT_SYS_DYNAMIC_LINKER($1) 6882d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6883d769e936Smrg 6884d769e936Smrg _LT_CONFIG($1) 6885d769e936Smrg fi # test -n "$compiler" 6886d769e936Smrg 6887d769e936Smrg CC=$lt_save_CC 6888d769e936Smrg CFLAGS=$lt_save_CFLAGS 6889d769e936Smrg LDCXX=$LD 6890d769e936Smrg LD=$lt_save_LD 6891d769e936Smrg GCC=$lt_save_GCC 6892d769e936Smrg with_gnu_ld=$lt_save_with_gnu_ld 6893d769e936Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 6894d769e936Smrg lt_cv_path_LD=$lt_save_path_LD 6895d769e936Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6896d769e936Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6897d769e936Smrgfi # test "$_lt_caught_CXX_error" != yes 68981d54945dSmrg 6899d769e936SmrgAC_LANG_POP 6900d769e936Smrg])# _LT_LANG_CXX_CONFIG 69011d54945dSmrg 69021d54945dSmrg 6903d769e936Smrg# _LT_FUNC_STRIPNAME_CNF 6904d769e936Smrg# ---------------------- 6905d769e936Smrg# func_stripname_cnf prefix suffix name 6906d769e936Smrg# strip PREFIX and SUFFIX off of NAME. 6907d769e936Smrg# PREFIX and SUFFIX must not contain globbing or regex special 6908d769e936Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 6909d769e936Smrg# dot (in which case that matches only a dot). 6910d769e936Smrg# 6911d769e936Smrg# This function is identical to the (non-XSI) version of func_stripname, 6912d769e936Smrg# except this one can be used by m4 code that may be executed by configure, 6913d769e936Smrg# rather than the libtool script. 6914d769e936Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6915d769e936SmrgAC_REQUIRE([_LT_DECL_SED]) 6916d769e936SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6917d769e936Smrgfunc_stripname_cnf () 6918d769e936Smrg{ 6919d769e936Smrg case ${2} in 6920d769e936Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6921d769e936Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6922d769e936Smrg esac 6923d769e936Smrg} # func_stripname_cnf 6924d769e936Smrg])# _LT_FUNC_STRIPNAME_CNF 69251d54945dSmrg 6926d769e936Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6927d769e936Smrg# --------------------------------- 6928d769e936Smrg# Figure out "hidden" library dependencies from verbose 6929d769e936Smrg# compiler output when linking a shared library. 6930d769e936Smrg# Parse the compiler output and extract the necessary 6931d769e936Smrg# objects, libraries and library flags. 6932d769e936Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6933d769e936Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6934d769e936SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6935d769e936Smrg# Dependencies to place before and after the object being linked: 6936d769e936Smrg_LT_TAGVAR(predep_objects, $1)= 6937d769e936Smrg_LT_TAGVAR(postdep_objects, $1)= 6938d769e936Smrg_LT_TAGVAR(predeps, $1)= 6939d769e936Smrg_LT_TAGVAR(postdeps, $1)= 6940d769e936Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6941d769e936Smrg 6942d769e936Smrgdnl we can't use the lt_simple_compile_test_code here, 6943d769e936Smrgdnl because it contains code intended for an executable, 6944d769e936Smrgdnl not a library. It's possible we should let each 6945d769e936Smrgdnl tag define a new lt_????_link_test_code variable, 6946d769e936Smrgdnl but it's only used here... 6947d769e936Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6948d769e936Smrgint a; 6949d769e936Smrgvoid foo (void) { a = 0; } 6950d769e936Smrg_LT_EOF 6951d769e936Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6952d769e936Smrgclass Foo 6953d769e936Smrg{ 6954d769e936Smrgpublic: 6955d769e936Smrg Foo (void) { a = 0; } 6956d769e936Smrgprivate: 6957d769e936Smrg int a; 6958d769e936Smrg}; 6959d769e936Smrg_LT_EOF 6960d769e936Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6961d769e936Smrg subroutine foo 6962d769e936Smrg implicit none 6963d769e936Smrg integer*4 a 6964d769e936Smrg a=0 6965d769e936Smrg return 6966d769e936Smrg end 6967d769e936Smrg_LT_EOF 6968d769e936Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6969d769e936Smrg subroutine foo 6970d769e936Smrg implicit none 6971d769e936Smrg integer a 6972d769e936Smrg a=0 6973d769e936Smrg return 6974d769e936Smrg end 6975d769e936Smrg_LT_EOF 6976d769e936Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6977d769e936Smrgpublic class foo { 6978d769e936Smrg private int a; 6979d769e936Smrg public void bar (void) { 6980d769e936Smrg a = 0; 6981d769e936Smrg } 6982d769e936Smrg}; 6983d769e936Smrg_LT_EOF 6984d769e936Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 6985d769e936Smrgpackage foo 6986d769e936Smrgfunc foo() { 6987d769e936Smrg} 6988d769e936Smrg_LT_EOF 69891d54945dSmrg]) 69901d54945dSmrg 6991d769e936Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 6992d769e936Smrgcase "$CC $CFLAGS " in #( 6993d769e936Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6994d769e936Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 6995d769e936Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 69961d54945dSmrgesac 69971d54945dSmrg 6998d769e936Smrgdnl Parse the compiler output and extract the necessary 6999d769e936Smrgdnl objects, libraries and library flags. 7000d769e936Smrgif AC_TRY_EVAL(ac_compile); then 7001d769e936Smrg # Parse the compiler output and extract the necessary 7002d769e936Smrg # objects, libraries and library flags. 7003786a6f21Smrg 7004d769e936Smrg # Sentinel used to keep track of whether or not we are before 7005d769e936Smrg # the conftest object file. 7006d769e936Smrg pre_test_object_deps_done=no 7007786a6f21Smrg 7008d769e936Smrg for p in `eval "$output_verbose_link_cmd"`; do 7009d769e936Smrg case ${prev}${p} in 70101d54945dSmrg 7011d769e936Smrg -L* | -R* | -l*) 7012d769e936Smrg # Some compilers place space between "-{L,R}" and the path. 7013d769e936Smrg # Remove the space. 7014d769e936Smrg if test $p = "-L" || 7015d769e936Smrg test $p = "-R"; then 7016d769e936Smrg prev=$p 7017d769e936Smrg continue 7018d769e936Smrg fi 70191d54945dSmrg 7020d769e936Smrg # Expand the sysroot to ease extracting the directories later. 7021d769e936Smrg if test -z "$prev"; then 7022d769e936Smrg case $p in 7023d769e936Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7024d769e936Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7025d769e936Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7026d769e936Smrg esac 7027d769e936Smrg fi 7028d769e936Smrg case $p in 7029d769e936Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7030d769e936Smrg esac 7031d769e936Smrg if test "$pre_test_object_deps_done" = no; then 7032d769e936Smrg case ${prev} in 7033d769e936Smrg -L | -R) 7034d769e936Smrg # Internal compiler library paths should come after those 7035d769e936Smrg # provided the user. The postdeps already come after the 7036d769e936Smrg # user supplied libs so there is no need to process them. 7037d769e936Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7038d769e936Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 7039d769e936Smrg else 7040d769e936Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 7041d769e936Smrg fi 7042d769e936Smrg ;; 7043d769e936Smrg # The "-l" case would never come before the object being 7044d769e936Smrg # linked, so don't bother handling this case. 7045d769e936Smrg esac 7046d769e936Smrg else 7047d769e936Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7048d769e936Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 7049d769e936Smrg else 7050d769e936Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 7051d769e936Smrg fi 7052d769e936Smrg fi 7053d769e936Smrg prev= 7054d769e936Smrg ;; 70551d54945dSmrg 7056d769e936Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 7057d769e936Smrg *.$objext) 7058d769e936Smrg # This assumes that the test object file only shows up 7059d769e936Smrg # once in the compiler output. 7060d769e936Smrg if test "$p" = "conftest.$objext"; then 7061d769e936Smrg pre_test_object_deps_done=yes 7062d769e936Smrg continue 7063d769e936Smrg fi 70641d54945dSmrg 7065d769e936Smrg if test "$pre_test_object_deps_done" = no; then 7066d769e936Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7067d769e936Smrg _LT_TAGVAR(predep_objects, $1)="$p" 7068d769e936Smrg else 7069d769e936Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7070d769e936Smrg fi 7071d769e936Smrg else 7072d769e936Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7073d769e936Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 7074d769e936Smrg else 7075d769e936Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7076d769e936Smrg fi 7077d769e936Smrg fi 7078d769e936Smrg ;; 70791d54945dSmrg 7080d769e936Smrg *) ;; # Ignore the rest. 70811d54945dSmrg 7082d769e936Smrg esac 7083d769e936Smrg done 70841d54945dSmrg 7085d769e936Smrg # Clean up. 7086d769e936Smrg rm -f a.out a.exe 7087d769e936Smrgelse 7088d769e936Smrg echo "libtool.m4: error: problem compiling $1 test program" 7089d769e936Smrgfi 70901d54945dSmrg 7091d769e936Smrg$RM -f confest.$objext 7092d769e936SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 70931d54945dSmrg 7094d769e936Smrg# PORTME: override above test on systems where it is broken 7095d769e936Smrgm4_if([$1], [CXX], 7096d769e936Smrg[case $host_os in 7097d769e936Smrginterix[[3-9]]*) 7098d769e936Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7099d769e936Smrg # hack all around it, let's just trust "g++" to DTRT. 7100d769e936Smrg _LT_TAGVAR(predep_objects,$1)= 7101d769e936Smrg _LT_TAGVAR(postdep_objects,$1)= 7102d769e936Smrg _LT_TAGVAR(postdeps,$1)= 7103d769e936Smrg ;; 71041d54945dSmrg 7105d769e936Smrglinux*) 7106d769e936Smrg case `$CC -V 2>&1 | sed 5q` in 7107d769e936Smrg *Sun\ C*) 7108d769e936Smrg # Sun C++ 5.9 71091d54945dSmrg 7110d769e936Smrg # The more standards-conforming stlport4 library is 7111d769e936Smrg # incompatible with the Cstd library. Avoid specifying 7112d769e936Smrg # it if it's in CXXFLAGS. Ignore libCrun as 7113d769e936Smrg # -library=stlport4 depends on it. 7114d769e936Smrg case " $CXX $CXXFLAGS " in 7115d769e936Smrg *" -library=stlport4 "*) 7116d769e936Smrg solaris_use_stlport4=yes 7117ec713c28Smrg ;; 7118d769e936Smrg esac 71191d54945dSmrg 7120d769e936Smrg if test "$solaris_use_stlport4" != yes; then 7121d769e936Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7122d769e936Smrg fi 7123d769e936Smrg ;; 7124d769e936Smrg esac 7125d769e936Smrg ;; 7126d769e936Smrg 7127d769e936Smrgsolaris*) 7128d769e936Smrg case $cc_basename in 7129d769e936Smrg CC* | sunCC*) 7130d769e936Smrg # The more standards-conforming stlport4 library is 7131d769e936Smrg # incompatible with the Cstd library. Avoid specifying 7132d769e936Smrg # it if it's in CXXFLAGS. Ignore libCrun as 7133d769e936Smrg # -library=stlport4 depends on it. 7134d769e936Smrg case " $CXX $CXXFLAGS " in 7135d769e936Smrg *" -library=stlport4 "*) 7136d769e936Smrg solaris_use_stlport4=yes 7137ec713c28Smrg ;; 7138d769e936Smrg esac 71391d54945dSmrg 7140d769e936Smrg # Adding this requires a known-good setup of shared libraries for 7141d769e936Smrg # Sun compiler versions before 5.6, else PIC objects from an old 7142d769e936Smrg # archive will be linked into the output, leading to subtle bugs. 7143d769e936Smrg if test "$solaris_use_stlport4" != yes; then 7144d769e936Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7145d769e936Smrg fi 7146d769e936Smrg ;; 7147d769e936Smrg esac 7148d769e936Smrg ;; 7149d769e936Smrgesac 7150d769e936Smrg]) 71511d54945dSmrg 7152d769e936Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 7153d769e936Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7154d769e936Smrgesac 7155d769e936Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7156d769e936Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7157d769e936Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7158d769e936Smrgfi 7159d769e936Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7160d769e936Smrg [The directories searched by this compiler when creating a shared library]) 7161d769e936Smrg_LT_TAGDECL([], [predep_objects], [1], 7162d769e936Smrg [Dependencies to place before and after the objects being linked to 7163d769e936Smrg create a shared library]) 7164d769e936Smrg_LT_TAGDECL([], [postdep_objects], [1]) 7165d769e936Smrg_LT_TAGDECL([], [predeps], [1]) 7166d769e936Smrg_LT_TAGDECL([], [postdeps], [1]) 7167d769e936Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7168d769e936Smrg [The library search path used internally by the compiler when linking 7169d769e936Smrg a shared library]) 7170d769e936Smrg])# _LT_SYS_HIDDEN_LIBDEPS 7171d769e936Smrg 7172d769e936Smrg 7173d769e936Smrg# _LT_LANG_F77_CONFIG([TAG]) 7174d769e936Smrg# -------------------------- 7175d769e936Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 7176d769e936Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7177d769e936Smrg# to write the compiler configuration to `libtool'. 7178d769e936Smrgm4_defun([_LT_LANG_F77_CONFIG], 7179d769e936Smrg[AC_LANG_PUSH(Fortran 77) 7180d769e936Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 7181d769e936Smrg _lt_disable_F77=yes 7182d769e936Smrgfi 71831d54945dSmrg 7184d769e936Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7185d769e936Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7186d769e936Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7187d769e936Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7188d769e936Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7189d769e936Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7190d769e936Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7191d769e936Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7192d769e936Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7193d769e936Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7194d769e936Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7195d769e936Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7196d769e936Smrg_LT_TAGVAR(module_cmds, $1)= 7197d769e936Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7198d769e936Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7199d769e936Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7200d769e936Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7201d769e936Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7202d769e936Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7203d769e936Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7204d769e936Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 72051d54945dSmrg 7206d769e936Smrg# Source file extension for f77 test sources. 7207d769e936Smrgac_ext=f 72081d54945dSmrg 7209d769e936Smrg# Object file extension for compiled f77 test sources. 7210d769e936Smrgobjext=o 7211d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 7212d769e936Smrg 7213d769e936Smrg# No sense in running all these tests if we already determined that 7214d769e936Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 7215d769e936Smrg# are currently assumed to apply to all compilers on this platform, 7216d769e936Smrg# and will be corrupted by setting them based on a non-working compiler. 7217d769e936Smrgif test "$_lt_disable_F77" != yes; then 7218d769e936Smrg # Code to be used in simple compile tests 7219d769e936Smrg lt_simple_compile_test_code="\ 7220d769e936Smrg subroutine t 7221d769e936Smrg return 7222d769e936Smrg end 7223d769e936Smrg" 72241d54945dSmrg 7225d769e936Smrg # Code to be used in simple link tests 7226d769e936Smrg lt_simple_link_test_code="\ 7227d769e936Smrg program t 7228d769e936Smrg end 7229d769e936Smrg" 72301d54945dSmrg 7231d769e936Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7232d769e936Smrg _LT_TAG_COMPILER 7233d769e936Smrg 7234d769e936Smrg # save warnings/boilerplate of simple test code 7235d769e936Smrg _LT_COMPILER_BOILERPLATE 7236d769e936Smrg _LT_LINKER_BOILERPLATE 7237d769e936Smrg 7238d769e936Smrg # Allow CC to be a program name with arguments. 7239d769e936Smrg lt_save_CC="$CC" 7240d769e936Smrg lt_save_GCC=$GCC 7241d769e936Smrg lt_save_CFLAGS=$CFLAGS 7242d769e936Smrg CC=${F77-"f77"} 7243d769e936Smrg CFLAGS=$FFLAGS 7244d769e936Smrg compiler=$CC 7245d769e936Smrg _LT_TAGVAR(compiler, $1)=$CC 7246d769e936Smrg _LT_CC_BASENAME([$compiler]) 7247d769e936Smrg GCC=$G77 7248d769e936Smrg if test -n "$compiler"; then 7249d769e936Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7250d769e936Smrg AC_MSG_RESULT([$can_build_shared]) 72511d54945dSmrg 7252d769e936Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7253d769e936Smrg test "$can_build_shared" = "no" && enable_shared=no 72541d54945dSmrg 7255d769e936Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7256d769e936Smrg # are all built from PIC. 7257ec713c28Smrg case $host_os in 7258d769e936Smrg aix3*) 7259d769e936Smrg test "$enable_shared" = yes && enable_static=no 7260d769e936Smrg if test -n "$RANLIB"; then 7261d769e936Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7262d769e936Smrg postinstall_cmds='$RANLIB $lib' 7263d769e936Smrg fi 7264d769e936Smrg ;; 7265d769e936Smrg aix[[4-9]]*) 7266d769e936Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7267d769e936Smrg test "$enable_shared" = yes && enable_static=no 7268ec713c28Smrg fi 7269d769e936Smrg ;; 7270d769e936Smrg esac 7271d769e936Smrg AC_MSG_RESULT([$enable_shared]) 7272d769e936Smrg 7273d769e936Smrg AC_MSG_CHECKING([whether to build static libraries]) 7274d769e936Smrg # Make sure either enable_shared or enable_static is yes. 7275d769e936Smrg test "$enable_shared" = yes || enable_static=yes 7276d769e936Smrg AC_MSG_RESULT([$enable_static]) 7277d769e936Smrg 7278d769e936Smrg _LT_TAGVAR(GCC, $1)="$G77" 7279d769e936Smrg _LT_TAGVAR(LD, $1)="$LD" 7280d769e936Smrg 7281d769e936Smrg ## CAVEAT EMPTOR: 7282d769e936Smrg ## There is no encapsulation within the following macros, do not change 7283d769e936Smrg ## the running order or otherwise move them around unless you know exactly 7284d769e936Smrg ## what you are doing... 7285d769e936Smrg _LT_COMPILER_PIC($1) 7286d769e936Smrg _LT_COMPILER_C_O($1) 7287d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 7288d769e936Smrg _LT_LINKER_SHLIBS($1) 7289d769e936Smrg _LT_SYS_DYNAMIC_LINKER($1) 7290d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7291d769e936Smrg 7292d769e936Smrg _LT_CONFIG($1) 7293d769e936Smrg fi # test -n "$compiler" 7294d769e936Smrg 7295d769e936Smrg GCC=$lt_save_GCC 7296d769e936Smrg CC="$lt_save_CC" 7297d769e936Smrg CFLAGS="$lt_save_CFLAGS" 7298d769e936Smrgfi # test "$_lt_disable_F77" != yes 72991d54945dSmrg 7300d769e936SmrgAC_LANG_POP 7301d769e936Smrg])# _LT_LANG_F77_CONFIG 73021d54945dSmrg 7303786a6f21Smrg 7304d769e936Smrg# _LT_LANG_FC_CONFIG([TAG]) 7305d769e936Smrg# ------------------------- 7306d769e936Smrg# Ensure that the configuration variables for a Fortran compiler are 7307d769e936Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7308d769e936Smrg# to write the compiler configuration to `libtool'. 7309d769e936Smrgm4_defun([_LT_LANG_FC_CONFIG], 7310d769e936Smrg[AC_LANG_PUSH(Fortran) 7311d769e936Smrg 7312d769e936Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 7313d769e936Smrg _lt_disable_FC=yes 7314d769e936Smrgfi 7315786a6f21Smrg 7316d769e936Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7317d769e936Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7318d769e936Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7319d769e936Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7320d769e936Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7321d769e936Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7322d769e936Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7323d769e936Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7324d769e936Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7325d769e936Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7326d769e936Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7327d769e936Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7328d769e936Smrg_LT_TAGVAR(module_cmds, $1)= 7329d769e936Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7330d769e936Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7331d769e936Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7332d769e936Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7333d769e936Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7334d769e936Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7335d769e936Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7336d769e936Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7337d769e936Smrg 7338d769e936Smrg# Source file extension for fc test sources. 7339d769e936Smrgac_ext=${ac_fc_srcext-f} 7340d769e936Smrg 7341d769e936Smrg# Object file extension for compiled fc test sources. 7342d769e936Smrgobjext=o 7343d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 7344d769e936Smrg 7345d769e936Smrg# No sense in running all these tests if we already determined that 7346d769e936Smrg# the FC compiler isn't working. Some variables (like enable_shared) 7347d769e936Smrg# are currently assumed to apply to all compilers on this platform, 7348d769e936Smrg# and will be corrupted by setting them based on a non-working compiler. 7349d769e936Smrgif test "$_lt_disable_FC" != yes; then 7350d769e936Smrg # Code to be used in simple compile tests 7351d769e936Smrg lt_simple_compile_test_code="\ 7352d769e936Smrg subroutine t 7353d769e936Smrg return 7354d769e936Smrg end 7355d769e936Smrg" 7356786a6f21Smrg 7357d769e936Smrg # Code to be used in simple link tests 7358d769e936Smrg lt_simple_link_test_code="\ 7359d769e936Smrg program t 7360d769e936Smrg end 7361d769e936Smrg" 7362786a6f21Smrg 7363d769e936Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7364d769e936Smrg _LT_TAG_COMPILER 7365d769e936Smrg 7366d769e936Smrg # save warnings/boilerplate of simple test code 7367d769e936Smrg _LT_COMPILER_BOILERPLATE 7368d769e936Smrg _LT_LINKER_BOILERPLATE 7369d769e936Smrg 7370d769e936Smrg # Allow CC to be a program name with arguments. 7371d769e936Smrg lt_save_CC="$CC" 7372d769e936Smrg lt_save_GCC=$GCC 7373d769e936Smrg lt_save_CFLAGS=$CFLAGS 7374d769e936Smrg CC=${FC-"f95"} 7375d769e936Smrg CFLAGS=$FCFLAGS 7376d769e936Smrg compiler=$CC 7377d769e936Smrg GCC=$ac_cv_fc_compiler_gnu 7378d769e936Smrg 7379d769e936Smrg _LT_TAGVAR(compiler, $1)=$CC 7380d769e936Smrg _LT_CC_BASENAME([$compiler]) 7381d769e936Smrg 7382d769e936Smrg if test -n "$compiler"; then 7383d769e936Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7384d769e936Smrg AC_MSG_RESULT([$can_build_shared]) 7385d769e936Smrg 7386d769e936Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7387d769e936Smrg test "$can_build_shared" = "no" && enable_shared=no 7388d769e936Smrg 7389d769e936Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7390d769e936Smrg # are all built from PIC. 7391d769e936Smrg case $host_os in 7392d769e936Smrg aix3*) 7393d769e936Smrg test "$enable_shared" = yes && enable_static=no 7394d769e936Smrg if test -n "$RANLIB"; then 7395d769e936Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7396d769e936Smrg postinstall_cmds='$RANLIB $lib' 7397d769e936Smrg fi 7398d769e936Smrg ;; 7399d769e936Smrg aix[[4-9]]*) 7400d769e936Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7401d769e936Smrg test "$enable_shared" = yes && enable_static=no 7402ec713c28Smrg fi 7403d769e936Smrg ;; 7404d769e936Smrg esac 7405d769e936Smrg AC_MSG_RESULT([$enable_shared]) 7406d769e936Smrg 7407d769e936Smrg AC_MSG_CHECKING([whether to build static libraries]) 7408d769e936Smrg # Make sure either enable_shared or enable_static is yes. 7409d769e936Smrg test "$enable_shared" = yes || enable_static=yes 7410d769e936Smrg AC_MSG_RESULT([$enable_static]) 7411d769e936Smrg 7412d769e936Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7413d769e936Smrg _LT_TAGVAR(LD, $1)="$LD" 7414d769e936Smrg 7415d769e936Smrg ## CAVEAT EMPTOR: 7416d769e936Smrg ## There is no encapsulation within the following macros, do not change 7417d769e936Smrg ## the running order or otherwise move them around unless you know exactly 7418d769e936Smrg ## what you are doing... 7419d769e936Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7420d769e936Smrg _LT_COMPILER_PIC($1) 7421d769e936Smrg _LT_COMPILER_C_O($1) 7422d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 7423d769e936Smrg _LT_LINKER_SHLIBS($1) 7424d769e936Smrg _LT_SYS_DYNAMIC_LINKER($1) 7425d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7426d769e936Smrg 7427d769e936Smrg _LT_CONFIG($1) 7428d769e936Smrg fi # test -n "$compiler" 7429d769e936Smrg 7430d769e936Smrg GCC=$lt_save_GCC 7431d769e936Smrg CC=$lt_save_CC 7432d769e936Smrg CFLAGS=$lt_save_CFLAGS 7433d769e936Smrgfi # test "$_lt_disable_FC" != yes 74341d54945dSmrg 7435d769e936SmrgAC_LANG_POP 7436d769e936Smrg])# _LT_LANG_FC_CONFIG 74371d54945dSmrg 74381d54945dSmrg 7439d769e936Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 7440d769e936Smrg# -------------------------- 7441d769e936Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7442d769e936Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7443d769e936Smrg# to write the compiler configuration to `libtool'. 7444d769e936Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 7445d769e936Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7446d769e936SmrgAC_LANG_SAVE 74471d54945dSmrg 7448d769e936Smrg# Source file extension for Java test sources. 7449d769e936Smrgac_ext=java 74501d54945dSmrg 7451d769e936Smrg# Object file extension for compiled Java test sources. 7452d769e936Smrgobjext=o 7453d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 74541d54945dSmrg 7455d769e936Smrg# Code to be used in simple compile tests 7456d769e936Smrglt_simple_compile_test_code="class foo {}" 74571d54945dSmrg 7458d769e936Smrg# Code to be used in simple link tests 7459d769e936Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7460d769e936Smrg 7461d769e936Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7462d769e936Smrg_LT_TAG_COMPILER 7463d769e936Smrg 7464d769e936Smrg# save warnings/boilerplate of simple test code 7465d769e936Smrg_LT_COMPILER_BOILERPLATE 7466d769e936Smrg_LT_LINKER_BOILERPLATE 7467d769e936Smrg 7468d769e936Smrg# Allow CC to be a program name with arguments. 7469d769e936Smrglt_save_CC=$CC 7470d769e936Smrglt_save_CFLAGS=$CFLAGS 7471d769e936Smrglt_save_GCC=$GCC 7472d769e936SmrgGCC=yes 7473d769e936SmrgCC=${GCJ-"gcj"} 7474d769e936SmrgCFLAGS=$GCJFLAGS 7475d769e936Smrgcompiler=$CC 7476d769e936Smrg_LT_TAGVAR(compiler, $1)=$CC 7477d769e936Smrg_LT_TAGVAR(LD, $1)="$LD" 7478d769e936Smrg_LT_CC_BASENAME([$compiler]) 74791d54945dSmrg 7480d769e936Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7481d769e936Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 74821d54945dSmrg 7483d769e936Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7484d769e936Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7485d769e936Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 74861d54945dSmrg 7487d769e936Smrgif test -n "$compiler"; then 7488d769e936Smrg _LT_COMPILER_NO_RTTI($1) 7489d769e936Smrg _LT_COMPILER_PIC($1) 7490d769e936Smrg _LT_COMPILER_C_O($1) 7491d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 7492d769e936Smrg _LT_LINKER_SHLIBS($1) 7493d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 74941d54945dSmrg 7495d769e936Smrg _LT_CONFIG($1) 7496d769e936Smrgfi 74971d54945dSmrg 7498d769e936SmrgAC_LANG_RESTORE 74991d54945dSmrg 7500d769e936SmrgGCC=$lt_save_GCC 7501d769e936SmrgCC=$lt_save_CC 7502d769e936SmrgCFLAGS=$lt_save_CFLAGS 7503d769e936Smrg])# _LT_LANG_GCJ_CONFIG 75041d54945dSmrg 75051d54945dSmrg 7506d769e936Smrg# _LT_LANG_GO_CONFIG([TAG]) 7507d769e936Smrg# -------------------------- 7508d769e936Smrg# Ensure that the configuration variables for the GNU Go compiler 7509d769e936Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7510d769e936Smrg# to write the compiler configuration to `libtool'. 7511d769e936Smrgm4_defun([_LT_LANG_GO_CONFIG], 7512d769e936Smrg[AC_REQUIRE([LT_PROG_GO])dnl 7513d769e936SmrgAC_LANG_SAVE 75141d54945dSmrg 7515d769e936Smrg# Source file extension for Go test sources. 7516d769e936Smrgac_ext=go 75171d54945dSmrg 7518d769e936Smrg# Object file extension for compiled Go test sources. 7519d769e936Smrgobjext=o 7520d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 75211d54945dSmrg 7522d769e936Smrg# Code to be used in simple compile tests 7523d769e936Smrglt_simple_compile_test_code="package main; func main() { }" 75241d54945dSmrg 7525d769e936Smrg# Code to be used in simple link tests 7526d769e936Smrglt_simple_link_test_code='package main; func main() { }' 75271d54945dSmrg 7528d769e936Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7529d769e936Smrg_LT_TAG_COMPILER 75301d54945dSmrg 7531d769e936Smrg# save warnings/boilerplate of simple test code 7532d769e936Smrg_LT_COMPILER_BOILERPLATE 7533d769e936Smrg_LT_LINKER_BOILERPLATE 75341d54945dSmrg 7535d769e936Smrg# Allow CC to be a program name with arguments. 7536d769e936Smrglt_save_CC=$CC 7537d769e936Smrglt_save_CFLAGS=$CFLAGS 7538d769e936Smrglt_save_GCC=$GCC 7539d769e936SmrgGCC=yes 7540d769e936SmrgCC=${GOC-"gccgo"} 7541d769e936SmrgCFLAGS=$GOFLAGS 7542d769e936Smrgcompiler=$CC 7543d769e936Smrg_LT_TAGVAR(compiler, $1)=$CC 7544d769e936Smrg_LT_TAGVAR(LD, $1)="$LD" 7545d769e936Smrg_LT_CC_BASENAME([$compiler]) 75461d54945dSmrg 7547d769e936Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 7548d769e936Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 75491d54945dSmrg 7550d769e936Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7551d769e936Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7552d769e936Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 75531d54945dSmrg 7554d769e936Smrgif test -n "$compiler"; then 7555d769e936Smrg _LT_COMPILER_NO_RTTI($1) 7556d769e936Smrg _LT_COMPILER_PIC($1) 7557d769e936Smrg _LT_COMPILER_C_O($1) 7558d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 7559d769e936Smrg _LT_LINKER_SHLIBS($1) 7560d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7561786a6f21Smrg 7562d769e936Smrg _LT_CONFIG($1) 7563d769e936Smrgfi 75641d54945dSmrg 7565d769e936SmrgAC_LANG_RESTORE 75661d54945dSmrg 7567d769e936SmrgGCC=$lt_save_GCC 7568d769e936SmrgCC=$lt_save_CC 7569d769e936SmrgCFLAGS=$lt_save_CFLAGS 7570d769e936Smrg])# _LT_LANG_GO_CONFIG 75711d54945dSmrg 75721d54945dSmrg 7573d769e936Smrg# _LT_LANG_RC_CONFIG([TAG]) 7574d769e936Smrg# ------------------------- 7575d769e936Smrg# Ensure that the configuration variables for the Windows resource compiler 7576d769e936Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7577d769e936Smrg# to write the compiler configuration to `libtool'. 7578d769e936Smrgm4_defun([_LT_LANG_RC_CONFIG], 7579d769e936Smrg[AC_REQUIRE([LT_PROG_RC])dnl 7580d769e936SmrgAC_LANG_SAVE 75811d54945dSmrg 7582d769e936Smrg# Source file extension for RC test sources. 7583d769e936Smrgac_ext=rc 75841d54945dSmrg 7585d769e936Smrg# Object file extension for compiled RC test sources. 7586d769e936Smrgobjext=o 7587d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 75881d54945dSmrg 7589d769e936Smrg# Code to be used in simple compile tests 7590d769e936Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 75911d54945dSmrg 7592d769e936Smrg# Code to be used in simple link tests 7593d769e936Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 75941d54945dSmrg 7595d769e936Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7596d769e936Smrg_LT_TAG_COMPILER 7597786a6f21Smrg 7598d769e936Smrg# save warnings/boilerplate of simple test code 7599d769e936Smrg_LT_COMPILER_BOILERPLATE 7600d769e936Smrg_LT_LINKER_BOILERPLATE 76011d54945dSmrg 7602d769e936Smrg# Allow CC to be a program name with arguments. 7603d769e936Smrglt_save_CC="$CC" 7604d769e936Smrglt_save_CFLAGS=$CFLAGS 7605d769e936Smrglt_save_GCC=$GCC 7606d769e936SmrgGCC= 7607d769e936SmrgCC=${RC-"windres"} 7608d769e936SmrgCFLAGS= 7609d769e936Smrgcompiler=$CC 7610d769e936Smrg_LT_TAGVAR(compiler, $1)=$CC 7611d769e936Smrg_LT_CC_BASENAME([$compiler]) 7612d769e936Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 76131d54945dSmrg 7614d769e936Smrgif test -n "$compiler"; then 7615d769e936Smrg : 7616d769e936Smrg _LT_CONFIG($1) 7617d769e936Smrgfi 7618d769e936Smrg 7619d769e936SmrgGCC=$lt_save_GCC 7620d769e936SmrgAC_LANG_RESTORE 7621d769e936SmrgCC=$lt_save_CC 7622d769e936SmrgCFLAGS=$lt_save_CFLAGS 7623d769e936Smrg])# _LT_LANG_RC_CONFIG 76241d54945dSmrg 76251d54945dSmrg 7626d769e936Smrg# LT_PROG_GCJ 7627d769e936Smrg# ----------- 7628d769e936SmrgAC_DEFUN([LT_PROG_GCJ], 7629d769e936Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7630d769e936Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7631d769e936Smrg [AC_CHECK_TOOL(GCJ, gcj,) 7632d769e936Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7633d769e936Smrg AC_SUBST(GCJFLAGS)])])[]dnl 7634d769e936Smrg]) 7635d769e936Smrg 7636d769e936Smrg# Old name: 7637d769e936SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7638d769e936Smrgdnl aclocal-1.4 backwards compatibility: 7639d769e936Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 76401d54945dSmrg 76411d54945dSmrg 7642d769e936Smrg# LT_PROG_GO 7643d769e936Smrg# ---------- 7644d769e936SmrgAC_DEFUN([LT_PROG_GO], 7645d769e936Smrg[AC_CHECK_TOOL(GOC, gccgo,) 7646d769e936Smrg]) 76471d54945dSmrg 76481d54945dSmrg 7649d769e936Smrg# LT_PROG_RC 7650d769e936Smrg# ---------- 7651d769e936SmrgAC_DEFUN([LT_PROG_RC], 7652d769e936Smrg[AC_CHECK_TOOL(RC, windres,) 7653ec713c28Smrg]) 76541d54945dSmrg 7655d769e936Smrg# Old name: 7656d769e936SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7657d769e936Smrgdnl aclocal-1.4 backwards compatibility: 7658d769e936Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 7659d769e936Smrg 7660d769e936Smrg 7661d769e936Smrg# _LT_DECL_EGREP 7662d769e936Smrg# -------------- 7663d769e936Smrg# If we don't have a new enough Autoconf to choose the best grep 7664d769e936Smrg# available, choose the one first in the user's PATH. 7665d769e936Smrgm4_defun([_LT_DECL_EGREP], 7666d769e936Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7667d769e936SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7668d769e936Smrgtest -z "$GREP" && GREP=grep 7669d769e936Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7670d769e936Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7671d769e936Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7672d769e936Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7673d769e936SmrgAC_SUBST([GREP]) 76741d54945dSmrg]) 76751d54945dSmrg 7676ba85709eSmrg 7677d769e936Smrg# _LT_DECL_OBJDUMP 7678d769e936Smrg# -------------- 7679d769e936Smrg# If we don't have a new enough Autoconf to choose the best objdump 7680d769e936Smrg# available, choose the one first in the user's PATH. 7681d769e936Smrgm4_defun([_LT_DECL_OBJDUMP], 7682d769e936Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7683d769e936Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7684d769e936Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7685d769e936SmrgAC_SUBST([OBJDUMP]) 7686d769e936Smrg]) 7687ba85709eSmrg 7688d769e936Smrg# _LT_DECL_DLLTOOL 7689ec713c28Smrg# ---------------- 7690d769e936Smrg# Ensure DLLTOOL variable is set. 7691d769e936Smrgm4_defun([_LT_DECL_DLLTOOL], 7692d769e936Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7693d769e936Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7694d769e936Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7695d769e936SmrgAC_SUBST([DLLTOOL]) 7696d769e936Smrg]) 7697ba85709eSmrg 7698d769e936Smrg# _LT_DECL_SED 7699d769e936Smrg# ------------ 7700d769e936Smrg# Check for a fully-functional sed program, that truncates 7701d769e936Smrg# as few characters as possible. Prefer GNU sed if found. 7702d769e936Smrgm4_defun([_LT_DECL_SED], 7703d769e936Smrg[AC_PROG_SED 7704d769e936Smrgtest -z "$SED" && SED=sed 7705d769e936SmrgXsed="$SED -e 1s/^X//" 7706d769e936Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7707d769e936Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7708d769e936Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7709d769e936Smrg])# _LT_DECL_SED 7710ba85709eSmrg 7711d769e936Smrgm4_ifndef([AC_PROG_SED], [ 7712ec713c28Smrg# NOTE: This macro has been submitted for inclusion into # 7713ec713c28Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7714ec713c28Smrg# a released version of Autoconf we should remove this # 7715d769e936Smrg# macro and use it instead. # 7716d769e936Smrg 7717d769e936Smrgm4_defun([AC_PROG_SED], 7718ec713c28Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7719ec713c28SmrgAC_CACHE_VAL(lt_cv_path_SED, 7720ec713c28Smrg[# Loop through the user's path and test for sed and gsed. 7721ec713c28Smrg# Then use that list of sed's as ones to test for truncation. 7722ec713c28Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7723ec713c28Smrgfor as_dir in $PATH 7724ec713c28Smrgdo 7725ec713c28Smrg IFS=$as_save_IFS 7726ec713c28Smrg test -z "$as_dir" && as_dir=. 7727ec713c28Smrg for lt_ac_prog in sed gsed; do 7728ec713c28Smrg for ac_exec_ext in '' $ac_executable_extensions; do 7729d769e936Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7730ec713c28Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7731ec713c28Smrg fi 7732ec713c28Smrg done 7733ec713c28Smrg done 7734ec713c28Smrgdone 7735ec713c28SmrgIFS=$as_save_IFS 7736ec713c28Smrglt_ac_max=0 7737ec713c28Smrglt_ac_count=0 7738ec713c28Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7739ec713c28Smrg# along with /bin/sed that truncates output. 7740ec713c28Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7741ec713c28Smrg test ! -f $lt_ac_sed && continue 7742ec713c28Smrg cat /dev/null > conftest.in 7743ec713c28Smrg lt_ac_count=0 7744ec713c28Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7745ec713c28Smrg # Check for GNU sed and select it if it is found. 7746ec713c28Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7747ec713c28Smrg lt_cv_path_SED=$lt_ac_sed 7748ec713c28Smrg break 7749ec713c28Smrg fi 7750ec713c28Smrg while true; do 7751ec713c28Smrg cat conftest.in conftest.in >conftest.tmp 7752ec713c28Smrg mv conftest.tmp conftest.in 7753ec713c28Smrg cp conftest.in conftest.nl 7754ec713c28Smrg echo >>conftest.nl 7755ec713c28Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7756ec713c28Smrg cmp -s conftest.out conftest.nl || break 7757ec713c28Smrg # 10000 chars as input seems more than enough 7758ec713c28Smrg test $lt_ac_count -gt 10 && break 7759ec713c28Smrg lt_ac_count=`expr $lt_ac_count + 1` 7760ec713c28Smrg if test $lt_ac_count -gt $lt_ac_max; then 7761ec713c28Smrg lt_ac_max=$lt_ac_count 7762ec713c28Smrg lt_cv_path_SED=$lt_ac_sed 7763ec713c28Smrg fi 7764ec713c28Smrg done 7765ec713c28Smrgdone 7766ec713c28Smrg]) 7767ec713c28SmrgSED=$lt_cv_path_SED 7768ec713c28SmrgAC_SUBST([SED]) 7769ec713c28SmrgAC_MSG_RESULT([$SED]) 7770d769e936Smrg])#AC_PROG_SED 7771d769e936Smrg])#m4_ifndef 7772d769e936Smrg 7773d769e936Smrg# Old name: 7774d769e936SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7775d769e936Smrgdnl aclocal-1.4 backwards compatibility: 7776d769e936Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7777d769e936Smrg 7778d769e936Smrg 7779d769e936Smrg# _LT_CHECK_SHELL_FEATURES 7780d769e936Smrg# ------------------------ 7781d769e936Smrg# Find out whether the shell is Bourne or XSI compatible, 7782d769e936Smrg# or has some other useful features. 7783d769e936Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7784d769e936Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7785d769e936Smrg# Try some XSI features 7786d769e936Smrgxsi_shell=no 7787d769e936Smrg( _lt_dummy="a/b/c" 7788d769e936Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7789d769e936Smrg = c,a/b,b/c, \ 7790d769e936Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7791d769e936Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7792d769e936Smrg && xsi_shell=yes 7793d769e936SmrgAC_MSG_RESULT([$xsi_shell]) 7794d769e936Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7795d769e936Smrg 7796d769e936SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7797d769e936Smrglt_shell_append=no 7798d769e936Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7799d769e936Smrg >/dev/null 2>&1 \ 7800d769e936Smrg && lt_shell_append=yes 7801d769e936SmrgAC_MSG_RESULT([$lt_shell_append]) 7802d769e936Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7803d769e936Smrg 7804d769e936Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7805d769e936Smrg lt_unset=unset 7806d769e936Smrgelse 7807d769e936Smrg lt_unset=false 7808d769e936Smrgfi 7809d769e936Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7810d769e936Smrg 7811d769e936Smrg# test EBCDIC or ASCII 7812d769e936Smrgcase `echo X|tr X '\101'` in 7813d769e936Smrg A) # ASCII based system 7814d769e936Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7815d769e936Smrg lt_SP2NL='tr \040 \012' 7816d769e936Smrg lt_NL2SP='tr \015\012 \040\040' 7817d769e936Smrg ;; 7818d769e936Smrg *) # EBCDIC based system 7819d769e936Smrg lt_SP2NL='tr \100 \n' 7820d769e936Smrg lt_NL2SP='tr \r\n \100\100' 7821d769e936Smrg ;; 7822d769e936Smrgesac 7823d769e936Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7824d769e936Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7825d769e936Smrg])# _LT_CHECK_SHELL_FEATURES 7826d769e936Smrg 7827d769e936Smrg 7828d769e936Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7829d769e936Smrg# ------------------------------------------------------ 7830d769e936Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7831d769e936Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7832d769e936Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 7833d769e936Smrg[dnl { 7834d769e936Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 7835d769e936Smrg$1 ()\ 7836d769e936Smrg{\ 7837d769e936Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7838d769e936Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7839d769e936Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7840d769e936Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7841d769e936Smrgtest 0 -eq $? || _lt_function_replace_fail=: 7842d769e936Smrg]) 7843d769e936Smrg 7844d769e936Smrg 7845d769e936Smrg# _LT_PROG_REPLACE_SHELLFNS 7846d769e936Smrg# ------------------------- 7847d769e936Smrg# Replace existing portable implementations of several shell functions with 7848d769e936Smrg# equivalent extended shell implementations where those features are available.. 7849d769e936Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7850d769e936Smrg[if test x"$xsi_shell" = xyes; then 7851d769e936Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7852d769e936Smrg case ${1} in 7853d769e936Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7854d769e936Smrg * ) func_dirname_result="${3}" ;; 7855d769e936Smrg esac]) 7856d769e936Smrg 7857d769e936Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7858d769e936Smrg func_basename_result="${1##*/}"]) 7859d769e936Smrg 7860d769e936Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7861d769e936Smrg case ${1} in 7862d769e936Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7863d769e936Smrg * ) func_dirname_result="${3}" ;; 7864d769e936Smrg esac 7865d769e936Smrg func_basename_result="${1##*/}"]) 7866d769e936Smrg 7867d769e936Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7868d769e936Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7869d769e936Smrg # positional parameters, so assign one to ordinary parameter first. 7870d769e936Smrg func_stripname_result=${3} 7871d769e936Smrg func_stripname_result=${func_stripname_result#"${1}"} 7872d769e936Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 7873d769e936Smrg 7874d769e936Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7875d769e936Smrg func_split_long_opt_name=${1%%=*} 7876d769e936Smrg func_split_long_opt_arg=${1#*=}]) 7877d769e936Smrg 7878d769e936Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7879d769e936Smrg func_split_short_opt_arg=${1#??} 7880d769e936Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 7881d769e936Smrg 7882d769e936Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7883d769e936Smrg case ${1} in 7884d769e936Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7885d769e936Smrg *) func_lo2o_result=${1} ;; 7886d769e936Smrg esac]) 7887d769e936Smrg 7888d769e936Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 7889d769e936Smrg 7890d769e936Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7891d769e936Smrg 7892d769e936Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7893d769e936Smrgfi 7894d769e936Smrg 7895d769e936Smrgif test x"$lt_shell_append" = xyes; then 7896d769e936Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7897d769e936Smrg 7898d769e936Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7899d769e936Smrg func_quote_for_eval "${2}" 7900d769e936Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7901d769e936Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 7902d769e936Smrg 7903d769e936Smrg # Save a `func_append' function call where possible by direct use of '+=' 7904d769e936Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7905d769e936Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7906d769e936Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7907d769e936Smrg test 0 -eq $? || _lt_function_replace_fail=: 7908d769e936Smrgelse 7909d769e936Smrg # Save a `func_append' function call even when '+=' is not available 7910d769e936Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7911d769e936Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7912d769e936Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7913d769e936Smrg test 0 -eq $? || _lt_function_replace_fail=: 7914d769e936Smrgfi 7915d769e936Smrg 7916d769e936Smrgif test x"$_lt_function_replace_fail" = x":"; then 7917d769e936Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7918d769e936Smrgfi 7919d769e936Smrg]) 7920d769e936Smrg 7921d769e936Smrg# _LT_PATH_CONVERSION_FUNCTIONS 7922d769e936Smrg# ----------------------------- 7923d769e936Smrg# Determine which file name conversion functions should be used by 7924d769e936Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7925d769e936Smrg# for certain cross-compile configurations and native mingw. 7926d769e936Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7927d769e936Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7928d769e936SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7929d769e936SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 7930d769e936SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7931d769e936Smrg[case $host in 7932d769e936Smrg *-*-mingw* ) 7933d769e936Smrg case $build in 7934d769e936Smrg *-*-mingw* ) # actually msys 7935d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7936d769e936Smrg ;; 7937d769e936Smrg *-*-cygwin* ) 7938d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7939d769e936Smrg ;; 7940d769e936Smrg * ) # otherwise, assume *nix 7941d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7942d769e936Smrg ;; 7943d769e936Smrg esac 7944d769e936Smrg ;; 7945d769e936Smrg *-*-cygwin* ) 7946d769e936Smrg case $build in 7947d769e936Smrg *-*-mingw* ) # actually msys 7948d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7949d769e936Smrg ;; 7950d769e936Smrg *-*-cygwin* ) 7951d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7952d769e936Smrg ;; 7953d769e936Smrg * ) # otherwise, assume *nix 7954d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7955d769e936Smrg ;; 7956d769e936Smrg esac 7957d769e936Smrg ;; 7958d769e936Smrg * ) # unhandled hosts (and "normal" native builds) 7959d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7960d769e936Smrg ;; 7961d769e936Smrgesac 7962d769e936Smrg]) 7963d769e936Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 7964d769e936SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7965d769e936Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7966d769e936Smrg [0], [convert $build file names to $host format])dnl 7967d769e936Smrg 7968d769e936SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7969d769e936SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7970d769e936Smrg[#assume ordinary cross tools, or native build. 7971d769e936Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 7972d769e936Smrgcase $host in 7973d769e936Smrg *-*-mingw* ) 7974d769e936Smrg case $build in 7975d769e936Smrg *-*-mingw* ) # actually msys 7976d769e936Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7977d769e936Smrg ;; 7978d769e936Smrg esac 7979d769e936Smrg ;; 7980d769e936Smrgesac 7981d769e936Smrg]) 7982d769e936Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7983d769e936SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7984d769e936Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7985d769e936Smrg [0], [convert $build files to toolchain format])dnl 7986d769e936Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 7987d769e936Smrg 7988d769e936Smrg# Helper functions for option handling. -*- Autoconf -*- 7989d769e936Smrg# 7990d769e936Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 7991d769e936Smrg# Inc. 7992d769e936Smrg# Written by Gary V. Vaughan, 2004 7993d769e936Smrg# 7994d769e936Smrg# This file is free software; the Free Software Foundation gives 7995d769e936Smrg# unlimited permission to copy and/or distribute it, with or without 7996d769e936Smrg# modifications, as long as this notice is preserved. 7997d769e936Smrg 7998d769e936Smrg# serial 7 ltoptions.m4 7999d769e936Smrg 8000d769e936Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8001d769e936SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8002d769e936Smrg 8003d769e936Smrg 8004d769e936Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8005d769e936Smrg# ------------------------------------------ 8006d769e936Smrgm4_define([_LT_MANGLE_OPTION], 8007d769e936Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8008d769e936Smrg 8009d769e936Smrg 8010d769e936Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8011d769e936Smrg# --------------------------------------- 8012d769e936Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8013d769e936Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8014d769e936Smrg# saved as a flag. 8015d769e936Smrgm4_define([_LT_SET_OPTION], 8016d769e936Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8017d769e936Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8018d769e936Smrg _LT_MANGLE_DEFUN([$1], [$2]), 8019d769e936Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 8020d769e936Smrg]) 8021d769e936Smrg 8022d769e936Smrg 8023d769e936Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8024d769e936Smrg# ------------------------------------------------------------ 8025d769e936Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8026d769e936Smrgm4_define([_LT_IF_OPTION], 8027d769e936Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8028d769e936Smrg 8029d769e936Smrg 8030d769e936Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8031d769e936Smrg# ------------------------------------------------------- 8032d769e936Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8033d769e936Smrg# are set. 8034d769e936Smrgm4_define([_LT_UNLESS_OPTIONS], 8035d769e936Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8036d769e936Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8037d769e936Smrg [m4_define([$0_found])])])[]dnl 8038d769e936Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8039d769e936Smrg])[]dnl 8040d769e936Smrg]) 8041d769e936Smrg 8042d769e936Smrg 8043d769e936Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8044d769e936Smrg# ---------------------------------------- 8045d769e936Smrg# OPTION-LIST is a space-separated list of Libtool options associated 8046d769e936Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 8047d769e936Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8048d769e936Smrg# the unknown option and exit. 8049d769e936Smrgm4_defun([_LT_SET_OPTIONS], 8050d769e936Smrg[# Set options 8051d769e936Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8052d769e936Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 8053d769e936Smrg 8054d769e936Smrgm4_if([$1],[LT_INIT],[ 8055d769e936Smrg dnl 8056d769e936Smrg dnl Simply set some default values (i.e off) if boolean options were not 8057d769e936Smrg dnl specified: 8058d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8059d769e936Smrg ]) 8060d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8061d769e936Smrg ]) 8062d769e936Smrg dnl 8063d769e936Smrg dnl If no reference was made to various pairs of opposing options, then 8064d769e936Smrg dnl we run the default mode handler for the pair. For example, if neither 8065d769e936Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 8066d769e936Smrg dnl archives by default: 8067d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8068d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8069d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8070d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8071d769e936Smrg [_LT_ENABLE_FAST_INSTALL]) 8072d769e936Smrg ]) 8073d769e936Smrg])# _LT_SET_OPTIONS 8074d769e936Smrg 8075d769e936Smrg 8076d769e936Smrg 8077d769e936Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8078d769e936Smrg# ----------------------------------------- 8079d769e936Smrgm4_define([_LT_MANGLE_DEFUN], 8080d769e936Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8081d769e936Smrg 8082d769e936Smrg 8083d769e936Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8084d769e936Smrg# ----------------------------------------------- 8085d769e936Smrgm4_define([LT_OPTION_DEFINE], 8086d769e936Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8087d769e936Smrg])# LT_OPTION_DEFINE 8088d769e936Smrg 8089d769e936Smrg 8090d769e936Smrg# dlopen 8091d769e936Smrg# ------ 8092d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8093d769e936Smrg]) 8094d769e936Smrg 8095d769e936SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 8096d769e936Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 8097d769e936SmrgAC_DIAGNOSE([obsolete], 8098d769e936Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8099d769e936Smrgput the `dlopen' option into LT_INIT's first parameter.]) 8100d769e936Smrg]) 8101d769e936Smrg 8102d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8103d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8104d769e936Smrg 8105d769e936Smrg 8106d769e936Smrg# win32-dll 8107d769e936Smrg# --------- 8108d769e936Smrg# Declare package support for building win32 dll's. 8109d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8110d769e936Smrg[enable_win32_dll=yes 8111d769e936Smrg 8112d769e936Smrgcase $host in 8113d769e936Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8114d769e936Smrg AC_CHECK_TOOL(AS, as, false) 8115d769e936Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8116d769e936Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 8117d769e936Smrg ;; 8118d769e936Smrgesac 8119d769e936Smrg 8120d769e936Smrgtest -z "$AS" && AS=as 8121d769e936Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8122d769e936Smrg 8123d769e936Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8124d769e936Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8125d769e936Smrg 8126d769e936Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8127d769e936Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8128d769e936Smrg])# win32-dll 8129d769e936Smrg 8130d769e936SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8131d769e936Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8132d769e936Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 8133d769e936SmrgAC_DIAGNOSE([obsolete], 8134d769e936Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8135d769e936Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 8136d769e936Smrg]) 8137d769e936Smrg 8138d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8139d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8140d769e936Smrg 8141d769e936Smrg 8142d769e936Smrg# _LT_ENABLE_SHARED([DEFAULT]) 8143d769e936Smrg# ---------------------------- 8144d769e936Smrg# implement the --enable-shared flag, and supports the `shared' and 8145d769e936Smrg# `disable-shared' LT_INIT options. 8146d769e936Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8147d769e936Smrgm4_define([_LT_ENABLE_SHARED], 8148d769e936Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8149d769e936SmrgAC_ARG_ENABLE([shared], 8150d769e936Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8151d769e936Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8152d769e936Smrg [p=${PACKAGE-default} 8153d769e936Smrg case $enableval in 8154d769e936Smrg yes) enable_shared=yes ;; 8155d769e936Smrg no) enable_shared=no ;; 8156d769e936Smrg *) 8157d769e936Smrg enable_shared=no 8158d769e936Smrg # Look at the argument we got. We use all the common list separators. 8159d769e936Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8160d769e936Smrg for pkg in $enableval; do 8161d769e936Smrg IFS="$lt_save_ifs" 8162d769e936Smrg if test "X$pkg" = "X$p"; then 8163d769e936Smrg enable_shared=yes 8164d769e936Smrg fi 8165d769e936Smrg done 8166d769e936Smrg IFS="$lt_save_ifs" 8167d769e936Smrg ;; 8168d769e936Smrg esac], 8169d769e936Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8170d769e936Smrg 8171d769e936Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8172d769e936Smrg [Whether or not to build shared libraries]) 8173d769e936Smrg])# _LT_ENABLE_SHARED 8174d769e936Smrg 8175d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8176d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8177d769e936Smrg 8178d769e936Smrg# Old names: 8179d769e936SmrgAC_DEFUN([AC_ENABLE_SHARED], 8180d769e936Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8181d769e936Smrg]) 8182d769e936Smrg 8183d769e936SmrgAC_DEFUN([AC_DISABLE_SHARED], 8184d769e936Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8185d769e936Smrg]) 8186d769e936Smrg 8187d769e936SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8188d769e936SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8189d769e936Smrg 8190d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8191d769e936Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8192d769e936Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8193d769e936Smrg 8194d769e936Smrg 8195d769e936Smrg 8196d769e936Smrg# _LT_ENABLE_STATIC([DEFAULT]) 8197d769e936Smrg# ---------------------------- 8198d769e936Smrg# implement the --enable-static flag, and support the `static' and 8199d769e936Smrg# `disable-static' LT_INIT options. 8200d769e936Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8201d769e936Smrgm4_define([_LT_ENABLE_STATIC], 8202d769e936Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8203d769e936SmrgAC_ARG_ENABLE([static], 8204d769e936Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8205d769e936Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8206d769e936Smrg [p=${PACKAGE-default} 8207d769e936Smrg case $enableval in 8208d769e936Smrg yes) enable_static=yes ;; 8209d769e936Smrg no) enable_static=no ;; 8210d769e936Smrg *) 8211d769e936Smrg enable_static=no 8212d769e936Smrg # Look at the argument we got. We use all the common list separators. 8213d769e936Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8214d769e936Smrg for pkg in $enableval; do 8215d769e936Smrg IFS="$lt_save_ifs" 8216d769e936Smrg if test "X$pkg" = "X$p"; then 8217d769e936Smrg enable_static=yes 8218d769e936Smrg fi 8219d769e936Smrg done 8220d769e936Smrg IFS="$lt_save_ifs" 8221d769e936Smrg ;; 8222d769e936Smrg esac], 8223d769e936Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8224d769e936Smrg 8225d769e936Smrg _LT_DECL([build_old_libs], [enable_static], [0], 8226d769e936Smrg [Whether or not to build static libraries]) 8227d769e936Smrg])# _LT_ENABLE_STATIC 8228d769e936Smrg 8229d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8230d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8231d769e936Smrg 8232d769e936Smrg# Old names: 8233d769e936SmrgAC_DEFUN([AC_ENABLE_STATIC], 8234d769e936Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8235d769e936Smrg]) 8236d769e936Smrg 8237d769e936SmrgAC_DEFUN([AC_DISABLE_STATIC], 8238d769e936Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8239d769e936Smrg]) 8240d769e936Smrg 8241d769e936SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8242d769e936SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8243d769e936Smrg 8244d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8245d769e936Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8246d769e936Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8247d769e936Smrg 8248d769e936Smrg 8249d769e936Smrg 8250d769e936Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8251d769e936Smrg# ---------------------------------- 8252d769e936Smrg# implement the --enable-fast-install flag, and support the `fast-install' 8253d769e936Smrg# and `disable-fast-install' LT_INIT options. 8254d769e936Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8255d769e936Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 8256d769e936Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8257d769e936SmrgAC_ARG_ENABLE([fast-install], 8258d769e936Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8259d769e936Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8260d769e936Smrg [p=${PACKAGE-default} 8261d769e936Smrg case $enableval in 8262d769e936Smrg yes) enable_fast_install=yes ;; 8263d769e936Smrg no) enable_fast_install=no ;; 8264d769e936Smrg *) 8265d769e936Smrg enable_fast_install=no 8266d769e936Smrg # Look at the argument we got. We use all the common list separators. 8267d769e936Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8268d769e936Smrg for pkg in $enableval; do 8269d769e936Smrg IFS="$lt_save_ifs" 8270d769e936Smrg if test "X$pkg" = "X$p"; then 8271d769e936Smrg enable_fast_install=yes 8272d769e936Smrg fi 8273d769e936Smrg done 8274d769e936Smrg IFS="$lt_save_ifs" 8275d769e936Smrg ;; 8276d769e936Smrg esac], 8277d769e936Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8278d769e936Smrg 8279d769e936Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 8280d769e936Smrg [Whether or not to optimize for fast installation])dnl 8281d769e936Smrg])# _LT_ENABLE_FAST_INSTALL 8282d769e936Smrg 8283d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8284d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8285d769e936Smrg 8286d769e936Smrg# Old names: 8287d769e936SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8288d769e936Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8289d769e936SmrgAC_DIAGNOSE([obsolete], 8290d769e936Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8291d769e936Smrgthe `fast-install' option into LT_INIT's first parameter.]) 8292d769e936Smrg]) 8293d769e936Smrg 8294d769e936SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8295d769e936Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8296d769e936SmrgAC_DIAGNOSE([obsolete], 8297d769e936Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8298d769e936Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 8299d769e936Smrg]) 8300d769e936Smrg 8301d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8302d769e936Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8303d769e936Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8304d769e936Smrg 8305d769e936Smrg 8306d769e936Smrg# _LT_WITH_PIC([MODE]) 8307d769e936Smrg# -------------------- 8308d769e936Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 8309d769e936Smrg# LT_INIT options. 8310d769e936Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 8311d769e936Smrgm4_define([_LT_WITH_PIC], 8312d769e936Smrg[AC_ARG_WITH([pic], 8313d769e936Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8314d769e936Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8315d769e936Smrg [lt_p=${PACKAGE-default} 8316d769e936Smrg case $withval in 8317d769e936Smrg yes|no) pic_mode=$withval ;; 8318d769e936Smrg *) 8319d769e936Smrg pic_mode=default 8320d769e936Smrg # Look at the argument we got. We use all the common list separators. 8321d769e936Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8322d769e936Smrg for lt_pkg in $withval; do 8323d769e936Smrg IFS="$lt_save_ifs" 8324d769e936Smrg if test "X$lt_pkg" = "X$lt_p"; then 8325d769e936Smrg pic_mode=yes 8326d769e936Smrg fi 8327d769e936Smrg done 8328d769e936Smrg IFS="$lt_save_ifs" 8329d769e936Smrg ;; 8330d769e936Smrg esac], 8331d769e936Smrg [pic_mode=default]) 8332d769e936Smrg 8333d769e936Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 8334d769e936Smrg 8335d769e936Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8336d769e936Smrg])# _LT_WITH_PIC 8337d769e936Smrg 8338d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8339d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8340d769e936Smrg 8341d769e936Smrg# Old name: 8342d769e936SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8343d769e936Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8344d769e936SmrgAC_DIAGNOSE([obsolete], 8345d769e936Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8346d769e936Smrgput the `pic-only' option into LT_INIT's first parameter.]) 8347d769e936Smrg]) 8348d769e936Smrg 8349d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8350d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8351d769e936Smrg 8352d769e936Smrg 8353d769e936Smrgm4_define([_LTDL_MODE], []) 8354d769e936SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8355d769e936Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8356d769e936SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8357d769e936Smrg [m4_define([_LTDL_MODE], [recursive])]) 8358d769e936SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8359d769e936Smrg [m4_define([_LTDL_MODE], [subproject])]) 8360d769e936Smrg 8361d769e936Smrgm4_define([_LTDL_TYPE], []) 8362d769e936SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8363d769e936Smrg [m4_define([_LTDL_TYPE], [installable])]) 8364d769e936SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8365d769e936Smrg [m4_define([_LTDL_TYPE], [convenience])]) 8366d769e936Smrg 8367d769e936Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8368d769e936Smrg# 8369d769e936Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 8370d769e936Smrg# Written by Gary V. Vaughan, 2004 8371d769e936Smrg# 8372d769e936Smrg# This file is free software; the Free Software Foundation gives 8373d769e936Smrg# unlimited permission to copy and/or distribute it, with or without 8374d769e936Smrg# modifications, as long as this notice is preserved. 8375d769e936Smrg 8376d769e936Smrg# serial 6 ltsugar.m4 8377d769e936Smrg 8378d769e936Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8379d769e936SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8380d769e936Smrg 8381d769e936Smrg 8382d769e936Smrg# lt_join(SEP, ARG1, [ARG2...]) 8383d769e936Smrg# ----------------------------- 8384d769e936Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8385d769e936Smrg# associated separator. 8386d769e936Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8387d769e936Smrg# versions in m4sugar had bugs. 8388d769e936Smrgm4_define([lt_join], 8389d769e936Smrg[m4_if([$#], [1], [], 8390d769e936Smrg [$#], [2], [[$2]], 8391d769e936Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8392d769e936Smrgm4_define([_lt_join], 8393d769e936Smrg[m4_if([$#$2], [2], [], 8394d769e936Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8395d769e936Smrg 8396d769e936Smrg 8397d769e936Smrg# lt_car(LIST) 8398d769e936Smrg# lt_cdr(LIST) 8399d769e936Smrg# ------------ 8400d769e936Smrg# Manipulate m4 lists. 8401d769e936Smrg# These macros are necessary as long as will still need to support 8402d769e936Smrg# Autoconf-2.59 which quotes differently. 8403d769e936Smrgm4_define([lt_car], [[$1]]) 8404d769e936Smrgm4_define([lt_cdr], 8405d769e936Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8406d769e936Smrg [$#], 1, [], 8407d769e936Smrg [m4_dquote(m4_shift($@))])]) 8408d769e936Smrgm4_define([lt_unquote], $1) 8409d769e936Smrg 8410d769e936Smrg 8411d769e936Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8412d769e936Smrg# ------------------------------------------ 8413d769e936Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 8414d769e936Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8415d769e936Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8416d769e936Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8417d769e936Smrg# than defined and empty). 8418d769e936Smrg# 8419d769e936Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8420d769e936Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8421d769e936Smrgm4_define([lt_append], 8422d769e936Smrg[m4_define([$1], 8423d769e936Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8424d769e936Smrg 8425d769e936Smrg 8426d769e936Smrg 8427d769e936Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8428d769e936Smrg# ---------------------------------------------------------- 8429d769e936Smrg# Produce a SEP delimited list of all paired combinations of elements of 8430d769e936Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8431d769e936Smrg# has the form PREFIXmINFIXSUFFIXn. 8432d769e936Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8433d769e936Smrgm4_define([lt_combine], 8434d769e936Smrg[m4_if(m4_eval([$# > 3]), [1], 8435d769e936Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8436d769e936Smrg[[m4_foreach([_Lt_prefix], [$2], 8437d769e936Smrg [m4_foreach([_Lt_suffix], 8438d769e936Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8439d769e936Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8440d769e936Smrg 8441d769e936Smrg 8442d769e936Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8443d769e936Smrg# ----------------------------------------------------------------------- 8444d769e936Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8445d769e936Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8446d769e936Smrgm4_define([lt_if_append_uniq], 8447d769e936Smrg[m4_ifdef([$1], 8448d769e936Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8449d769e936Smrg [lt_append([$1], [$2], [$3])$4], 8450d769e936Smrg [$5])], 8451d769e936Smrg [lt_append([$1], [$2], [$3])$4])]) 8452d769e936Smrg 8453d769e936Smrg 8454d769e936Smrg# lt_dict_add(DICT, KEY, VALUE) 8455d769e936Smrg# ----------------------------- 8456d769e936Smrgm4_define([lt_dict_add], 8457d769e936Smrg[m4_define([$1($2)], [$3])]) 8458d769e936Smrg 8459d769e936Smrg 8460d769e936Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8461d769e936Smrg# -------------------------------------------- 8462d769e936Smrgm4_define([lt_dict_add_subkey], 8463d769e936Smrg[m4_define([$1($2:$3)], [$4])]) 8464d769e936Smrg 8465d769e936Smrg 8466d769e936Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8467d769e936Smrg# ---------------------------------- 8468d769e936Smrgm4_define([lt_dict_fetch], 8469d769e936Smrg[m4_ifval([$3], 8470d769e936Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8471d769e936Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8472d769e936Smrg 8473d769e936Smrg 8474d769e936Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8475d769e936Smrg# ----------------------------------------------------------------- 8476d769e936Smrgm4_define([lt_if_dict_fetch], 8477d769e936Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8478d769e936Smrg [$5], 8479d769e936Smrg [$6])]) 8480d769e936Smrg 8481d769e936Smrg 8482d769e936Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8483d769e936Smrg# -------------------------------------------------------------- 8484d769e936Smrgm4_define([lt_dict_filter], 8485d769e936Smrg[m4_if([$5], [], [], 8486d769e936Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8487d769e936Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8488d769e936Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8489d769e936Smrg]) 8490d769e936Smrg 8491d769e936Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8492d769e936Smrg# 8493d769e936Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 8494d769e936Smrg# Written by Scott James Remnant, 2004 8495d769e936Smrg# 8496d769e936Smrg# This file is free software; the Free Software Foundation gives 8497d769e936Smrg# unlimited permission to copy and/or distribute it, with or without 8498d769e936Smrg# modifications, as long as this notice is preserved. 8499d769e936Smrg 8500d769e936Smrg# @configure_input@ 8501d769e936Smrg 8502d769e936Smrg# serial 3337 ltversion.m4 8503d769e936Smrg# This file is part of GNU Libtool 8504d769e936Smrg 8505d769e936Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 8506d769e936Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 8507d769e936Smrg 8508d769e936SmrgAC_DEFUN([LTVERSION_VERSION], 8509d769e936Smrg[macro_version='2.4.2' 8510d769e936Smrgmacro_revision='1.3337' 8511d769e936Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8512d769e936Smrg_LT_DECL(, macro_revision, 0) 85131d54945dSmrg]) 8514786a6f21Smrg 8515d769e936Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8516d769e936Smrg# 8517d769e936Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 8518d769e936Smrg# Written by Scott James Remnant, 2004. 8519d769e936Smrg# 8520d769e936Smrg# This file is free software; the Free Software Foundation gives 8521d769e936Smrg# unlimited permission to copy and/or distribute it, with or without 8522d769e936Smrg# modifications, as long as this notice is preserved. 8523d769e936Smrg 8524d769e936Smrg# serial 5 lt~obsolete.m4 8525d769e936Smrg 8526d769e936Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 8527d769e936Smrg# 8528d769e936Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 8529d769e936Smrg# which have later been changed to m4_define as they aren't part of the 8530d769e936Smrg# exported API, or moved to Autoconf or Automake where they belong. 8531d769e936Smrg# 8532d769e936Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8533d769e936Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8534d769e936Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 8535d769e936Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8536d769e936Smrg# and doesn't know about Autoconf macros at all.) 8537d769e936Smrg# 8538d769e936Smrg# So we provide this file, which has a silly filename so it's always 8539d769e936Smrg# included after everything else. This provides aclocal with the 8540d769e936Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8541d769e936Smrg# because those macros already exist, or will be overwritten later. 8542d769e936Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8543d769e936Smrg# 8544d769e936Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8545d769e936Smrg# Yes, that means every name once taken will need to remain here until 8546d769e936Smrg# we give up compatibility with versions before 1.7, at which point 8547d769e936Smrg# we need to keep only those names which we still refer to. 8548d769e936Smrg 8549d769e936Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8550d769e936SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8551d769e936Smrg 8552d769e936Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8553d769e936Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8554d769e936Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8555d769e936Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8556d769e936Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8557d769e936Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8558d769e936Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8559d769e936Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8560d769e936Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8561d769e936Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8562d769e936Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8563d769e936Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8564d769e936Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8565d769e936Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8566d769e936Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8567d769e936Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8568d769e936Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8569d769e936Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8570d769e936Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8571d769e936Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8572d769e936Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8573d769e936Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8574d769e936Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8575d769e936Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8576d769e936Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8577d769e936Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8578d769e936Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8579d769e936Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8580d769e936Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8581d769e936Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8582d769e936Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8583d769e936Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8584d769e936Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8585d769e936Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8586d769e936Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8587d769e936Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8588d769e936Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8589d769e936Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8590d769e936Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8591d769e936Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8592d769e936Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8593d769e936Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8594d769e936Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8595d769e936Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8596d769e936Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8597d769e936Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8598d769e936Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8599d769e936Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8600d769e936Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8601d769e936Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8602d769e936Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8603d769e936Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8604d769e936Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8605d769e936Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8606d769e936Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8607d769e936Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8608d769e936Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8609d769e936Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8610d769e936Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8611d769e936Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8612d769e936Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 8613d769e936Smrg 86141d54945dSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 8615d769e936Smrg# serial 1 (pkg-config-0.24) 86161d54945dSmrg# 86171d54945dSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 86181d54945dSmrg# 86191d54945dSmrg# This program is free software; you can redistribute it and/or modify 86201d54945dSmrg# it under the terms of the GNU General Public License as published by 86211d54945dSmrg# the Free Software Foundation; either version 2 of the License, or 86221d54945dSmrg# (at your option) any later version. 86231d54945dSmrg# 86241d54945dSmrg# This program is distributed in the hope that it will be useful, but 86251d54945dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 86261d54945dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 86271d54945dSmrg# General Public License for more details. 86281d54945dSmrg# 86291d54945dSmrg# You should have received a copy of the GNU General Public License 86301d54945dSmrg# along with this program; if not, write to the Free Software 86311d54945dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 86321d54945dSmrg# 86331d54945dSmrg# As a special exception to the GNU General Public License, if you 86341d54945dSmrg# distribute this file as part of a program that contains a 86351d54945dSmrg# configuration script generated by Autoconf, you may include it under 86361d54945dSmrg# the same distribution terms that you use for the rest of that program. 86371d54945dSmrg 86381d54945dSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 86391d54945dSmrg# ---------------------------------- 86401d54945dSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 86411d54945dSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 86421d54945dSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 8643d769e936SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 8644d769e936SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 8645d769e936SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 8646d769e936Smrg 86471d54945dSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 86481d54945dSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 86491d54945dSmrgfi 86501d54945dSmrgif test -n "$PKG_CONFIG"; then 86511d54945dSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 86521d54945dSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 86531d54945dSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 86541d54945dSmrg AC_MSG_RESULT([yes]) 86551d54945dSmrg else 86561d54945dSmrg AC_MSG_RESULT([no]) 86571d54945dSmrg PKG_CONFIG="" 86581d54945dSmrg fi 86591d54945dSmrgfi[]dnl 86601d54945dSmrg])# PKG_PROG_PKG_CONFIG 86611d54945dSmrg 86621d54945dSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 86631d54945dSmrg# 86641d54945dSmrg# Check to see whether a particular set of modules exists. Similar 86651d54945dSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 86661d54945dSmrg# 8667d769e936Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8668d769e936Smrg# only at the first occurence in configure.ac, so if the first place 8669d769e936Smrg# it's called might be skipped (such as if it is within an "if", you 8670d769e936Smrg# have to call PKG_CHECK_EXISTS manually 86711d54945dSmrg# -------------------------------------------------------------- 86721d54945dSmrgAC_DEFUN([PKG_CHECK_EXISTS], 86731d54945dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 86741d54945dSmrgif test -n "$PKG_CONFIG" && \ 86751d54945dSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8676d769e936Smrg m4_default([$2], [:]) 86771d54945dSmrgm4_ifvaln([$3], [else 86781d54945dSmrg $3])dnl 86791d54945dSmrgfi]) 86801d54945dSmrg 86811d54945dSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 86821d54945dSmrg# --------------------------------------------- 86831d54945dSmrgm4_define([_PKG_CONFIG], 8684ba85709eSmrg[if test -n "$$1"; then 8685ba85709eSmrg pkg_cv_[]$1="$$1" 8686ba85709eSmrg elif test -n "$PKG_CONFIG"; then 8687ba85709eSmrg PKG_CHECK_EXISTS([$3], 8688ba85709eSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 8689ba85709eSmrg [pkg_failed=yes]) 8690ba85709eSmrg else 8691ba85709eSmrg pkg_failed=untried 86921d54945dSmrgfi[]dnl 86931d54945dSmrg])# _PKG_CONFIG 86941d54945dSmrg 86951d54945dSmrg# _PKG_SHORT_ERRORS_SUPPORTED 86961d54945dSmrg# ----------------------------- 86971d54945dSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 86981d54945dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 86991d54945dSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 87001d54945dSmrg _pkg_short_errors_supported=yes 87011d54945dSmrgelse 87021d54945dSmrg _pkg_short_errors_supported=no 87031d54945dSmrgfi[]dnl 87041d54945dSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 87051d54945dSmrg 87061d54945dSmrg 87071d54945dSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 87081d54945dSmrg# [ACTION-IF-NOT-FOUND]) 87091d54945dSmrg# 87101d54945dSmrg# 87111d54945dSmrg# Note that if there is a possibility the first call to 87121d54945dSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 87131d54945dSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 87141d54945dSmrg# 87151d54945dSmrg# 87161d54945dSmrg# -------------------------------------------------------------- 87171d54945dSmrgAC_DEFUN([PKG_CHECK_MODULES], 87181d54945dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 87191d54945dSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 87201d54945dSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 87211d54945dSmrg 87221d54945dSmrgpkg_failed=no 87231d54945dSmrgAC_MSG_CHECKING([for $1]) 87241d54945dSmrg 87251d54945dSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 87261d54945dSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 87271d54945dSmrg 87281d54945dSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 87291d54945dSmrgand $1[]_LIBS to avoid the need to call pkg-config. 87301d54945dSmrgSee the pkg-config man page for more details.]) 87311d54945dSmrg 87321d54945dSmrgif test $pkg_failed = yes; then 8733d769e936Smrg AC_MSG_RESULT([no]) 87341d54945dSmrg _PKG_SHORT_ERRORS_SUPPORTED 87351d54945dSmrg if test $_pkg_short_errors_supported = yes; then 8736ba85709eSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 87371d54945dSmrg else 8738ba85709eSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 87391d54945dSmrg fi 87401d54945dSmrg # Put the nasty error message in config.log where it belongs 87411d54945dSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 87421d54945dSmrg 8743d769e936Smrg m4_default([$4], [AC_MSG_ERROR( 87441d54945dSmrg[Package requirements ($2) were not met: 87451d54945dSmrg 87461d54945dSmrg$$1_PKG_ERRORS 87471d54945dSmrg 87481d54945dSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 87491d54945dSmrginstalled software in a non-standard prefix. 87501d54945dSmrg 8751d769e936Smrg_PKG_TEXT]) 8752d769e936Smrg ]) 87531d54945dSmrgelif test $pkg_failed = untried; then 8754d769e936Smrg AC_MSG_RESULT([no]) 8755d769e936Smrg m4_default([$4], [AC_MSG_FAILURE( 87561d54945dSmrg[The pkg-config script could not be found or is too old. Make sure it 87571d54945dSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 87581d54945dSmrgpath to pkg-config. 87591d54945dSmrg 87601d54945dSmrg_PKG_TEXT 87611d54945dSmrg 8762d769e936SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 8763d769e936Smrg ]) 87641d54945dSmrgelse 87651d54945dSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 87661d54945dSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 87671d54945dSmrg AC_MSG_RESULT([yes]) 8768d769e936Smrg $3 87691d54945dSmrgfi[]dnl 87701d54945dSmrg])# PKG_CHECK_MODULES 87711d54945dSmrg 8772786a6f21Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 87731d54945dSmrgdnl 8774d769e936Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 87751d54945dSmrgdnl 8776ba85709eSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 8777d769e936Smrgdnl copy of this software and associated documentation files (the "Software"), 8778d769e936Smrgdnl to deal in the Software without restriction, including without limitation 8779d769e936Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 8780d769e936Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 8781d769e936Smrgdnl Software is furnished to do so, subject to the following conditions: 8782ba85709eSmrgdnl 8783d769e936Smrgdnl The above copyright notice and this permission notice (including the next 8784d769e936Smrgdnl paragraph) shall be included in all copies or substantial portions of the 8785d769e936Smrgdnl Software. 8786ba85709eSmrgdnl 8787d769e936Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 8788d769e936Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 8789d769e936Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 8790d769e936Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 8791d769e936Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 8792d769e936Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 8793d769e936Smrgdnl DEALINGS IN THE SOFTWARE. 8794ba85709eSmrg 8795ba85709eSmrg# XORG_MACROS_VERSION(required-version) 8796ba85709eSmrg# ------------------------------------- 8797ba85709eSmrg# Minimum version: 1.1.0 8798ba85709eSmrg# 8799ba85709eSmrg# If you're using a macro added in Version 1.1 or newer, include this in 8800ba85709eSmrg# your configure.ac with the minimum required version, such as: 8801ba85709eSmrg# XORG_MACROS_VERSION(1.1) 8802ba85709eSmrg# 8803d769e936Smrg# To ensure that this macro is defined, also add: 8804d769e936Smrg# m4_ifndef([XORG_MACROS_VERSION], 8805d769e936Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 8806ba85709eSmrg# 8807ba85709eSmrg# 8808ba85709eSmrg# See the "minimum version" comment for each macro you use to see what 8809ba85709eSmrg# version you require. 8810d769e936Smrgm4_defun([XORG_MACROS_VERSION],[ 8811d769e936Smrgm4_define([vers_have], [1.17]) 8812d769e936Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 8813d769e936Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 8814d769e936Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 8815d769e936Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 8816d769e936Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 8817d769e936Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 8818d769e936Smrgm4_undefine([vers_have]) 8819d769e936Smrgm4_undefine([maj_have]) 8820d769e936Smrgm4_undefine([maj_needed]) 8821ba85709eSmrg]) # XORG_MACROS_VERSION 88221d54945dSmrg 88231d54945dSmrg# XORG_PROG_RAWCPP() 88241d54945dSmrg# ------------------ 8825ba85709eSmrg# Minimum version: 1.0.0 8826ba85709eSmrg# 88271d54945dSmrg# Find cpp program and necessary flags for use in pre-processing text files 88281d54945dSmrg# such as man pages and config files 88291d54945dSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 88301d54945dSmrgAC_REQUIRE([AC_PROG_CPP]) 88311d54945dSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 88321d54945dSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 88331d54945dSmrg 88341d54945dSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 88351d54945dSmrg# which is not the best choice for supporting other OS'es, but covers most 88361d54945dSmrg# of the ones we need for now. 88371d54945dSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 8838d769e936SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 88391d54945dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 88401d54945dSmrg AC_MSG_RESULT([no]) 88411d54945dSmrgelse 88421d54945dSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 88431d54945dSmrg RAWCPPFLAGS=-undef 88441d54945dSmrg AC_MSG_RESULT([yes]) 8845786a6f21Smrg # under Cygwin unix is still defined even with -undef 8846786a6f21Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8847786a6f21Smrg RAWCPPFLAGS="-undef -ansi" 8848786a6f21Smrg AC_MSG_RESULT([yes, with -ansi]) 88491d54945dSmrg else 88501d54945dSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 88511d54945dSmrg fi 88521d54945dSmrgfi 88531d54945dSmrgrm -f conftest.$ac_ext 88541d54945dSmrg 88551d54945dSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 8856d769e936SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 88571d54945dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 88581d54945dSmrg AC_MSG_RESULT([no]) 88591d54945dSmrgelse 88601d54945dSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 88611d54945dSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 88621d54945dSmrg AC_MSG_RESULT([yes]) 88631d54945dSmrg else 88641d54945dSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 88651d54945dSmrg fi 88661d54945dSmrgfi 88671d54945dSmrgrm -f conftest.$ac_ext 88681d54945dSmrgAC_SUBST(RAWCPPFLAGS) 88691d54945dSmrg]) # XORG_PROG_RAWCPP 88701d54945dSmrg 88711d54945dSmrg# XORG_MANPAGE_SECTIONS() 88721d54945dSmrg# ----------------------- 8873ba85709eSmrg# Minimum version: 1.0.0 8874ba85709eSmrg# 88751d54945dSmrg# Determine which sections man pages go in for the different man page types 88761d54945dSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 88771d54945dSmrg# Not sure if there's any better way than just hardcoding by OS name. 88781d54945dSmrg# Override default settings by setting environment variables 8879d769e936Smrg# Added MAN_SUBSTS in version 1.8 8880d769e936Smrg# Added AC_PROG_SED in version 1.8 88811d54945dSmrg 88821d54945dSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 88831d54945dSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 8884d769e936SmrgAC_REQUIRE([AC_PROG_SED]) 88851d54945dSmrg 88861d54945dSmrgif test x$APP_MAN_SUFFIX = x ; then 8887ba85709eSmrg APP_MAN_SUFFIX=1 88881d54945dSmrgfi 88891d54945dSmrgif test x$APP_MAN_DIR = x ; then 8890ba85709eSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 88911d54945dSmrgfi 88921d54945dSmrg 88931d54945dSmrgif test x$LIB_MAN_SUFFIX = x ; then 8894ba85709eSmrg LIB_MAN_SUFFIX=3 88951d54945dSmrgfi 88961d54945dSmrgif test x$LIB_MAN_DIR = x ; then 8897ba85709eSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 88981d54945dSmrgfi 88991d54945dSmrg 89001d54945dSmrgif test x$FILE_MAN_SUFFIX = x ; then 89011d54945dSmrg case $host_os in 89021d54945dSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 89031d54945dSmrg *) FILE_MAN_SUFFIX=5 ;; 89041d54945dSmrg esac 89051d54945dSmrgfi 89061d54945dSmrgif test x$FILE_MAN_DIR = x ; then 8907ba85709eSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 89081d54945dSmrgfi 89091d54945dSmrg 89101d54945dSmrgif test x$MISC_MAN_SUFFIX = x ; then 89111d54945dSmrg case $host_os in 89121d54945dSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 89131d54945dSmrg *) MISC_MAN_SUFFIX=7 ;; 89141d54945dSmrg esac 89151d54945dSmrgfi 89161d54945dSmrgif test x$MISC_MAN_DIR = x ; then 8917ba85709eSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 89181d54945dSmrgfi 89191d54945dSmrg 89201d54945dSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 89211d54945dSmrg case $host_os in 89221d54945dSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 89231d54945dSmrg *) DRIVER_MAN_SUFFIX=4 ;; 89241d54945dSmrg esac 89251d54945dSmrgfi 89261d54945dSmrgif test x$DRIVER_MAN_DIR = x ; then 8927ba85709eSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 89281d54945dSmrgfi 89291d54945dSmrg 89301d54945dSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 89311d54945dSmrg case $host_os in 89321d54945dSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 89331d54945dSmrg *) ADMIN_MAN_SUFFIX=8 ;; 89341d54945dSmrg esac 89351d54945dSmrgfi 89361d54945dSmrgif test x$ADMIN_MAN_DIR = x ; then 89371d54945dSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 89381d54945dSmrgfi 89391d54945dSmrg 89401d54945dSmrg 89411d54945dSmrgAC_SUBST([APP_MAN_SUFFIX]) 89421d54945dSmrgAC_SUBST([LIB_MAN_SUFFIX]) 89431d54945dSmrgAC_SUBST([FILE_MAN_SUFFIX]) 89441d54945dSmrgAC_SUBST([MISC_MAN_SUFFIX]) 89451d54945dSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 89461d54945dSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 89471d54945dSmrgAC_SUBST([APP_MAN_DIR]) 89481d54945dSmrgAC_SUBST([LIB_MAN_DIR]) 89491d54945dSmrgAC_SUBST([FILE_MAN_DIR]) 89501d54945dSmrgAC_SUBST([MISC_MAN_DIR]) 89511d54945dSmrgAC_SUBST([DRIVER_MAN_DIR]) 89521d54945dSmrgAC_SUBST([ADMIN_MAN_DIR]) 8953d769e936Smrg 8954d769e936SmrgXORG_MAN_PAGE="X Version 11" 8955d769e936SmrgAC_SUBST([XORG_MAN_PAGE]) 8956d769e936SmrgMAN_SUBSTS="\ 8957d769e936Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 8958d769e936Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 8959d769e936Smrg -e 's|__xservername__|Xorg|g' \ 8960d769e936Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 8961d769e936Smrg -e 's|__projectroot__|\$(prefix)|g' \ 8962d769e936Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 8963d769e936Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 8964d769e936Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 8965d769e936Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 8966d769e936Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 8967d769e936Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 8968d769e936Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 8969d769e936SmrgAC_SUBST([MAN_SUBSTS]) 8970d769e936Smrg 89711d54945dSmrg]) # XORG_MANPAGE_SECTIONS 89721d54945dSmrg 8973d769e936Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 8974d769e936Smrg# ------------------------ 8975d769e936Smrg# Minimum version: 1.7.0 8976d769e936Smrg# 8977d769e936Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 8978d769e936Smrg# provided by xorg-sgml-doctools, if installed. 8979d769e936SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 8980d769e936SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 8981d769e936SmrgXORG_SGML_PATH= 8982d769e936SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 8983d769e936Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 8984d769e936Smrg [m4_ifval([$1],[:], 8985d769e936Smrg [if test x"$cross_compiling" != x"yes" ; then 8986d769e936Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 8987d769e936Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 8988d769e936Smrg fi]) 8989d769e936Smrg ]) 8990d769e936Smrg 8991d769e936Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 8992d769e936Smrg# the path and the name of the doc stylesheet 8993d769e936Smrgif test "x$XORG_SGML_PATH" != "x" ; then 8994d769e936Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 8995d769e936Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 8996d769e936Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 8997d769e936Smrgelse 8998d769e936Smrg AC_MSG_RESULT([no]) 8999d769e936Smrgfi 9000d769e936Smrg 9001d769e936SmrgAC_SUBST(XORG_SGML_PATH) 9002d769e936SmrgAC_SUBST(STYLESHEET_SRCDIR) 9003d769e936SmrgAC_SUBST(XSL_STYLESHEET) 9004d769e936SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9005d769e936Smrg]) # XORG_CHECK_SGML_DOCTOOLS 9006d769e936Smrg 90071d54945dSmrg# XORG_CHECK_LINUXDOC 90081d54945dSmrg# ------------------- 9009ba85709eSmrg# Minimum version: 1.0.0 9010ba85709eSmrg# 90111d54945dSmrg# Defines the variable MAKE_TEXT if the necessary tools and 90121d54945dSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 90131d54945dSmrg# Whether or not the necessary tools and files are found can be checked 90141d54945dSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 90151d54945dSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9016d769e936SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9017d769e936SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 90181d54945dSmrg 90191d54945dSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 90201d54945dSmrg 9021d769e936SmrgAC_MSG_CHECKING([whether to build documentation]) 90221d54945dSmrg 9023d769e936Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 90241d54945dSmrg BUILDDOC=yes 90251d54945dSmrgelse 90261d54945dSmrg BUILDDOC=no 90271d54945dSmrgfi 90281d54945dSmrg 90291d54945dSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 90301d54945dSmrg 90311d54945dSmrgAC_MSG_RESULT([$BUILDDOC]) 90321d54945dSmrg 9033d769e936SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 90341d54945dSmrg 9035d769e936Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 90361d54945dSmrg BUILDPDFDOC=yes 90371d54945dSmrgelse 90381d54945dSmrg BUILDPDFDOC=no 90391d54945dSmrgfi 90401d54945dSmrg 90411d54945dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 90421d54945dSmrg 90431d54945dSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 90441d54945dSmrg 9045d769e936SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9046ba85709eSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 90471d54945dSmrgMAKE_PDF="$PS2PDF" 9048ba85709eSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 90491d54945dSmrg 90501d54945dSmrgAC_SUBST(MAKE_TEXT) 90511d54945dSmrgAC_SUBST(MAKE_PS) 90521d54945dSmrgAC_SUBST(MAKE_PDF) 90531d54945dSmrgAC_SUBST(MAKE_HTML) 90541d54945dSmrg]) # XORG_CHECK_LINUXDOC 90551d54945dSmrg 9056ba85709eSmrg# XORG_CHECK_DOCBOOK 9057ba85709eSmrg# ------------------- 9058ba85709eSmrg# Minimum version: 1.0.0 9059ba85709eSmrg# 9060ba85709eSmrg# Checks for the ability to build output formats from SGML DocBook source. 9061ba85709eSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9062ba85709eSmrg# indicates whether the necessary tools and files are found and, if set, 9063ba85709eSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9064ba85709eSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9065d769e936SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9066d769e936Smrg 9067ba85709eSmrgBUILDTXTDOC=no 9068ba85709eSmrgBUILDPDFDOC=no 9069ba85709eSmrgBUILDPSDOC=no 9070ba85709eSmrgBUILDHTMLDOC=no 9071ba85709eSmrg 9072ba85709eSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9073ba85709eSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9074ba85709eSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9075ba85709eSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9076ba85709eSmrg 9077d769e936SmrgAC_MSG_CHECKING([whether to build text documentation]) 9078d769e936Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9079ba85709eSmrg test x$BUILD_TXTDOC != xno; then 9080ba85709eSmrg BUILDTXTDOC=yes 9081ba85709eSmrgfi 9082ba85709eSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9083ba85709eSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9084ba85709eSmrg 9085d769e936SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9086d769e936Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9087d769e936Smrg test x$BUILD_PDFDOC != xno; then 9088d769e936Smrg BUILDPDFDOC=yes 9089d769e936Smrgfi 9090d769e936SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9091d769e936SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9092d769e936Smrg 9093d769e936SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9094d769e936Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9095d769e936Smrg test x$BUILD_PSDOC != xno; then 9096d769e936Smrg BUILDPSDOC=yes 9097d769e936Smrgfi 9098d769e936SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9099d769e936SmrgAC_MSG_RESULT([$BUILDPSDOC]) 9100d769e936Smrg 9101d769e936SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9102d769e936Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9103d769e936Smrg test x$BUILD_HTMLDOC != xno; then 9104d769e936Smrg BUILDHTMLDOC=yes 9105d769e936Smrgfi 9106d769e936SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9107d769e936SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9108d769e936Smrg 9109d769e936SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9110d769e936SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9111d769e936SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9112d769e936SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9113d769e936Smrg 9114d769e936SmrgAC_SUBST(MAKE_TEXT) 9115d769e936SmrgAC_SUBST(MAKE_PS) 9116d769e936SmrgAC_SUBST(MAKE_PDF) 9117d769e936SmrgAC_SUBST(MAKE_HTML) 9118d769e936Smrg]) # XORG_CHECK_DOCBOOK 9119d769e936Smrg 9120d769e936Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9121d769e936Smrg# ---------------- 9122d769e936Smrg# Minimum version: 1.5.0 9123d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9124d769e936Smrg# 9125d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 9126d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 9127d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9128d769e936Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9129d769e936Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9130d769e936Smrg# --with-xmlto assumes 'auto'. 9131d769e936Smrg# 9132d769e936Smrg# Interface to module: 9133d769e936Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9134d769e936Smrg# XMLTO: returns the path of the xmlto program found 9135d769e936Smrg# returns the path set by the user in the environment 9136d769e936Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9137d769e936Smrg# 'no' user instructs the module not to use xmlto 9138d769e936Smrg# 9139d769e936Smrg# Added in version 1.10.0 9140d769e936Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9141d769e936Smrg# xmlto for text output requires either lynx, links, or w3m browsers 9142d769e936Smrg# 9143d769e936Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9144d769e936Smrg# 9145d769e936SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9146d769e936SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9147d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9148d769e936SmrgAC_ARG_WITH(xmlto, 9149d769e936Smrg AS_HELP_STRING([--with-xmlto], 9150d769e936Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9151d769e936Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9152d769e936Smrgm4_undefine([_defopt]) 9153d769e936Smrg 9154d769e936Smrgif test "x$use_xmlto" = x"auto"; then 9155d769e936Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9156d769e936Smrg if test "x$XMLTO" = "x"; then 9157d769e936Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9158d769e936Smrg have_xmlto=no 9159d769e936Smrg else 9160d769e936Smrg have_xmlto=yes 9161d769e936Smrg fi 9162d769e936Smrgelif test "x$use_xmlto" = x"yes" ; then 9163d769e936Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9164d769e936Smrg if test "x$XMLTO" = "x"; then 9165d769e936Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9166d769e936Smrg fi 9167d769e936Smrg have_xmlto=yes 9168d769e936Smrgelif test "x$use_xmlto" = x"no" ; then 9169d769e936Smrg if test "x$XMLTO" != "x"; then 9170d769e936Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9171d769e936Smrg fi 9172d769e936Smrg have_xmlto=no 9173d769e936Smrgelse 9174d769e936Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9175d769e936Smrgfi 9176d769e936Smrg 9177d769e936Smrg# Test for a minimum version of xmlto, if provided. 9178d769e936Smrgm4_ifval([$1], 9179d769e936Smrg[if test "$have_xmlto" = yes; then 9180d769e936Smrg # scrape the xmlto version 9181d769e936Smrg AC_MSG_CHECKING([the xmlto version]) 9182d769e936Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9183d769e936Smrg AC_MSG_RESULT([$xmlto_version]) 9184d769e936Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9185d769e936Smrg [if test "x$use_xmlto" = xauto; then 9186d769e936Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9187d769e936Smrg have_xmlto=no 9188d769e936Smrg else 9189d769e936Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9190d769e936Smrg fi]) 9191d769e936Smrgfi]) 9192d769e936Smrg 9193d769e936Smrg# Test for the ability of xmlto to generate a text target 9194d769e936Smrghave_xmlto_text=no 9195d769e936Smrgcat > conftest.xml << "EOF" 9196d769e936SmrgEOF 9197d769e936SmrgAS_IF([test "$have_xmlto" = yes], 9198d769e936Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9199d769e936Smrg [have_xmlto_text=yes], 9200d769e936Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9201d769e936Smrgrm -f conftest.xml 9202d769e936SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9203d769e936SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9204d769e936Smrg]) # XORG_WITH_XMLTO 9205d769e936Smrg 9206d769e936Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9207d769e936Smrg# -------------------------------------------- 9208d769e936Smrg# Minimum version: 1.12.0 9209d769e936Smrg# Minimum version for optional DEFAULT argument: 1.12.0 9210d769e936Smrg# 9211d769e936Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9212d769e936Smrg# XML-based language used for the transformation of XML documents. 9213d769e936Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9214d769e936Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9215d769e936Smrg# The XSLT processor is often used as a standalone tool for transformations. 9216d769e936Smrg# It should not be assumed that this tool is used only to work with documnetation. 9217d769e936Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9218d769e936Smrg# 9219d769e936Smrg# Interface to module: 9220d769e936Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9221d769e936Smrg# XSLTPROC: returns the path of the xsltproc program found 9222d769e936Smrg# returns the path set by the user in the environment 9223d769e936Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9224d769e936Smrg# 'no' user instructs the module not to use xsltproc 9225d769e936Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9226d769e936Smrg# 9227d769e936Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9228d769e936Smrg# 9229d769e936SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9230d769e936SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9231d769e936Smrg# Preserves the interface, should it be implemented later 9232d769e936Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9233d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9234d769e936SmrgAC_ARG_WITH(xsltproc, 9235d769e936Smrg AS_HELP_STRING([--with-xsltproc], 9236d769e936Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9237d769e936Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9238d769e936Smrgm4_undefine([_defopt]) 9239d769e936Smrg 9240d769e936Smrgif test "x$use_xsltproc" = x"auto"; then 9241d769e936Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9242d769e936Smrg if test "x$XSLTPROC" = "x"; then 9243d769e936Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9244d769e936Smrg have_xsltproc=no 9245d769e936Smrg else 9246d769e936Smrg have_xsltproc=yes 9247d769e936Smrg fi 9248d769e936Smrgelif test "x$use_xsltproc" = x"yes" ; then 9249d769e936Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9250d769e936Smrg if test "x$XSLTPROC" = "x"; then 9251d769e936Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9252d769e936Smrg fi 9253d769e936Smrg have_xsltproc=yes 9254d769e936Smrgelif test "x$use_xsltproc" = x"no" ; then 9255d769e936Smrg if test "x$XSLTPROC" != "x"; then 9256d769e936Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9257d769e936Smrg fi 9258d769e936Smrg have_xsltproc=no 9259d769e936Smrgelse 9260d769e936Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9261d769e936Smrgfi 9262d769e936Smrg 9263d769e936SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9264d769e936Smrg]) # XORG_WITH_XSLTPROC 9265d769e936Smrg 9266d769e936Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9267d769e936Smrg# ---------------------------------------- 9268d769e936Smrg# Minimum version: 1.15.0 9269d769e936Smrg# 9270d769e936Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 9271d769e936Smrg# scanning arbitrary text files, extracting information from those text files, 9272d769e936Smrg# and printing reports based on that information. 9273d769e936Smrg# 9274d769e936Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9275d769e936Smrg# 9276d769e936Smrg# Interface to module: 9277d769e936Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 9278d769e936Smrg# PERL: returns the path of the perl program found 9279d769e936Smrg# returns the path set by the user in the environment 9280d769e936Smrg# --with-perl: 'yes' user instructs the module to use perl 9281d769e936Smrg# 'no' user instructs the module not to use perl 9282d769e936Smrg# have_perl: returns yes if perl found in PATH or no 9283d769e936Smrg# 9284d769e936Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9285d769e936Smrg# 9286d769e936SmrgAC_DEFUN([XORG_WITH_PERL],[ 9287d769e936SmrgAC_ARG_VAR([PERL], [Path to perl command]) 9288d769e936Smrg# Preserves the interface, should it be implemented later 9289d769e936Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9290d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9291d769e936SmrgAC_ARG_WITH(perl, 9292d769e936Smrg AS_HELP_STRING([--with-perl], 9293d769e936Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 9294d769e936Smrg [use_perl=$withval], [use_perl=]_defopt) 9295d769e936Smrgm4_undefine([_defopt]) 9296d769e936Smrg 9297d769e936Smrgif test "x$use_perl" = x"auto"; then 9298d769e936Smrg AC_PATH_PROG([PERL], [perl]) 9299d769e936Smrg if test "x$PERL" = "x"; then 9300d769e936Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9301d769e936Smrg have_perl=no 9302d769e936Smrg else 9303d769e936Smrg have_perl=yes 9304d769e936Smrg fi 9305d769e936Smrgelif test "x$use_perl" = x"yes" ; then 9306d769e936Smrg AC_PATH_PROG([PERL], [perl]) 9307d769e936Smrg if test "x$PERL" = "x"; then 9308d769e936Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9309d769e936Smrg fi 9310d769e936Smrg have_perl=yes 9311d769e936Smrgelif test "x$use_perl" = x"no" ; then 9312d769e936Smrg if test "x$PERL" != "x"; then 9313d769e936Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9314d769e936Smrg fi 9315d769e936Smrg have_perl=no 9316d769e936Smrgelse 9317d769e936Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9318d769e936Smrgfi 9319d769e936Smrg 9320d769e936SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9321d769e936Smrg]) # XORG_WITH_PERL 9322d769e936Smrg 9323d769e936Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9324d769e936Smrg# ---------------- 9325d769e936Smrg# Minimum version: 1.5.0 9326d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9327d769e936Smrg# 9328d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 9329d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 9330d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9331d769e936Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9332d769e936Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9333d769e936Smrg# --with-asciidoc assumes 'auto'. 9334d769e936Smrg# 9335d769e936Smrg# Interface to module: 9336d769e936Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9337d769e936Smrg# ASCIIDOC: returns the path of the asciidoc program found 9338d769e936Smrg# returns the path set by the user in the environment 9339d769e936Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9340d769e936Smrg# 'no' user instructs the module not to use asciidoc 9341d769e936Smrg# 9342d769e936Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9343d769e936Smrg# 9344d769e936SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 9345d769e936SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9346d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9347d769e936SmrgAC_ARG_WITH(asciidoc, 9348d769e936Smrg AS_HELP_STRING([--with-asciidoc], 9349d769e936Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9350d769e936Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9351d769e936Smrgm4_undefine([_defopt]) 9352d769e936Smrg 9353d769e936Smrgif test "x$use_asciidoc" = x"auto"; then 9354d769e936Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9355d769e936Smrg if test "x$ASCIIDOC" = "x"; then 9356d769e936Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9357d769e936Smrg have_asciidoc=no 9358d769e936Smrg else 9359d769e936Smrg have_asciidoc=yes 9360d769e936Smrg fi 9361d769e936Smrgelif test "x$use_asciidoc" = x"yes" ; then 9362d769e936Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9363d769e936Smrg if test "x$ASCIIDOC" = "x"; then 9364d769e936Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9365d769e936Smrg fi 9366d769e936Smrg have_asciidoc=yes 9367d769e936Smrgelif test "x$use_asciidoc" = x"no" ; then 9368d769e936Smrg if test "x$ASCIIDOC" != "x"; then 9369d769e936Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9370d769e936Smrg fi 9371d769e936Smrg have_asciidoc=no 9372d769e936Smrgelse 9373d769e936Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9374d769e936Smrgfi 9375d769e936Smrgm4_ifval([$1], 9376d769e936Smrg[if test "$have_asciidoc" = yes; then 9377d769e936Smrg # scrape the asciidoc version 9378d769e936Smrg AC_MSG_CHECKING([the asciidoc version]) 9379d769e936Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9380d769e936Smrg AC_MSG_RESULT([$asciidoc_version]) 9381d769e936Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 9382d769e936Smrg [if test "x$use_asciidoc" = xauto; then 9383d769e936Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9384d769e936Smrg have_asciidoc=no 9385d769e936Smrg else 9386d769e936Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9387d769e936Smrg fi]) 9388d769e936Smrgfi]) 9389d769e936SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9390d769e936Smrg]) # XORG_WITH_ASCIIDOC 9391d769e936Smrg 9392d769e936Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 9393d769e936Smrg# -------------------------------- 9394d769e936Smrg# Minimum version: 1.5.0 9395d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9396d769e936Smrg# 9397d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 9398d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 9399d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9400d769e936Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 9401d769e936Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 9402d769e936Smrg# --with-doxygen assumes 'auto'. 9403d769e936Smrg# 9404d769e936Smrg# Interface to module: 9405d769e936Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9406d769e936Smrg# DOXYGEN: returns the path of the doxygen program found 9407d769e936Smrg# returns the path set by the user in the environment 9408d769e936Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 9409d769e936Smrg# 'no' user instructs the module not to use doxygen 9410d769e936Smrg# 9411d769e936Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9412d769e936Smrg# 9413d769e936SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 9414d769e936SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 9415d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9416d769e936SmrgAC_ARG_WITH(doxygen, 9417d769e936Smrg AS_HELP_STRING([--with-doxygen], 9418d769e936Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 9419d769e936Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 9420d769e936Smrgm4_undefine([_defopt]) 9421d769e936Smrg 9422d769e936Smrgif test "x$use_doxygen" = x"auto"; then 9423d769e936Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9424d769e936Smrg if test "x$DOXYGEN" = "x"; then 9425d769e936Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 9426d769e936Smrg have_doxygen=no 9427d769e936Smrg else 9428d769e936Smrg have_doxygen=yes 9429d769e936Smrg fi 9430d769e936Smrgelif test "x$use_doxygen" = x"yes" ; then 9431d769e936Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9432d769e936Smrg if test "x$DOXYGEN" = "x"; then 9433d769e936Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 9434d769e936Smrg fi 9435d769e936Smrg have_doxygen=yes 9436d769e936Smrgelif test "x$use_doxygen" = x"no" ; then 9437d769e936Smrg if test "x$DOXYGEN" != "x"; then 9438d769e936Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 9439d769e936Smrg fi 9440d769e936Smrg have_doxygen=no 9441d769e936Smrgelse 9442d769e936Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 9443d769e936Smrgfi 9444d769e936Smrgm4_ifval([$1], 9445d769e936Smrg[if test "$have_doxygen" = yes; then 9446d769e936Smrg # scrape the doxygen version 9447d769e936Smrg AC_MSG_CHECKING([the doxygen version]) 9448d769e936Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 9449d769e936Smrg AC_MSG_RESULT([$doxygen_version]) 9450d769e936Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 9451d769e936Smrg [if test "x$use_doxygen" = xauto; then 9452d769e936Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 9453d769e936Smrg have_doxygen=no 9454d769e936Smrg else 9455d769e936Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 9456d769e936Smrg fi]) 9457d769e936Smrgfi]) 9458d769e936SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 9459d769e936Smrg]) # XORG_WITH_DOXYGEN 9460d769e936Smrg 9461d769e936Smrg# XORG_WITH_GROFF([DEFAULT]) 9462d769e936Smrg# ---------------- 9463d769e936Smrg# Minimum version: 1.6.0 9464d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9465d769e936Smrg# 9466d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 9467d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 9468d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9469d769e936Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 9470d769e936Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 9471d769e936Smrg# --with-groff assumes 'auto'. 9472d769e936Smrg# 9473d769e936Smrg# Interface to module: 9474d769e936Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 9475d769e936Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 9476d769e936Smrg# HAVE_GROFF_MS: the -ms macros package 9477d769e936Smrg# GROFF: returns the path of the groff program found 9478d769e936Smrg# returns the path set by the user in the environment 9479d769e936Smrg# --with-groff: 'yes' user instructs the module to use groff 9480d769e936Smrg# 'no' user instructs the module not to use groff 9481d769e936Smrg# 9482d769e936Smrg# Added in version 1.9.0: 9483d769e936Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 9484d769e936Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 9485d769e936Smrg# psselect from the psutils package. 9486d769e936Smrg# the ghostcript package. Refer to the grohtml man pages 9487d769e936Smrg# 9488d769e936Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 9489d769e936Smrg# 9490d769e936Smrg# OS and distros often splits groff in a basic and full package, the former 9491d769e936Smrg# having the groff program and the later having devices, fonts and macros 9492d769e936Smrg# Checking for the groff executable is not enough. 9493d769e936Smrg# 9494d769e936Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 9495d769e936Smrg# unset HAVE_GROFF or GROFF env variables. 9496d769e936Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 9497d769e936Smrg# 9498d769e936SmrgAC_DEFUN([XORG_WITH_GROFF],[ 9499d769e936SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 9500d769e936Smrgm4_define([_defopt], m4_default([$1], [auto])) 9501d769e936SmrgAC_ARG_WITH(groff, 9502d769e936Smrg AS_HELP_STRING([--with-groff], 9503d769e936Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 9504d769e936Smrg [use_groff=$withval], [use_groff=]_defopt) 9505d769e936Smrgm4_undefine([_defopt]) 9506d769e936Smrg 9507d769e936Smrgif test "x$use_groff" = x"auto"; then 9508d769e936Smrg AC_PATH_PROG([GROFF], [groff]) 9509d769e936Smrg if test "x$GROFF" = "x"; then 9510d769e936Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 9511d769e936Smrg have_groff=no 9512d769e936Smrg else 9513d769e936Smrg have_groff=yes 9514d769e936Smrg fi 9515d769e936Smrgelif test "x$use_groff" = x"yes" ; then 9516d769e936Smrg AC_PATH_PROG([GROFF], [groff]) 9517d769e936Smrg if test "x$GROFF" = "x"; then 9518d769e936Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 9519d769e936Smrg fi 9520d769e936Smrg have_groff=yes 9521d769e936Smrgelif test "x$use_groff" = x"no" ; then 9522d769e936Smrg if test "x$GROFF" != "x"; then 9523d769e936Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 9524d769e936Smrg fi 9525d769e936Smrg have_groff=no 9526d769e936Smrgelse 9527d769e936Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 9528d769e936Smrgfi 9529d769e936Smrg 9530d769e936Smrg# We have groff, test for the presence of the macro packages 9531d769e936Smrgif test "x$have_groff" = x"yes"; then 9532d769e936Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 9533d769e936Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 9534d769e936Smrg groff_ms_works=yes 9535d769e936Smrg else 9536d769e936Smrg groff_ms_works=no 9537d769e936Smrg fi 9538d769e936Smrg AC_MSG_RESULT([$groff_ms_works]) 9539d769e936Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 9540d769e936Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 9541d769e936Smrg groff_mm_works=yes 9542d769e936Smrg else 9543d769e936Smrg groff_mm_works=no 9544d769e936Smrg fi 9545d769e936Smrg AC_MSG_RESULT([$groff_mm_works]) 9546d769e936Smrgfi 9547d769e936Smrg 9548d769e936Smrg# We have groff, test for HTML dependencies, one command per package 9549d769e936Smrgif test "x$have_groff" = x"yes"; then 9550d769e936Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 9551d769e936Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 9552d769e936Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 9553d769e936Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 9554d769e936Smrg have_groff_html=yes 9555d769e936Smrg else 9556d769e936Smrg have_groff_html=no 9557d769e936Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 9558d769e936Smrg fi 9559d769e936Smrgfi 9560d769e936Smrg 9561d769e936Smrg# Set Automake conditionals for Makefiles 9562d769e936SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 9563d769e936SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 9564d769e936SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 9565d769e936SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 9566d769e936Smrg]) # XORG_WITH_GROFF 9567d769e936Smrg 9568d769e936Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 9569d769e936Smrg# --------------------------------------- 9570d769e936Smrg# Minimum version: 1.6.0 9571d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9572d769e936Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 9573d769e936Smrg# 9574d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 9575d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 9576d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9577d769e936Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 9578d769e936Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 9579d769e936Smrg# --with-fop assumes 'auto'. 9580d769e936Smrg# 9581d769e936Smrg# Interface to module: 9582d769e936Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 9583d769e936Smrg# FOP: returns the path of the fop program found 9584d769e936Smrg# returns the path set by the user in the environment 9585d769e936Smrg# --with-fop: 'yes' user instructs the module to use fop 9586d769e936Smrg# 'no' user instructs the module not to use fop 9587d769e936Smrg# 9588d769e936Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 9589d769e936Smrg# 9590d769e936SmrgAC_DEFUN([XORG_WITH_FOP],[ 9591d769e936SmrgAC_ARG_VAR([FOP], [Path to fop command]) 9592d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9593d769e936SmrgAC_ARG_WITH(fop, 9594d769e936Smrg AS_HELP_STRING([--with-fop], 9595d769e936Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 9596d769e936Smrg [use_fop=$withval], [use_fop=]_defopt) 9597d769e936Smrgm4_undefine([_defopt]) 9598d769e936Smrg 9599d769e936Smrgif test "x$use_fop" = x"auto"; then 9600d769e936Smrg AC_PATH_PROG([FOP], [fop]) 9601d769e936Smrg if test "x$FOP" = "x"; then 9602d769e936Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 9603d769e936Smrg have_fop=no 9604d769e936Smrg else 9605d769e936Smrg have_fop=yes 9606d769e936Smrg fi 9607d769e936Smrgelif test "x$use_fop" = x"yes" ; then 9608d769e936Smrg AC_PATH_PROG([FOP], [fop]) 9609d769e936Smrg if test "x$FOP" = "x"; then 9610d769e936Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 9611d769e936Smrg fi 9612d769e936Smrg have_fop=yes 9613d769e936Smrgelif test "x$use_fop" = x"no" ; then 9614d769e936Smrg if test "x$FOP" != "x"; then 9615d769e936Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 9616d769e936Smrg fi 9617d769e936Smrg have_fop=no 9618d769e936Smrgelse 9619d769e936Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 9620d769e936Smrgfi 9621d769e936Smrg 9622d769e936Smrg# Test for a minimum version of fop, if provided. 9623d769e936Smrgm4_ifval([$1], 9624d769e936Smrg[if test "$have_fop" = yes; then 9625d769e936Smrg # scrape the fop version 9626d769e936Smrg AC_MSG_CHECKING([for fop minimum version]) 9627d769e936Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 9628d769e936Smrg AC_MSG_RESULT([$fop_version]) 9629d769e936Smrg AS_VERSION_COMPARE([$fop_version], [$1], 9630d769e936Smrg [if test "x$use_fop" = xauto; then 9631d769e936Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 9632d769e936Smrg have_fop=no 9633d769e936Smrg else 9634d769e936Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 9635d769e936Smrg fi]) 9636d769e936Smrgfi]) 9637d769e936SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 9638d769e936Smrg]) # XORG_WITH_FOP 9639d769e936Smrg 9640d769e936Smrg# XORG_WITH_PS2PDF([DEFAULT]) 9641d769e936Smrg# ---------------- 9642d769e936Smrg# Minimum version: 1.6.0 9643d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9644d769e936Smrg# 9645d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 9646d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 9647d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9648d769e936Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 9649d769e936Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 9650d769e936Smrg# --with-ps2pdf assumes 'auto'. 9651d769e936Smrg# 9652d769e936Smrg# Interface to module: 9653d769e936Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 9654d769e936Smrg# PS2PDF: returns the path of the ps2pdf program found 9655d769e936Smrg# returns the path set by the user in the environment 9656d769e936Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 9657d769e936Smrg# 'no' user instructs the module not to use ps2pdf 9658d769e936Smrg# 9659d769e936Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 9660d769e936Smrg# 9661d769e936SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 9662d769e936SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 9663d769e936Smrgm4_define([_defopt], m4_default([$1], [auto])) 9664d769e936SmrgAC_ARG_WITH(ps2pdf, 9665d769e936Smrg AS_HELP_STRING([--with-ps2pdf], 9666d769e936Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 9667d769e936Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 9668d769e936Smrgm4_undefine([_defopt]) 9669d769e936Smrg 9670d769e936Smrgif test "x$use_ps2pdf" = x"auto"; then 9671d769e936Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 9672d769e936Smrg if test "x$PS2PDF" = "x"; then 9673d769e936Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 9674d769e936Smrg have_ps2pdf=no 9675d769e936Smrg else 9676d769e936Smrg have_ps2pdf=yes 9677d769e936Smrg fi 9678d769e936Smrgelif test "x$use_ps2pdf" = x"yes" ; then 9679d769e936Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 9680d769e936Smrg if test "x$PS2PDF" = "x"; then 9681d769e936Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 9682d769e936Smrg fi 9683d769e936Smrg have_ps2pdf=yes 9684d769e936Smrgelif test "x$use_ps2pdf" = x"no" ; then 9685d769e936Smrg if test "x$PS2PDF" != "x"; then 9686d769e936Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 9687d769e936Smrg fi 9688d769e936Smrg have_ps2pdf=no 9689d769e936Smrgelse 9690d769e936Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 9691d769e936Smrgfi 9692d769e936SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 9693d769e936Smrg]) # XORG_WITH_PS2PDF 9694d769e936Smrg 9695d769e936Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 9696d769e936Smrg# ---------------- 9697d769e936Smrg# Minimum version: 1.6.0 9698d769e936Smrg# 9699d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 9700d769e936Smrg# not at the appropriate level. This macro enables a builder to skip all 9701d769e936Smrg# documentation targets except traditional man pages. 9702d769e936Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9703d769e936Smrg# maximum flexibilty in controlling documentation building. 9704d769e936Smrg# Refer to: 9705d769e936Smrg# XORG_WITH_XMLTO --with-xmlto 9706d769e936Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 9707d769e936Smrg# XORG_WITH_DOXYGEN --with-doxygen 9708d769e936Smrg# XORG_WITH_FOP --with-fop 9709d769e936Smrg# XORG_WITH_GROFF --with-groff 9710d769e936Smrg# XORG_WITH_PS2PDF --with-ps2pdf 9711d769e936Smrg# 9712d769e936Smrg# Interface to module: 9713d769e936Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 9714d769e936Smrg# --enable-docs: 'yes' user instructs the module to generate docs 9715d769e936Smrg# 'no' user instructs the module not to generate docs 9716d769e936Smrg# parm1: specify the default value, yes or no. 9717d769e936Smrg# 9718d769e936SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 9719d769e936Smrgm4_define([docs_default], m4_default([$1], [yes])) 9720d769e936SmrgAC_ARG_ENABLE(docs, 9721d769e936Smrg AS_HELP_STRING([--enable-docs], 9722d769e936Smrg [Enable building the documentation (default: ]docs_default[)]), 9723d769e936Smrg [build_docs=$enableval], [build_docs=]docs_default) 9724d769e936Smrgm4_undefine([docs_default]) 9725d769e936SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 9726d769e936SmrgAC_MSG_CHECKING([whether to build documentation]) 9727d769e936SmrgAC_MSG_RESULT([$build_docs]) 9728d769e936Smrg]) # XORG_ENABLE_DOCS 9729d769e936Smrg 9730d769e936Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 9731d769e936Smrg# ---------------- 9732d769e936Smrg# Minimum version: 1.6.0 9733d769e936Smrg# 9734d769e936Smrg# This macro enables a builder to skip all developer documentation. 9735d769e936Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9736d769e936Smrg# maximum flexibilty in controlling documentation building. 9737d769e936Smrg# Refer to: 9738d769e936Smrg# XORG_WITH_XMLTO --with-xmlto 9739d769e936Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 9740d769e936Smrg# XORG_WITH_DOXYGEN --with-doxygen 9741d769e936Smrg# XORG_WITH_FOP --with-fop 9742d769e936Smrg# XORG_WITH_GROFF --with-groff 9743d769e936Smrg# XORG_WITH_PS2PDF --with-ps2pdf 9744d769e936Smrg# 9745d769e936Smrg# Interface to module: 9746d769e936Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 9747d769e936Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 9748d769e936Smrg# 'no' user instructs the module not to generate developer docs 9749d769e936Smrg# parm1: specify the default value, yes or no. 9750d769e936Smrg# 9751d769e936SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 9752d769e936Smrgm4_define([devel_default], m4_default([$1], [yes])) 9753d769e936SmrgAC_ARG_ENABLE(devel-docs, 9754d769e936Smrg AS_HELP_STRING([--enable-devel-docs], 9755d769e936Smrg [Enable building the developer documentation (default: ]devel_default[)]), 9756d769e936Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 9757d769e936Smrgm4_undefine([devel_default]) 9758d769e936SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 9759d769e936SmrgAC_MSG_CHECKING([whether to build developer documentation]) 9760d769e936SmrgAC_MSG_RESULT([$build_devel_docs]) 9761d769e936Smrg]) # XORG_ENABLE_DEVEL_DOCS 9762d769e936Smrg 9763d769e936Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 9764d769e936Smrg# ---------------- 9765d769e936Smrg# Minimum version: 1.6.0 9766d769e936Smrg# 9767d769e936Smrg# This macro enables a builder to skip all functional specification targets. 9768d769e936Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9769d769e936Smrg# maximum flexibilty in controlling documentation building. 9770d769e936Smrg# Refer to: 9771d769e936Smrg# XORG_WITH_XMLTO --with-xmlto 9772d769e936Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 9773d769e936Smrg# XORG_WITH_DOXYGEN --with-doxygen 9774d769e936Smrg# XORG_WITH_FOP --with-fop 9775d769e936Smrg# XORG_WITH_GROFF --with-groff 9776d769e936Smrg# XORG_WITH_PS2PDF --with-ps2pdf 9777d769e936Smrg# 9778d769e936Smrg# Interface to module: 9779d769e936Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 9780d769e936Smrg# --enable-specs: 'yes' user instructs the module to generate specs 9781d769e936Smrg# 'no' user instructs the module not to generate specs 9782d769e936Smrg# parm1: specify the default value, yes or no. 9783d769e936Smrg# 9784d769e936SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 9785d769e936Smrgm4_define([spec_default], m4_default([$1], [yes])) 9786d769e936SmrgAC_ARG_ENABLE(specs, 9787d769e936Smrg AS_HELP_STRING([--enable-specs], 9788d769e936Smrg [Enable building the specs (default: ]spec_default[)]), 9789d769e936Smrg [build_specs=$enableval], [build_specs=]spec_default) 9790d769e936Smrgm4_undefine([spec_default]) 9791d769e936SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 9792d769e936SmrgAC_MSG_CHECKING([whether to build functional specifications]) 9793d769e936SmrgAC_MSG_RESULT([$build_specs]) 9794d769e936Smrg]) # XORG_ENABLE_SPECS 9795d769e936Smrg 9796d769e936Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 9797d769e936Smrg# ---------------------------------------------- 9798d769e936Smrg# Minimum version: 1.13.0 9799d769e936Smrg# 9800d769e936Smrg# This macro enables a builder to enable/disable unit testing 9801d769e936Smrg# It makes no assumption about the test cases implementation 9802d769e936Smrg# Test cases may or may not use Automake "Support for test suites" 9803d769e936Smrg# They may or may not use the software utility library GLib 9804d769e936Smrg# 9805d769e936Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 9806d769e936Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 9807d769e936Smrg# The variable enable_unit_tests is used by other macros in this file. 9808d769e936Smrg# 9809d769e936Smrg# Interface to module: 9810d769e936Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 9811d769e936Smrg# enable_unit_tests: used in configure.ac for additional configuration 9812d769e936Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 9813d769e936Smrg# 'no' user instructs the module not to build tests 9814d769e936Smrg# parm1: specify the default value, yes or no. 9815d769e936Smrg# 9816d769e936SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 9817d769e936SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 9818d769e936SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 9819d769e936SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9820d769e936Smrgm4_define([_defopt], m4_default([$1], [auto])) 9821d769e936SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 9822d769e936Smrg [Enable building unit test cases (default: ]_defopt[)]), 9823d769e936Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 9824d769e936Smrgm4_undefine([_defopt]) 9825d769e936SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 9826d769e936SmrgAC_MSG_CHECKING([whether to build unit test cases]) 9827d769e936SmrgAC_MSG_RESULT([$enable_unit_tests]) 9828d769e936Smrg]) # XORG_ENABLE_UNIT_TESTS 9829d769e936Smrg 9830d769e936Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 9831d769e936Smrg# ------------------------------------------------------ 9832d769e936Smrg# Minimum version: 1.17.0 9833d769e936Smrg# 9834d769e936Smrg# This macro enables a builder to enable/disable integration testing 9835d769e936Smrg# It makes no assumption about the test cases' implementation 9836d769e936Smrg# Test cases may or may not use Automake "Support for test suites" 9837d769e936Smrg# 9838d769e936Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 9839d769e936Smrg# usually requires less dependencies and may be built and run under less 9840d769e936Smrg# stringent environments than integration tests. 9841d769e936Smrg# 9842d769e936Smrg# Interface to module: 9843d769e936Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 9844d769e936Smrg# enable_integration_tests: used in configure.ac for additional configuration 9845d769e936Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 9846d769e936Smrg# 'no' user instructs the module not to build tests 9847d769e936Smrg# parm1: specify the default value, yes or no. 9848d769e936Smrg# 9849d769e936SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 9850d769e936SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9851d769e936Smrgm4_define([_defopt], m4_default([$1], [auto])) 9852d769e936SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 9853d769e936Smrg [Enable building integration test cases (default: ]_defopt[)]), 9854d769e936Smrg [enable_integration_tests=$enableval], 9855d769e936Smrg [enable_integration_tests=]_defopt) 9856d769e936Smrgm4_undefine([_defopt]) 9857d769e936SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 9858d769e936Smrg [test "x$enable_integration_tests" != xno]) 9859d769e936SmrgAC_MSG_CHECKING([whether to build unit test cases]) 9860d769e936SmrgAC_MSG_RESULT([$enable_integration_tests]) 9861d769e936Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 9862d769e936Smrg 9863d769e936Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 9864d769e936Smrg# ---------------------------------------- 9865d769e936Smrg# Minimum version: 1.13.0 9866d769e936Smrg# 9867d769e936Smrg# GLib is a library which provides advanced data structures and functions. 9868d769e936Smrg# This macro enables a module to test for the presence of Glib. 9869d769e936Smrg# 9870d769e936Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 9871d769e936Smrg# Otherwise the value of $enable_unit_tests is blank. 9872d769e936Smrg# 9873d769e936Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 9874d769e936Smrg# test support usually requires less dependencies and may be built and run under 9875d769e936Smrg# less stringent environments than integration tests. 9876d769e936Smrg# 9877d769e936Smrg# Interface to module: 9878d769e936Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 9879d769e936Smrg# with_glib: used in configure.ac to know if GLib has been found 9880d769e936Smrg# --with-glib: 'yes' user instructs the module to use glib 9881d769e936Smrg# 'no' user instructs the module not to use glib 9882d769e936Smrg# 9883d769e936SmrgAC_DEFUN([XORG_WITH_GLIB],[ 9884d769e936SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9885d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9886d769e936SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 9887d769e936Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 9888d769e936Smrg [with_glib=$withval], [with_glib=]_defopt) 9889d769e936Smrgm4_undefine([_defopt]) 9890d769e936Smrg 9891d769e936Smrghave_glib=no 9892d769e936Smrg# Do not probe GLib if user explicitly disabled unit testing 9893d769e936Smrgif test "x$enable_unit_tests" != x"no"; then 9894d769e936Smrg # Do not probe GLib if user explicitly disabled it 9895d769e936Smrg if test "x$with_glib" != x"no"; then 9896d769e936Smrg m4_ifval( 9897d769e936Smrg [$1], 9898d769e936Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 9899d769e936Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 9900d769e936Smrg ) 9901d769e936Smrg fi 9902d769e936Smrgfi 9903d769e936Smrg 9904d769e936Smrg# Not having GLib when unit testing has been explicitly requested is an error 9905d769e936Smrgif test "x$enable_unit_tests" = x"yes"; then 9906d769e936Smrg if test "x$have_glib" = x"no"; then 9907d769e936Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9908d769e936Smrg fi 9909d769e936Smrgfi 9910d769e936Smrg 9911d769e936Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 9912d769e936Smrgif test "x$enable_unit_tests" = x"no"; then 9913d769e936Smrg if test "x$with_glib" = x"yes"; then 9914d769e936Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9915d769e936Smrg fi 9916d769e936Smrgfi 9917d769e936Smrg 9918d769e936Smrg# Not having GLib when it has been explicitly requested is an error 9919d769e936Smrgif test "x$with_glib" = x"yes"; then 9920d769e936Smrg if test "x$have_glib" = x"no"; then 9921d769e936Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 9922d769e936Smrg fi 9923d769e936Smrgfi 9924d769e936Smrg 9925d769e936SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 9926d769e936Smrg]) # XORG_WITH_GLIB 9927d769e936Smrg 9928d769e936Smrg# XORG_LD_WRAP([required|optional]) 9929d769e936Smrg# --------------------------------- 9930d769e936Smrg# Minimum version: 1.13.0 9931d769e936Smrg# 9932d769e936Smrg# Check if linker supports -wrap, passed via compiler flags 9933d769e936Smrg# 9934d769e936Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 9935d769e936Smrg# Otherwise the value of $enable_unit_tests is blank. 9936d769e936Smrg# 9937d769e936Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 9938d769e936Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 9939d769e936Smrg# available, an argument of "optional" allows use when some unit tests require 9940d769e936Smrg# ld -wrap and others do not. 9941d769e936Smrg# 9942d769e936SmrgAC_DEFUN([XORG_LD_WRAP],[ 9943d769e936SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 9944d769e936Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 9945d769e936Smrg void __wrap_exit(int status) { return; }], 9946d769e936Smrg [exit(0);])]) 9947d769e936Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 9948d769e936Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 9949d769e936Smrg if test "x$have_ld_wrap" = x"no"; then 9950d769e936Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 9951d769e936Smrg fi 9952d769e936Smrgfi 9953d769e936SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 9954d769e936Smrg# 9955d769e936Smrg]) # XORG_LD_WRAP 9956d769e936Smrg 9957d769e936Smrg# XORG_CHECK_LINKER_FLAGS 9958d769e936Smrg# ----------------------- 9959d769e936Smrg# SYNOPSIS 9960d769e936Smrg# 9961d769e936Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 9962d769e936Smrg# 9963d769e936Smrg# DESCRIPTION 9964d769e936Smrg# 9965d769e936Smrg# Check whether the given linker FLAGS work with the current language's 9966d769e936Smrg# linker, or whether they give an error. 9967d769e936Smrg# 9968d769e936Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 9969d769e936Smrg# success/failure. 9970d769e936Smrg# 9971d769e936Smrg# PROGRAM-SOURCE is the program source to link with, if needed 9972d769e936Smrg# 9973d769e936Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 9974d769e936Smrg# 9975d769e936Smrg# LICENSE 9976d769e936Smrg# 9977d769e936Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 9978d769e936Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 9979d769e936Smrg# Copyright (c) 2009 Matteo Frigo 9980d769e936Smrg# 9981d769e936Smrg# This program is free software: you can redistribute it and/or modify it 9982d769e936Smrg# under the terms of the GNU General Public License as published by the 9983d769e936Smrg# Free Software Foundation, either version 3 of the License, or (at your 9984d769e936Smrg# option) any later version. 9985d769e936Smrg# 9986d769e936Smrg# This program is distributed in the hope that it will be useful, but 9987d769e936Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9988d769e936Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 9989d769e936Smrg# Public License for more details. 9990d769e936Smrg# 9991d769e936Smrg# You should have received a copy of the GNU General Public License along 9992d769e936Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 9993d769e936Smrg# 9994d769e936Smrg# As a special exception, the respective Autoconf Macro's copyright owner 9995d769e936Smrg# gives unlimited permission to copy, distribute and modify the configure 9996d769e936Smrg# scripts that are the output of Autoconf when processing the Macro. You 9997d769e936Smrg# need not follow the terms of the GNU General Public License when using 9998d769e936Smrg# or distributing such scripts, even though portions of the text of the 9999d769e936Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 10000d769e936Smrg# all other use of the material that constitutes the Autoconf Macro. 10001d769e936Smrg# 10002d769e936Smrg# This special exception to the GPL applies to versions of the Autoconf 10003d769e936Smrg# Macro released by the Autoconf Archive. When you make and distribute a 10004d769e936Smrg# modified version of the Autoconf Macro, you may extend this special 10005d769e936Smrg# exception to the GPL to apply to your modified version as well.# 10006d769e936SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10007d769e936Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10008d769e936Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10009d769e936SmrgAS_LITERAL_IF([$1], 10010d769e936Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10011d769e936Smrg ax_save_FLAGS=$LDFLAGS 10012d769e936Smrg LDFLAGS="$1" 10013d769e936Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10014d769e936Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10015d769e936Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10016d769e936Smrg LDFLAGS=$ax_save_FLAGS])], 10017d769e936Smrg [ax_save_FLAGS=$LDFLAGS 10018d769e936Smrg LDFLAGS="$1" 10019d769e936Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10020d769e936Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10021d769e936Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10022d769e936Smrg LDFLAGS=$ax_save_FLAGS]) 10023d769e936Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10024d769e936SmrgAC_MSG_RESULT($xorg_check_linker_flags) 10025d769e936Smrgif test "x$xorg_check_linker_flags" = xyes; then 10026d769e936Smrg m4_default([$2], :) 10027d769e936Smrgelse 10028d769e936Smrg m4_default([$3], :) 10029d769e936Smrgfi 10030d769e936Smrg]) # XORG_CHECK_LINKER_FLAGS 10031d769e936Smrg 10032d769e936Smrg# XORG_MEMORY_CHECK_FLAGS 10033d769e936Smrg# ----------------------- 10034d769e936Smrg# Minimum version: 1.16.0 10035d769e936Smrg# 10036d769e936Smrg# This macro attempts to find appropriate memory checking functionality 10037d769e936Smrg# for various platforms which unit testing code may use to catch various 10038d769e936Smrg# forms of memory allocation and access errors in testing. 10039d769e936Smrg# 10040d769e936Smrg# Interface to module: 10041d769e936Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10042d769e936Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 10043d769e936Smrg# 10044d769e936Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10045d769e936Smrg# 10046d769e936SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10047d769e936Smrg 10048d769e936SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10049d769e936SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10050d769e936Smrg [Environment variables to enable memory checking in tests]) 10051ba85709eSmrg 10052d769e936Smrg# Check for different types of support on different platforms 10053d769e936Smrgcase $host_os in 10054d769e936Smrg solaris*) 10055d769e936Smrg AC_CHECK_LIB([umem], [umem_alloc], 10056d769e936Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10057d769e936Smrg ;; 10058d769e936Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10059d769e936Smrg # both directly and inverted, so should not be 0 or 255. 10060d769e936Smrg malloc_debug_env='MALLOC_PERTURB_=15' 10061d769e936Smrg ;; 10062d769e936Smrg darwin*) 10063d769e936Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10064d769e936Smrg ;; 10065d769e936Smrg *bsd*) 10066d769e936Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10067d769e936Smrg ;; 10068d769e936Smrgesac 10069ba85709eSmrg 10070d769e936Smrg# User supplied flags override default flags 10071d769e936Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10072d769e936Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10073ba85709eSmrgfi 10074ba85709eSmrg 10075d769e936SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10076d769e936Smrg]) # XORG_WITH_LINT 10077ba85709eSmrg 100781d54945dSmrg# XORG_CHECK_MALLOC_ZERO 100791d54945dSmrg# ---------------------- 10080ba85709eSmrg# Minimum version: 1.0.0 10081ba85709eSmrg# 100821d54945dSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 100831d54945dSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 100841d54945dSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 100851d54945dSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 100861d54945dSmrgAC_ARG_ENABLE(malloc0returnsnull, 10087d769e936Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 100881d54945dSmrg [malloc(0) returns NULL (default: auto)]), 100891d54945dSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 100901d54945dSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 100911d54945dSmrg 100921d54945dSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 100931d54945dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10094d769e936Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10095d769e936Smrg#include <stdlib.h> 10096d769e936Smrg],[ 100971d54945dSmrg char *m0, *r0, *c0, *p; 100981d54945dSmrg m0 = malloc(0); 100991d54945dSmrg p = malloc(10); 101001d54945dSmrg r0 = realloc(p,0); 10101d769e936Smrg c0 = calloc(0,10); 10102d769e936Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10103d769e936Smrg])], 101041d54945dSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 10105d769e936Smrg [MALLOC_ZERO_RETURNS_NULL=no], 10106d769e936Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 101071d54945dSmrgfi 101081d54945dSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 101091d54945dSmrg 101101d54945dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 101111d54945dSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 101121d54945dSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 101131d54945dSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 101141d54945dSmrgelse 101151d54945dSmrg MALLOC_ZERO_CFLAGS="" 101161d54945dSmrg XMALLOC_ZERO_CFLAGS="" 101171d54945dSmrg XTMALLOC_ZERO_CFLAGS="" 101181d54945dSmrgfi 101191d54945dSmrg 101201d54945dSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 101211d54945dSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 101221d54945dSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 101231d54945dSmrg]) # XORG_CHECK_MALLOC_ZERO 101241d54945dSmrg 10125ba85709eSmrg# XORG_WITH_LINT() 10126ba85709eSmrg# ---------------- 10127ba85709eSmrg# Minimum version: 1.1.0 10128ba85709eSmrg# 10129d769e936Smrg# This macro enables the use of a tool that flags some suspicious and 10130d769e936Smrg# non-portable constructs (likely to be bugs) in C language source code. 10131d769e936Smrg# It will attempt to locate the tool and use appropriate options. 10132d769e936Smrg# There are various lint type tools on different platforms. 10133d769e936Smrg# 10134d769e936Smrg# Interface to module: 10135d769e936Smrg# LINT: returns the path to the tool found on the platform 10136d769e936Smrg# or the value set to LINT on the configure cmd line 10137d769e936Smrg# also an Automake conditional 10138d769e936Smrg# LINT_FLAGS: an Automake variable with appropriate flags 10139d769e936Smrg# 10140d769e936Smrg# --with-lint: 'yes' user instructs the module to use lint 10141d769e936Smrg# 'no' user instructs the module not to use lint (default) 10142d769e936Smrg# 10143d769e936Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10144d769e936Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 10145ba85709eSmrg# 10146ba85709eSmrgAC_DEFUN([XORG_WITH_LINT],[ 10147ba85709eSmrg 10148d769e936SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10149d769e936SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10150d769e936SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10151ba85709eSmrg [Use a lint-style source code checker (default: disabled)])], 10152ba85709eSmrg [use_lint=$withval], [use_lint=no]) 10153d769e936Smrg 10154d769e936Smrg# Obtain platform specific info like program name and options 10155d769e936Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10156d769e936Smrgcase $host_os in 10157d769e936Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10158d769e936Smrg lint_name=splint 10159d769e936Smrg lint_options="-badflag" 10160d769e936Smrg ;; 10161d769e936Smrg *freebsd* | *netbsd*) 10162d769e936Smrg lint_name=lint 10163d769e936Smrg lint_options="-u -b" 10164d769e936Smrg ;; 10165d769e936Smrg *solaris*) 10166d769e936Smrg lint_name=lint 10167d769e936Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10168d769e936Smrg ;; 10169d769e936Smrgesac 10170d769e936Smrg 10171d769e936Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10172d769e936Smrgif test "x$use_lint" = x"yes" ; then 10173d769e936Smrg AC_PATH_PROG([LINT], [$lint_name]) 10174d769e936Smrg if test "x$LINT" = "x"; then 10175d769e936Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10176d769e936Smrg fi 10177d769e936Smrgelif test "x$use_lint" = x"no" ; then 10178d769e936Smrg if test "x$LINT" != "x"; then 10179d769e936Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10180d769e936Smrg fi 10181ba85709eSmrgelse 10182d769e936Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10183ba85709eSmrgfi 10184d769e936Smrg 10185d769e936Smrg# User supplied flags override default flags 10186d769e936Smrgif test "x$LINT_FLAGS" != "x"; then 10187d769e936Smrg lint_options=$LINT_FLAGS 10188ba85709eSmrgfi 10189ba85709eSmrg 10190d769e936SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10191d769e936SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10192ba85709eSmrg 10193ba85709eSmrg]) # XORG_WITH_LINT 10194ba85709eSmrg 10195ba85709eSmrg# XORG_LINT_LIBRARY(LIBNAME) 10196ba85709eSmrg# -------------------------- 10197ba85709eSmrg# Minimum version: 1.1.0 10198ba85709eSmrg# 10199ba85709eSmrg# Sets up flags for building lint libraries for checking programs that call 10200ba85709eSmrg# functions in the library. 10201ba85709eSmrg# 10202d769e936Smrg# Interface to module: 10203d769e936Smrg# LINTLIB - Automake variable with the name of lint library file to make 10204d769e936Smrg# MAKE_LINT_LIB - Automake conditional 10205d769e936Smrg# 10206d769e936Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10207d769e936Smrg# - 'no' user instructs the module not to create a lint library (default) 10208ba85709eSmrg 10209ba85709eSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 10210ba85709eSmrgAC_REQUIRE([XORG_WITH_LINT]) 10211d769e936SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10212ba85709eSmrg [Create lint library (default: disabled)])], 10213ba85709eSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10214d769e936Smrg 10215d769e936Smrgif test "x$make_lint_lib" = x"yes" ; then 10216d769e936Smrg LINTLIB=llib-l$1.ln 10217d769e936Smrg if test "x$LINT" = "x"; then 10218d769e936Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10219d769e936Smrg fi 10220d769e936Smrgelif test "x$make_lint_lib" != x"no" ; then 10221d769e936Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10222ba85709eSmrgfi 10223d769e936Smrg 10224ba85709eSmrgAC_SUBST(LINTLIB) 10225ba85709eSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10226ba85709eSmrg 10227ba85709eSmrg]) # XORG_LINT_LIBRARY 10228ba85709eSmrg 10229d769e936Smrg# XORG_COMPILER_BRAND 10230d769e936Smrg# ------------------- 10231d769e936Smrg# Minimum version: 1.14.0 10232d769e936Smrg# 10233d769e936Smrg# Checks for various brands of compilers and sets flags as appropriate: 10234d769e936Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10235d769e936Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10236d769e936Smrg# clang compiler - sets CLANGCC to "yes" 10237d769e936Smrg# Intel compiler - sets INTELCC to "yes" 10238d769e936Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10239d769e936Smrg# 10240d769e936SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10241d769e936SmrgAC_LANG_CASE( 10242d769e936Smrg [C], [ 10243d769e936Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10244d769e936Smrg ], 10245d769e936Smrg [C++], [ 10246d769e936Smrg AC_REQUIRE([AC_PROG_CXX]) 10247d769e936Smrg ] 10248d769e936Smrg) 10249d769e936SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10250d769e936SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10251d769e936SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10252d769e936Smrg]) # XORG_COMPILER_BRAND 10253d769e936Smrg 10254d769e936Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10255d769e936Smrg# --------------- 10256d769e936Smrg# Minimum version: 1.16.0 10257d769e936Smrg# 10258d769e936Smrg# Test if the compiler works when passed the given flag as a command line argument. 10259d769e936Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10260d769e936Smrg# next flag in the list until there are no more options. 10261d769e936Smrg# 10262d769e936Smrg# Note that this does not guarantee that the compiler supports the flag as some 10263d769e936Smrg# compilers will simply ignore arguments that they do not understand, but we do 10264d769e936Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10265d769e936Smrg# -Werror=unused-command-line-argument 10266d769e936Smrg# 10267d769e936SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10268d769e936Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10269d769e936Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10270d769e936Smrg 10271d769e936SmrgAC_LANG_COMPILER_REQUIRE 10272d769e936Smrg 10273d769e936SmrgAC_LANG_CASE( 10274d769e936Smrg [C], [ 10275d769e936Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10276d769e936Smrg define([PREFIX], [C]) 10277d769e936Smrg define([CACHE_PREFIX], [cc]) 10278d769e936Smrg define([COMPILER], [$CC]) 10279d769e936Smrg ], 10280d769e936Smrg [C++], [ 10281d769e936Smrg define([PREFIX], [CXX]) 10282d769e936Smrg define([CACHE_PREFIX], [cxx]) 10283d769e936Smrg define([COMPILER], [$CXX]) 10284d769e936Smrg ] 10285d769e936Smrg) 10286d769e936Smrg 10287d769e936Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10288d769e936Smrg 10289d769e936Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10290d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10291d769e936Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10292d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10293d769e936Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10294d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10295d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10296d769e936Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10297d769e936Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10298d769e936Smrgfi 10299d769e936Smrg 10300d769e936Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10301d769e936Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10302d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10303d769e936Smrg fi 10304d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10305d769e936Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10306d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10307d769e936Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10308d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10309d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10310d769e936Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10311d769e936Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10312d769e936Smrgfi 10313d769e936Smrg 10314d769e936Smrgfound="no" 10315d769e936Smrgm4_foreach([flag], m4_cdr($@), [ 10316d769e936Smrg if test $found = "no" ; then 10317d769e936Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 10318d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10319d769e936Smrg fi 10320d769e936Smrg 10321d769e936Smrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 10322d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10323d769e936Smrg fi 10324d769e936Smrg 10325d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10326d769e936Smrg 10327d769e936Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10328d769e936Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10329d769e936Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10330d769e936Smrg AC_CACHE_VAL($cacheid, 10331d769e936Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10332d769e936Smrg [eval $cacheid=yes], 10333d769e936Smrg [eval $cacheid=no])]) 10334d769e936Smrg 10335d769e936Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10336d769e936Smrg 10337d769e936Smrg eval supported=\$$cacheid 10338d769e936Smrg AC_MSG_RESULT([$supported]) 10339d769e936Smrg if test "$supported" = "yes" ; then 10340d769e936Smrg $1="$$1 ]flag[" 10341d769e936Smrg found="yes" 10342d769e936Smrg fi 10343d769e936Smrg fi 10344d769e936Smrg]) 10345d769e936Smrg]) # XORG_TESTSET_CFLAG 10346d769e936Smrg 10347d769e936Smrg# XORG_COMPILER_FLAGS 10348d769e936Smrg# --------------- 10349d769e936Smrg# Minimum version: 1.16.0 10350d769e936Smrg# 10351d769e936Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10352d769e936Smrg# arguments supported by the selected compiler which do NOT alter the generated 10353d769e936Smrg# code. These arguments will cause the compiler to print various warnings 10354d769e936Smrg# during compilation AND turn a conservative set of warnings into errors. 10355d769e936Smrg# 10356d769e936Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10357d769e936Smrg# future versions of util-macros as options are added to new compilers. 10358d769e936Smrg# 10359d769e936SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10360d769e936SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10361d769e936Smrg 10362d769e936SmrgAC_ARG_ENABLE(selective-werror, 10363d769e936Smrg AS_HELP_STRING([--disable-selective-werror], 10364d769e936Smrg [Turn off selective compiler errors. (default: enabled)]), 10365d769e936Smrg [SELECTIVE_WERROR=$enableval], 10366d769e936Smrg [SELECTIVE_WERROR=yes]) 10367d769e936Smrg 10368d769e936SmrgAC_LANG_CASE( 10369d769e936Smrg [C], [ 10370d769e936Smrg define([PREFIX], [C]) 10371d769e936Smrg ], 10372d769e936Smrg [C++], [ 10373d769e936Smrg define([PREFIX], [CXX]) 10374d769e936Smrg ] 10375d769e936Smrg) 10376d769e936Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 10377d769e936Smrgif test "x$SUNCC" = "xyes"; then 10378d769e936Smrg [BASE_]PREFIX[FLAGS]="-v" 10379d769e936Smrgelse 10380d769e936Smrg [BASE_]PREFIX[FLAGS]="" 10381d769e936Smrgfi 10382d769e936Smrg 10383d769e936Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10384d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10385d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10386d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10387d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10388d769e936Smrg 10389d769e936SmrgAC_LANG_CASE( 10390d769e936Smrg [C], [ 10391d769e936Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10392d769e936Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10393d769e936Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10394d769e936Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 10395d769e936Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 10396d769e936Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10397d769e936Smrg ] 10398d769e936Smrg) 10399d769e936Smrg 10400d769e936Smrg# This chunk adds additional warnings that could catch undesired effects. 10401d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10402d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10403d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10404d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10405d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10406d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10407d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 10408d769e936Smrg 10409d769e936Smrg# These are currently disabled because they are noisy. They will be enabled 10410d769e936Smrg# in the future once the codebase is sufficiently modernized to silence 10411d769e936Smrg# them. For now, I don't want them to drown out the other warnings. 10412d769e936Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10413d769e936Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10414d769e936Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 10415d769e936Smrg 10416d769e936Smrg# Turn some warnings into errors, so we don't accidently get successful builds 10417d769e936Smrg# when there are problems that should be fixed. 10418d769e936Smrg 10419d769e936Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 10420d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10421d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10422d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10423d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10424d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10425d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10426d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10427d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10428d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10429d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10430d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10431d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10432d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10433d769e936Smrgelse 10434d769e936SmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 10435d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10436d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10437d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10438d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10439d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10440d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10441d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10442d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10443d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10444d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10445d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10446d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10447d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10448d769e936Smrgfi 10449d769e936Smrg 10450d769e936SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10451d769e936Smrg]) # XORG_COMPILER_FLAGS 10452d769e936Smrg 10453786a6f21Smrg# XORG_CWARNFLAGS 10454786a6f21Smrg# --------------- 10455786a6f21Smrg# Minimum version: 1.2.0 10456d769e936Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 10457786a6f21Smrg# 10458786a6f21Smrg# Defines CWARNFLAGS to enable C compiler warnings. 10459786a6f21Smrg# 10460d769e936Smrg# This function is deprecated because it defines -fno-strict-aliasing 10461d769e936Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 10462d769e936Smrg# is needed, then it should be added explicitly in the module when 10463d769e936Smrg# it is updated to use BASE_CFLAGS. 10464d769e936Smrg# 10465786a6f21SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 10466d769e936SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10467d769e936SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10468d769e936SmrgAC_LANG_CASE( 10469d769e936Smrg [C], [ 10470d769e936Smrg CWARNFLAGS="$BASE_CFLAGS" 10471d769e936Smrg if test "x$GCC" = xyes ; then 10472d769e936Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 10473d769e936Smrg fi 10474d769e936Smrg AC_SUBST(CWARNFLAGS) 10475d769e936Smrg ] 10476d769e936Smrg) 10477786a6f21Smrg]) # XORG_CWARNFLAGS 10478d769e936Smrg 10479d769e936Smrg# XORG_STRICT_OPTION 10480d769e936Smrg# ----------------------- 10481d769e936Smrg# Minimum version: 1.3.0 10482d769e936Smrg# 10483d769e936Smrg# Add configure option to enable strict compilation flags, such as treating 10484d769e936Smrg# warnings as fatal errors. 10485d769e936Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 10486d769e936Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 10487d769e936Smrg# 10488d769e936Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 10489d769e936Smrg# when strict compilation is unconditionally desired. 10490d769e936SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 10491d769e936SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 10492d769e936SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10493d769e936Smrg 10494d769e936SmrgAC_ARG_ENABLE(strict-compilation, 10495d769e936Smrg AS_HELP_STRING([--enable-strict-compilation], 10496d769e936Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 10497d769e936Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 10498d769e936Smrg 10499d769e936SmrgAC_LANG_CASE( 10500d769e936Smrg [C], [ 10501d769e936Smrg define([PREFIX], [C]) 10502d769e936Smrg ], 10503d769e936Smrg [C++], [ 10504d769e936Smrg define([PREFIX], [CXX]) 10505d769e936Smrg ] 10506d769e936Smrg) 10507d769e936Smrg 10508d769e936Smrg[STRICT_]PREFIX[FLAGS]="" 10509d769e936SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 10510d769e936SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 10511d769e936Smrg 10512d769e936Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 10513d769e936Smrg# activate it with -Werror, so we add it here explicitly. 10514d769e936SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 10515d769e936Smrg 10516d769e936Smrgif test "x$STRICT_COMPILE" = "xyes"; then 10517d769e936Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 10518d769e936Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 10519d769e936Smrgfi 10520d769e936SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 10521d769e936SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10522d769e936SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 10523d769e936Smrg]) # XORG_STRICT_OPTION 10524d769e936Smrg 10525d769e936Smrg# XORG_DEFAULT_OPTIONS 10526d769e936Smrg# -------------------- 10527d769e936Smrg# Minimum version: 1.3.0 10528d769e936Smrg# 10529d769e936Smrg# Defines default options for X.Org modules. 10530d769e936Smrg# 10531d769e936SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 10532d769e936SmrgAC_REQUIRE([AC_PROG_INSTALL]) 10533d769e936SmrgXORG_COMPILER_FLAGS 10534d769e936SmrgXORG_CWARNFLAGS 10535d769e936SmrgXORG_STRICT_OPTION 10536d769e936SmrgXORG_RELEASE_VERSION 10537d769e936SmrgXORG_CHANGELOG 10538d769e936SmrgXORG_INSTALL 10539d769e936SmrgXORG_MANPAGE_SECTIONS 10540d769e936Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 10541d769e936Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 10542d769e936Smrg]) # XORG_DEFAULT_OPTIONS 10543d769e936Smrg 10544d769e936Smrg# XORG_INSTALL() 10545d769e936Smrg# ---------------- 10546d769e936Smrg# Minimum version: 1.4.0 10547d769e936Smrg# 10548d769e936Smrg# Defines the variable INSTALL_CMD as the command to copy 10549d769e936Smrg# INSTALL from $prefix/share/util-macros. 10550d769e936Smrg# 10551d769e936SmrgAC_DEFUN([XORG_INSTALL], [ 10552d769e936SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10553d769e936Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 10554d769e936SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 10555d769e936Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 10556d769e936Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 10557d769e936Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 10558d769e936SmrgAC_SUBST([INSTALL_CMD]) 10559d769e936Smrg]) # XORG_INSTALL 105601d54945dSmrgdnl Copyright 2005 Red Hat, Inc 105611d54945dSmrgdnl 105621d54945dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 105631d54945dSmrgdnl documentation for any purpose is hereby granted without fee, provided that 105641d54945dSmrgdnl the above copyright notice appear in all copies and that both that 105651d54945dSmrgdnl copyright notice and this permission notice appear in supporting 105661d54945dSmrgdnl documentation. 105671d54945dSmrgdnl 105681d54945dSmrgdnl The above copyright notice and this permission notice shall be included 105691d54945dSmrgdnl in all copies or substantial portions of the Software. 105701d54945dSmrgdnl 105711d54945dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 105721d54945dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 105731d54945dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 105741d54945dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 105751d54945dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 105761d54945dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 105771d54945dSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 105781d54945dSmrgdnl 105791d54945dSmrgdnl Except as contained in this notice, the name of the copyright holders shall 105801d54945dSmrgdnl not be used in advertising or otherwise to promote the sale, use or 105811d54945dSmrgdnl other dealings in this Software without prior written authorization 105821d54945dSmrgdnl from the copyright holders. 105831d54945dSmrgdnl 105841d54945dSmrg 105851d54945dSmrg# XORG_RELEASE_VERSION 105861d54945dSmrg# -------------------- 10587d769e936Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 105881d54945dSmrg 105891d54945dSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 10590ba85709eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 10591ba85709eSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 10592ba85709eSmrg [Major version of this package]) 10593ba85709eSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 10594ba85709eSmrg if test "x$PVM" = "x"; then 10595ba85709eSmrg PVM="0" 10596ba85709eSmrg fi 10597ba85709eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 10598ba85709eSmrg [$PVM], 10599ba85709eSmrg [Minor version of this package]) 10600ba85709eSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 10601ba85709eSmrg if test "x$PVP" = "x"; then 10602ba85709eSmrg PVP="0" 10603ba85709eSmrg fi 10604ba85709eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 10605ba85709eSmrg [$PVP], 10606ba85709eSmrg [Patch version of this package]) 106071d54945dSmrg]) 106081d54945dSmrg 10609786a6f21Smrg# XORG_CHANGELOG() 10610786a6f21Smrg# ---------------- 10611786a6f21Smrg# Minimum version: 1.2.0 10612786a6f21Smrg# 10613786a6f21Smrg# Defines the variable CHANGELOG_CMD as the command to generate 10614786a6f21Smrg# ChangeLog from git. 10615786a6f21Smrg# 10616786a6f21Smrg# 10617786a6f21SmrgAC_DEFUN([XORG_CHANGELOG], [ 10618d769e936SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 10619d769e936Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 10620d769e936Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 10621786a6f21Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 10622786a6f21SmrgAC_SUBST([CHANGELOG_CMD]) 10623786a6f21Smrg]) # XORG_CHANGELOG 10624786a6f21Smrg 10625d769e936Smrgdnl Copyright 2005 Red Hat, Inc 10626d769e936Smrgdnl 10627d769e936Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 10628d769e936Smrgdnl documentation for any purpose is hereby granted without fee, provided that 10629d769e936Smrgdnl the above copyright notice appear in all copies and that both that 10630d769e936Smrgdnl copyright notice and this permission notice appear in supporting 10631d769e936Smrgdnl documentation. 10632d769e936Smrgdnl 10633d769e936Smrgdnl The above copyright notice and this permission notice shall be included 10634d769e936Smrgdnl in all copies or substantial portions of the Software. 10635d769e936Smrgdnl 10636d769e936Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10637d769e936Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10638d769e936Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10639d769e936Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10640d769e936Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10641d769e936Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10642d769e936Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 10643d769e936Smrgdnl 10644d769e936Smrgdnl Except as contained in this notice, the name of the copyright holders shall 10645d769e936Smrgdnl not be used in advertising or otherwise to promote the sale, use or 10646d769e936Smrgdnl other dealings in this Software without prior written authorization 10647d769e936Smrgdnl from the copyright holders. 10648d769e936Smrgdnl 10649d769e936Smrg 10650d769e936Smrg# XORG_DRIVER_CHECK_EXT() 10651d769e936Smrg# -------------------------- 10652d769e936Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 10653d769e936Smrg# is defined, then add $1 to $REQUIRED_MODULES. 10654d769e936Smrg 10655d769e936SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 10656d769e936Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10657d769e936Smrg SAVE_CFLAGS="$CFLAGS" 10658d769e936Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 10659d769e936Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 10660d769e936Smrg#include "xorg-server.h" 10661d769e936Smrg#if !defined $1 10662d769e936Smrg#error $1 not defined 10663d769e936Smrg#endif 10664d769e936Smrg ]])], 10665d769e936Smrg [_EXT_CHECK=yes], 10666d769e936Smrg [_EXT_CHECK=no]) 10667d769e936Smrg CFLAGS="$SAVE_CFLAGS" 10668d769e936Smrg AC_MSG_CHECKING([if $1 is defined]) 10669d769e936Smrg AC_MSG_RESULT([$_EXT_CHECK]) 10670d769e936Smrg if test "$_EXT_CHECK" != no; then 10671d769e936Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 10672d769e936Smrg fi 10673d769e936Smrg]) 10674d769e936Smrg 10675d769e936Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software 10676d769e936Smrg# Foundation, Inc. 106771d54945dSmrg# 106781d54945dSmrg# This file is free software; the Free Software Foundation 106791d54945dSmrg# gives unlimited permission to copy and/or distribute it, 106801d54945dSmrg# with or without modifications, as long as this notice is preserved. 106811d54945dSmrg 10682d769e936Smrg# serial 1 10683d769e936Smrg 106841d54945dSmrg# AM_AUTOMAKE_VERSION(VERSION) 106851d54945dSmrg# ---------------------------- 106861d54945dSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 106871d54945dSmrg# generated from the m4 files accompanying Automake X.Y. 10688ba85709eSmrg# (This private macro should not be called outside this file.) 10689ba85709eSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 10690ec713c28Smrg[am__api_version='1.11' 10691ba85709eSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 10692ba85709eSmrgdnl require some minimum version. Point them to the right macro. 10693d769e936Smrgm4_if([$1], [1.11.3], [], 10694ba85709eSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 10695ba85709eSmrg]) 10696ba85709eSmrg 10697ba85709eSmrg# _AM_AUTOCONF_VERSION(VERSION) 10698ba85709eSmrg# ----------------------------- 10699ba85709eSmrg# aclocal traces this macro to find the Autoconf version. 10700ba85709eSmrg# This is a private macro too. Using m4_define simplifies 10701ba85709eSmrg# the logic in aclocal, which can simply ignore this definition. 10702ba85709eSmrgm4_define([_AM_AUTOCONF_VERSION], []) 107031d54945dSmrg 107041d54945dSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 107051d54945dSmrg# ------------------------------- 10706ba85709eSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 10707786a6f21Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 107081d54945dSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 10709d769e936Smrg[AM_AUTOMAKE_VERSION([1.11.3])dnl 10710ba85709eSmrgm4_ifndef([AC_AUTOCONF_VERSION], 10711ba85709eSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 10712786a6f21Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 107131d54945dSmrg 107141d54945dSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 107151d54945dSmrg 10716d769e936Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 107171d54945dSmrg# 107181d54945dSmrg# This file is free software; the Free Software Foundation 107191d54945dSmrg# gives unlimited permission to copy and/or distribute it, 107201d54945dSmrg# with or without modifications, as long as this notice is preserved. 107211d54945dSmrg 10722d769e936Smrg# serial 1 10723d769e936Smrg 107241d54945dSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 107251d54945dSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 107261d54945dSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 107271d54945dSmrg# 107281d54945dSmrg# Of course, Automake must honor this variable whenever it calls a 107291d54945dSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 107301d54945dSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 107311d54945dSmrg# depending on how configure is run. This is pretty annoying, since 107321d54945dSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 107331d54945dSmrg# source directory, any form will work fine, but in subdirectories a 107341d54945dSmrg# relative path needs to be adjusted first. 107351d54945dSmrg# 107361d54945dSmrg# $ac_aux_dir/missing 107371d54945dSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 107381d54945dSmrg# $top_srcdir/$ac_aux_dir/missing 107391d54945dSmrg# fails if $ac_aux_dir is absolute, 107401d54945dSmrg# fails when called from a subdirectory in a VPATH build with 107411d54945dSmrg# a relative $ac_aux_dir 107421d54945dSmrg# 107431d54945dSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 107441d54945dSmrg# are both prefixed by $srcdir. In an in-source build this is usually 107451d54945dSmrg# harmless because $srcdir is `.', but things will broke when you 107461d54945dSmrg# start a VPATH build or use an absolute $srcdir. 107471d54945dSmrg# 107481d54945dSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 107491d54945dSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 107501d54945dSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 107511d54945dSmrg# and then we would define $MISSING as 107521d54945dSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 107531d54945dSmrg# This will work as long as MISSING is not called from configure, because 107541d54945dSmrg# unfortunately $(top_srcdir) has no meaning in configure. 107551d54945dSmrg# However there are other variables, like CC, which are often used in 107561d54945dSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 107571d54945dSmrg# 107581d54945dSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 107591d54945dSmrg# absolute PATH. The drawback is that using absolute paths prevent a 107601d54945dSmrg# configured tree to be moved without reconfiguration. 107611d54945dSmrg 107621d54945dSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 107631d54945dSmrg[dnl Rely on autoconf to set up CDPATH properly. 107641d54945dSmrgAC_PREREQ([2.50])dnl 107651d54945dSmrg# expand $ac_aux_dir to an absolute path 107661d54945dSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 107671d54945dSmrg]) 107681d54945dSmrg 107691d54945dSmrg# AM_CONDITIONAL -*- Autoconf -*- 107701d54945dSmrg 10771ec713c28Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 107721d54945dSmrg# Free Software Foundation, Inc. 107731d54945dSmrg# 107741d54945dSmrg# This file is free software; the Free Software Foundation 107751d54945dSmrg# gives unlimited permission to copy and/or distribute it, 107761d54945dSmrg# with or without modifications, as long as this notice is preserved. 107771d54945dSmrg 10778ec713c28Smrg# serial 9 107791d54945dSmrg 107801d54945dSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 107811d54945dSmrg# ------------------------------------- 107821d54945dSmrg# Define a conditional. 107831d54945dSmrgAC_DEFUN([AM_CONDITIONAL], 107841d54945dSmrg[AC_PREREQ(2.52)dnl 107851d54945dSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 107861d54945dSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 10787ba85709eSmrgAC_SUBST([$1_TRUE])dnl 10788ba85709eSmrgAC_SUBST([$1_FALSE])dnl 10789ba85709eSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 10790ba85709eSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 10791ec713c28Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 107921d54945dSmrgif $2; then 107931d54945dSmrg $1_TRUE= 107941d54945dSmrg $1_FALSE='#' 107951d54945dSmrgelse 107961d54945dSmrg $1_TRUE='#' 107971d54945dSmrg $1_FALSE= 107981d54945dSmrgfi 107991d54945dSmrgAC_CONFIG_COMMANDS_PRE( 108001d54945dSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 108011d54945dSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 108021d54945dSmrgUsually this means the macro was only invoked conditionally.]]) 108031d54945dSmrgfi])]) 108041d54945dSmrg 10805d769e936Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 10806d769e936Smrg# 2010, 2011 Free Software Foundation, Inc. 108071d54945dSmrg# 108081d54945dSmrg# This file is free software; the Free Software Foundation 108091d54945dSmrg# gives unlimited permission to copy and/or distribute it, 108101d54945dSmrg# with or without modifications, as long as this notice is preserved. 108111d54945dSmrg 10812d769e936Smrg# serial 12 108131d54945dSmrg 108141d54945dSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 108151d54945dSmrg# written in clear, in which case automake, when reading aclocal.m4, 108161d54945dSmrg# will think it sees a *use*, and therefore will trigger all it's 108171d54945dSmrg# C support machinery. Also note that it means that autoscan, seeing 108181d54945dSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 108191d54945dSmrg 108201d54945dSmrg 108211d54945dSmrg# _AM_DEPENDENCIES(NAME) 108221d54945dSmrg# ---------------------- 108231d54945dSmrg# See how the compiler implements dependency checking. 108241d54945dSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 108251d54945dSmrg# We try a few techniques and use that to set a single cache variable. 108261d54945dSmrg# 108271d54945dSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 108281d54945dSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 108291d54945dSmrg# dependency, and given that the user is not expected to run this macro, 108301d54945dSmrg# just rely on AC_PROG_CC. 108311d54945dSmrgAC_DEFUN([_AM_DEPENDENCIES], 108321d54945dSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 108331d54945dSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 108341d54945dSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 108351d54945dSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 108361d54945dSmrg 108371d54945dSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 108381d54945dSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 108391d54945dSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 10840ba85709eSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 108411d54945dSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 108421d54945dSmrg [depcc="$$1" am_compiler_list=]) 108431d54945dSmrg 108441d54945dSmrgAC_CACHE_CHECK([dependency style of $depcc], 108451d54945dSmrg [am_cv_$1_dependencies_compiler_type], 108461d54945dSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 108471d54945dSmrg # We make a subdir and do the tests there. Otherwise we can end up 108481d54945dSmrg # making bogus files that we don't know about and never remove. For 108491d54945dSmrg # instance it was reported that on HP-UX the gcc test will end up 108501d54945dSmrg # making a dummy file named `D' -- because `-MD' means `put the output 108511d54945dSmrg # in D'. 10852d769e936Smrg rm -rf conftest.dir 108531d54945dSmrg mkdir conftest.dir 108541d54945dSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 108551d54945dSmrg # using a relative directory. 108561d54945dSmrg cp "$am_depcomp" conftest.dir 108571d54945dSmrg cd conftest.dir 108581d54945dSmrg # We will build objects and dependencies in a subdirectory because 108591d54945dSmrg # it helps to detect inapplicable dependency modes. For instance 108601d54945dSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 108611d54945dSmrg # side effect of compilation, but ICC will put the dependencies in 108621d54945dSmrg # the current directory while Tru64 will put them in the object 108631d54945dSmrg # directory. 108641d54945dSmrg mkdir sub 108651d54945dSmrg 108661d54945dSmrg am_cv_$1_dependencies_compiler_type=none 108671d54945dSmrg if test "$am_compiler_list" = ""; then 108681d54945dSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 108691d54945dSmrg fi 10870ec713c28Smrg am__universal=false 10871ec713c28Smrg m4_case([$1], [CC], 10872ec713c28Smrg [case " $depcc " in #( 10873ec713c28Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 10874ec713c28Smrg esac], 10875ec713c28Smrg [CXX], 10876ec713c28Smrg [case " $depcc " in #( 10877ec713c28Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 10878ec713c28Smrg esac]) 10879ec713c28Smrg 108801d54945dSmrg for depmode in $am_compiler_list; do 108811d54945dSmrg # Setup a source with many dependencies, because some compilers 108821d54945dSmrg # like to wrap large dependency lists on column 80 (with \), and 108831d54945dSmrg # we should not choose a depcomp mode which is confused by this. 108841d54945dSmrg # 108851d54945dSmrg # We need to recreate these files for each test, as the compiler may 108861d54945dSmrg # overwrite some of them when testing with obscure command lines. 108871d54945dSmrg # This happens at least with the AIX C compiler. 108881d54945dSmrg : > sub/conftest.c 108891d54945dSmrg for i in 1 2 3 4 5 6; do 108901d54945dSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 108911d54945dSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 108921d54945dSmrg # Solaris 8's {/usr,}/bin/sh. 108931d54945dSmrg touch sub/conftst$i.h 108941d54945dSmrg done 108951d54945dSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 108961d54945dSmrg 10897ec713c28Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 10898ec713c28Smrg # mode. It turns out that the SunPro C++ compiler does not properly 10899ec713c28Smrg # handle `-M -o', and we need to detect this. Also, some Intel 10900ec713c28Smrg # versions had trouble with output in subdirs 10901ec713c28Smrg am__obj=sub/conftest.${OBJEXT-o} 10902ec713c28Smrg am__minus_obj="-o $am__obj" 109031d54945dSmrg case $depmode in 10904ec713c28Smrg gcc) 10905ec713c28Smrg # This depmode causes a compiler race in universal mode. 10906ec713c28Smrg test "$am__universal" = false || continue 10907ec713c28Smrg ;; 109081d54945dSmrg nosideeffect) 109091d54945dSmrg # after this tag, mechanisms are not by side-effect, so they'll 109101d54945dSmrg # only be used when explicitly requested 109111d54945dSmrg if test "x$enable_dependency_tracking" = xyes; then 109121d54945dSmrg continue 109131d54945dSmrg else 109141d54945dSmrg break 109151d54945dSmrg fi 109161d54945dSmrg ;; 10917d769e936Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 10918ec713c28Smrg # This compiler won't grok `-c -o', but also, the minuso test has 10919ec713c28Smrg # not run yet. These depmodes are late enough in the game, and 10920ec713c28Smrg # so weak that their functioning should not be impacted. 10921ec713c28Smrg am__obj=conftest.${OBJEXT-o} 10922ec713c28Smrg am__minus_obj= 10923ec713c28Smrg ;; 109241d54945dSmrg none) break ;; 109251d54945dSmrg esac 109261d54945dSmrg if depmode=$depmode \ 10927ec713c28Smrg source=sub/conftest.c object=$am__obj \ 109281d54945dSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 10929ec713c28Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 109301d54945dSmrg >/dev/null 2>conftest.err && 10931ba85709eSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 109321d54945dSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 10933ec713c28Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 109341d54945dSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 109351d54945dSmrg # icc doesn't choke on unknown options, it will just issue warnings 109361d54945dSmrg # or remarks (even with -Werror). So we grep stderr for any message 109371d54945dSmrg # that says an option was ignored or not supported. 109381d54945dSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 109391d54945dSmrg # icc: Command line warning: ignoring option '-M'; no argument required 109401d54945dSmrg # The diagnosis changed in icc 8.0: 109411d54945dSmrg # icc: Command line remark: option '-MP' not supported 109421d54945dSmrg if (grep 'ignoring option' conftest.err || 109431d54945dSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 109441d54945dSmrg am_cv_$1_dependencies_compiler_type=$depmode 109451d54945dSmrg break 109461d54945dSmrg fi 109471d54945dSmrg fi 109481d54945dSmrg done 109491d54945dSmrg 109501d54945dSmrg cd .. 109511d54945dSmrg rm -rf conftest.dir 109521d54945dSmrgelse 109531d54945dSmrg am_cv_$1_dependencies_compiler_type=none 109541d54945dSmrgfi 109551d54945dSmrg]) 109561d54945dSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 109571d54945dSmrgAM_CONDITIONAL([am__fastdep$1], [ 109581d54945dSmrg test "x$enable_dependency_tracking" != xno \ 109591d54945dSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 109601d54945dSmrg]) 109611d54945dSmrg 109621d54945dSmrg 109631d54945dSmrg# AM_SET_DEPDIR 109641d54945dSmrg# ------------- 109651d54945dSmrg# Choose a directory name for dependency files. 109661d54945dSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 109671d54945dSmrgAC_DEFUN([AM_SET_DEPDIR], 109681d54945dSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 109691d54945dSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 109701d54945dSmrg]) 109711d54945dSmrg 109721d54945dSmrg 109731d54945dSmrg# AM_DEP_TRACK 109741d54945dSmrg# ------------ 109751d54945dSmrgAC_DEFUN([AM_DEP_TRACK], 109761d54945dSmrg[AC_ARG_ENABLE(dependency-tracking, 109771d54945dSmrg[ --disable-dependency-tracking speeds up one-time build 109781d54945dSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 109791d54945dSmrgif test "x$enable_dependency_tracking" != xno; then 109801d54945dSmrg am_depcomp="$ac_aux_dir/depcomp" 109811d54945dSmrg AMDEPBACKSLASH='\' 10982d769e936Smrg am__nodep='_no' 109831d54945dSmrgfi 109841d54945dSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 10985ba85709eSmrgAC_SUBST([AMDEPBACKSLASH])dnl 10986ba85709eSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 10987d769e936SmrgAC_SUBST([am__nodep])dnl 10988d769e936Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 109891d54945dSmrg]) 109901d54945dSmrg 109911d54945dSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 109921d54945dSmrg 10993786a6f21Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 109941d54945dSmrg# Free Software Foundation, Inc. 109951d54945dSmrg# 109961d54945dSmrg# This file is free software; the Free Software Foundation 109971d54945dSmrg# gives unlimited permission to copy and/or distribute it, 109981d54945dSmrg# with or without modifications, as long as this notice is preserved. 109991d54945dSmrg 11000ec713c28Smrg#serial 5 110011d54945dSmrg 110021d54945dSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 110031d54945dSmrg# ------------------------------ 110041d54945dSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11005ec713c28Smrg[{ 11006ec713c28Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 11007ec713c28Smrg # are listed without --file. Let's play safe and only enable the eval 11008ec713c28Smrg # if we detect the quoting. 11009ec713c28Smrg case $CONFIG_FILES in 11010ec713c28Smrg *\'*) eval set x "$CONFIG_FILES" ;; 11011ec713c28Smrg *) set x $CONFIG_FILES ;; 11012ec713c28Smrg esac 11013ec713c28Smrg shift 11014ec713c28Smrg for mf 11015ec713c28Smrg do 11016ec713c28Smrg # Strip MF so we end up with the name of the file. 11017ec713c28Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11018ec713c28Smrg # Check whether this is an Automake generated Makefile or not. 11019ec713c28Smrg # We used to match only the files named `Makefile.in', but 11020ec713c28Smrg # some people rename them; so instead we look at the file content. 11021ec713c28Smrg # Grep'ing the first line is not enough: some people post-process 11022ec713c28Smrg # each Makefile.in and add a new line on top of each file to say so. 11023ec713c28Smrg # Grep'ing the whole file is not good either: AIX grep has a line 11024ec713c28Smrg # limit of 2048, but all sed's we know have understand at least 4000. 11025ec713c28Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11026ec713c28Smrg dirpart=`AS_DIRNAME("$mf")` 11027ec713c28Smrg else 11028ec713c28Smrg continue 11029ec713c28Smrg fi 11030ec713c28Smrg # Extract the definition of DEPDIR, am__include, and am__quote 11031ec713c28Smrg # from the Makefile without running `make'. 11032ec713c28Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11033ec713c28Smrg test -z "$DEPDIR" && continue 11034ec713c28Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 11035ec713c28Smrg test -z "am__include" && continue 11036ec713c28Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11037ec713c28Smrg # When using ansi2knr, U may be empty or an underscore; expand it 11038ec713c28Smrg U=`sed -n 's/^U = //p' < "$mf"` 11039ec713c28Smrg # Find all dependency output files, they are included files with 11040ec713c28Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11041ec713c28Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 11042ec713c28Smrg # expansion. 11043ec713c28Smrg for file in `sed -n " 11044ec713c28Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11045ec713c28Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 11046ec713c28Smrg # Make sure the directory exists. 11047ec713c28Smrg test -f "$dirpart/$file" && continue 11048ec713c28Smrg fdir=`AS_DIRNAME(["$file"])` 11049ec713c28Smrg AS_MKDIR_P([$dirpart/$fdir]) 11050ec713c28Smrg # echo "creating $dirpart/$file" 11051ec713c28Smrg echo '# dummy' > "$dirpart/$file" 11052ec713c28Smrg done 110531d54945dSmrg done 11054ec713c28Smrg} 110551d54945dSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 110561d54945dSmrg 110571d54945dSmrg 110581d54945dSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 110591d54945dSmrg# ----------------------------- 110601d54945dSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 110611d54945dSmrg# 110621d54945dSmrg# This code is only required when automatic dependency tracking 110631d54945dSmrg# is enabled. FIXME. This creates each `.P' file that we will 110641d54945dSmrg# need in order to bootstrap the dependency handling code. 110651d54945dSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 110661d54945dSmrg[AC_CONFIG_COMMANDS([depfiles], 110671d54945dSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 110681d54945dSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 110691d54945dSmrg]) 110701d54945dSmrg 110711d54945dSmrg# Do all the work for Automake. -*- Autoconf -*- 110721d54945dSmrg 11073ba85709eSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 11074ec713c28Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 110751d54945dSmrg# 110761d54945dSmrg# This file is free software; the Free Software Foundation 110771d54945dSmrg# gives unlimited permission to copy and/or distribute it, 110781d54945dSmrg# with or without modifications, as long as this notice is preserved. 110791d54945dSmrg 11080ec713c28Smrg# serial 16 110811d54945dSmrg 110821d54945dSmrg# This macro actually does too much. Some checks are only needed if 110831d54945dSmrg# your package does certain things. But this isn't really a big deal. 110841d54945dSmrg 110851d54945dSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 110861d54945dSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 110871d54945dSmrg# ----------------------------------------------- 110881d54945dSmrg# The call with PACKAGE and VERSION arguments is the old style 110891d54945dSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 110901d54945dSmrg# and VERSION should now be passed to AC_INIT and removed from 110911d54945dSmrg# the call to AM_INIT_AUTOMAKE. 110921d54945dSmrg# We support both call styles for the transition. After 110931d54945dSmrg# the next Automake release, Autoconf can make the AC_INIT 110941d54945dSmrg# arguments mandatory, and then we can depend on a new Autoconf 110951d54945dSmrg# release and drop the old call support. 110961d54945dSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 11097ec713c28Smrg[AC_PREREQ([2.62])dnl 110981d54945dSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 110991d54945dSmrgdnl the ones we care about. 111001d54945dSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 111011d54945dSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 111021d54945dSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 11103ba85709eSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 11104ba85709eSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11105ba85709eSmrg # is not polluted with repeated "-I." 11106ba85709eSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11107ba85709eSmrg # test to see if srcdir already configured 11108ba85709eSmrg if test -f $srcdir/config.status; then 11109ba85709eSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11110ba85709eSmrg fi 111111d54945dSmrgfi 111121d54945dSmrg 111131d54945dSmrg# test whether we have cygpath 111141d54945dSmrgif test -z "$CYGPATH_W"; then 111151d54945dSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 111161d54945dSmrg CYGPATH_W='cygpath -w' 111171d54945dSmrg else 111181d54945dSmrg CYGPATH_W=echo 111191d54945dSmrg fi 111201d54945dSmrgfi 111211d54945dSmrgAC_SUBST([CYGPATH_W]) 111221d54945dSmrg 111231d54945dSmrg# Define the identity of the package. 111241d54945dSmrgdnl Distinguish between old-style and new-style calls. 111251d54945dSmrgm4_ifval([$2], 111261d54945dSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 111271d54945dSmrg AC_SUBST([PACKAGE], [$1])dnl 111281d54945dSmrg AC_SUBST([VERSION], [$2])], 111291d54945dSmrg[_AM_SET_OPTIONS([$1])dnl 11130ba85709eSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11131ba85709eSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 11132ba85709eSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 111331d54945dSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 111341d54945dSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 111351d54945dSmrg 111361d54945dSmrg_AM_IF_OPTION([no-define],, 111371d54945dSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 111381d54945dSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 111391d54945dSmrg 111401d54945dSmrg# Some tools Automake needs. 111411d54945dSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 111421d54945dSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 111431d54945dSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 111441d54945dSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 111451d54945dSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 111461d54945dSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 111471d54945dSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 11148ec713c28SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11149ec713c28SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 111501d54945dSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 111511d54945dSmrg# We need awk for the "check" target. The system "awk" is bad on 111521d54945dSmrg# some platforms. 111531d54945dSmrgAC_REQUIRE([AC_PROG_AWK])dnl 111541d54945dSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 111551d54945dSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 111561d54945dSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11157ec713c28Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11158ec713c28Smrg [_AM_PROG_TAR([v7])])]) 111591d54945dSmrg_AM_IF_OPTION([no-dependencies],, 111601d54945dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 11161ec713c28Smrg [_AM_DEPENDENCIES(CC)], 11162ec713c28Smrg [define([AC_PROG_CC], 11163ec713c28Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 111641d54945dSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 11165ec713c28Smrg [_AM_DEPENDENCIES(CXX)], 11166ec713c28Smrg [define([AC_PROG_CXX], 11167ec713c28Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 11168ba85709eSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 11169ec713c28Smrg [_AM_DEPENDENCIES(OBJC)], 11170ec713c28Smrg [define([AC_PROG_OBJC], 11171ec713c28Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 111721d54945dSmrg]) 11173ec713c28Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 11174ec713c28Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 11175ec713c28Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 11176ec713c28Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 11177ec713c28SmrgAC_CONFIG_COMMANDS_PRE(dnl 11178ec713c28Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 11179ec713c28Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 111801d54945dSmrg]) 111811d54945dSmrg 11182ec713c28Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11183ec713c28Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11184ec713c28Smrgdnl mangled by Autoconf and run in a shell conditional statement. 11185ec713c28Smrgm4_define([_AC_COMPILER_EXEEXT], 11186ec713c28Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11187ec713c28Smrg 111881d54945dSmrg 111891d54945dSmrg# When config.status generates a header, we must update the stamp-h file. 111901d54945dSmrg# This file resides in the same directory as the config header 111911d54945dSmrg# that is generated. The stamp files are numbered to have different names. 111921d54945dSmrg 111931d54945dSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 111941d54945dSmrg# loop where config.status creates the headers, so we can generate 111951d54945dSmrg# our stamp files there. 111961d54945dSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 111971d54945dSmrg[# Compute $1's index in $config_headers. 11198ba85709eSmrg_am_arg=$1 111991d54945dSmrg_am_stamp_count=1 112001d54945dSmrgfor _am_header in $config_headers :; do 112011d54945dSmrg case $_am_header in 11202ba85709eSmrg $_am_arg | $_am_arg:* ) 112031d54945dSmrg break ;; 112041d54945dSmrg * ) 112051d54945dSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 112061d54945dSmrg esac 112071d54945dSmrgdone 11208ba85709eSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 112091d54945dSmrg 11210d769e936Smrg# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, 11211d769e936Smrg# Inc. 112121d54945dSmrg# 112131d54945dSmrg# This file is free software; the Free Software Foundation 112141d54945dSmrg# gives unlimited permission to copy and/or distribute it, 112151d54945dSmrg# with or without modifications, as long as this notice is preserved. 112161d54945dSmrg 11217d769e936Smrg# serial 1 11218d769e936Smrg 112191d54945dSmrg# AM_PROG_INSTALL_SH 112201d54945dSmrg# ------------------ 112211d54945dSmrg# Define $install_sh. 112221d54945dSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 112231d54945dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11224ec713c28Smrgif test x"${install_sh}" != xset; then 11225ec713c28Smrg case $am_aux_dir in 11226ec713c28Smrg *\ * | *\ *) 11227ec713c28Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11228ec713c28Smrg *) 11229ec713c28Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 11230ec713c28Smrg esac 11231ec713c28Smrgfi 112321d54945dSmrgAC_SUBST(install_sh)]) 112331d54945dSmrg 112341d54945dSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 112351d54945dSmrg# 112361d54945dSmrg# This file is free software; the Free Software Foundation 112371d54945dSmrg# gives unlimited permission to copy and/or distribute it, 112381d54945dSmrg# with or without modifications, as long as this notice is preserved. 112391d54945dSmrg 112401d54945dSmrg# serial 2 112411d54945dSmrg 112421d54945dSmrg# Check whether the underlying file-system supports filenames 112431d54945dSmrg# with a leading dot. For instance MS-DOS doesn't. 112441d54945dSmrgAC_DEFUN([AM_SET_LEADING_DOT], 112451d54945dSmrg[rm -rf .tst 2>/dev/null 112461d54945dSmrgmkdir .tst 2>/dev/null 112471d54945dSmrgif test -d .tst; then 112481d54945dSmrg am__leading_dot=. 112491d54945dSmrgelse 112501d54945dSmrg am__leading_dot=_ 112511d54945dSmrgfi 112521d54945dSmrgrmdir .tst 2>/dev/null 112531d54945dSmrgAC_SUBST([am__leading_dot])]) 112541d54945dSmrg 112551d54945dSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 112561d54945dSmrg# From Jim Meyering 112571d54945dSmrg 11258d769e936Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 11259d769e936Smrg# 2011 Free Software Foundation, Inc. 112601d54945dSmrg# 112611d54945dSmrg# This file is free software; the Free Software Foundation 112621d54945dSmrg# gives unlimited permission to copy and/or distribute it, 112631d54945dSmrg# with or without modifications, as long as this notice is preserved. 112641d54945dSmrg 11265ec713c28Smrg# serial 5 112661d54945dSmrg 11267ec713c28Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 11268ec713c28Smrg# ---------------------------------- 11269ec713c28Smrg# Control maintainer-specific portions of Makefiles. 11270ec713c28Smrg# Default is to disable them, unless `enable' is passed literally. 11271ec713c28Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 11272ec713c28Smrg# can override the default with the --enable/--disable switch. 112731d54945dSmrgAC_DEFUN([AM_MAINTAINER_MODE], 11274ec713c28Smrg[m4_case(m4_default([$1], [disable]), 11275ec713c28Smrg [enable], [m4_define([am_maintainer_other], [disable])], 11276ec713c28Smrg [disable], [m4_define([am_maintainer_other], [enable])], 11277ec713c28Smrg [m4_define([am_maintainer_other], [enable]) 11278ec713c28Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 11279d769e936SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 11280ec713c28Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 11281ec713c28Smrg AC_ARG_ENABLE([maintainer-mode], 11282ec713c28Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 112831d54945dSmrg (and sometimes confusing) to the casual installer], 11284ec713c28Smrg [USE_MAINTAINER_MODE=$enableval], 11285ec713c28Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 112861d54945dSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 11287ec713c28Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 112881d54945dSmrg MAINT=$MAINTAINER_MODE_TRUE 11289ec713c28Smrg AC_SUBST([MAINT])dnl 112901d54945dSmrg] 112911d54945dSmrg) 112921d54945dSmrg 112931d54945dSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 112941d54945dSmrg 112951d54945dSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 112961d54945dSmrg 11297ec713c28Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 112981d54945dSmrg# 112991d54945dSmrg# This file is free software; the Free Software Foundation 113001d54945dSmrg# gives unlimited permission to copy and/or distribute it, 113011d54945dSmrg# with or without modifications, as long as this notice is preserved. 113021d54945dSmrg 11303ec713c28Smrg# serial 4 113041d54945dSmrg 113051d54945dSmrg# AM_MAKE_INCLUDE() 113061d54945dSmrg# ----------------- 113071d54945dSmrg# Check to see how make treats includes. 113081d54945dSmrgAC_DEFUN([AM_MAKE_INCLUDE], 113091d54945dSmrg[am_make=${MAKE-make} 113101d54945dSmrgcat > confinc << 'END' 113111d54945dSmrgam__doit: 11312ec713c28Smrg @echo this is the am__doit target 113131d54945dSmrg.PHONY: am__doit 113141d54945dSmrgEND 113151d54945dSmrg# If we don't find an include directive, just comment out the code. 113161d54945dSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 113171d54945dSmrgam__include="#" 113181d54945dSmrgam__quote= 113191d54945dSmrg_am_result=none 113201d54945dSmrg# First try GNU make style include. 113211d54945dSmrgecho "include confinc" > confmf 11322ec713c28Smrg# Ignore all kinds of additional output from `make'. 11323ec713c28Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 11324ec713c28Smrg*the\ am__doit\ target*) 11325ec713c28Smrg am__include=include 11326ec713c28Smrg am__quote= 11327ec713c28Smrg _am_result=GNU 11328ec713c28Smrg ;; 11329ec713c28Smrgesac 113301d54945dSmrg# Now try BSD make style include. 113311d54945dSmrgif test "$am__include" = "#"; then 113321d54945dSmrg echo '.include "confinc"' > confmf 11333ec713c28Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 11334ec713c28Smrg *the\ am__doit\ target*) 11335ec713c28Smrg am__include=.include 11336ec713c28Smrg am__quote="\"" 11337ec713c28Smrg _am_result=BSD 11338ec713c28Smrg ;; 11339ec713c28Smrg esac 113401d54945dSmrgfi 113411d54945dSmrgAC_SUBST([am__include]) 113421d54945dSmrgAC_SUBST([am__quote]) 113431d54945dSmrgAC_MSG_RESULT([$_am_result]) 113441d54945dSmrgrm -f confinc confmf 113451d54945dSmrg]) 113461d54945dSmrg 113471d54945dSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 113481d54945dSmrg 11349ec713c28Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 113501d54945dSmrg# Free Software Foundation, Inc. 113511d54945dSmrg# 113521d54945dSmrg# This file is free software; the Free Software Foundation 113531d54945dSmrg# gives unlimited permission to copy and/or distribute it, 113541d54945dSmrg# with or without modifications, as long as this notice is preserved. 113551d54945dSmrg 11356ec713c28Smrg# serial 6 113571d54945dSmrg 113581d54945dSmrg# AM_MISSING_PROG(NAME, PROGRAM) 113591d54945dSmrg# ------------------------------ 113601d54945dSmrgAC_DEFUN([AM_MISSING_PROG], 113611d54945dSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 113621d54945dSmrg$1=${$1-"${am_missing_run}$2"} 113631d54945dSmrgAC_SUBST($1)]) 113641d54945dSmrg 113651d54945dSmrg 113661d54945dSmrg# AM_MISSING_HAS_RUN 113671d54945dSmrg# ------------------ 113681d54945dSmrg# Define MISSING if not defined so far and test if it supports --run. 113691d54945dSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 113701d54945dSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 113711d54945dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11372ba85709eSmrgAC_REQUIRE_AUX_FILE([missing])dnl 11373ec713c28Smrgif test x"${MISSING+set}" != xset; then 11374ec713c28Smrg case $am_aux_dir in 11375ec713c28Smrg *\ * | *\ *) 11376ec713c28Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 11377ec713c28Smrg *) 11378ec713c28Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 11379ec713c28Smrg esac 11380ec713c28Smrgfi 113811d54945dSmrg# Use eval to expand $SHELL 113821d54945dSmrgif eval "$MISSING --run true"; then 113831d54945dSmrg am_missing_run="$MISSING --run " 113841d54945dSmrgelse 113851d54945dSmrg am_missing_run= 113861d54945dSmrg AC_MSG_WARN([`missing' script is too old or missing]) 113871d54945dSmrgfi 113881d54945dSmrg]) 113891d54945dSmrg 11390d769e936Smrg# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, 11391d769e936Smrg# Inc. 113921d54945dSmrg# 113931d54945dSmrg# This file is free software; the Free Software Foundation 113941d54945dSmrg# gives unlimited permission to copy and/or distribute it, 113951d54945dSmrg# with or without modifications, as long as this notice is preserved. 113961d54945dSmrg 11397d769e936Smrg# serial 1 11398d769e936Smrg 113991d54945dSmrg# AM_PROG_MKDIR_P 114001d54945dSmrg# --------------- 11401ba85709eSmrg# Check for `mkdir -p'. 114021d54945dSmrgAC_DEFUN([AM_PROG_MKDIR_P], 11403ba85709eSmrg[AC_PREREQ([2.60])dnl 11404ba85709eSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 11405ba85709eSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 11406ba85709eSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 11407ba85709eSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 11408ba85709eSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 11409ba85709eSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 11410ba85709eSmrgdnl adjustment using top_builddir (which is defined more often than 11411ba85709eSmrgdnl MKDIR_P). 11412ba85709eSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 11413ba85709eSmrgcase $mkdir_p in 11414ba85709eSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 11415ba85709eSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 11416ba85709eSmrgesac 11417ba85709eSmrg]) 114181d54945dSmrg 114191d54945dSmrg# Helper functions for option handling. -*- Autoconf -*- 114201d54945dSmrg 11421d769e936Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software 11422d769e936Smrg# Foundation, Inc. 114231d54945dSmrg# 114241d54945dSmrg# This file is free software; the Free Software Foundation 114251d54945dSmrg# gives unlimited permission to copy and/or distribute it, 114261d54945dSmrg# with or without modifications, as long as this notice is preserved. 114271d54945dSmrg 11428d769e936Smrg# serial 5 114291d54945dSmrg 114301d54945dSmrg# _AM_MANGLE_OPTION(NAME) 114311d54945dSmrg# ----------------------- 114321d54945dSmrgAC_DEFUN([_AM_MANGLE_OPTION], 114331d54945dSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 114341d54945dSmrg 114351d54945dSmrg# _AM_SET_OPTION(NAME) 11436d769e936Smrg# -------------------- 114371d54945dSmrg# Set option NAME. Presently that only means defining a flag for this option. 114381d54945dSmrgAC_DEFUN([_AM_SET_OPTION], 114391d54945dSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 114401d54945dSmrg 114411d54945dSmrg# _AM_SET_OPTIONS(OPTIONS) 11442d769e936Smrg# ------------------------ 114431d54945dSmrg# OPTIONS is a space-separated list of Automake options. 114441d54945dSmrgAC_DEFUN([_AM_SET_OPTIONS], 11445786a6f21Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 114461d54945dSmrg 114471d54945dSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 114481d54945dSmrg# ------------------------------------------- 114491d54945dSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 114501d54945dSmrgAC_DEFUN([_AM_IF_OPTION], 114511d54945dSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 114521d54945dSmrg 114531d54945dSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 114541d54945dSmrg 11455ec713c28Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 114561d54945dSmrg# Free Software Foundation, Inc. 114571d54945dSmrg# 114581d54945dSmrg# This file is free software; the Free Software Foundation 114591d54945dSmrg# gives unlimited permission to copy and/or distribute it, 114601d54945dSmrg# with or without modifications, as long as this notice is preserved. 114611d54945dSmrg 11462ec713c28Smrg# serial 5 114631d54945dSmrg 114641d54945dSmrg# AM_SANITY_CHECK 114651d54945dSmrg# --------------- 114661d54945dSmrgAC_DEFUN([AM_SANITY_CHECK], 114671d54945dSmrg[AC_MSG_CHECKING([whether build environment is sane]) 114681d54945dSmrg# Just in case 114691d54945dSmrgsleep 1 114701d54945dSmrgecho timestamp > conftest.file 11471ec713c28Smrg# Reject unsafe characters in $srcdir or the absolute working directory 11472ec713c28Smrg# name. Accept space and tab only in the latter. 11473ec713c28Smrgam_lf=' 11474ec713c28Smrg' 11475ec713c28Smrgcase `pwd` in 11476ec713c28Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 11477ec713c28Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 11478ec713c28Smrgesac 11479ec713c28Smrgcase $srcdir in 11480ec713c28Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 11481ec713c28Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 11482ec713c28Smrgesac 11483ec713c28Smrg 114841d54945dSmrg# Do `set' in a subshell so we don't clobber the current shell's 114851d54945dSmrg# arguments. Must try -L first in case configure is actually a 114861d54945dSmrg# symlink; some systems play weird games with the mod time of symlinks 114871d54945dSmrg# (eg FreeBSD returns the mod time of the symlink's containing 114881d54945dSmrg# directory). 114891d54945dSmrgif ( 11490ec713c28Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 114911d54945dSmrg if test "$[*]" = "X"; then 114921d54945dSmrg # -L didn't work. 11493ec713c28Smrg set X `ls -t "$srcdir/configure" conftest.file` 114941d54945dSmrg fi 114951d54945dSmrg rm -f conftest.file 114961d54945dSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 114971d54945dSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 114981d54945dSmrg 114991d54945dSmrg # If neither matched, then we have a broken ls. This can happen 115001d54945dSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 115011d54945dSmrg # broken ls alias from the environment. This has actually 115021d54945dSmrg # happened. Such a system could not be considered "sane". 115031d54945dSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 115041d54945dSmrgalias in your environment]) 115051d54945dSmrg fi 115061d54945dSmrg 115071d54945dSmrg test "$[2]" = conftest.file 115081d54945dSmrg ) 115091d54945dSmrgthen 115101d54945dSmrg # Ok. 115111d54945dSmrg : 115121d54945dSmrgelse 115131d54945dSmrg AC_MSG_ERROR([newly created file is older than distributed files! 115141d54945dSmrgCheck your system clock]) 115151d54945dSmrgfi 115161d54945dSmrgAC_MSG_RESULT(yes)]) 115171d54945dSmrg 11518d769e936Smrg# Copyright (C) 2009, 2011 Free Software Foundation, Inc. 11519d769e936Smrg# 11520d769e936Smrg# This file is free software; the Free Software Foundation 11521d769e936Smrg# gives unlimited permission to copy and/or distribute it, 11522d769e936Smrg# with or without modifications, as long as this notice is preserved. 11523d769e936Smrg 11524d769e936Smrg# serial 2 11525d769e936Smrg 11526d769e936Smrg# AM_SILENT_RULES([DEFAULT]) 11527d769e936Smrg# -------------------------- 11528d769e936Smrg# Enable less verbose build rules; with the default set to DEFAULT 11529d769e936Smrg# (`yes' being less verbose, `no' or empty being verbose). 11530d769e936SmrgAC_DEFUN([AM_SILENT_RULES], 11531d769e936Smrg[AC_ARG_ENABLE([silent-rules], 11532d769e936Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 11533d769e936Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 11534d769e936Smrgcase $enable_silent_rules in 11535d769e936Smrgyes) AM_DEFAULT_VERBOSITY=0;; 11536d769e936Smrgno) AM_DEFAULT_VERBOSITY=1;; 11537d769e936Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 11538d769e936Smrgesac 11539d769e936Smrgdnl 11540d769e936Smrgdnl A few `make' implementations (e.g., NonStop OS and NextStep) 11541d769e936Smrgdnl do not support nested variable expansions. 11542d769e936Smrgdnl See automake bug#9928 and bug#10237. 11543d769e936Smrgam_make=${MAKE-make} 11544d769e936SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 11545d769e936Smrg [am_cv_make_support_nested_variables], 11546d769e936Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 11547d769e936SmrgBAR0=false 11548d769e936SmrgBAR1=true 11549d769e936SmrgV=1 11550d769e936Smrgam__doit: 11551d769e936Smrg @$(TRUE) 11552d769e936Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 11553d769e936Smrg am_cv_make_support_nested_variables=yes 11554d769e936Smrgelse 11555d769e936Smrg am_cv_make_support_nested_variables=no 11556d769e936Smrgfi]) 11557d769e936Smrgif test $am_cv_make_support_nested_variables = yes; then 11558d769e936Smrg dnl Using `$V' instead of `$(V)' breaks IRIX make. 11559d769e936Smrg AM_V='$(V)' 11560d769e936Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 11561d769e936Smrgelse 11562d769e936Smrg AM_V=$AM_DEFAULT_VERBOSITY 11563d769e936Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 11564d769e936Smrgfi 11565d769e936SmrgAC_SUBST([AM_V])dnl 11566d769e936SmrgAM_SUBST_NOTMAKE([AM_V])dnl 11567d769e936SmrgAC_SUBST([AM_DEFAULT_V])dnl 11568d769e936SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 11569d769e936SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 11570d769e936SmrgAM_BACKSLASH='\' 11571d769e936SmrgAC_SUBST([AM_BACKSLASH])dnl 11572d769e936Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 11573d769e936Smrg]) 11574d769e936Smrg 11575d769e936Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 115761d54945dSmrg# 115771d54945dSmrg# This file is free software; the Free Software Foundation 115781d54945dSmrg# gives unlimited permission to copy and/or distribute it, 115791d54945dSmrg# with or without modifications, as long as this notice is preserved. 115801d54945dSmrg 11581d769e936Smrg# serial 1 11582d769e936Smrg 115831d54945dSmrg# AM_PROG_INSTALL_STRIP 115841d54945dSmrg# --------------------- 115851d54945dSmrg# One issue with vendor `install' (even GNU) is that you can't 115861d54945dSmrg# specify the program used to strip binaries. This is especially 115871d54945dSmrg# annoying in cross-compiling environments, where the build's strip 115881d54945dSmrg# is unlikely to handle the host's binaries. 115891d54945dSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 115901d54945dSmrg# always use install-sh in `make install-strip', and initialize 115911d54945dSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 115921d54945dSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 115931d54945dSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 115941d54945dSmrg# Installed binaries are usually stripped using `strip' when the user 115951d54945dSmrg# run `make install-strip'. However `strip' might not be the right 115961d54945dSmrg# tool to use in cross-compilation environments, therefore Automake 115971d54945dSmrg# will honor the `STRIP' environment variable to overrule this program. 115981d54945dSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 115991d54945dSmrgif test "$cross_compiling" != no; then 116001d54945dSmrg AC_CHECK_TOOL([STRIP], [strip], :) 116011d54945dSmrgfi 11602ba85709eSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 116031d54945dSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 116041d54945dSmrg 11605d769e936Smrg# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. 11606ba85709eSmrg# 11607ba85709eSmrg# This file is free software; the Free Software Foundation 11608ba85709eSmrg# gives unlimited permission to copy and/or distribute it, 11609ba85709eSmrg# with or without modifications, as long as this notice is preserved. 11610ba85709eSmrg 11611d769e936Smrg# serial 3 11612ec713c28Smrg 11613ba85709eSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 11614ba85709eSmrg# --------------------------- 11615ba85709eSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 11616ba85709eSmrg# This macro is traced by Automake. 11617ba85709eSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 11618ba85709eSmrg 11619ec713c28Smrg# AM_SUBST_NOTMAKE(VARIABLE) 11620d769e936Smrg# -------------------------- 11621ec713c28Smrg# Public sister of _AM_SUBST_NOTMAKE. 11622ec713c28SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 11623ec713c28Smrg 116241d54945dSmrg# Check how to create a tarball. -*- Autoconf -*- 116251d54945dSmrg 11626d769e936Smrg# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. 116271d54945dSmrg# 116281d54945dSmrg# This file is free software; the Free Software Foundation 116291d54945dSmrg# gives unlimited permission to copy and/or distribute it, 116301d54945dSmrg# with or without modifications, as long as this notice is preserved. 116311d54945dSmrg 116321d54945dSmrg# serial 2 116331d54945dSmrg 116341d54945dSmrg# _AM_PROG_TAR(FORMAT) 116351d54945dSmrg# -------------------- 116361d54945dSmrg# Check how to create a tarball in format FORMAT. 116371d54945dSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 116381d54945dSmrg# 116391d54945dSmrg# Substitute a variable $(am__tar) that is a command 116401d54945dSmrg# writing to stdout a FORMAT-tarball containing the directory 116411d54945dSmrg# $tardir. 116421d54945dSmrg# tardir=directory && $(am__tar) > result.tar 116431d54945dSmrg# 116441d54945dSmrg# Substitute a variable $(am__untar) that extract such 116451d54945dSmrg# a tarball read from stdin. 116461d54945dSmrg# $(am__untar) < result.tar 116471d54945dSmrgAC_DEFUN([_AM_PROG_TAR], 11648d769e936Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 11649d769e936Smrg# in the wild :-( We should find a proper way to deprecate it ... 11650d769e936SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 116511d54945dSmrgm4_if([$1], [v7], 11652d769e936Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 116531d54945dSmrg [m4_case([$1], [ustar],, [pax],, 116541d54945dSmrg [m4_fatal([Unknown tar format])]) 116551d54945dSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 116561d54945dSmrg# Loop over all known methods to create a tar archive until one works. 116571d54945dSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 116581d54945dSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 116591d54945dSmrg# Do not fold the above two line into one, because Tru64 sh and 116601d54945dSmrg# Solaris sh will not grok spaces in the rhs of `-'. 116611d54945dSmrgfor _am_tool in $_am_tools 116621d54945dSmrgdo 116631d54945dSmrg case $_am_tool in 116641d54945dSmrg gnutar) 116651d54945dSmrg for _am_tar in tar gnutar gtar; 116661d54945dSmrg do 116671d54945dSmrg AM_RUN_LOG([$_am_tar --version]) && break 116681d54945dSmrg done 116691d54945dSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 116701d54945dSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 116711d54945dSmrg am__untar="$_am_tar -xf -" 116721d54945dSmrg ;; 116731d54945dSmrg plaintar) 116741d54945dSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 116751d54945dSmrg # ustar tarball either. 116761d54945dSmrg (tar --version) >/dev/null 2>&1 && continue 116771d54945dSmrg am__tar='tar chf - "$$tardir"' 116781d54945dSmrg am__tar_='tar chf - "$tardir"' 116791d54945dSmrg am__untar='tar xf -' 116801d54945dSmrg ;; 116811d54945dSmrg pax) 116821d54945dSmrg am__tar='pax -L -x $1 -w "$$tardir"' 116831d54945dSmrg am__tar_='pax -L -x $1 -w "$tardir"' 116841d54945dSmrg am__untar='pax -r' 116851d54945dSmrg ;; 116861d54945dSmrg cpio) 116871d54945dSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 116881d54945dSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 116891d54945dSmrg am__untar='cpio -i -H $1 -d' 116901d54945dSmrg ;; 116911d54945dSmrg none) 116921d54945dSmrg am__tar=false 116931d54945dSmrg am__tar_=false 116941d54945dSmrg am__untar=false 116951d54945dSmrg ;; 116961d54945dSmrg esac 116971d54945dSmrg 116981d54945dSmrg # If the value was cached, stop now. We just wanted to have am__tar 116991d54945dSmrg # and am__untar set. 117001d54945dSmrg test -n "${am_cv_prog_tar_$1}" && break 117011d54945dSmrg 117021d54945dSmrg # tar/untar a dummy directory, and stop if the command works 117031d54945dSmrg rm -rf conftest.dir 117041d54945dSmrg mkdir conftest.dir 117051d54945dSmrg echo GrepMe > conftest.dir/file 117061d54945dSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 117071d54945dSmrg rm -rf conftest.dir 117081d54945dSmrg if test -s conftest.tar; then 117091d54945dSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 117101d54945dSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 117111d54945dSmrg fi 117121d54945dSmrgdone 117131d54945dSmrgrm -rf conftest.dir 117141d54945dSmrg 117151d54945dSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 117161d54945dSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 117171d54945dSmrgAC_SUBST([am__tar]) 117181d54945dSmrgAC_SUBST([am__untar]) 117191d54945dSmrg]) # _AM_PROG_TAR 117201d54945dSmrg 11721