aclocal.m4 revision 414bd68f
1414bd68fSmrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 23e72ca8cSmrg 3414bd68fSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 4ee3138f1Smrg 5ee3138f1Smrg# This file is free software; the Free Software Foundation 6ee3138f1Smrg# gives unlimited permission to copy and/or distribute it, 7ee3138f1Smrg# with or without modifications, as long as this notice is preserved. 8ee3138f1Smrg 9ee3138f1Smrg# This program is distributed in the hope that it will be useful, 10ee3138f1Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11ee3138f1Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12ee3138f1Smrg# PARTICULAR PURPOSE. 13ee3138f1Smrg 1426b1ff4eSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15ee3138f1Smrgm4_ifndef([AC_AUTOCONF_VERSION], 16ee3138f1Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 173e72ca8cSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 183e72ca8cSmrg[m4_warning([this file was generated for autoconf 2.69. 19ee3138f1SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20ee3138f1SmrgIf you have problems, you may need to regenerate the build system entirely. 213e72ca8cSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22ee3138f1Smrg 23414bd68fSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2434977a2fSmrg# 25414bd68fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 26414bd68fSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 27414bd68fSmrg# Foundation, Inc. 28414bd68fSmrg# Written by Gordon Matzigkeit, 1996 2934977a2fSmrg# 30414bd68fSmrg# This file is free software; the Free Software Foundation gives 31414bd68fSmrg# unlimited permission to copy and/or distribute it, with or without 32414bd68fSmrg# modifications, as long as this notice is preserved. 3334977a2fSmrg 34414bd68fSmrgm4_define([_LT_COPYING], [dnl 35414bd68fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 36414bd68fSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 37414bd68fSmrg# Foundation, Inc. 38414bd68fSmrg# Written by Gordon Matzigkeit, 1996 3934977a2fSmrg# 40414bd68fSmrg# This file is part of GNU Libtool. 4134977a2fSmrg# 42414bd68fSmrg# GNU Libtool is free software; you can redistribute it and/or 43414bd68fSmrg# modify it under the terms of the GNU General Public License as 44414bd68fSmrg# published by the Free Software Foundation; either version 2 of 45414bd68fSmrg# the License, or (at your option) any later version. 4634977a2fSmrg# 47414bd68fSmrg# As a special exception to the GNU General Public License, 48414bd68fSmrg# if you distribute this file as part of a program or library that 49414bd68fSmrg# is built using GNU Libtool, you may include this file under the 50414bd68fSmrg# same distribution terms that you use for the rest of that program. 5134977a2fSmrg# 52414bd68fSmrg# GNU Libtool is distributed in the hope that it will be useful, 53414bd68fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 54414bd68fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 55414bd68fSmrg# GNU General Public License for more details. 5634977a2fSmrg# 57414bd68fSmrg# You should have received a copy of the GNU General Public License 58414bd68fSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 59414bd68fSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 60414bd68fSmrg# obtained by writing to the Free Software Foundation, Inc., 61414bd68fSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 62414bd68fSmrg]) 63ee3138f1Smrg 64414bd68fSmrg# serial 57 LT_INIT 65414bd68fSmrg 66414bd68fSmrg 67414bd68fSmrg# LT_PREREQ(VERSION) 68414bd68fSmrg# ------------------ 69414bd68fSmrg# Complain and exit if this libtool version is less that VERSION. 70414bd68fSmrgm4_defun([LT_PREREQ], 71414bd68fSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 72414bd68fSmrg [m4_default([$3], 73414bd68fSmrg [m4_fatal([Libtool version $1 or higher is required], 74414bd68fSmrg 63)])], 75414bd68fSmrg [$2])]) 76414bd68fSmrg 77414bd68fSmrg 78414bd68fSmrg# _LT_CHECK_BUILDDIR 79414bd68fSmrg# ------------------ 80414bd68fSmrg# Complain if the absolute build directory name contains unusual characters 81414bd68fSmrgm4_defun([_LT_CHECK_BUILDDIR], 82414bd68fSmrg[case `pwd` in 83414bd68fSmrg *\ * | *\ *) 84414bd68fSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 85414bd68fSmrgesac 86a1ed278cSmrg]) 8734977a2fSmrg 8834977a2fSmrg 89414bd68fSmrg# LT_INIT([OPTIONS]) 90414bd68fSmrg# ------------------ 91414bd68fSmrgAC_DEFUN([LT_INIT], 92414bd68fSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 93414bd68fSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 94414bd68fSmrgAC_BEFORE([$0], [LT_LANG])dnl 95414bd68fSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 96414bd68fSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 97414bd68fSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 9834977a2fSmrg 99414bd68fSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 100414bd68fSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 101414bd68fSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 102414bd68fSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 103414bd68fSmrgdnl unless we require an AC_DEFUNed macro: 104414bd68fSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 105414bd68fSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 106414bd68fSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 107414bd68fSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 108414bd68fSmrgm4_require([_LT_PROG_LTMAIN])dnl 10934977a2fSmrg 110414bd68fSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 11134977a2fSmrg 112414bd68fSmrgdnl Parse OPTIONS 113414bd68fSmrg_LT_SET_OPTIONS([$0], [$1]) 114ee3138f1Smrg 115414bd68fSmrg# This can be used to rebuild libtool when needed 116414bd68fSmrgLIBTOOL_DEPS="$ltmain" 117ee3138f1Smrg 118414bd68fSmrg# Always use our own libtool. 119414bd68fSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 120414bd68fSmrgAC_SUBST(LIBTOOL)dnl 121ee3138f1Smrg 122414bd68fSmrg_LT_SETUP 12379a8a9c6Smrg 124414bd68fSmrg# Only expand once: 125414bd68fSmrgm4_define([LT_INIT]) 126414bd68fSmrg])# LT_INIT 127ee3138f1Smrg 128414bd68fSmrg# Old names: 129414bd68fSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 130414bd68fSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 131414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 132414bd68fSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 133414bd68fSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 134ee3138f1Smrg 135ee3138f1Smrg 136414bd68fSmrg# _LT_CC_BASENAME(CC) 137414bd68fSmrg# ------------------- 138414bd68fSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 139414bd68fSmrgm4_defun([_LT_CC_BASENAME], 140414bd68fSmrg[for cc_temp in $1""; do 141414bd68fSmrg case $cc_temp in 142414bd68fSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 143414bd68fSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 144414bd68fSmrg \-*) ;; 145414bd68fSmrg *) break;; 146414bd68fSmrg esac 147414bd68fSmrgdone 148414bd68fSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 149414bd68fSmrg]) 15034977a2fSmrg 15134977a2fSmrg 152414bd68fSmrg# _LT_FILEUTILS_DEFAULTS 153414bd68fSmrg# ---------------------- 154414bd68fSmrg# It is okay to use these file commands and assume they have been set 155414bd68fSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 156414bd68fSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 157414bd68fSmrg[: ${CP="cp -f"} 158414bd68fSmrg: ${MV="mv -f"} 159414bd68fSmrg: ${RM="rm -f"} 160414bd68fSmrg])# _LT_FILEUTILS_DEFAULTS 16134977a2fSmrg 16234977a2fSmrg 163414bd68fSmrg# _LT_SETUP 164414bd68fSmrg# --------- 165414bd68fSmrgm4_defun([_LT_SETUP], 166414bd68fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 167414bd68fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 168414bd68fSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 169414bd68fSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 17034977a2fSmrg 171414bd68fSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 172414bd68fSmrgdnl 173414bd68fSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 174414bd68fSmrg_LT_DECL([], [host], [0])dnl 175414bd68fSmrg_LT_DECL([], [host_os], [0])dnl 176414bd68fSmrgdnl 177414bd68fSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 178414bd68fSmrg_LT_DECL([], [build], [0])dnl 179414bd68fSmrg_LT_DECL([], [build_os], [0])dnl 180414bd68fSmrgdnl 181414bd68fSmrgAC_REQUIRE([AC_PROG_CC])dnl 182414bd68fSmrgAC_REQUIRE([LT_PATH_LD])dnl 183414bd68fSmrgAC_REQUIRE([LT_PATH_NM])dnl 184414bd68fSmrgdnl 185414bd68fSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 186414bd68fSmrgtest -z "$LN_S" && LN_S="ln -s" 187414bd68fSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 188414bd68fSmrgdnl 189414bd68fSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 190414bd68fSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 191414bd68fSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 192414bd68fSmrgdnl 193414bd68fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 194414bd68fSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 195414bd68fSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 196414bd68fSmrgm4_require([_LT_CMD_RELOAD])dnl 197414bd68fSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 198414bd68fSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 199414bd68fSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 200414bd68fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 201414bd68fSmrgm4_require([_LT_WITH_SYSROOT])dnl 20234977a2fSmrg 203414bd68fSmrg_LT_CONFIG_LIBTOOL_INIT([ 204414bd68fSmrg# See if we are running on zsh, and set the options which allow our 205414bd68fSmrg# commands through without removal of \ escapes INIT. 206414bd68fSmrgif test -n "\${ZSH_VERSION+set}" ; then 207414bd68fSmrg setopt NO_GLOB_SUBST 2083e72ca8cSmrgfi 2093e72ca8cSmrg]) 210414bd68fSmrgif test -n "${ZSH_VERSION+set}" ; then 211414bd68fSmrg setopt NO_GLOB_SUBST 212414bd68fSmrgfi 21334977a2fSmrg 214414bd68fSmrg_LT_CHECK_OBJDIR 21534977a2fSmrg 216414bd68fSmrgm4_require([_LT_TAG_COMPILER])dnl 21734977a2fSmrg 218414bd68fSmrgcase $host_os in 219414bd68fSmrgaix3*) 220414bd68fSmrg # AIX sometimes has problems with the GCC collect2 program. For some 221414bd68fSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 222414bd68fSmrg # vanish in a puff of smoke. 223414bd68fSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 224414bd68fSmrg COLLECT_NAMES= 225414bd68fSmrg export COLLECT_NAMES 226414bd68fSmrg fi 227414bd68fSmrg ;; 228414bd68fSmrgesac 22934977a2fSmrg 230414bd68fSmrg# Global variables: 231414bd68fSmrgofile=libtool 232414bd68fSmrgcan_build_shared=yes 233a1ed278cSmrg 234414bd68fSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 235414bd68fSmrg# which needs '.lib'). 236414bd68fSmrglibext=a 237a1ed278cSmrg 238414bd68fSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 239a1ed278cSmrg 240414bd68fSmrgold_CC="$CC" 241414bd68fSmrgold_CFLAGS="$CFLAGS" 242a1ed278cSmrg 243414bd68fSmrg# Set sane defaults for various variables 244414bd68fSmrgtest -z "$CC" && CC=cc 245414bd68fSmrgtest -z "$LTCC" && LTCC=$CC 246414bd68fSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 247414bd68fSmrgtest -z "$LD" && LD=ld 248414bd68fSmrgtest -z "$ac_objext" && ac_objext=o 24934977a2fSmrg 250414bd68fSmrg_LT_CC_BASENAME([$compiler]) 25134977a2fSmrg 252414bd68fSmrg# Only perform the check for file, if the check method requires it 253414bd68fSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 254414bd68fSmrgcase $deplibs_check_method in 255414bd68fSmrgfile_magic*) 256414bd68fSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 257414bd68fSmrg _LT_PATH_MAGIC 2583e72ca8cSmrg fi 259414bd68fSmrg ;; 260414bd68fSmrgesac 26134977a2fSmrg 262414bd68fSmrg# Use C for the default configuration in the libtool script 263414bd68fSmrgLT_SUPPORTED_TAG([CC]) 264414bd68fSmrg_LT_LANG_C_CONFIG 265414bd68fSmrg_LT_LANG_DEFAULT_CONFIG 266414bd68fSmrg_LT_CONFIG_COMMANDS 267414bd68fSmrg])# _LT_SETUP 26834977a2fSmrg 26934977a2fSmrg 270414bd68fSmrg# _LT_PREPARE_SED_QUOTE_VARS 271414bd68fSmrg# -------------------------- 272414bd68fSmrg# Define a few sed substitution that help us do robust quoting. 273414bd68fSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 274414bd68fSmrg[# Backslashify metacharacters that are still active within 275414bd68fSmrg# double-quoted strings. 276414bd68fSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 27734977a2fSmrg 278414bd68fSmrg# Same as above, but do not quote variable references. 279414bd68fSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 280414bd68fSmrg 281414bd68fSmrg# Sed substitution to delay expansion of an escaped shell variable in a 282414bd68fSmrg# double_quote_subst'ed string. 283414bd68fSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 284414bd68fSmrg 285414bd68fSmrg# Sed substitution to delay expansion of an escaped single quote. 286414bd68fSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 287414bd68fSmrg 288414bd68fSmrg# Sed substitution to avoid accidental globbing in evaled expressions 289414bd68fSmrgno_glob_subst='s/\*/\\\*/g' 290a1ed278cSmrg]) 29134977a2fSmrg 292414bd68fSmrg# _LT_PROG_LTMAIN 293414bd68fSmrg# --------------- 294414bd68fSmrg# Note that this code is called both from `configure', and `config.status' 295414bd68fSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 296414bd68fSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 297414bd68fSmrg# so we pass a copy along to make sure it has a sensible value anyway. 298414bd68fSmrgm4_defun([_LT_PROG_LTMAIN], 299414bd68fSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 300414bd68fSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 301414bd68fSmrgltmain="$ac_aux_dir/ltmain.sh" 302414bd68fSmrg])# _LT_PROG_LTMAIN 30334977a2fSmrg 30434977a2fSmrg 305ee3138f1Smrg 306414bd68fSmrg# So that we can recreate a full libtool script including additional 307414bd68fSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 308414bd68fSmrg# in macros and then make a single call at the end using the `libtool' 309414bd68fSmrg# label. 310ee3138f1Smrg 31134977a2fSmrg 312414bd68fSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 313414bd68fSmrg# ---------------------------------------- 314414bd68fSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 315414bd68fSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 316414bd68fSmrg[m4_ifval([$1], 317414bd68fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 318414bd68fSmrg [$1 319414bd68fSmrg])])]) 32034977a2fSmrg 321414bd68fSmrg# Initialize. 322414bd68fSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 32334977a2fSmrg 32434977a2fSmrg 325414bd68fSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 326414bd68fSmrg# ------------------------------ 327414bd68fSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 328414bd68fSmrgm4_define([_LT_CONFIG_LIBTOOL], 329414bd68fSmrg[m4_ifval([$1], 330414bd68fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 331414bd68fSmrg [$1 332414bd68fSmrg])])]) 33334977a2fSmrg 334414bd68fSmrg# Initialize. 335414bd68fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 33634977a2fSmrg 337414bd68fSmrg 338414bd68fSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 339414bd68fSmrg# ----------------------------------------------------- 340414bd68fSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 341414bd68fSmrg[_LT_CONFIG_LIBTOOL([$1]) 342414bd68fSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3433e72ca8cSmrg]) 34434977a2fSmrg 34534977a2fSmrg 346414bd68fSmrg# _LT_FORMAT_COMMENT([COMMENT]) 347414bd68fSmrg# ----------------------------- 348414bd68fSmrg# Add leading comment marks to the start of each line, and a trailing 349414bd68fSmrg# full-stop to the whole comment if one is not present already. 350414bd68fSmrgm4_define([_LT_FORMAT_COMMENT], 351414bd68fSmrg[m4_ifval([$1], [ 352414bd68fSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 353414bd68fSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 354414bd68fSmrg)]) 35534977a2fSmrg 35634977a2fSmrg 357414bd68fSmrg 358414bd68fSmrg 359414bd68fSmrg 360414bd68fSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 361414bd68fSmrg# ------------------------------------------------------------------- 362414bd68fSmrg# CONFIGNAME is the name given to the value in the libtool script. 363414bd68fSmrg# VARNAME is the (base) name used in the configure script. 364414bd68fSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 365414bd68fSmrg# VARNAME. Any other value will be used directly. 366414bd68fSmrgm4_define([_LT_DECL], 367414bd68fSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 368414bd68fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 369414bd68fSmrg [m4_ifval([$1], [$1], [$2])]) 370414bd68fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 371414bd68fSmrg m4_ifval([$4], 372414bd68fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 373414bd68fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 374414bd68fSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 37534977a2fSmrg]) 37634977a2fSmrg 37734977a2fSmrg 378414bd68fSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 379414bd68fSmrg# -------------------------------------------------------- 380414bd68fSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 38134977a2fSmrg 38234977a2fSmrg 383414bd68fSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 384414bd68fSmrg# ------------------------------------------------ 385414bd68fSmrgm4_define([lt_decl_tag_varnames], 386414bd68fSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 38734977a2fSmrg 38834977a2fSmrg 389414bd68fSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 390414bd68fSmrg# --------------------------------------------------------- 391414bd68fSmrgm4_define([_lt_decl_filter], 392414bd68fSmrg[m4_case([$#], 393414bd68fSmrg [0], [m4_fatal([$0: too few arguments: $#])], 394414bd68fSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 395414bd68fSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 396414bd68fSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 397414bd68fSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 398414bd68fSmrg]) 39934977a2fSmrg 40034977a2fSmrg 401414bd68fSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 402414bd68fSmrg# -------------------------------------------------- 403414bd68fSmrgm4_define([lt_decl_quote_varnames], 404414bd68fSmrg[_lt_decl_filter([value], [1], $@)]) 40534977a2fSmrg 40634977a2fSmrg 407414bd68fSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 408414bd68fSmrg# --------------------------------------------------- 409414bd68fSmrgm4_define([lt_decl_dquote_varnames], 410414bd68fSmrg[_lt_decl_filter([value], [2], $@)]) 4113e72ca8cSmrg 412414bd68fSmrg 413414bd68fSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 414414bd68fSmrg# --------------------------------------------------- 415414bd68fSmrgm4_define([lt_decl_varnames_tagged], 416414bd68fSmrg[m4_assert([$# <= 2])dnl 417414bd68fSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 418414bd68fSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 419414bd68fSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 420414bd68fSmrgm4_define([_lt_decl_varnames_tagged], 421414bd68fSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 422414bd68fSmrg 423414bd68fSmrg 424414bd68fSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 425414bd68fSmrg# ------------------------------------------------ 426414bd68fSmrgm4_define([lt_decl_all_varnames], 427414bd68fSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 428414bd68fSmrg m4_if([$2], [], 429414bd68fSmrg m4_quote(lt_decl_varnames), 430414bd68fSmrg m4_quote(m4_shift($@))))[]dnl 431414bd68fSmrg]) 432414bd68fSmrgm4_define([_lt_decl_all_varnames], 433414bd68fSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 434414bd68fSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4353e72ca8cSmrg]) 43634977a2fSmrg 43734977a2fSmrg 438414bd68fSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 439414bd68fSmrg# ------------------------------------ 440414bd68fSmrg# Quote a variable value, and forward it to `config.status' so that its 441414bd68fSmrg# declaration there will have the same value as in `configure'. VARNAME 442414bd68fSmrg# must have a single quote delimited value for this to work. 443414bd68fSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 444414bd68fSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 445414bd68fSmrg 44634977a2fSmrg 447414bd68fSmrg# _LT_CONFIG_STATUS_DECLARATIONS 448414bd68fSmrg# ------------------------------ 449414bd68fSmrg# We delimit libtool config variables with single quotes, so when 450414bd68fSmrg# we write them to config.status, we have to be sure to quote all 451414bd68fSmrg# embedded single quotes properly. In configure, this macro expands 452414bd68fSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4533e72ca8cSmrg# 454414bd68fSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 455414bd68fSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 456414bd68fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 457414bd68fSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 45834977a2fSmrg 45934977a2fSmrg 460414bd68fSmrg# _LT_LIBTOOL_TAGS 461414bd68fSmrg# ---------------- 462414bd68fSmrg# Output comment and list of tags supported by the script 463414bd68fSmrgm4_defun([_LT_LIBTOOL_TAGS], 464414bd68fSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 465414bd68fSmrgavailable_tags="_LT_TAGS"dnl 466414bd68fSmrg]) 467414bd68fSmrg 468414bd68fSmrg 469414bd68fSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 470414bd68fSmrg# ----------------------------------- 471414bd68fSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 472414bd68fSmrg# expand to a commented shell variable setting: 47334977a2fSmrg# 474414bd68fSmrg# # Some comment about what VAR is for. 475414bd68fSmrg# visible_name=$lt_internal_name 476414bd68fSmrgm4_define([_LT_LIBTOOL_DECLARE], 477414bd68fSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 478414bd68fSmrg [description])))[]dnl 479414bd68fSmrgm4_pushdef([_libtool_name], 480414bd68fSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 481414bd68fSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 482414bd68fSmrg [0], [_libtool_name=[$]$1], 483414bd68fSmrg [1], [_libtool_name=$lt_[]$1], 484414bd68fSmrg [2], [_libtool_name=$lt_[]$1], 485414bd68fSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 486414bd68fSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 487414bd68fSmrg]) 48834977a2fSmrg 48934977a2fSmrg 490414bd68fSmrg# _LT_LIBTOOL_CONFIG_VARS 491414bd68fSmrg# ----------------------- 492414bd68fSmrg# Produce commented declarations of non-tagged libtool config variables 493414bd68fSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 494414bd68fSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 495414bd68fSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 496414bd68fSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 497414bd68fSmrg[m4_foreach([_lt_var], 498414bd68fSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 499414bd68fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 50034977a2fSmrg 50134977a2fSmrg 502414bd68fSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 503414bd68fSmrg# ------------------------- 504414bd68fSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 505414bd68fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 506414bd68fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 50734977a2fSmrg 50826b1ff4eSmrg 509414bd68fSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 510414bd68fSmrg# ------------------------------ 511414bd68fSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 51234977a2fSmrg 51326b1ff4eSmrg 514414bd68fSmrg# _LT_CONFIG_COMMANDS 515414bd68fSmrg# ------------------- 516414bd68fSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 517414bd68fSmrg# variables for single and double quote escaping we saved from calls 518414bd68fSmrg# to _LT_DECL, we can put quote escaped variables declarations 519414bd68fSmrg# into `config.status', and then the shell code to quote escape them in 520414bd68fSmrg# for loops in `config.status'. Finally, any additional code accumulated 521414bd68fSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 522414bd68fSmrgm4_defun([_LT_CONFIG_COMMANDS], 523414bd68fSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 524414bd68fSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 525414bd68fSmrg dnl instead of duplicating it all over again into config.status, 526414bd68fSmrg dnl then we will have config.status run $CONFIG_LT later, so it 527414bd68fSmrg dnl needs to know what name is stored there: 528414bd68fSmrg [AC_CONFIG_COMMANDS([libtool], 529414bd68fSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 530414bd68fSmrg dnl If the libtool generation code is destined for config.status, 531414bd68fSmrg dnl expand the accumulated commands and init code now: 532414bd68fSmrg [AC_CONFIG_COMMANDS([libtool], 533414bd68fSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 534414bd68fSmrg])#_LT_CONFIG_COMMANDS 53526b1ff4eSmrg 53626b1ff4eSmrg 537414bd68fSmrg# Initialize. 538414bd68fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 539414bd68fSmrg[ 54026b1ff4eSmrg 541414bd68fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 542414bd68fSmrg# if CDPATH is set. 543414bd68fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 54426b1ff4eSmrg 545414bd68fSmrgsed_quote_subst='$sed_quote_subst' 546414bd68fSmrgdouble_quote_subst='$double_quote_subst' 547414bd68fSmrgdelay_variable_subst='$delay_variable_subst' 548414bd68fSmrg_LT_CONFIG_STATUS_DECLARATIONS 549414bd68fSmrgLTCC='$LTCC' 550414bd68fSmrgLTCFLAGS='$LTCFLAGS' 551414bd68fSmrgcompiler='$compiler_DEFAULT' 55226b1ff4eSmrg 553414bd68fSmrg# A function that is used when there is no print builtin or printf. 554414bd68fSmrgfunc_fallback_echo () 555414bd68fSmrg{ 556414bd68fSmrg eval 'cat <<_LTECHO_EOF 557414bd68fSmrg\$[]1 558414bd68fSmrg_LTECHO_EOF' 559414bd68fSmrg} 560414bd68fSmrg 561414bd68fSmrg# Quote evaled strings. 562414bd68fSmrgfor var in lt_decl_all_varnames([[ \ 563414bd68fSmrg]], lt_decl_quote_varnames); do 564414bd68fSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 565414bd68fSmrg *[[\\\\\\\`\\"\\\$]]*) 566414bd68fSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 56726b1ff4eSmrg ;; 568414bd68fSmrg *) 569414bd68fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 57026b1ff4eSmrg ;; 571414bd68fSmrg esac 572414bd68fSmrgdone 573414bd68fSmrg 574414bd68fSmrg# Double-quote double-evaled strings. 575414bd68fSmrgfor var in lt_decl_all_varnames([[ \ 576414bd68fSmrg]], lt_decl_dquote_varnames); do 577414bd68fSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 578414bd68fSmrg *[[\\\\\\\`\\"\\\$]]*) 579414bd68fSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 58026b1ff4eSmrg ;; 581414bd68fSmrg *) 582414bd68fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 58326b1ff4eSmrg ;; 58426b1ff4eSmrg esac 585414bd68fSmrgdone 58634977a2fSmrg 587414bd68fSmrg_LT_OUTPUT_LIBTOOL_INIT 5883e72ca8cSmrg]) 58934977a2fSmrg 590414bd68fSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 591414bd68fSmrg# ------------------------------------ 592414bd68fSmrg# Generate a child script FILE with all initialization necessary to 593414bd68fSmrg# reuse the environment learned by the parent script, and make the 594414bd68fSmrg# file executable. If COMMENT is supplied, it is inserted after the 595414bd68fSmrg# `#!' sequence but before initialization text begins. After this 596414bd68fSmrg# macro, additional text can be appended to FILE to form the body of 597414bd68fSmrg# the child script. The macro ends with non-zero status if the 598414bd68fSmrg# file could not be fully written (such as if the disk is full). 599414bd68fSmrgm4_ifdef([AS_INIT_GENERATED], 600414bd68fSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 601414bd68fSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 602414bd68fSmrg[m4_require([AS_PREPARE])]dnl 603414bd68fSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 604414bd68fSmrg[lt_write_fail=0 605414bd68fSmrgcat >$1 <<_ASEOF || lt_write_fail=1 606414bd68fSmrg#! $SHELL 607414bd68fSmrg# Generated by $as_me. 608414bd68fSmrg$2 609414bd68fSmrgSHELL=\${CONFIG_SHELL-$SHELL} 610414bd68fSmrgexport SHELL 611414bd68fSmrg_ASEOF 612414bd68fSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 613414bd68fSmrgAS_SHELL_SANITIZE 614414bd68fSmrg_AS_PREPARE 615414bd68fSmrgexec AS_MESSAGE_FD>&1 616414bd68fSmrg_ASEOF 617414bd68fSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 618414bd68fSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 619ee3138f1Smrg 620414bd68fSmrg# LT_OUTPUT 621414bd68fSmrg# --------- 622414bd68fSmrg# This macro allows early generation of the libtool script (before 623414bd68fSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 624414bd68fSmrg# tests. 625414bd68fSmrgAC_DEFUN([LT_OUTPUT], 626414bd68fSmrg[: ${CONFIG_LT=./config.lt} 627414bd68fSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 628414bd68fSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 629414bd68fSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 63034977a2fSmrg 631414bd68fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 632414bd68fSmrglt_cl_silent=false 633414bd68fSmrgexec AS_MESSAGE_LOG_FD>>config.log 634414bd68fSmrg{ 635414bd68fSmrg echo 636414bd68fSmrg AS_BOX([Running $as_me.]) 637414bd68fSmrg} >&AS_MESSAGE_LOG_FD 638ee3138f1Smrg 639414bd68fSmrglt_cl_help="\ 640414bd68fSmrg\`$as_me' creates a local libtool stub from the current configuration, 641414bd68fSmrgfor use in further configure time tests before the real libtool is 642414bd68fSmrggenerated. 643ee3138f1Smrg 644414bd68fSmrgUsage: $[0] [[OPTIONS]] 645ee3138f1Smrg 646414bd68fSmrg -h, --help print this help, then exit 647414bd68fSmrg -V, --version print version number, then exit 648414bd68fSmrg -q, --quiet do not print progress messages 649414bd68fSmrg -d, --debug don't remove temporary files 650ee3138f1Smrg 651414bd68fSmrgReport bugs to <bug-libtool@gnu.org>." 652b425557eSmrg 653414bd68fSmrglt_cl_version="\ 654414bd68fSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 655414bd68fSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 656414bd68fSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 657b425557eSmrg 658414bd68fSmrgCopyright (C) 2011 Free Software Foundation, Inc. 659414bd68fSmrgThis config.lt script is free software; the Free Software Foundation 660414bd68fSmrggives unlimited permision to copy, distribute and modify it." 661b425557eSmrg 662414bd68fSmrgwhile test $[#] != 0 663414bd68fSmrgdo 664414bd68fSmrg case $[1] in 665414bd68fSmrg --version | --v* | -V ) 666414bd68fSmrg echo "$lt_cl_version"; exit 0 ;; 667414bd68fSmrg --help | --h* | -h ) 668414bd68fSmrg echo "$lt_cl_help"; exit 0 ;; 669414bd68fSmrg --debug | --d* | -d ) 670414bd68fSmrg debug=: ;; 671414bd68fSmrg --quiet | --q* | --silent | --s* | -q ) 672414bd68fSmrg lt_cl_silent=: ;; 673ee3138f1Smrg 674414bd68fSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 675414bd68fSmrgTry \`$[0] --help' for more information.]) ;; 676ee3138f1Smrg 677414bd68fSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 678414bd68fSmrgTry \`$[0] --help' for more information.]) ;; 679414bd68fSmrg esac 680414bd68fSmrg shift 681414bd68fSmrgdone 682ee3138f1Smrg 683414bd68fSmrgif $lt_cl_silent; then 684414bd68fSmrg exec AS_MESSAGE_FD>/dev/null 685414bd68fSmrgfi 686414bd68fSmrg_LTEOF 68779a8a9c6Smrg 688414bd68fSmrgcat >>"$CONFIG_LT" <<_LTEOF 689414bd68fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 690414bd68fSmrg_LTEOF 69134977a2fSmrg 692414bd68fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 693414bd68fSmrgAC_MSG_NOTICE([creating $ofile]) 694414bd68fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 695414bd68fSmrgAS_EXIT(0) 696414bd68fSmrg_LTEOF 697414bd68fSmrgchmod +x "$CONFIG_LT" 698ee3138f1Smrg 699414bd68fSmrg# configure is writing to config.log, but config.lt does its own redirection, 700414bd68fSmrg# appending to config.log, which fails on DOS, as config.log is still kept 701414bd68fSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 702414bd68fSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 703414bd68fSmrglt_cl_success=: 704414bd68fSmrgtest "$silent" = yes && 705414bd68fSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 706414bd68fSmrgexec AS_MESSAGE_LOG_FD>/dev/null 707414bd68fSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 708414bd68fSmrgexec AS_MESSAGE_LOG_FD>>config.log 709414bd68fSmrg$lt_cl_success || AS_EXIT(1) 710414bd68fSmrg])# LT_OUTPUT 711ee3138f1Smrg 712ee3138f1Smrg 713414bd68fSmrg# _LT_CONFIG(TAG) 714414bd68fSmrg# --------------- 715414bd68fSmrg# If TAG is the built-in tag, create an initial libtool script with a 716414bd68fSmrg# default configuration from the untagged config vars. Otherwise add code 717414bd68fSmrg# to config.status for appending the configuration named by TAG from the 718414bd68fSmrg# matching tagged config vars. 719414bd68fSmrgm4_defun([_LT_CONFIG], 720414bd68fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 721414bd68fSmrg_LT_CONFIG_SAVE_COMMANDS([ 722414bd68fSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 723414bd68fSmrg m4_if(_LT_TAG, [C], [ 724414bd68fSmrg # See if we are running on zsh, and set the options which allow our 725414bd68fSmrg # commands through without removal of \ escapes. 726414bd68fSmrg if test -n "${ZSH_VERSION+set}" ; then 727414bd68fSmrg setopt NO_GLOB_SUBST 728414bd68fSmrg fi 729ee3138f1Smrg 730414bd68fSmrg cfgfile="${ofile}T" 731414bd68fSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 732414bd68fSmrg $RM "$cfgfile" 733ee3138f1Smrg 734414bd68fSmrg cat <<_LT_EOF >> "$cfgfile" 735414bd68fSmrg#! $SHELL 736ee3138f1Smrg 737414bd68fSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 738414bd68fSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 739414bd68fSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 740414bd68fSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 741414bd68fSmrg# 742414bd68fSmrg_LT_COPYING 743414bd68fSmrg_LT_LIBTOOL_TAGS 744ee3138f1Smrg 745414bd68fSmrg# ### BEGIN LIBTOOL CONFIG 746414bd68fSmrg_LT_LIBTOOL_CONFIG_VARS 747414bd68fSmrg_LT_LIBTOOL_TAG_VARS 748414bd68fSmrg# ### END LIBTOOL CONFIG 749ee3138f1Smrg 750414bd68fSmrg_LT_EOF 751ee3138f1Smrg 752414bd68fSmrg case $host_os in 753414bd68fSmrg aix3*) 754414bd68fSmrg cat <<\_LT_EOF >> "$cfgfile" 755414bd68fSmrg# AIX sometimes has problems with the GCC collect2 program. For some 756414bd68fSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 757414bd68fSmrg# vanish in a puff of smoke. 758414bd68fSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 759414bd68fSmrg COLLECT_NAMES= 760414bd68fSmrg export COLLECT_NAMES 761414bd68fSmrgfi 762414bd68fSmrg_LT_EOF 763414bd68fSmrg ;; 764414bd68fSmrg esac 765ee3138f1Smrg 766414bd68fSmrg _LT_PROG_LTMAIN 767ee3138f1Smrg 768414bd68fSmrg # We use sed instead of cat because bash on DJGPP gets confused if 769414bd68fSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 770414bd68fSmrg # text mode, it properly converts lines to CR/LF. This bash problem 771414bd68fSmrg # is reportedly fixed, but why not run on old versions too? 772414bd68fSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 773414bd68fSmrg || (rm -f "$cfgfile"; exit 1) 774ee3138f1Smrg 775414bd68fSmrg _LT_PROG_REPLACE_SHELLFNS 776ee3138f1Smrg 777414bd68fSmrg mv -f "$cfgfile" "$ofile" || 778414bd68fSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 779414bd68fSmrg chmod +x "$ofile" 780414bd68fSmrg], 781414bd68fSmrg[cat <<_LT_EOF >> "$ofile" 782ee3138f1Smrg 783414bd68fSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 784414bd68fSmrgdnl in a comment (ie after a #). 785414bd68fSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 786414bd68fSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 787414bd68fSmrg# ### END LIBTOOL TAG CONFIG: $1 788414bd68fSmrg_LT_EOF 789414bd68fSmrg])dnl /m4_if 790414bd68fSmrg], 791414bd68fSmrg[m4_if([$1], [], [ 792414bd68fSmrg PACKAGE='$PACKAGE' 793414bd68fSmrg VERSION='$VERSION' 794414bd68fSmrg TIMESTAMP='$TIMESTAMP' 795414bd68fSmrg RM='$RM' 796414bd68fSmrg ofile='$ofile'], []) 797414bd68fSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 798414bd68fSmrg])# _LT_CONFIG 799ee3138f1Smrg 800ee3138f1Smrg 801414bd68fSmrg# LT_SUPPORTED_TAG(TAG) 802414bd68fSmrg# --------------------- 803414bd68fSmrg# Trace this macro to discover what tags are supported by the libtool 804414bd68fSmrg# --tag option, using: 805414bd68fSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 806414bd68fSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 807ee3138f1Smrg 808ee3138f1Smrg 809414bd68fSmrg# C support is built-in for now 810414bd68fSmrgm4_define([_LT_LANG_C_enabled], []) 811414bd68fSmrgm4_define([_LT_TAGS], []) 812b425557eSmrg 81334977a2fSmrg 814414bd68fSmrg# LT_LANG(LANG) 815414bd68fSmrg# ------------- 816414bd68fSmrg# Enable libtool support for the given language if not already enabled. 817414bd68fSmrgAC_DEFUN([LT_LANG], 818414bd68fSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 819414bd68fSmrgm4_case([$1], 820414bd68fSmrg [C], [_LT_LANG(C)], 821414bd68fSmrg [C++], [_LT_LANG(CXX)], 822414bd68fSmrg [Go], [_LT_LANG(GO)], 823414bd68fSmrg [Java], [_LT_LANG(GCJ)], 824414bd68fSmrg [Fortran 77], [_LT_LANG(F77)], 825414bd68fSmrg [Fortran], [_LT_LANG(FC)], 826414bd68fSmrg [Windows Resource], [_LT_LANG(RC)], 827414bd68fSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 828414bd68fSmrg [_LT_LANG($1)], 829414bd68fSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 830414bd68fSmrg])# LT_LANG 83134977a2fSmrg 832b425557eSmrg 833414bd68fSmrg# _LT_LANG(LANGNAME) 834414bd68fSmrg# ------------------ 835414bd68fSmrgm4_defun([_LT_LANG], 836414bd68fSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 837414bd68fSmrg [LT_SUPPORTED_TAG([$1])dnl 838414bd68fSmrg m4_append([_LT_TAGS], [$1 ])dnl 839414bd68fSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 840414bd68fSmrg _LT_LANG_$1_CONFIG($1)])dnl 841414bd68fSmrg])# _LT_LANG 842b425557eSmrg 84334977a2fSmrg 844414bd68fSmrgm4_ifndef([AC_PROG_GO], [ 845414bd68fSmrg# NOTE: This macro has been submitted for inclusion into # 846414bd68fSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 847414bd68fSmrg# a released version of Autoconf we should remove this # 848414bd68fSmrg# macro and use it instead. # 849414bd68fSmrgm4_defun([AC_PROG_GO], 850414bd68fSmrg[AC_LANG_PUSH(Go)dnl 851414bd68fSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 852414bd68fSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 853414bd68fSmrg_AC_ARG_VAR_LDFLAGS()dnl 854414bd68fSmrgAC_CHECK_TOOL(GOC, gccgo) 855414bd68fSmrgif test -z "$GOC"; then 856414bd68fSmrg if test -n "$ac_tool_prefix"; then 857414bd68fSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 858414bd68fSmrg fi 859414bd68fSmrgfi 860414bd68fSmrgif test -z "$GOC"; then 861414bd68fSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 862414bd68fSmrgfi 863414bd68fSmrg])#m4_defun 864414bd68fSmrg])#m4_ifndef 865ee3138f1Smrg 866ee3138f1Smrg 867414bd68fSmrg# _LT_LANG_DEFAULT_CONFIG 868414bd68fSmrg# ----------------------- 869414bd68fSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 870414bd68fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 871414bd68fSmrg [LT_LANG(CXX)], 872414bd68fSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 873ee3138f1Smrg 874414bd68fSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 875414bd68fSmrg [LT_LANG(F77)], 876414bd68fSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 877b425557eSmrg 878414bd68fSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 879414bd68fSmrg [LT_LANG(FC)], 880414bd68fSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 881ee3138f1Smrg 882414bd68fSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 883414bd68fSmrgdnl pulling things in needlessly. 884414bd68fSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 885414bd68fSmrg [LT_LANG(GCJ)], 886414bd68fSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 887414bd68fSmrg [LT_LANG(GCJ)], 888414bd68fSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 889414bd68fSmrg [LT_LANG(GCJ)], 890414bd68fSmrg [m4_ifdef([AC_PROG_GCJ], 891414bd68fSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 892414bd68fSmrg m4_ifdef([A][M_PROG_GCJ], 893414bd68fSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 894414bd68fSmrg m4_ifdef([LT_PROG_GCJ], 895414bd68fSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 896b425557eSmrg 897414bd68fSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 898414bd68fSmrg [LT_LANG(GO)], 899414bd68fSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 900ee3138f1Smrg 901414bd68fSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 902414bd68fSmrg [LT_LANG(RC)], 903414bd68fSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 904414bd68fSmrg])# _LT_LANG_DEFAULT_CONFIG 905a1ed278cSmrg 906414bd68fSmrg# Obsolete macros: 907414bd68fSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 908414bd68fSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 909414bd68fSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 910414bd68fSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 911414bd68fSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 912414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 913414bd68fSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 914414bd68fSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 915414bd68fSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 916414bd68fSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 917414bd68fSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 918a1ed278cSmrg 919ee3138f1Smrg 920414bd68fSmrg# _LT_TAG_COMPILER 921414bd68fSmrg# ---------------- 922414bd68fSmrgm4_defun([_LT_TAG_COMPILER], 923414bd68fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 924ee3138f1Smrg 925414bd68fSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 926414bd68fSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 927414bd68fSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 928414bd68fSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 929ee3138f1Smrg 930414bd68fSmrg# If no C compiler was specified, use CC. 931414bd68fSmrgLTCC=${LTCC-"$CC"} 932ee3138f1Smrg 933414bd68fSmrg# If no C compiler flags were specified, use CFLAGS. 934414bd68fSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 935ee3138f1Smrg 936414bd68fSmrg# Allow CC to be a program name with arguments. 937414bd68fSmrgcompiler=$CC 938414bd68fSmrg])# _LT_TAG_COMPILER 939ee3138f1Smrg 940ee3138f1Smrg 941414bd68fSmrg# _LT_COMPILER_BOILERPLATE 942414bd68fSmrg# ------------------------ 943414bd68fSmrg# Check for compiler boilerplate output or warnings with 944414bd68fSmrg# the simple compiler test code. 945414bd68fSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 946414bd68fSmrg[m4_require([_LT_DECL_SED])dnl 947414bd68fSmrgac_outfile=conftest.$ac_objext 948414bd68fSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 949414bd68fSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 950414bd68fSmrg_lt_compiler_boilerplate=`cat conftest.err` 951414bd68fSmrg$RM conftest* 952414bd68fSmrg])# _LT_COMPILER_BOILERPLATE 953ee3138f1Smrg 95434977a2fSmrg 955414bd68fSmrg# _LT_LINKER_BOILERPLATE 956414bd68fSmrg# ---------------------- 957414bd68fSmrg# Check for linker boilerplate output or warnings with 958414bd68fSmrg# the simple link test code. 959414bd68fSmrgm4_defun([_LT_LINKER_BOILERPLATE], 960414bd68fSmrg[m4_require([_LT_DECL_SED])dnl 961414bd68fSmrgac_outfile=conftest.$ac_objext 962414bd68fSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 963414bd68fSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 964414bd68fSmrg_lt_linker_boilerplate=`cat conftest.err` 965414bd68fSmrg$RM -r conftest* 966414bd68fSmrg])# _LT_LINKER_BOILERPLATE 967ee3138f1Smrg 968414bd68fSmrg# _LT_REQUIRED_DARWIN_CHECKS 969414bd68fSmrg# ------------------------- 970414bd68fSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 971414bd68fSmrg case $host_os in 972414bd68fSmrg rhapsody* | darwin*) 973414bd68fSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 974414bd68fSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 975414bd68fSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 976414bd68fSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 977414bd68fSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 978414bd68fSmrg _LT_DECL([], [DSYMUTIL], [1], 979414bd68fSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 980414bd68fSmrg _LT_DECL([], [NMEDIT], [1], 981414bd68fSmrg [Tool to change global to local symbols on Mac OS X]) 982414bd68fSmrg _LT_DECL([], [LIPO], [1], 983414bd68fSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 984414bd68fSmrg _LT_DECL([], [OTOOL], [1], 985414bd68fSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 986414bd68fSmrg _LT_DECL([], [OTOOL64], [1], 987414bd68fSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 988ee3138f1Smrg 989414bd68fSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 990414bd68fSmrg [lt_cv_apple_cc_single_mod=no 991414bd68fSmrg if test -z "${LT_MULTI_MODULE}"; then 992414bd68fSmrg # By default we will add the -single_module flag. You can override 993414bd68fSmrg # by either setting the environment variable LT_MULTI_MODULE 994414bd68fSmrg # non-empty at configure time, or by adding -multi_module to the 995414bd68fSmrg # link flags. 996414bd68fSmrg rm -rf libconftest.dylib* 997414bd68fSmrg echo "int foo(void){return 1;}" > conftest.c 998414bd68fSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 999414bd68fSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1000414bd68fSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1001414bd68fSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1002414bd68fSmrg _lt_result=$? 1003414bd68fSmrg # If there is a non-empty error log, and "single_module" 1004414bd68fSmrg # appears in it, assume the flag caused a linker warning 1005414bd68fSmrg if test -s conftest.err && $GREP single_module conftest.err; then 1006414bd68fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1007414bd68fSmrg # Otherwise, if the output was created with a 0 exit code from 1008414bd68fSmrg # the compiler, it worked. 1009414bd68fSmrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 1010414bd68fSmrg lt_cv_apple_cc_single_mod=yes 1011414bd68fSmrg else 1012414bd68fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1013414bd68fSmrg fi 1014414bd68fSmrg rm -rf libconftest.dylib* 1015414bd68fSmrg rm -f conftest.* 1016414bd68fSmrg fi]) 1017ee3138f1Smrg 1018414bd68fSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1019414bd68fSmrg [lt_cv_ld_exported_symbols_list], 1020414bd68fSmrg [lt_cv_ld_exported_symbols_list=no 1021414bd68fSmrg save_LDFLAGS=$LDFLAGS 1022414bd68fSmrg echo "_main" > conftest.sym 1023414bd68fSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1024414bd68fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1025414bd68fSmrg [lt_cv_ld_exported_symbols_list=yes], 1026414bd68fSmrg [lt_cv_ld_exported_symbols_list=no]) 1027414bd68fSmrg LDFLAGS="$save_LDFLAGS" 1028414bd68fSmrg ]) 10293e72ca8cSmrg 1030414bd68fSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1031414bd68fSmrg [lt_cv_ld_force_load=no 1032414bd68fSmrg cat > conftest.c << _LT_EOF 1033414bd68fSmrgint forced_loaded() { return 2;} 1034414bd68fSmrg_LT_EOF 1035414bd68fSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1036414bd68fSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1037414bd68fSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1038414bd68fSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1039414bd68fSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1040414bd68fSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1041414bd68fSmrg cat > conftest.c << _LT_EOF 1042414bd68fSmrgint main() { return 0;} 1043414bd68fSmrg_LT_EOF 1044414bd68fSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1045414bd68fSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1046414bd68fSmrg _lt_result=$? 1047414bd68fSmrg if test -s conftest.err && $GREP force_load conftest.err; then 1048414bd68fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1049414bd68fSmrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 1050414bd68fSmrg lt_cv_ld_force_load=yes 1051414bd68fSmrg else 1052414bd68fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1053414bd68fSmrg fi 1054414bd68fSmrg rm -f conftest.err libconftest.a conftest conftest.c 1055414bd68fSmrg rm -rf conftest.dSYM 1056414bd68fSmrg ]) 1057414bd68fSmrg case $host_os in 1058414bd68fSmrg rhapsody* | darwin1.[[012]]) 1059414bd68fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 1060414bd68fSmrg darwin1.*) 1061414bd68fSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1062414bd68fSmrg darwin*) # darwin 5.x on 1063414bd68fSmrg # if running on 10.5 or later, the deployment target defaults 1064414bd68fSmrg # to the OS version, if on x86, and 10.4, the deployment 1065414bd68fSmrg # target defaults to 10.4. Don't you love it? 1066414bd68fSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1067414bd68fSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1068414bd68fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1069414bd68fSmrg 10.[[012]]*) 1070414bd68fSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1071414bd68fSmrg 10.*) 1072414bd68fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1073414bd68fSmrg esac 1074414bd68fSmrg ;; 1075414bd68fSmrg esac 1076414bd68fSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 1077414bd68fSmrg _lt_dar_single_mod='$single_module' 1078414bd68fSmrg fi 1079414bd68fSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 1080414bd68fSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 1081414bd68fSmrg else 1082414bd68fSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 1083414bd68fSmrg fi 1084414bd68fSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1085414bd68fSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1086414bd68fSmrg else 1087414bd68fSmrg _lt_dsymutil= 1088414bd68fSmrg fi 1089414bd68fSmrg ;; 1090414bd68fSmrg esac 1091414bd68fSmrg]) 1092ee3138f1Smrg 1093ee3138f1Smrg 1094414bd68fSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1095414bd68fSmrg# --------------------------------- 1096414bd68fSmrg# Checks for linker and compiler features on darwin 1097414bd68fSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1098414bd68fSmrg[ 1099414bd68fSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1100414bd68fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1101414bd68fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 1102414bd68fSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1103414bd68fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1104414bd68fSmrg if test "$lt_cv_ld_force_load" = "yes"; then 1105414bd68fSmrg _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\"`' 1106414bd68fSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1107414bd68fSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1108414bd68fSmrg else 1109414bd68fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1110414bd68fSmrg fi 1111414bd68fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1112414bd68fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1113414bd68fSmrg case $cc_basename in 1114414bd68fSmrg ifort*) _lt_dar_can_shared=yes ;; 1115414bd68fSmrg *) _lt_dar_can_shared=$GCC ;; 1116414bd68fSmrg esac 1117414bd68fSmrg if test "$_lt_dar_can_shared" = "yes"; then 1118414bd68fSmrg output_verbose_link_cmd=func_echo_all 1119414bd68fSmrg _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}" 1120414bd68fSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1121414bd68fSmrg _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}" 1122414bd68fSmrg _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}" 1123414bd68fSmrg m4_if([$1], [CXX], 1124414bd68fSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1125414bd68fSmrg _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}" 1126414bd68fSmrg _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}" 1127414bd68fSmrg fi 1128414bd68fSmrg],[]) 1129414bd68fSmrg else 1130414bd68fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 1131414bd68fSmrg fi 1132414bd68fSmrg]) 1133414bd68fSmrg 1134414bd68fSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1135414bd68fSmrg# ---------------------------------- 1136414bd68fSmrg# Links a minimal program and checks the executable 1137414bd68fSmrg# for the system default hardcoded library path. In most cases, 1138414bd68fSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1139414bd68fSmrg# the location of the communication and MPI libs are included too. 1140414bd68fSmrg# If we don't find anything, use the default library path according 1141414bd68fSmrg# to the aix ld manual. 1142414bd68fSmrg# Store the results from the different compilers for each TAGNAME. 1143414bd68fSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 1144414bd68fSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1145414bd68fSmrg[m4_require([_LT_DECL_SED])dnl 1146414bd68fSmrgif test "${lt_cv_aix_libpath+set}" = set; then 1147414bd68fSmrg aix_libpath=$lt_cv_aix_libpath 1148414bd68fSmrgelse 1149414bd68fSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1150414bd68fSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1151414bd68fSmrg lt_aix_libpath_sed='[ 1152414bd68fSmrg /Import File Strings/,/^$/ { 1153414bd68fSmrg /^0/ { 1154414bd68fSmrg s/^0 *\([^ ]*\) *$/\1/ 1155414bd68fSmrg p 1156414bd68fSmrg } 1157414bd68fSmrg }]' 1158414bd68fSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1159414bd68fSmrg # Check for a 64-bit object if we didn't find anything. 1160414bd68fSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1161414bd68fSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1162414bd68fSmrg fi],[]) 1163414bd68fSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1164414bd68fSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1165414bd68fSmrg fi 1166414bd68fSmrg ]) 1167414bd68fSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1168414bd68fSmrgfi 1169414bd68fSmrg])# _LT_SYS_MODULE_PATH_AIX 1170ee3138f1Smrg 1171ee3138f1Smrg 1172414bd68fSmrg# _LT_SHELL_INIT(ARG) 1173414bd68fSmrg# ------------------- 1174414bd68fSmrgm4_define([_LT_SHELL_INIT], 1175414bd68fSmrg[m4_divert_text([M4SH-INIT], [$1 1176414bd68fSmrg])])# _LT_SHELL_INIT 1177a1ed278cSmrg 1178a1ed278cSmrg 1179ee3138f1Smrg 1180414bd68fSmrg# _LT_PROG_ECHO_BACKSLASH 1181414bd68fSmrg# ----------------------- 1182414bd68fSmrg# Find how we can fake an echo command that does not interpret backslash. 1183414bd68fSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 1184414bd68fSmrg# of the generated configure script which will find a shell with a builtin 1185414bd68fSmrg# printf (which we can use as an echo command). 1186414bd68fSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1187414bd68fSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1188414bd68fSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1189414bd68fSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1190ee3138f1Smrg 1191414bd68fSmrgAC_MSG_CHECKING([how to print strings]) 1192414bd68fSmrg# Test print first, because it will be a builtin if present. 1193414bd68fSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1194414bd68fSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1195414bd68fSmrg ECHO='print -r --' 1196414bd68fSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1197414bd68fSmrg ECHO='printf %s\n' 1198414bd68fSmrgelse 1199414bd68fSmrg # Use this function as a fallback that always works. 1200414bd68fSmrg func_fallback_echo () 1201414bd68fSmrg { 1202414bd68fSmrg eval 'cat <<_LTECHO_EOF 1203414bd68fSmrg$[]1 1204414bd68fSmrg_LTECHO_EOF' 1205414bd68fSmrg } 1206414bd68fSmrg ECHO='func_fallback_echo' 1207414bd68fSmrgfi 1208ee3138f1Smrg 1209414bd68fSmrg# func_echo_all arg... 1210414bd68fSmrg# Invoke $ECHO with all args, space-separated. 1211414bd68fSmrgfunc_echo_all () 1212414bd68fSmrg{ 1213414bd68fSmrg $ECHO "$*" 1214414bd68fSmrg} 1215ee3138f1Smrg 1216414bd68fSmrgcase "$ECHO" in 1217414bd68fSmrg printf*) AC_MSG_RESULT([printf]) ;; 1218414bd68fSmrg print*) AC_MSG_RESULT([print -r]) ;; 1219414bd68fSmrg *) AC_MSG_RESULT([cat]) ;; 1220414bd68fSmrgesac 1221ee3138f1Smrg 1222414bd68fSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 1223414bd68fSmrg[_AS_DETECT_SUGGESTED([ 1224414bd68fSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1225414bd68fSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1226414bd68fSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1227414bd68fSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1228414bd68fSmrg PATH=/empty FPATH=/empty; export PATH FPATH 1229414bd68fSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1230414bd68fSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1231ee3138f1Smrg 1232414bd68fSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1233414bd68fSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1234414bd68fSmrg])# _LT_PROG_ECHO_BACKSLASH 1235ee3138f1Smrg 1236ee3138f1Smrg 1237414bd68fSmrg# _LT_WITH_SYSROOT 12383e72ca8cSmrg# ---------------- 1239414bd68fSmrgAC_DEFUN([_LT_WITH_SYSROOT], 1240414bd68fSmrg[AC_MSG_CHECKING([for sysroot]) 1241414bd68fSmrgAC_ARG_WITH([sysroot], 1242414bd68fSmrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1243414bd68fSmrg (or the compiler's sysroot if not specified).], 1244414bd68fSmrg[], [with_sysroot=no]) 12453e72ca8cSmrg 12463e72ca8cSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 12473e72ca8cSmrgdnl in case the user passed a directory name. 12483e72ca8cSmrglt_sysroot= 12493e72ca8cSmrgcase ${with_sysroot} in #( 12503e72ca8cSmrg yes) 12513e72ca8cSmrg if test "$GCC" = yes; then 12523e72ca8cSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 12533e72ca8cSmrg fi 12543e72ca8cSmrg ;; #( 12553e72ca8cSmrg /*) 12563e72ca8cSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 12573e72ca8cSmrg ;; #( 12583e72ca8cSmrg no|'') 12593e72ca8cSmrg ;; #( 12603e72ca8cSmrg *) 12613e72ca8cSmrg AC_MSG_RESULT([${with_sysroot}]) 12623e72ca8cSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 12633e72ca8cSmrg ;; 12643e72ca8cSmrgesac 1265ee3138f1Smrg 12663e72ca8cSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 12673e72ca8cSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 12683e72ca8cSmrg[dependent libraries, and in which our libraries should be installed.])]) 1269ee3138f1Smrg 12703e72ca8cSmrg# _LT_ENABLE_LOCK 12713e72ca8cSmrg# --------------- 12723e72ca8cSmrgm4_defun([_LT_ENABLE_LOCK], 12733e72ca8cSmrg[AC_ARG_ENABLE([libtool-lock], 12743e72ca8cSmrg [AS_HELP_STRING([--disable-libtool-lock], 12753e72ca8cSmrg [avoid locking (might break parallel builds)])]) 12763e72ca8cSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1277ee3138f1Smrg 12783e72ca8cSmrg# Some flags need to be propagated to the compiler or linker for good 12793e72ca8cSmrg# libtool support. 12803e72ca8cSmrgcase $host in 12813e72ca8cSmrgia64-*-hpux*) 12823e72ca8cSmrg # Find out which ABI we are using. 12833e72ca8cSmrg echo 'int i;' > conftest.$ac_ext 12843e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 12853e72ca8cSmrg case `/usr/bin/file conftest.$ac_objext` in 12863e72ca8cSmrg *ELF-32*) 12873e72ca8cSmrg HPUX_IA64_MODE="32" 12883e72ca8cSmrg ;; 12893e72ca8cSmrg *ELF-64*) 12903e72ca8cSmrg HPUX_IA64_MODE="64" 12913e72ca8cSmrg ;; 1292b425557eSmrg esac 1293a1ed278cSmrg fi 12943e72ca8cSmrg rm -rf conftest* 12953e72ca8cSmrg ;; 12963e72ca8cSmrg*-*-irix6*) 12973e72ca8cSmrg # Find out which ABI we are using. 12983e72ca8cSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 12993e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 13003e72ca8cSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 13013e72ca8cSmrg case `/usr/bin/file conftest.$ac_objext` in 13023e72ca8cSmrg *32-bit*) 13033e72ca8cSmrg LD="${LD-ld} -melf32bsmip" 13043e72ca8cSmrg ;; 13053e72ca8cSmrg *N32*) 13063e72ca8cSmrg LD="${LD-ld} -melf32bmipn32" 13073e72ca8cSmrg ;; 13083e72ca8cSmrg *64-bit*) 13093e72ca8cSmrg LD="${LD-ld} -melf64bmip" 13103e72ca8cSmrg ;; 13113e72ca8cSmrg esac 13123e72ca8cSmrg else 13133e72ca8cSmrg case `/usr/bin/file conftest.$ac_objext` in 13143e72ca8cSmrg *32-bit*) 13153e72ca8cSmrg LD="${LD-ld} -32" 13163e72ca8cSmrg ;; 13173e72ca8cSmrg *N32*) 13183e72ca8cSmrg LD="${LD-ld} -n32" 13193e72ca8cSmrg ;; 13203e72ca8cSmrg *64-bit*) 13213e72ca8cSmrg LD="${LD-ld} -64" 13223e72ca8cSmrg ;; 13233e72ca8cSmrg esac 13243e72ca8cSmrg fi 13253e72ca8cSmrg fi 13263e72ca8cSmrg rm -rf conftest* 1327a1ed278cSmrg ;; 1328ee3138f1Smrg 1329414bd68fSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13303e72ca8cSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 13313e72ca8cSmrg # Find out which ABI we are using. 13323e72ca8cSmrg echo 'int i;' > conftest.$ac_ext 13333e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 13343e72ca8cSmrg case `/usr/bin/file conftest.o` in 13353e72ca8cSmrg *32-bit*) 13363e72ca8cSmrg case $host in 13373e72ca8cSmrg x86_64-*kfreebsd*-gnu) 13383e72ca8cSmrg LD="${LD-ld} -m elf_i386_fbsd" 13393e72ca8cSmrg ;; 13403e72ca8cSmrg x86_64-*linux*) 13413e72ca8cSmrg LD="${LD-ld} -m elf_i386" 13423e72ca8cSmrg ;; 1343414bd68fSmrg powerpc64le-*linux*) 1344414bd68fSmrg LD="${LD-ld} -m elf32lppclinux" 1345414bd68fSmrg ;; 1346414bd68fSmrg powerpc64-*linux*) 13473e72ca8cSmrg LD="${LD-ld} -m elf32ppclinux" 13483e72ca8cSmrg ;; 13493e72ca8cSmrg s390x-*linux*) 13503e72ca8cSmrg LD="${LD-ld} -m elf_s390" 13513e72ca8cSmrg ;; 13523e72ca8cSmrg sparc64-*linux*) 13533e72ca8cSmrg LD="${LD-ld} -m elf32_sparc" 13543e72ca8cSmrg ;; 13553e72ca8cSmrg esac 13563e72ca8cSmrg ;; 13573e72ca8cSmrg *64-bit*) 13583e72ca8cSmrg case $host in 13593e72ca8cSmrg x86_64-*kfreebsd*-gnu) 13603e72ca8cSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 13613e72ca8cSmrg ;; 13623e72ca8cSmrg x86_64-*linux*) 13633e72ca8cSmrg LD="${LD-ld} -m elf_x86_64" 13643e72ca8cSmrg ;; 1365414bd68fSmrg powerpcle-*linux*) 1366414bd68fSmrg LD="${LD-ld} -m elf64lppc" 1367414bd68fSmrg ;; 1368414bd68fSmrg powerpc-*linux*) 13693e72ca8cSmrg LD="${LD-ld} -m elf64ppc" 13703e72ca8cSmrg ;; 13713e72ca8cSmrg s390*-*linux*|s390*-*tpf*) 13723e72ca8cSmrg LD="${LD-ld} -m elf64_s390" 13733e72ca8cSmrg ;; 13743e72ca8cSmrg sparc*-*linux*) 13753e72ca8cSmrg LD="${LD-ld} -m elf64_sparc" 13763e72ca8cSmrg ;; 13773e72ca8cSmrg esac 13783e72ca8cSmrg ;; 13793e72ca8cSmrg esac 13803e72ca8cSmrg fi 13813e72ca8cSmrg rm -rf conftest* 1382a1ed278cSmrg ;; 1383ee3138f1Smrg 13843e72ca8cSmrg*-*-sco3.2v5*) 13853e72ca8cSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 13863e72ca8cSmrg SAVE_CFLAGS="$CFLAGS" 13873e72ca8cSmrg CFLAGS="$CFLAGS -belf" 13883e72ca8cSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 13893e72ca8cSmrg [AC_LANG_PUSH(C) 13903e72ca8cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 13913e72ca8cSmrg AC_LANG_POP]) 13923e72ca8cSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 13933e72ca8cSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 13943e72ca8cSmrg CFLAGS="$SAVE_CFLAGS" 13953e72ca8cSmrg fi 13963e72ca8cSmrg ;; 13973e72ca8cSmrg*-*solaris*) 13983e72ca8cSmrg # Find out which ABI we are using. 13993e72ca8cSmrg echo 'int i;' > conftest.$ac_ext 14003e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 14013e72ca8cSmrg case `/usr/bin/file conftest.o` in 14023e72ca8cSmrg *64-bit*) 14033e72ca8cSmrg case $lt_cv_prog_gnu_ld in 14043e72ca8cSmrg yes*) 14053e72ca8cSmrg case $host in 14063e72ca8cSmrg i?86-*-solaris*) 14073e72ca8cSmrg LD="${LD-ld} -m elf_x86_64" 14083e72ca8cSmrg ;; 14093e72ca8cSmrg sparc*-*-solaris*) 14103e72ca8cSmrg LD="${LD-ld} -m elf64_sparc" 14113e72ca8cSmrg ;; 14123e72ca8cSmrg esac 14133e72ca8cSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 14143e72ca8cSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 14153e72ca8cSmrg LD="${LD-ld}_sol2" 14163e72ca8cSmrg fi 14173e72ca8cSmrg ;; 14183e72ca8cSmrg *) 14193e72ca8cSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14203e72ca8cSmrg LD="${LD-ld} -64" 14213e72ca8cSmrg fi 14223e72ca8cSmrg ;; 14233e72ca8cSmrg esac 14243e72ca8cSmrg ;; 14253e72ca8cSmrg esac 14263e72ca8cSmrg fi 14273e72ca8cSmrg rm -rf conftest* 1428a1ed278cSmrg ;; 14293e72ca8cSmrgesac 1430ee3138f1Smrg 14313e72ca8cSmrgneed_locks="$enable_libtool_lock" 14323e72ca8cSmrg])# _LT_ENABLE_LOCK 1433ee3138f1Smrg 1434ee3138f1Smrg 14353e72ca8cSmrg# _LT_PROG_AR 14363e72ca8cSmrg# ----------- 14373e72ca8cSmrgm4_defun([_LT_PROG_AR], 14383e72ca8cSmrg[AC_CHECK_TOOLS(AR, [ar], false) 14393e72ca8cSmrg: ${AR=ar} 14403e72ca8cSmrg: ${AR_FLAGS=cru} 14413e72ca8cSmrg_LT_DECL([], [AR], [1], [The archiver]) 14423e72ca8cSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 14433e72ca8cSmrg 14443e72ca8cSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 14453e72ca8cSmrg [lt_cv_ar_at_file=no 14463e72ca8cSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 14473e72ca8cSmrg [echo conftest.$ac_objext > conftest.lst 14483e72ca8cSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 14493e72ca8cSmrg AC_TRY_EVAL([lt_ar_try]) 14503e72ca8cSmrg if test "$ac_status" -eq 0; then 14513e72ca8cSmrg # Ensure the archiver fails upon bogus file names. 14523e72ca8cSmrg rm -f conftest.$ac_objext libconftest.a 14533e72ca8cSmrg AC_TRY_EVAL([lt_ar_try]) 14543e72ca8cSmrg if test "$ac_status" -ne 0; then 14553e72ca8cSmrg lt_cv_ar_at_file=@ 14563e72ca8cSmrg fi 14573e72ca8cSmrg fi 14583e72ca8cSmrg rm -f conftest.* libconftest.a 14593e72ca8cSmrg ]) 14603e72ca8cSmrg ]) 14613e72ca8cSmrg 14623e72ca8cSmrgif test "x$lt_cv_ar_at_file" = xno; then 14633e72ca8cSmrg archiver_list_spec= 14643e72ca8cSmrgelse 14653e72ca8cSmrg archiver_list_spec=$lt_cv_ar_at_file 14663e72ca8cSmrgfi 14673e72ca8cSmrg_LT_DECL([], [archiver_list_spec], [1], 14683e72ca8cSmrg [How to feed a file listing to the archiver]) 14693e72ca8cSmrg])# _LT_PROG_AR 14703e72ca8cSmrg 14713e72ca8cSmrg 14723e72ca8cSmrg# _LT_CMD_OLD_ARCHIVE 14733e72ca8cSmrg# ------------------- 14743e72ca8cSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 14753e72ca8cSmrg[_LT_PROG_AR 14763e72ca8cSmrg 14773e72ca8cSmrgAC_CHECK_TOOL(STRIP, strip, :) 14783e72ca8cSmrgtest -z "$STRIP" && STRIP=: 14793e72ca8cSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 14803e72ca8cSmrg 14813e72ca8cSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 14823e72ca8cSmrgtest -z "$RANLIB" && RANLIB=: 14833e72ca8cSmrg_LT_DECL([], [RANLIB], [1], 14843e72ca8cSmrg [Commands used to install an old-style archive]) 14853e72ca8cSmrg 14863e72ca8cSmrg# Determine commands to create old-style static archives. 14873e72ca8cSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 14883e72ca8cSmrgold_postinstall_cmds='chmod 644 $oldlib' 14893e72ca8cSmrgold_postuninstall_cmds= 14903e72ca8cSmrg 14913e72ca8cSmrgif test -n "$RANLIB"; then 1492a1ed278cSmrg case $host_os in 14933e72ca8cSmrg openbsd*) 14943e72ca8cSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1495a1ed278cSmrg ;; 1496a1ed278cSmrg *) 14973e72ca8cSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1498a1ed278cSmrg ;; 1499a1ed278cSmrg esac 15003e72ca8cSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15013e72ca8cSmrgfi 1502ee3138f1Smrg 15033e72ca8cSmrgcase $host_os in 15043e72ca8cSmrg darwin*) 15053e72ca8cSmrg lock_old_archive_extraction=yes ;; 15063e72ca8cSmrg *) 15073e72ca8cSmrg lock_old_archive_extraction=no ;; 15083e72ca8cSmrgesac 15093e72ca8cSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 15103e72ca8cSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15113e72ca8cSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 15123e72ca8cSmrg [Commands used to build an old-style archive]) 15133e72ca8cSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 15143e72ca8cSmrg [Whether to use a lock for old archive extraction]) 15153e72ca8cSmrg])# _LT_CMD_OLD_ARCHIVE 1516ee3138f1Smrg 151734977a2fSmrg 15183e72ca8cSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15193e72ca8cSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 15203e72ca8cSmrg# ---------------------------------------------------------------- 15213e72ca8cSmrg# Check whether the given compiler option works 15223e72ca8cSmrgAC_DEFUN([_LT_COMPILER_OPTION], 15233e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15243e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 15253e72ca8cSmrgAC_CACHE_CHECK([$1], [$2], 15263e72ca8cSmrg [$2=no 15273e72ca8cSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15283e72ca8cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15293e72ca8cSmrg lt_compiler_flag="$3" 15303e72ca8cSmrg # Insert the option either (1) after the last *FLAGS variable, or 15313e72ca8cSmrg # (2) before a word containing "conftest.", or (3) at the end. 15323e72ca8cSmrg # Note that $ac_compile itself does not contain backslashes and begins 15333e72ca8cSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 15343e72ca8cSmrg # The option is referenced via a variable to avoid confusing sed. 15353e72ca8cSmrg lt_compile=`echo "$ac_compile" | $SED \ 15363e72ca8cSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 15373e72ca8cSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 15383e72ca8cSmrg -e 's:$: $lt_compiler_flag:'` 15393e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 15403e72ca8cSmrg (eval "$lt_compile" 2>conftest.err) 15413e72ca8cSmrg ac_status=$? 15423e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 15433e72ca8cSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 15443e72ca8cSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 15453e72ca8cSmrg # The compiler can only warn and ignore the option if not recognized 15463e72ca8cSmrg # So say no if there are warnings other than the usual output. 15473e72ca8cSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 15483e72ca8cSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15493e72ca8cSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 15503e72ca8cSmrg $2=yes 15513e72ca8cSmrg fi 15523e72ca8cSmrg fi 15533e72ca8cSmrg $RM conftest* 15543e72ca8cSmrg]) 1555ee3138f1Smrg 15563e72ca8cSmrgif test x"[$]$2" = xyes; then 15573e72ca8cSmrg m4_if([$5], , :, [$5]) 15583e72ca8cSmrgelse 15593e72ca8cSmrg m4_if([$6], , :, [$6]) 15603e72ca8cSmrgfi 15613e72ca8cSmrg])# _LT_COMPILER_OPTION 1562ee3138f1Smrg 15633e72ca8cSmrg# Old name: 15643e72ca8cSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 15653e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 15663e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1567b425557eSmrg 1568ee3138f1Smrg 15693e72ca8cSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15703e72ca8cSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 15713e72ca8cSmrg# ---------------------------------------------------- 15723e72ca8cSmrg# Check whether the given linker option works 15733e72ca8cSmrgAC_DEFUN([_LT_LINKER_OPTION], 15743e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15753e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 15763e72ca8cSmrgAC_CACHE_CHECK([$1], [$2], 15773e72ca8cSmrg [$2=no 15783e72ca8cSmrg save_LDFLAGS="$LDFLAGS" 15793e72ca8cSmrg LDFLAGS="$LDFLAGS $3" 15803e72ca8cSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 15813e72ca8cSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 15823e72ca8cSmrg # The linker can only warn and ignore the option if not recognized 15833e72ca8cSmrg # So say no if there are warnings 15843e72ca8cSmrg if test -s conftest.err; then 15853e72ca8cSmrg # Append any errors to the config.log. 15863e72ca8cSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 15873e72ca8cSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 15883e72ca8cSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15893e72ca8cSmrg if diff conftest.exp conftest.er2 >/dev/null; then 15903e72ca8cSmrg $2=yes 15913e72ca8cSmrg fi 15923e72ca8cSmrg else 15933e72ca8cSmrg $2=yes 15943e72ca8cSmrg fi 15953e72ca8cSmrg fi 15963e72ca8cSmrg $RM -r conftest* 15973e72ca8cSmrg LDFLAGS="$save_LDFLAGS" 15983e72ca8cSmrg]) 159934977a2fSmrg 16003e72ca8cSmrgif test x"[$]$2" = xyes; then 16013e72ca8cSmrg m4_if([$4], , :, [$4]) 16023e72ca8cSmrgelse 16033e72ca8cSmrg m4_if([$5], , :, [$5]) 16043e72ca8cSmrgfi 16053e72ca8cSmrg])# _LT_LINKER_OPTION 1606b425557eSmrg 16073e72ca8cSmrg# Old name: 16083e72ca8cSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16093e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 16103e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 161134977a2fSmrg 161234977a2fSmrg 16133e72ca8cSmrg# LT_CMD_MAX_LEN 16143e72ca8cSmrg#--------------- 16153e72ca8cSmrgAC_DEFUN([LT_CMD_MAX_LEN], 16163e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16173e72ca8cSmrg# find the maximum length of command line arguments 16183e72ca8cSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 16193e72ca8cSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 16203e72ca8cSmrg i=0 16213e72ca8cSmrg teststring="ABCD" 1622ee3138f1Smrg 16233e72ca8cSmrg case $build_os in 16243e72ca8cSmrg msdosdjgpp*) 16253e72ca8cSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 16263e72ca8cSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 16273e72ca8cSmrg # during glob expansion). Even if it were fixed, the result of this 16283e72ca8cSmrg # check would be larger than it should be. 16293e72ca8cSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 16303e72ca8cSmrg ;; 1631ee3138f1Smrg 16323e72ca8cSmrg gnu*) 16333e72ca8cSmrg # Under GNU Hurd, this test is not required because there is 16343e72ca8cSmrg # no limit to the length of command line arguments. 16353e72ca8cSmrg # Libtool will interpret -1 as no limit whatsoever 16363e72ca8cSmrg lt_cv_sys_max_cmd_len=-1; 16373e72ca8cSmrg ;; 1638ee3138f1Smrg 16393e72ca8cSmrg cygwin* | mingw* | cegcc*) 16403e72ca8cSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 16413e72ca8cSmrg # about 5 minutes as the teststring grows exponentially. 16423e72ca8cSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 16433e72ca8cSmrg # you end up with a "frozen" computer, even though with patience 16443e72ca8cSmrg # the test eventually succeeds (with a max line length of 256k). 16453e72ca8cSmrg # Instead, let's just punt: use the minimum linelength reported by 16463e72ca8cSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 16473e72ca8cSmrg lt_cv_sys_max_cmd_len=8192; 16483e72ca8cSmrg ;; 1649ee3138f1Smrg 16503e72ca8cSmrg mint*) 16513e72ca8cSmrg # On MiNT this can take a long time and run out of memory. 16523e72ca8cSmrg lt_cv_sys_max_cmd_len=8192; 16533e72ca8cSmrg ;; 1654ee3138f1Smrg 16553e72ca8cSmrg amigaos*) 16563e72ca8cSmrg # On AmigaOS with pdksh, this test takes hours, literally. 16573e72ca8cSmrg # So we just punt and use a minimum line length of 8192. 16583e72ca8cSmrg lt_cv_sys_max_cmd_len=8192; 16593e72ca8cSmrg ;; 1660ee3138f1Smrg 16613e72ca8cSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 16623e72ca8cSmrg # This has been around since 386BSD, at least. Likely further. 16633e72ca8cSmrg if test -x /sbin/sysctl; then 16643e72ca8cSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 16653e72ca8cSmrg elif test -x /usr/sbin/sysctl; then 16663e72ca8cSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 16673e72ca8cSmrg else 16683e72ca8cSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 16693e72ca8cSmrg fi 16703e72ca8cSmrg # And add a safety zone 16713e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 16723e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 16733e72ca8cSmrg ;; 1674b425557eSmrg 16753e72ca8cSmrg interix*) 16763e72ca8cSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 16773e72ca8cSmrg lt_cv_sys_max_cmd_len=196608 16783e72ca8cSmrg ;; 16793e72ca8cSmrg 16803e72ca8cSmrg os2*) 16813e72ca8cSmrg # The test takes a long time on OS/2. 16823e72ca8cSmrg lt_cv_sys_max_cmd_len=8192 16833e72ca8cSmrg ;; 16843e72ca8cSmrg 16853e72ca8cSmrg osf*) 16863e72ca8cSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 16873e72ca8cSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 16883e72ca8cSmrg # nice to cause kernel panics so lets avoid the loop below. 16893e72ca8cSmrg # First set a reasonable default. 16903e72ca8cSmrg lt_cv_sys_max_cmd_len=16384 16913e72ca8cSmrg # 16923e72ca8cSmrg if test -x /sbin/sysconfig; then 16933e72ca8cSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 16943e72ca8cSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 16953e72ca8cSmrg esac 16963e72ca8cSmrg fi 16973e72ca8cSmrg ;; 16983e72ca8cSmrg sco3.2v5*) 16993e72ca8cSmrg lt_cv_sys_max_cmd_len=102400 17003e72ca8cSmrg ;; 17013e72ca8cSmrg sysv5* | sco5v6* | sysv4.2uw2*) 17023e72ca8cSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 17033e72ca8cSmrg if test -n "$kargmax"; then 17043e72ca8cSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 17053e72ca8cSmrg else 17063e72ca8cSmrg lt_cv_sys_max_cmd_len=32768 17073e72ca8cSmrg fi 17083e72ca8cSmrg ;; 17093e72ca8cSmrg *) 17103e72ca8cSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 17113e72ca8cSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 17123e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17133e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17143e72ca8cSmrg else 17153e72ca8cSmrg # Make teststring a little bigger before we do anything with it. 17163e72ca8cSmrg # a 1K string should be a reasonable start. 17173e72ca8cSmrg for i in 1 2 3 4 5 6 7 8 ; do 17183e72ca8cSmrg teststring=$teststring$teststring 17193e72ca8cSmrg done 17203e72ca8cSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17213e72ca8cSmrg # If test is not a shell built-in, we'll probably end up computing a 17223e72ca8cSmrg # maximum length that is only half of the actual maximum length, but 17233e72ca8cSmrg # we can't tell. 17243e72ca8cSmrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 17253e72ca8cSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 17263e72ca8cSmrg test $i != 17 # 1/2 MB should be enough 17273e72ca8cSmrg do 17283e72ca8cSmrg i=`expr $i + 1` 17293e72ca8cSmrg teststring=$teststring$teststring 17303e72ca8cSmrg done 17313e72ca8cSmrg # Only check the string length outside the loop. 17323e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 17333e72ca8cSmrg teststring= 17343e72ca8cSmrg # Add a significant safety factor because C++ compilers can tack on 17353e72ca8cSmrg # massive amounts of additional arguments before passing them to the 17363e72ca8cSmrg # linker. It appears as though 1/2 is a usable value. 17373e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 17383e72ca8cSmrg fi 17393e72ca8cSmrg ;; 1740b425557eSmrg esac 17413e72ca8cSmrg]) 17423e72ca8cSmrgif test -n $lt_cv_sys_max_cmd_len ; then 17433e72ca8cSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 17443e72ca8cSmrgelse 17453e72ca8cSmrg AC_MSG_RESULT(none) 17463e72ca8cSmrgfi 17473e72ca8cSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 17483e72ca8cSmrg_LT_DECL([], [max_cmd_len], [0], 17493e72ca8cSmrg [What is the maximum length of a command?]) 17503e72ca8cSmrg])# LT_CMD_MAX_LEN 1751ee3138f1Smrg 17523e72ca8cSmrg# Old name: 17533e72ca8cSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 17543e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 17553e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1756ee3138f1Smrg 1757ee3138f1Smrg 17583e72ca8cSmrg# _LT_HEADER_DLFCN 17593e72ca8cSmrg# ---------------- 17603e72ca8cSmrgm4_defun([_LT_HEADER_DLFCN], 17613e72ca8cSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 17623e72ca8cSmrg])# _LT_HEADER_DLFCN 1763ee3138f1Smrg 1764ee3138f1Smrg 17653e72ca8cSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 17663e72ca8cSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 17673e72ca8cSmrg# ---------------------------------------------------------------- 17683e72ca8cSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 17693e72ca8cSmrg[m4_require([_LT_HEADER_DLFCN])dnl 17703e72ca8cSmrgif test "$cross_compiling" = yes; then : 17713e72ca8cSmrg [$4] 17723e72ca8cSmrgelse 17733e72ca8cSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 17743e72ca8cSmrg lt_status=$lt_dlunknown 17753e72ca8cSmrg cat > conftest.$ac_ext <<_LT_EOF 17763e72ca8cSmrg[#line $LINENO "configure" 17773e72ca8cSmrg#include "confdefs.h" 1778ee3138f1Smrg 17793e72ca8cSmrg#if HAVE_DLFCN_H 17803e72ca8cSmrg#include <dlfcn.h> 17813e72ca8cSmrg#endif 1782ee3138f1Smrg 17833e72ca8cSmrg#include <stdio.h> 1784ee3138f1Smrg 17853e72ca8cSmrg#ifdef RTLD_GLOBAL 17863e72ca8cSmrg# define LT_DLGLOBAL RTLD_GLOBAL 17873e72ca8cSmrg#else 17883e72ca8cSmrg# ifdef DL_GLOBAL 17893e72ca8cSmrg# define LT_DLGLOBAL DL_GLOBAL 17903e72ca8cSmrg# else 17913e72ca8cSmrg# define LT_DLGLOBAL 0 17923e72ca8cSmrg# endif 17933e72ca8cSmrg#endif 1794ee3138f1Smrg 17953e72ca8cSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 17963e72ca8cSmrg find out it does not work in some platform. */ 17973e72ca8cSmrg#ifndef LT_DLLAZY_OR_NOW 17983e72ca8cSmrg# ifdef RTLD_LAZY 17993e72ca8cSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 18003e72ca8cSmrg# else 18013e72ca8cSmrg# ifdef DL_LAZY 18023e72ca8cSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 18033e72ca8cSmrg# else 18043e72ca8cSmrg# ifdef RTLD_NOW 18053e72ca8cSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 18063e72ca8cSmrg# else 18073e72ca8cSmrg# ifdef DL_NOW 18083e72ca8cSmrg# define LT_DLLAZY_OR_NOW DL_NOW 18093e72ca8cSmrg# else 18103e72ca8cSmrg# define LT_DLLAZY_OR_NOW 0 18113e72ca8cSmrg# endif 18123e72ca8cSmrg# endif 18133e72ca8cSmrg# endif 18143e72ca8cSmrg# endif 18153e72ca8cSmrg#endif 1816ee3138f1Smrg 18173e72ca8cSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 18183e72ca8cSmrg correspondingly for the symbols needed. */ 18193e72ca8cSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 18203e72ca8cSmrgint fnord () __attribute__((visibility("default"))); 18213e72ca8cSmrg#endif 1822b425557eSmrg 18233e72ca8cSmrgint fnord () { return 42; } 18243e72ca8cSmrgint main () 18253e72ca8cSmrg{ 18263e72ca8cSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 18273e72ca8cSmrg int status = $lt_dlunknown; 1828b425557eSmrg 18293e72ca8cSmrg if (self) 18303e72ca8cSmrg { 18313e72ca8cSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 18323e72ca8cSmrg else 18333e72ca8cSmrg { 18343e72ca8cSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 18353e72ca8cSmrg else puts (dlerror ()); 18363e72ca8cSmrg } 18373e72ca8cSmrg /* dlclose (self); */ 18383e72ca8cSmrg } 1839a1ed278cSmrg else 18403e72ca8cSmrg puts (dlerror ()); 18413e72ca8cSmrg 18423e72ca8cSmrg return status; 18433e72ca8cSmrg}] 18443e72ca8cSmrg_LT_EOF 18453e72ca8cSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 18463e72ca8cSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 18473e72ca8cSmrg lt_status=$? 18483e72ca8cSmrg case x$lt_status in 18493e72ca8cSmrg x$lt_dlno_uscore) $1 ;; 18503e72ca8cSmrg x$lt_dlneed_uscore) $2 ;; 18513e72ca8cSmrg x$lt_dlunknown|x*) $3 ;; 18523e72ca8cSmrg esac 18533e72ca8cSmrg else : 18543e72ca8cSmrg # compilation failed 18553e72ca8cSmrg $3 1856a1ed278cSmrg fi 1857a1ed278cSmrgfi 18583e72ca8cSmrgrm -fr conftest* 18593e72ca8cSmrg])# _LT_TRY_DLOPEN_SELF 1860b425557eSmrg 1861b425557eSmrg 18623e72ca8cSmrg# LT_SYS_DLOPEN_SELF 18633e72ca8cSmrg# ------------------ 18643e72ca8cSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 18653e72ca8cSmrg[m4_require([_LT_HEADER_DLFCN])dnl 18663e72ca8cSmrgif test "x$enable_dlopen" != xyes; then 18673e72ca8cSmrg enable_dlopen=unknown 18683e72ca8cSmrg enable_dlopen_self=unknown 18693e72ca8cSmrg enable_dlopen_self_static=unknown 18703e72ca8cSmrgelse 18713e72ca8cSmrg lt_cv_dlopen=no 18723e72ca8cSmrg lt_cv_dlopen_libs= 1873b425557eSmrg 18743e72ca8cSmrg case $host_os in 18753e72ca8cSmrg beos*) 18763e72ca8cSmrg lt_cv_dlopen="load_add_on" 18773e72ca8cSmrg lt_cv_dlopen_libs= 18783e72ca8cSmrg lt_cv_dlopen_self=yes 18793e72ca8cSmrg ;; 1880b425557eSmrg 18813e72ca8cSmrg mingw* | pw32* | cegcc*) 18823e72ca8cSmrg lt_cv_dlopen="LoadLibrary" 18833e72ca8cSmrg lt_cv_dlopen_libs= 18843e72ca8cSmrg ;; 18853e72ca8cSmrg 18863e72ca8cSmrg cygwin*) 18873e72ca8cSmrg lt_cv_dlopen="dlopen" 18883e72ca8cSmrg lt_cv_dlopen_libs= 18893e72ca8cSmrg ;; 18903e72ca8cSmrg 18913e72ca8cSmrg darwin*) 18923e72ca8cSmrg # if libdl is installed we need to link against it 18933e72ca8cSmrg AC_CHECK_LIB([dl], [dlopen], 18943e72ca8cSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 18953e72ca8cSmrg lt_cv_dlopen="dyld" 18963e72ca8cSmrg lt_cv_dlopen_libs= 18973e72ca8cSmrg lt_cv_dlopen_self=yes 18983e72ca8cSmrg ]) 1899a1ed278cSmrg ;; 19003e72ca8cSmrg 1901a1ed278cSmrg *) 19023e72ca8cSmrg AC_CHECK_FUNC([shl_load], 19033e72ca8cSmrg [lt_cv_dlopen="shl_load"], 19043e72ca8cSmrg [AC_CHECK_LIB([dld], [shl_load], 19053e72ca8cSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 19063e72ca8cSmrg [AC_CHECK_FUNC([dlopen], 19073e72ca8cSmrg [lt_cv_dlopen="dlopen"], 19083e72ca8cSmrg [AC_CHECK_LIB([dl], [dlopen], 19093e72ca8cSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 19103e72ca8cSmrg [AC_CHECK_LIB([svld], [dlopen], 19113e72ca8cSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 19123e72ca8cSmrg [AC_CHECK_LIB([dld], [dld_link], 19133e72ca8cSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 19143e72ca8cSmrg ]) 19153e72ca8cSmrg ]) 19163e72ca8cSmrg ]) 19173e72ca8cSmrg ]) 19183e72ca8cSmrg ]) 1919b425557eSmrg ;; 1920b425557eSmrg esac 1921ee3138f1Smrg 19223e72ca8cSmrg if test "x$lt_cv_dlopen" != xno; then 19233e72ca8cSmrg enable_dlopen=yes 19243e72ca8cSmrg else 19253e72ca8cSmrg enable_dlopen=no 19263e72ca8cSmrg fi 1927ee3138f1Smrg 19283e72ca8cSmrg case $lt_cv_dlopen in 19293e72ca8cSmrg dlopen) 19303e72ca8cSmrg save_CPPFLAGS="$CPPFLAGS" 19313e72ca8cSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1932ee3138f1Smrg 19333e72ca8cSmrg save_LDFLAGS="$LDFLAGS" 19343e72ca8cSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1935ee3138f1Smrg 19363e72ca8cSmrg save_LIBS="$LIBS" 19373e72ca8cSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 1938ee3138f1Smrg 19393e72ca8cSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 19403e72ca8cSmrg lt_cv_dlopen_self, [dnl 19413e72ca8cSmrg _LT_TRY_DLOPEN_SELF( 19423e72ca8cSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 19433e72ca8cSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 19443e72ca8cSmrg ]) 1945b425557eSmrg 19463e72ca8cSmrg if test "x$lt_cv_dlopen_self" = xyes; then 19473e72ca8cSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 19483e72ca8cSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 19493e72ca8cSmrg lt_cv_dlopen_self_static, [dnl 19503e72ca8cSmrg _LT_TRY_DLOPEN_SELF( 19513e72ca8cSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 19523e72ca8cSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 19533e72ca8cSmrg ]) 1954a1ed278cSmrg fi 19553e72ca8cSmrg 19563e72ca8cSmrg CPPFLAGS="$save_CPPFLAGS" 19573e72ca8cSmrg LDFLAGS="$save_LDFLAGS" 19583e72ca8cSmrg LIBS="$save_LIBS" 1959a1ed278cSmrg ;; 19603e72ca8cSmrg esac 1961b425557eSmrg 19623e72ca8cSmrg case $lt_cv_dlopen_self in 19633e72ca8cSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 19643e72ca8cSmrg *) enable_dlopen_self=unknown ;; 19653e72ca8cSmrg esac 1966b425557eSmrg 19673e72ca8cSmrg case $lt_cv_dlopen_self_static in 19683e72ca8cSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 19693e72ca8cSmrg *) enable_dlopen_self_static=unknown ;; 19703e72ca8cSmrg esac 19713e72ca8cSmrgfi 19723e72ca8cSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 19733e72ca8cSmrg [Whether dlopen is supported]) 19743e72ca8cSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 19753e72ca8cSmrg [Whether dlopen of programs is supported]) 19763e72ca8cSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 19773e72ca8cSmrg [Whether dlopen of statically linked programs is supported]) 19783e72ca8cSmrg])# LT_SYS_DLOPEN_SELF 1979b425557eSmrg 19803e72ca8cSmrg# Old name: 19813e72ca8cSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 19823e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 19833e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1984b425557eSmrg 1985b425557eSmrg 19863e72ca8cSmrg# _LT_COMPILER_C_O([TAGNAME]) 19873e72ca8cSmrg# --------------------------- 19883e72ca8cSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 19893e72ca8cSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 19903e72ca8cSmrgm4_defun([_LT_COMPILER_C_O], 19913e72ca8cSmrg[m4_require([_LT_DECL_SED])dnl 19923e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 19933e72ca8cSmrgm4_require([_LT_TAG_COMPILER])dnl 19943e72ca8cSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 19953e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 19963e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 19973e72ca8cSmrg $RM -r conftest 2>/dev/null 19983e72ca8cSmrg mkdir conftest 19993e72ca8cSmrg cd conftest 20003e72ca8cSmrg mkdir out 20013e72ca8cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2002a1ed278cSmrg 20033e72ca8cSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 20043e72ca8cSmrg # Insert the option either (1) after the last *FLAGS variable, or 20053e72ca8cSmrg # (2) before a word containing "conftest.", or (3) at the end. 20063e72ca8cSmrg # Note that $ac_compile itself does not contain backslashes and begins 20073e72ca8cSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 20083e72ca8cSmrg lt_compile=`echo "$ac_compile" | $SED \ 20093e72ca8cSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 20103e72ca8cSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 20113e72ca8cSmrg -e 's:$: $lt_compiler_flag:'` 20123e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 20133e72ca8cSmrg (eval "$lt_compile" 2>out/conftest.err) 20143e72ca8cSmrg ac_status=$? 20153e72ca8cSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 20163e72ca8cSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 20173e72ca8cSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 20183e72ca8cSmrg then 20193e72ca8cSmrg # The compiler can only warn and ignore the option if not recognized 20203e72ca8cSmrg # So say no if there are warnings 20213e72ca8cSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 20223e72ca8cSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 20233e72ca8cSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 20243e72ca8cSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 20253e72ca8cSmrg fi 20263e72ca8cSmrg fi 20273e72ca8cSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 20283e72ca8cSmrg $RM conftest* 20293e72ca8cSmrg # SGI C++ compiler will create directory out/ii_files/ for 20303e72ca8cSmrg # template instantiation 20313e72ca8cSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 20323e72ca8cSmrg $RM out/* && rmdir out 20333e72ca8cSmrg cd .. 20343e72ca8cSmrg $RM -r conftest 20353e72ca8cSmrg $RM conftest* 20363e72ca8cSmrg]) 20373e72ca8cSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 20383e72ca8cSmrg [Does compiler simultaneously support -c and -o options?]) 20393e72ca8cSmrg])# _LT_COMPILER_C_O 2040a1ed278cSmrg 20413e72ca8cSmrg 20423e72ca8cSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 20433e72ca8cSmrg# ---------------------------------- 20443e72ca8cSmrg# Check to see if we can do hard links to lock some files if needed 20453e72ca8cSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 20463e72ca8cSmrg[m4_require([_LT_ENABLE_LOCK])dnl 20473e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20483e72ca8cSmrg_LT_COMPILER_C_O([$1]) 20493e72ca8cSmrg 20503e72ca8cSmrghard_links="nottested" 20513e72ca8cSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 20523e72ca8cSmrg # do not overwrite the value of need_locks provided by the user 20533e72ca8cSmrg AC_MSG_CHECKING([if we can lock with hard links]) 20543e72ca8cSmrg hard_links=yes 20553e72ca8cSmrg $RM conftest* 20563e72ca8cSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 20573e72ca8cSmrg touch conftest.a 20583e72ca8cSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 20593e72ca8cSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 20603e72ca8cSmrg AC_MSG_RESULT([$hard_links]) 20613e72ca8cSmrg if test "$hard_links" = no; then 20623e72ca8cSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 20633e72ca8cSmrg need_locks=warn 2064b425557eSmrg fi 20653e72ca8cSmrgelse 20663e72ca8cSmrg need_locks=no 20673e72ca8cSmrgfi 20683e72ca8cSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 20693e72ca8cSmrg])# _LT_COMPILER_FILE_LOCKS 2070b425557eSmrg 2071a1ed278cSmrg 20723e72ca8cSmrg# _LT_CHECK_OBJDIR 20733e72ca8cSmrg# ---------------- 20743e72ca8cSmrgm4_defun([_LT_CHECK_OBJDIR], 20753e72ca8cSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 20763e72ca8cSmrg[rm -f .libs 2>/dev/null 20773e72ca8cSmrgmkdir .libs 2>/dev/null 20783e72ca8cSmrgif test -d .libs; then 20793e72ca8cSmrg lt_cv_objdir=.libs 20803e72ca8cSmrgelse 20813e72ca8cSmrg # MS-DOS does not allow filenames that begin with a dot. 20823e72ca8cSmrg lt_cv_objdir=_libs 20833e72ca8cSmrgfi 20843e72ca8cSmrgrmdir .libs 2>/dev/null]) 20853e72ca8cSmrgobjdir=$lt_cv_objdir 20863e72ca8cSmrg_LT_DECL([], [objdir], [0], 20873e72ca8cSmrg [The name of the directory that contains temporary libtool files])dnl 20883e72ca8cSmrgm4_pattern_allow([LT_OBJDIR])dnl 20893e72ca8cSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 20903e72ca8cSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 20913e72ca8cSmrg])# _LT_CHECK_OBJDIR 2092a1ed278cSmrg 20933e72ca8cSmrg 20943e72ca8cSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 20953e72ca8cSmrg# -------------------------------------- 20963e72ca8cSmrg# Check hardcoding attributes. 20973e72ca8cSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 20983e72ca8cSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 20993e72ca8cSmrg_LT_TAGVAR(hardcode_action, $1)= 21003e72ca8cSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21013e72ca8cSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 21023e72ca8cSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 21033e72ca8cSmrg 21043e72ca8cSmrg # We can hardcode non-existent directories. 21053e72ca8cSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 21063e72ca8cSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 21073e72ca8cSmrg # have to relink, otherwise we might link with an installed library 21083e72ca8cSmrg # when we should be linking with a yet-to-be-installed one 21093e72ca8cSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 21103e72ca8cSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 21113e72ca8cSmrg # Linking always hardcodes the temporary library directory. 21123e72ca8cSmrg _LT_TAGVAR(hardcode_action, $1)=relink 2113a1ed278cSmrg else 21143e72ca8cSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21153e72ca8cSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 211634977a2fSmrg fi 21173e72ca8cSmrgelse 21183e72ca8cSmrg # We cannot hardcode anything, or else we can only hardcode existing 21193e72ca8cSmrg # directories. 21203e72ca8cSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 21213e72ca8cSmrgfi 21223e72ca8cSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 212334977a2fSmrg 21243e72ca8cSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 21253e72ca8cSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 21263e72ca8cSmrg # Fast installation is not supported 21273e72ca8cSmrg enable_fast_install=no 21283e72ca8cSmrgelif test "$shlibpath_overrides_runpath" = yes || 21293e72ca8cSmrg test "$enable_shared" = no; then 21303e72ca8cSmrg # Fast installation is not necessary 21313e72ca8cSmrg enable_fast_install=needless 21323e72ca8cSmrgfi 21333e72ca8cSmrg_LT_TAGDECL([], [hardcode_action], [0], 21343e72ca8cSmrg [How to hardcode a shared library path into an executable]) 21353e72ca8cSmrg])# _LT_LINKER_HARDCODE_LIBPATH 213634977a2fSmrg 213734977a2fSmrg 21383e72ca8cSmrg# _LT_CMD_STRIPLIB 21393e72ca8cSmrg# ---------------- 21403e72ca8cSmrgm4_defun([_LT_CMD_STRIPLIB], 21413e72ca8cSmrg[m4_require([_LT_DECL_EGREP]) 21423e72ca8cSmrgstriplib= 21433e72ca8cSmrgold_striplib= 21443e72ca8cSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 21453e72ca8cSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 21463e72ca8cSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 21473e72ca8cSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 21483e72ca8cSmrg AC_MSG_RESULT([yes]) 21493e72ca8cSmrgelse 21503e72ca8cSmrg# FIXME - insert some real tests, host_os isn't really good enough 21513e72ca8cSmrg case $host_os in 21523e72ca8cSmrg darwin*) 21533e72ca8cSmrg if test -n "$STRIP" ; then 21543e72ca8cSmrg striplib="$STRIP -x" 21553e72ca8cSmrg old_striplib="$STRIP -S" 21563e72ca8cSmrg AC_MSG_RESULT([yes]) 21573e72ca8cSmrg else 21583e72ca8cSmrg AC_MSG_RESULT([no]) 21593e72ca8cSmrg fi 2160b425557eSmrg ;; 2161b425557eSmrg *) 21623e72ca8cSmrg AC_MSG_RESULT([no]) 2163b425557eSmrg ;; 2164b425557eSmrg esac 21653e72ca8cSmrgfi 21663e72ca8cSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 21673e72ca8cSmrg_LT_DECL([], [striplib], [1]) 21683e72ca8cSmrg])# _LT_CMD_STRIPLIB 216934977a2fSmrg 2170ee3138f1Smrg 21713e72ca8cSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 21723e72ca8cSmrg# ----------------------------- 21733e72ca8cSmrg# PORTME Fill in your ld.so characteristics 21743e72ca8cSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 21753e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 21763e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 21773e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21783e72ca8cSmrgm4_require([_LT_DECL_OBJDUMP])dnl 21793e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 21803e72ca8cSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 21813e72ca8cSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 21823e72ca8cSmrgm4_if([$1], 21833e72ca8cSmrg [], [ 21843e72ca8cSmrgif test "$GCC" = yes; then 21853e72ca8cSmrg case $host_os in 21863e72ca8cSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 21873e72ca8cSmrg *) lt_awk_arg="/^libraries:/" ;; 2188a1ed278cSmrg esac 21893e72ca8cSmrg case $host_os in 21903e72ca8cSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 21913e72ca8cSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 21923e72ca8cSmrg esac 21933e72ca8cSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 21943e72ca8cSmrg case $lt_search_path_spec in 21953e72ca8cSmrg *\;*) 21963e72ca8cSmrg # if the path contains ";" then we assume it to be the separator 21973e72ca8cSmrg # otherwise default to the standard path separator (i.e. ":") - it is 21983e72ca8cSmrg # assumed that no part of a normal pathname contains ";" but that should 21993e72ca8cSmrg # okay in the real world where ";" in dirpaths is itself problematic. 22003e72ca8cSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 22013e72ca8cSmrg ;; 22023e72ca8cSmrg *) 22033e72ca8cSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 22043e72ca8cSmrg ;; 22053e72ca8cSmrg esac 22063e72ca8cSmrg # Ok, now we have the path, separated by spaces, we can step through it 22073e72ca8cSmrg # and add multilib dir if necessary. 22083e72ca8cSmrg lt_tmp_lt_search_path_spec= 22093e72ca8cSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 22103e72ca8cSmrg for lt_sys_path in $lt_search_path_spec; do 22113e72ca8cSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 22123e72ca8cSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 22133e72ca8cSmrg else 22143e72ca8cSmrg test -d "$lt_sys_path" && \ 22153e72ca8cSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 22163e72ca8cSmrg fi 22173e72ca8cSmrg done 22183e72ca8cSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 22193e72ca8cSmrgBEGIN {RS=" "; FS="/|\n";} { 22203e72ca8cSmrg lt_foo=""; 22213e72ca8cSmrg lt_count=0; 22223e72ca8cSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 22233e72ca8cSmrg if ($lt_i != "" && $lt_i != ".") { 22243e72ca8cSmrg if ($lt_i == "..") { 22253e72ca8cSmrg lt_count++; 22263e72ca8cSmrg } else { 22273e72ca8cSmrg if (lt_count == 0) { 22283e72ca8cSmrg lt_foo="/" $lt_i lt_foo; 22293e72ca8cSmrg } else { 22303e72ca8cSmrg lt_count--; 22313e72ca8cSmrg } 22323e72ca8cSmrg } 22333e72ca8cSmrg } 22343e72ca8cSmrg } 22353e72ca8cSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 22363e72ca8cSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 22373e72ca8cSmrg}'` 22383e72ca8cSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 22393e72ca8cSmrg # for these hosts. 22403e72ca8cSmrg case $host_os in 22413e72ca8cSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 22423e72ca8cSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 22433e72ca8cSmrg esac 22443e72ca8cSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 22453e72ca8cSmrgelse 22463e72ca8cSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 22473e72ca8cSmrgfi]) 22483e72ca8cSmrglibrary_names_spec= 22493e72ca8cSmrglibname_spec='lib$name' 22503e72ca8cSmrgsoname_spec= 22513e72ca8cSmrgshrext_cmds=".so" 22523e72ca8cSmrgpostinstall_cmds= 22533e72ca8cSmrgpostuninstall_cmds= 22543e72ca8cSmrgfinish_cmds= 22553e72ca8cSmrgfinish_eval= 22563e72ca8cSmrgshlibpath_var= 22573e72ca8cSmrgshlibpath_overrides_runpath=unknown 22583e72ca8cSmrgversion_type=none 22593e72ca8cSmrgdynamic_linker="$host_os ld.so" 22603e72ca8cSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 22613e72ca8cSmrgneed_lib_prefix=unknown 22623e72ca8cSmrghardcode_into_libs=no 2263ee3138f1Smrg 22643e72ca8cSmrg# when you set need_version to no, make sure it does not cause -set_version 22653e72ca8cSmrg# flags to be left without arguments 22663e72ca8cSmrgneed_version=unknown 2267ee3138f1Smrg 22683e72ca8cSmrgcase $host_os in 22693e72ca8cSmrgaix3*) 22703e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 22713e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 22723e72ca8cSmrg shlibpath_var=LIBPATH 2273ee3138f1Smrg 22743e72ca8cSmrg # AIX 3 has no versioning support, so we append a major version to the name. 22753e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 2276a1ed278cSmrg ;; 2277ee3138f1Smrg 22783e72ca8cSmrgaix[[4-9]]*) 22793e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 22803e72ca8cSmrg need_lib_prefix=no 22813e72ca8cSmrg need_version=no 22823e72ca8cSmrg hardcode_into_libs=yes 22833e72ca8cSmrg if test "$host_cpu" = ia64; then 22843e72ca8cSmrg # AIX 5 supports IA64 22853e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 22863e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 2287a1ed278cSmrg else 22883e72ca8cSmrg # With GCC up to 2.95.x, collect2 would create an import file 22893e72ca8cSmrg # for dependence libraries. The import file would start with 22903e72ca8cSmrg # the line `#! .'. This would cause the generated library to 22913e72ca8cSmrg # depend on `.', always an invalid library. This was fixed in 22923e72ca8cSmrg # development snapshots of GCC prior to 3.0. 22933e72ca8cSmrg case $host_os in 22943e72ca8cSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 22953e72ca8cSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 22963e72ca8cSmrg echo ' yes ' 22973e72ca8cSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 22983e72ca8cSmrg : 22993e72ca8cSmrg else 23003e72ca8cSmrg can_build_shared=no 23013e72ca8cSmrg fi 23023e72ca8cSmrg ;; 23033e72ca8cSmrg esac 23043e72ca8cSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 23053e72ca8cSmrg # soname into executable. Probably we can add versioning support to 23063e72ca8cSmrg # collect2, so additional links can be useful in future. 23073e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 23083e72ca8cSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 23093e72ca8cSmrg # instead of lib<name>.a to let people know that these are not 23103e72ca8cSmrg # typical AIX shared libraries. 23113e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23123e72ca8cSmrg else 23133e72ca8cSmrg # We preserve .a as extension for shared libraries through AIX4.2 23143e72ca8cSmrg # and later when we are not doing run time linking. 23153e72ca8cSmrg library_names_spec='${libname}${release}.a $libname.a' 23163e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 23173e72ca8cSmrg fi 23183e72ca8cSmrg shlibpath_var=LIBPATH 2319a1ed278cSmrg fi 2320a1ed278cSmrg ;; 2321ee3138f1Smrg 23223e72ca8cSmrgamigaos*) 23233e72ca8cSmrg case $host_cpu in 23243e72ca8cSmrg powerpc) 23253e72ca8cSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 23263e72ca8cSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 23273e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23283e72ca8cSmrg ;; 23293e72ca8cSmrg m68k) 23303e72ca8cSmrg library_names_spec='$libname.ixlibrary $libname.a' 23313e72ca8cSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 23323e72ca8cSmrg 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' 23333e72ca8cSmrg ;; 23343e72ca8cSmrg esac 2335a1ed278cSmrg ;; 2336ee3138f1Smrg 23373e72ca8cSmrgbeos*) 23383e72ca8cSmrg library_names_spec='${libname}${shared_ext}' 23393e72ca8cSmrg dynamic_linker="$host_os ld.so" 23403e72ca8cSmrg shlibpath_var=LIBRARY_PATH 2341a1ed278cSmrg ;; 2342ee3138f1Smrg 23433e72ca8cSmrgbsdi[[45]]*) 23443e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 23453e72ca8cSmrg need_version=no 23463e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23473e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 23483e72ca8cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 23493e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 23503e72ca8cSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 23513e72ca8cSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 23523e72ca8cSmrg # the default ld.so.conf also contains /usr/contrib/lib and 23533e72ca8cSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 23543e72ca8cSmrg # libtool to hard-code these into programs 2355a1ed278cSmrg ;; 2356ee3138f1Smrg 23573e72ca8cSmrgcygwin* | mingw* | pw32* | cegcc*) 23583e72ca8cSmrg version_type=windows 23593e72ca8cSmrg shrext_cmds=".dll" 23603e72ca8cSmrg need_version=no 23613e72ca8cSmrg need_lib_prefix=no 2362ee3138f1Smrg 23633e72ca8cSmrg case $GCC,$cc_basename in 23643e72ca8cSmrg yes,*) 23653e72ca8cSmrg # gcc 23663e72ca8cSmrg library_names_spec='$libname.dll.a' 23673e72ca8cSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 23683e72ca8cSmrg postinstall_cmds='base_file=`basename \${file}`~ 23693e72ca8cSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 23703e72ca8cSmrg dldir=$destdir/`dirname \$dlpath`~ 23713e72ca8cSmrg test -d \$dldir || mkdir -p \$dldir~ 23723e72ca8cSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 23733e72ca8cSmrg chmod a+x \$dldir/$dlname~ 23743e72ca8cSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 23753e72ca8cSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 23763e72ca8cSmrg fi' 23773e72ca8cSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 23783e72ca8cSmrg dlpath=$dir/\$dldll~ 23793e72ca8cSmrg $RM \$dlpath' 23803e72ca8cSmrg shlibpath_overrides_runpath=yes 23813e72ca8cSmrg 23823e72ca8cSmrg case $host_os in 23833e72ca8cSmrg cygwin*) 23843e72ca8cSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 23853e72ca8cSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23863e72ca8cSmrgm4_if([$1], [],[ 23873e72ca8cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 23883e72ca8cSmrg ;; 23893e72ca8cSmrg mingw* | cegcc*) 23903e72ca8cSmrg # MinGW DLLs use traditional 'lib' prefix 23913e72ca8cSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23923e72ca8cSmrg ;; 23933e72ca8cSmrg pw32*) 23943e72ca8cSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 23953e72ca8cSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23963e72ca8cSmrg ;; 23973e72ca8cSmrg esac 23983e72ca8cSmrg dynamic_linker='Win32 ld.exe' 2399b425557eSmrg ;; 24003e72ca8cSmrg 24013e72ca8cSmrg *,cl*) 24023e72ca8cSmrg # Native MSVC 24033e72ca8cSmrg libname_spec='$name' 24043e72ca8cSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 24053e72ca8cSmrg library_names_spec='${libname}.dll.lib' 24063e72ca8cSmrg 24073e72ca8cSmrg case $build_os in 24083e72ca8cSmrg mingw*) 24093e72ca8cSmrg sys_lib_search_path_spec= 24103e72ca8cSmrg lt_save_ifs=$IFS 24113e72ca8cSmrg IFS=';' 24123e72ca8cSmrg for lt_path in $LIB 24133e72ca8cSmrg do 24143e72ca8cSmrg IFS=$lt_save_ifs 24153e72ca8cSmrg # Let DOS variable expansion print the short 8.3 style file name. 24163e72ca8cSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 24173e72ca8cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 24183e72ca8cSmrg done 24193e72ca8cSmrg IFS=$lt_save_ifs 24203e72ca8cSmrg # Convert to MSYS style. 24213e72ca8cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 24223e72ca8cSmrg ;; 24233e72ca8cSmrg cygwin*) 24243e72ca8cSmrg # Convert to unix form, then to dos form, then back to unix form 24253e72ca8cSmrg # but this time dos style (no spaces!) so that the unix form looks 24263e72ca8cSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 24273e72ca8cSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 24283e72ca8cSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 24293e72ca8cSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 24303e72ca8cSmrg ;; 24313e72ca8cSmrg *) 24323e72ca8cSmrg sys_lib_search_path_spec="$LIB" 24333e72ca8cSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 24343e72ca8cSmrg # It is most probably a Windows format PATH. 24353e72ca8cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 24363e72ca8cSmrg else 24373e72ca8cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 24383e72ca8cSmrg fi 24393e72ca8cSmrg # FIXME: find the short name or the path components, as spaces are 24403e72ca8cSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 24413e72ca8cSmrg ;; 24423e72ca8cSmrg esac 24433e72ca8cSmrg 24443e72ca8cSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 24453e72ca8cSmrg postinstall_cmds='base_file=`basename \${file}`~ 24463e72ca8cSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 24473e72ca8cSmrg dldir=$destdir/`dirname \$dlpath`~ 24483e72ca8cSmrg test -d \$dldir || mkdir -p \$dldir~ 24493e72ca8cSmrg $install_prog $dir/$dlname \$dldir/$dlname' 24503e72ca8cSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 24513e72ca8cSmrg dlpath=$dir/\$dldll~ 24523e72ca8cSmrg $RM \$dlpath' 24533e72ca8cSmrg shlibpath_overrides_runpath=yes 24543e72ca8cSmrg dynamic_linker='Win32 link.exe' 2455b425557eSmrg ;; 24563e72ca8cSmrg 24573e72ca8cSmrg *) 24583e72ca8cSmrg # Assume MSVC wrapper 24593e72ca8cSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 24603e72ca8cSmrg dynamic_linker='Win32 ld.exe' 246134977a2fSmrg ;; 2462ee3138f1Smrg esac 24633e72ca8cSmrg # FIXME: first we should search . and the directory the executable is in 24643e72ca8cSmrg shlibpath_var=PATH 2465a1ed278cSmrg ;; 2466ee3138f1Smrg 24673e72ca8cSmrgdarwin* | rhapsody*) 24683e72ca8cSmrg dynamic_linker="$host_os dyld" 24693e72ca8cSmrg version_type=darwin 24703e72ca8cSmrg need_lib_prefix=no 24713e72ca8cSmrg need_version=no 24723e72ca8cSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 24733e72ca8cSmrg soname_spec='${libname}${release}${major}$shared_ext' 24743e72ca8cSmrg shlibpath_overrides_runpath=yes 24753e72ca8cSmrg shlibpath_var=DYLD_LIBRARY_PATH 24763e72ca8cSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 24773e72ca8cSmrgm4_if([$1], [],[ 24783e72ca8cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 24793e72ca8cSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2480a1ed278cSmrg ;; 2481ee3138f1Smrg 24823e72ca8cSmrgdgux*) 24833e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 24843e72ca8cSmrg need_lib_prefix=no 24853e72ca8cSmrg need_version=no 24863e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 24873e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 24883e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 24893e72ca8cSmrg ;; 2490ee3138f1Smrg 24913e72ca8cSmrgfreebsd* | dragonfly*) 24923e72ca8cSmrg # DragonFly does not have aout. When/if they implement a new 24933e72ca8cSmrg # versioning mechanism, adjust this. 24943e72ca8cSmrg if test -x /usr/bin/objformat; then 24953e72ca8cSmrg objformat=`/usr/bin/objformat` 2496a1ed278cSmrg else 24973e72ca8cSmrg case $host_os in 24983e72ca8cSmrg freebsd[[23]].*) objformat=aout ;; 24993e72ca8cSmrg *) objformat=elf ;; 2500a1ed278cSmrg esac 2501a1ed278cSmrg fi 25023e72ca8cSmrg version_type=freebsd-$objformat 25033e72ca8cSmrg case $version_type in 25043e72ca8cSmrg freebsd-elf*) 25053e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 25063e72ca8cSmrg need_version=no 25073e72ca8cSmrg need_lib_prefix=no 25083e72ca8cSmrg ;; 25093e72ca8cSmrg freebsd-*) 25103e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 25113e72ca8cSmrg need_version=yes 25123e72ca8cSmrg ;; 25133e72ca8cSmrg esac 25143e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 25153e72ca8cSmrg case $host_os in 25163e72ca8cSmrg freebsd2.*) 25173e72ca8cSmrg shlibpath_overrides_runpath=yes 25183e72ca8cSmrg ;; 25193e72ca8cSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 25203e72ca8cSmrg shlibpath_overrides_runpath=yes 25213e72ca8cSmrg hardcode_into_libs=yes 25223e72ca8cSmrg ;; 25233e72ca8cSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 25243e72ca8cSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 25253e72ca8cSmrg shlibpath_overrides_runpath=no 25263e72ca8cSmrg hardcode_into_libs=yes 25273e72ca8cSmrg ;; 25283e72ca8cSmrg *) # from 4.6 on, and DragonFly 25293e72ca8cSmrg shlibpath_overrides_runpath=yes 25303e72ca8cSmrg hardcode_into_libs=yes 25313e72ca8cSmrg ;; 2532a1ed278cSmrg esac 25333e72ca8cSmrg ;; 2534ee3138f1Smrg 25353e72ca8cSmrggnu*) 25363e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 25373e72ca8cSmrg need_lib_prefix=no 25383e72ca8cSmrg need_version=no 25393e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 25403e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 25413e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 25423e72ca8cSmrg shlibpath_overrides_runpath=no 25433e72ca8cSmrg hardcode_into_libs=yes 25443e72ca8cSmrg ;; 2545ee3138f1Smrg 25463e72ca8cSmrghaiku*) 25473e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 25483e72ca8cSmrg need_lib_prefix=no 25493e72ca8cSmrg need_version=no 25503e72ca8cSmrg dynamic_linker="$host_os runtime_loader" 25513e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 25523e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 25533e72ca8cSmrg shlibpath_var=LIBRARY_PATH 25543e72ca8cSmrg shlibpath_overrides_runpath=yes 25553e72ca8cSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 25563e72ca8cSmrg hardcode_into_libs=yes 25573e72ca8cSmrg ;; 2558ee3138f1Smrg 25593e72ca8cSmrghpux9* | hpux10* | hpux11*) 25603e72ca8cSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 25613e72ca8cSmrg # link against other versions. 25623e72ca8cSmrg version_type=sunos 25633e72ca8cSmrg need_lib_prefix=no 25643e72ca8cSmrg need_version=no 25653e72ca8cSmrg case $host_cpu in 25663e72ca8cSmrg ia64*) 25673e72ca8cSmrg shrext_cmds='.so' 25683e72ca8cSmrg hardcode_into_libs=yes 25693e72ca8cSmrg dynamic_linker="$host_os dld.so" 25703e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 25713e72ca8cSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25723e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25733e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 25743e72ca8cSmrg if test "X$HPUX_IA64_MODE" = X32; then 25753e72ca8cSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 25763e72ca8cSmrg else 25773e72ca8cSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 25783e72ca8cSmrg fi 25793e72ca8cSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25803e72ca8cSmrg ;; 25813e72ca8cSmrg hppa*64*) 25823e72ca8cSmrg shrext_cmds='.sl' 25833e72ca8cSmrg hardcode_into_libs=yes 25843e72ca8cSmrg dynamic_linker="$host_os dld.sl" 25853e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 25863e72ca8cSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25873e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25883e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 25893e72ca8cSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 25903e72ca8cSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25913e72ca8cSmrg ;; 25923e72ca8cSmrg *) 25933e72ca8cSmrg shrext_cmds='.sl' 25943e72ca8cSmrg dynamic_linker="$host_os dld.sl" 25953e72ca8cSmrg shlibpath_var=SHLIB_PATH 25963e72ca8cSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 25973e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25983e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 25993e72ca8cSmrg ;; 26003e72ca8cSmrg esac 26013e72ca8cSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 26023e72ca8cSmrg postinstall_cmds='chmod 555 $lib' 26033e72ca8cSmrg # or fails outright, so override atomically: 26043e72ca8cSmrg install_override_mode=555 2605a1ed278cSmrg ;; 26063e72ca8cSmrg 26073e72ca8cSmrginterix[[3-9]]*) 26083e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 26093e72ca8cSmrg need_lib_prefix=no 26103e72ca8cSmrg need_version=no 26113e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 26123e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 26133e72ca8cSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 26143e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 26153e72ca8cSmrg shlibpath_overrides_runpath=no 26163e72ca8cSmrg hardcode_into_libs=yes 2617a1ed278cSmrg ;; 26183e72ca8cSmrg 26193e72ca8cSmrgirix5* | irix6* | nonstopux*) 26203e72ca8cSmrg case $host_os in 26213e72ca8cSmrg nonstopux*) version_type=nonstopux ;; 26223e72ca8cSmrg *) 26233e72ca8cSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 26243e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 26253e72ca8cSmrg else 26263e72ca8cSmrg version_type=irix 26273e72ca8cSmrg fi ;; 26283e72ca8cSmrg esac 26293e72ca8cSmrg need_lib_prefix=no 26303e72ca8cSmrg need_version=no 26313e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 26323e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 26333e72ca8cSmrg case $host_os in 26343e72ca8cSmrg irix5* | nonstopux*) 26353e72ca8cSmrg libsuff= shlibsuff= 26363e72ca8cSmrg ;; 26373e72ca8cSmrg *) 26383e72ca8cSmrg case $LD in # libtool.m4 will add one of these switches to LD 26393e72ca8cSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 26403e72ca8cSmrg libsuff= shlibsuff= libmagic=32-bit;; 26413e72ca8cSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 26423e72ca8cSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 26433e72ca8cSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 26443e72ca8cSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 26453e72ca8cSmrg *) libsuff= shlibsuff= libmagic=never-match;; 26463e72ca8cSmrg esac 26473e72ca8cSmrg ;; 26483e72ca8cSmrg esac 26493e72ca8cSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 26503e72ca8cSmrg shlibpath_overrides_runpath=no 26513e72ca8cSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 26523e72ca8cSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 26533e72ca8cSmrg hardcode_into_libs=yes 2654a1ed278cSmrg ;; 26553e72ca8cSmrg 26563e72ca8cSmrg# No shared lib support for Linux oldld, aout, or coff. 26573e72ca8cSmrglinux*oldld* | linux*aout* | linux*coff*) 26583e72ca8cSmrg dynamic_linker=no 2659a1ed278cSmrg ;; 2660ee3138f1Smrg 26613e72ca8cSmrg# This must be glibc/ELF. 26623e72ca8cSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 26633e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 26643e72ca8cSmrg need_lib_prefix=no 26653e72ca8cSmrg need_version=no 26663e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26673e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 26683e72ca8cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 26693e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 26703e72ca8cSmrg shlibpath_overrides_runpath=no 2671ee3138f1Smrg 26723e72ca8cSmrg # Some binutils ld are patched to set DT_RUNPATH 26733e72ca8cSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 26743e72ca8cSmrg [lt_cv_shlibpath_overrides_runpath=no 26753e72ca8cSmrg save_LDFLAGS=$LDFLAGS 26763e72ca8cSmrg save_libdir=$libdir 26773e72ca8cSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 26783e72ca8cSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 26793e72ca8cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 26803e72ca8cSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 26813e72ca8cSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 26823e72ca8cSmrg LDFLAGS=$save_LDFLAGS 26833e72ca8cSmrg libdir=$save_libdir 26843e72ca8cSmrg ]) 26853e72ca8cSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 268634977a2fSmrg 26873e72ca8cSmrg # This implies no fast_install, which is unacceptable. 26883e72ca8cSmrg # Some rework will be needed to allow for fast_install 26893e72ca8cSmrg # before this can be enabled. 26903e72ca8cSmrg hardcode_into_libs=yes 2691ee3138f1Smrg 26923e72ca8cSmrg # Add ABI-specific directories to the system library path. 26933e72ca8cSmrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2694ee3138f1Smrg 26953e72ca8cSmrg # Append ld.so.conf contents to the search path 26963e72ca8cSmrg if test -f /etc/ld.so.conf; then 26973e72ca8cSmrg 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' ' '` 26983e72ca8cSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2699ee3138f1Smrg 27003e72ca8cSmrg fi 2701ee3138f1Smrg 27023e72ca8cSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 27033e72ca8cSmrg # powerpc, because MkLinux only supported shared libraries with the 27043e72ca8cSmrg # GNU dynamic linker. Since this was broken with cross compilers, 27053e72ca8cSmrg # most powerpc-linux boxes support dynamic linking these days and 27063e72ca8cSmrg # people can always --disable-shared, the test was removed, and we 27073e72ca8cSmrg # assume the GNU/Linux dynamic linker is in use. 27083e72ca8cSmrg dynamic_linker='GNU/Linux ld.so' 27093e72ca8cSmrg ;; 27103e72ca8cSmrg 27113e72ca8cSmrgnetbsd*) 27123e72ca8cSmrg version_type=sunos 27133e72ca8cSmrg need_lib_prefix=no 27143e72ca8cSmrg need_version=no 27153e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 27163e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 27173e72ca8cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 27183e72ca8cSmrg dynamic_linker='NetBSD (a.out) ld.so' 2719a1ed278cSmrg else 27203e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 27213e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 27223e72ca8cSmrg dynamic_linker='NetBSD ld.elf_so' 2723a1ed278cSmrg fi 27243e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 27253e72ca8cSmrg shlibpath_overrides_runpath=yes 27263e72ca8cSmrg hardcode_into_libs=yes 27273e72ca8cSmrg ;; 2728ee3138f1Smrg 27293e72ca8cSmrgnewsos6) 27303e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 27313e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27323e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 27333e72ca8cSmrg shlibpath_overrides_runpath=yes 27343e72ca8cSmrg ;; 2735ee3138f1Smrg 27363e72ca8cSmrg*nto* | *qnx*) 27373e72ca8cSmrg version_type=qnx 27383e72ca8cSmrg need_lib_prefix=no 27393e72ca8cSmrg need_version=no 27403e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27413e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 27423e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 27433e72ca8cSmrg shlibpath_overrides_runpath=no 27443e72ca8cSmrg hardcode_into_libs=yes 27453e72ca8cSmrg dynamic_linker='ldqnx.so' 27463e72ca8cSmrg ;; 2747ee3138f1Smrg 27483e72ca8cSmrgopenbsd*) 27493e72ca8cSmrg version_type=sunos 27503e72ca8cSmrg sys_lib_dlsearch_path_spec="/usr/lib" 27513e72ca8cSmrg need_lib_prefix=no 27523e72ca8cSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 27533e72ca8cSmrg case $host_os in 27543e72ca8cSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 27553e72ca8cSmrg *) need_version=no ;; 27563e72ca8cSmrg esac 27573e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 27583e72ca8cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 27593e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 27603e72ca8cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 27613e72ca8cSmrg case $host_os in 27623e72ca8cSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 27633e72ca8cSmrg shlibpath_overrides_runpath=no 27643e72ca8cSmrg ;; 27653e72ca8cSmrg *) 27663e72ca8cSmrg shlibpath_overrides_runpath=yes 27673e72ca8cSmrg ;; 27683e72ca8cSmrg esac 27693e72ca8cSmrg else 27703e72ca8cSmrg shlibpath_overrides_runpath=yes 27713e72ca8cSmrg fi 27723e72ca8cSmrg ;; 2773ee3138f1Smrg 27743e72ca8cSmrgos2*) 27753e72ca8cSmrg libname_spec='$name' 27763e72ca8cSmrg shrext_cmds=".dll" 27773e72ca8cSmrg need_lib_prefix=no 27783e72ca8cSmrg library_names_spec='$libname${shared_ext} $libname.a' 27793e72ca8cSmrg dynamic_linker='OS/2 ld.exe' 27803e72ca8cSmrg shlibpath_var=LIBPATH 27813e72ca8cSmrg ;; 2782ee3138f1Smrg 27833e72ca8cSmrgosf3* | osf4* | osf5*) 27843e72ca8cSmrg version_type=osf 27853e72ca8cSmrg need_lib_prefix=no 27863e72ca8cSmrg need_version=no 27873e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 27883e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27893e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 27903e72ca8cSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 27913e72ca8cSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 27923e72ca8cSmrg ;; 2793ee3138f1Smrg 27943e72ca8cSmrgrdos*) 27953e72ca8cSmrg dynamic_linker=no 27963e72ca8cSmrg ;; 2797ee3138f1Smrg 27983e72ca8cSmrgsolaris*) 27993e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 28003e72ca8cSmrg need_lib_prefix=no 28013e72ca8cSmrg need_version=no 28023e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28033e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 28043e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 28053e72ca8cSmrg shlibpath_overrides_runpath=yes 28063e72ca8cSmrg hardcode_into_libs=yes 28073e72ca8cSmrg # ldd complains unless libraries are executable 28083e72ca8cSmrg postinstall_cmds='chmod +x $lib' 28093e72ca8cSmrg ;; 2810a1ed278cSmrg 28113e72ca8cSmrgsunos4*) 28123e72ca8cSmrg version_type=sunos 28133e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 28143e72ca8cSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 28153e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 28163e72ca8cSmrg shlibpath_overrides_runpath=yes 28173e72ca8cSmrg if test "$with_gnu_ld" = yes; then 28183e72ca8cSmrg need_lib_prefix=no 28193e72ca8cSmrg fi 28203e72ca8cSmrg need_version=yes 28213e72ca8cSmrg ;; 2822a1ed278cSmrg 28233e72ca8cSmrgsysv4 | sysv4.3*) 28243e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 28253e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28263e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 28273e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 28283e72ca8cSmrg case $host_vendor in 28293e72ca8cSmrg sni) 28303e72ca8cSmrg shlibpath_overrides_runpath=no 28313e72ca8cSmrg need_lib_prefix=no 28323e72ca8cSmrg runpath_var=LD_RUN_PATH 28333e72ca8cSmrg ;; 28343e72ca8cSmrg siemens) 28353e72ca8cSmrg need_lib_prefix=no 28363e72ca8cSmrg ;; 28373e72ca8cSmrg motorola) 28383e72ca8cSmrg need_lib_prefix=no 28393e72ca8cSmrg need_version=no 28403e72ca8cSmrg shlibpath_overrides_runpath=no 28413e72ca8cSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 28423e72ca8cSmrg ;; 28433e72ca8cSmrg esac 28443e72ca8cSmrg ;; 28453e72ca8cSmrg 28463e72ca8cSmrgsysv4*MP*) 28473e72ca8cSmrg if test -d /usr/nec ;then 28483e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 28493e72ca8cSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 28503e72ca8cSmrg soname_spec='$libname${shared_ext}.$major' 28513e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 2852a1ed278cSmrg fi 28533e72ca8cSmrg ;; 2854a1ed278cSmrg 28553e72ca8cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 28563e72ca8cSmrg version_type=freebsd-elf 28573e72ca8cSmrg need_lib_prefix=no 28583e72ca8cSmrg need_version=no 28593e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 28603e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 28613e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 28623e72ca8cSmrg shlibpath_overrides_runpath=yes 28633e72ca8cSmrg hardcode_into_libs=yes 28643e72ca8cSmrg if test "$with_gnu_ld" = yes; then 28653e72ca8cSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2866a1ed278cSmrg else 28673e72ca8cSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 28683e72ca8cSmrg case $host_os in 28693e72ca8cSmrg sco3.2v5*) 28703e72ca8cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 28713e72ca8cSmrg ;; 28723e72ca8cSmrg esac 2873b425557eSmrg fi 28743e72ca8cSmrg sys_lib_dlsearch_path_spec='/usr/lib' 28753e72ca8cSmrg ;; 2876ee3138f1Smrg 28773e72ca8cSmrgtpf*) 28783e72ca8cSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 28793e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 28803e72ca8cSmrg need_lib_prefix=no 28813e72ca8cSmrg need_version=no 28823e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28833e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 28843e72ca8cSmrg shlibpath_overrides_runpath=no 28853e72ca8cSmrg hardcode_into_libs=yes 28863e72ca8cSmrg ;; 2887ee3138f1Smrg 28883e72ca8cSmrguts4*) 28893e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 28903e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28913e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 28923e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 28933e72ca8cSmrg ;; 2894ee3138f1Smrg 28953e72ca8cSmrg*) 28963e72ca8cSmrg dynamic_linker=no 28973e72ca8cSmrg ;; 28983e72ca8cSmrgesac 28993e72ca8cSmrgAC_MSG_RESULT([$dynamic_linker]) 29003e72ca8cSmrgtest "$dynamic_linker" = no && can_build_shared=no 2901b425557eSmrg 29023e72ca8cSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 29033e72ca8cSmrgif test "$GCC" = yes; then 29043e72ca8cSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 29053e72ca8cSmrgfi 2906b425557eSmrg 29073e72ca8cSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 29083e72ca8cSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 29093e72ca8cSmrgfi 29103e72ca8cSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 29113e72ca8cSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2912a1ed278cSmrgfi 2913ee3138f1Smrg 29143e72ca8cSmrg_LT_DECL([], [variables_saved_for_relink], [1], 29153e72ca8cSmrg [Variables whose values should be saved in libtool wrapper scripts and 29163e72ca8cSmrg restored at link time]) 29173e72ca8cSmrg_LT_DECL([], [need_lib_prefix], [0], 29183e72ca8cSmrg [Do we need the "lib" prefix for modules?]) 29193e72ca8cSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 29203e72ca8cSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 29213e72ca8cSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 29223e72ca8cSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 29233e72ca8cSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 29243e72ca8cSmrg [Is shlibpath searched before the hard-coded library search path?]) 29253e72ca8cSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 29263e72ca8cSmrg_LT_DECL([], [library_names_spec], [1], 29273e72ca8cSmrg [[List of archive names. First name is the real one, the rest are links. 29283e72ca8cSmrg The last name is the one that the linker finds with -lNAME]]) 29293e72ca8cSmrg_LT_DECL([], [soname_spec], [1], 29303e72ca8cSmrg [[The coded name of the library, if different from the real name]]) 29313e72ca8cSmrg_LT_DECL([], [install_override_mode], [1], 29323e72ca8cSmrg [Permission mode override for installation of shared libraries]) 29333e72ca8cSmrg_LT_DECL([], [postinstall_cmds], [2], 29343e72ca8cSmrg [Command to use after installation of a shared archive]) 29353e72ca8cSmrg_LT_DECL([], [postuninstall_cmds], [2], 29363e72ca8cSmrg [Command to use after uninstallation of a shared archive]) 29373e72ca8cSmrg_LT_DECL([], [finish_cmds], [2], 29383e72ca8cSmrg [Commands used to finish a libtool library installation in a directory]) 29393e72ca8cSmrg_LT_DECL([], [finish_eval], [1], 29403e72ca8cSmrg [[As "finish_cmds", except a single script fragment to be evaled but 29413e72ca8cSmrg not shown]]) 29423e72ca8cSmrg_LT_DECL([], [hardcode_into_libs], [0], 29433e72ca8cSmrg [Whether we should hardcode library paths into libraries]) 29443e72ca8cSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 29453e72ca8cSmrg [Compile-time system search path for libraries]) 29463e72ca8cSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 29473e72ca8cSmrg [Run-time system search path for libraries]) 29483e72ca8cSmrg])# _LT_SYS_DYNAMIC_LINKER 2949ee3138f1Smrg 2950ee3138f1Smrg 29513e72ca8cSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 29523e72ca8cSmrg# -------------------------- 29533e72ca8cSmrg# find a file program which can recognize shared library 29543e72ca8cSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 29553e72ca8cSmrg[m4_require([_LT_DECL_EGREP])dnl 29563e72ca8cSmrgAC_MSG_CHECKING([for $1]) 29573e72ca8cSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 29583e72ca8cSmrg[case $MAGIC_CMD in 29593e72ca8cSmrg[[\\/*] | ?:[\\/]*]) 29603e72ca8cSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2961a1ed278cSmrg ;; 29623e72ca8cSmrg*) 29633e72ca8cSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 29643e72ca8cSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 29653e72ca8cSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 29663e72ca8cSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 29673e72ca8cSmrgdnl not every word. This closes a longstanding sh security hole. 29683e72ca8cSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 29693e72ca8cSmrg for ac_dir in $ac_dummy; do 29703e72ca8cSmrg IFS="$lt_save_ifs" 29713e72ca8cSmrg test -z "$ac_dir" && ac_dir=. 29723e72ca8cSmrg if test -f $ac_dir/$1; then 29733e72ca8cSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 29743e72ca8cSmrg if test -n "$file_magic_test_file"; then 29753e72ca8cSmrg case $deplibs_check_method in 29763e72ca8cSmrg "file_magic "*) 29773e72ca8cSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 29783e72ca8cSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 29793e72ca8cSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 29803e72ca8cSmrg $EGREP "$file_magic_regex" > /dev/null; then 29813e72ca8cSmrg : 29823e72ca8cSmrg else 29833e72ca8cSmrg cat <<_LT_EOF 1>&2 2984ee3138f1Smrg 29853e72ca8cSmrg*** Warning: the command libtool uses to detect shared libraries, 29863e72ca8cSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 29873e72ca8cSmrg*** The result is that libtool may fail to recognize shared libraries 29883e72ca8cSmrg*** as such. This will affect the creation of libtool libraries that 29893e72ca8cSmrg*** depend on shared libraries, but programs linked with such libtool 29903e72ca8cSmrg*** libraries will work regardless of this problem. Nevertheless, you 29913e72ca8cSmrg*** may want to report the problem to your system manager and/or to 29923e72ca8cSmrg*** bug-libtool@gnu.org 2993ee3138f1Smrg 29943e72ca8cSmrg_LT_EOF 29953e72ca8cSmrg fi ;; 2996a1ed278cSmrg esac 29973e72ca8cSmrg fi 29983e72ca8cSmrg break 2999a1ed278cSmrg fi 30003e72ca8cSmrg done 30013e72ca8cSmrg IFS="$lt_save_ifs" 30023e72ca8cSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 30033e72ca8cSmrg ;; 30043e72ca8cSmrgesac]) 30053e72ca8cSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 30063e72ca8cSmrgif test -n "$MAGIC_CMD"; then 30073e72ca8cSmrg AC_MSG_RESULT($MAGIC_CMD) 30083e72ca8cSmrgelse 30093e72ca8cSmrg AC_MSG_RESULT(no) 30103e72ca8cSmrgfi 30113e72ca8cSmrg_LT_DECL([], [MAGIC_CMD], [0], 30123e72ca8cSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 30133e72ca8cSmrg])# _LT_PATH_TOOL_PREFIX 3014ee3138f1Smrg 30153e72ca8cSmrg# Old name: 30163e72ca8cSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 30173e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 30183e72ca8cSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 301934977a2fSmrg 3020ee3138f1Smrg 30213e72ca8cSmrg# _LT_PATH_MAGIC 30223e72ca8cSmrg# -------------- 30233e72ca8cSmrg# find a file program which can recognize a shared library 30243e72ca8cSmrgm4_defun([_LT_PATH_MAGIC], 30253e72ca8cSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 30263e72ca8cSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 30273e72ca8cSmrg if test -n "$ac_tool_prefix"; then 30283e72ca8cSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 30293e72ca8cSmrg else 30303e72ca8cSmrg MAGIC_CMD=: 30313e72ca8cSmrg fi 30323e72ca8cSmrgfi 30333e72ca8cSmrg])# _LT_PATH_MAGIC 30343e72ca8cSmrg 3035ee3138f1Smrg 30363e72ca8cSmrg# LT_PATH_LD 30373e72ca8cSmrg# ---------- 30383e72ca8cSmrg# find the pathname to the GNU or non-GNU linker 30393e72ca8cSmrgAC_DEFUN([LT_PATH_LD], 30403e72ca8cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 30413e72ca8cSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 30423e72ca8cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 30433e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 30443e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 30453e72ca8cSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 304634977a2fSmrg 30473e72ca8cSmrgAC_ARG_WITH([gnu-ld], 30483e72ca8cSmrg [AS_HELP_STRING([--with-gnu-ld], 30493e72ca8cSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 30503e72ca8cSmrg [test "$withval" = no || with_gnu_ld=yes], 30513e72ca8cSmrg [with_gnu_ld=no])dnl 30523e72ca8cSmrg 30533e72ca8cSmrgac_prog=ld 30543e72ca8cSmrgif test "$GCC" = yes; then 30553e72ca8cSmrg # Check if gcc -print-prog-name=ld gives a path. 30563e72ca8cSmrg AC_MSG_CHECKING([for ld used by $CC]) 30573e72ca8cSmrg case $host in 30583e72ca8cSmrg *-*-mingw*) 30593e72ca8cSmrg # gcc leaves a trailing carriage return which upsets mingw 30603e72ca8cSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 30613e72ca8cSmrg *) 30623e72ca8cSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 30633e72ca8cSmrg esac 30643e72ca8cSmrg case $ac_prog in 30653e72ca8cSmrg # Accept absolute paths. 30663e72ca8cSmrg [[\\/]]* | ?:[[\\/]]*) 30673e72ca8cSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 30683e72ca8cSmrg # Canonicalize the pathname of ld 30693e72ca8cSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 30703e72ca8cSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 30713e72ca8cSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 30723e72ca8cSmrg done 30733e72ca8cSmrg test -z "$LD" && LD="$ac_prog" 3074a1ed278cSmrg ;; 30753e72ca8cSmrg "") 30763e72ca8cSmrg # If it fails, then pretend we aren't using GCC. 30773e72ca8cSmrg ac_prog=ld 30783e72ca8cSmrg ;; 30793e72ca8cSmrg *) 30803e72ca8cSmrg # If it is relative, then search for the first ld in PATH. 30813e72ca8cSmrg with_gnu_ld=unknown 30823e72ca8cSmrg ;; 30833e72ca8cSmrg esac 30843e72ca8cSmrgelif test "$with_gnu_ld" = yes; then 30853e72ca8cSmrg AC_MSG_CHECKING([for GNU ld]) 30863e72ca8cSmrgelse 30873e72ca8cSmrg AC_MSG_CHECKING([for non-GNU ld]) 30883e72ca8cSmrgfi 30893e72ca8cSmrgAC_CACHE_VAL(lt_cv_path_LD, 30903e72ca8cSmrg[if test -z "$LD"; then 30913e72ca8cSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 30923e72ca8cSmrg for ac_dir in $PATH; do 30933e72ca8cSmrg IFS="$lt_save_ifs" 30943e72ca8cSmrg test -z "$ac_dir" && ac_dir=. 30953e72ca8cSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 30963e72ca8cSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 30973e72ca8cSmrg # Check to see if the program is GNU ld. I'd rather use --version, 30983e72ca8cSmrg # but apparently some variants of GNU ld only accept -v. 30993e72ca8cSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 31003e72ca8cSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 31013e72ca8cSmrg *GNU* | *'with BFD'*) 31023e72ca8cSmrg test "$with_gnu_ld" != no && break 31033e72ca8cSmrg ;; 31043e72ca8cSmrg *) 31053e72ca8cSmrg test "$with_gnu_ld" != yes && break 31063e72ca8cSmrg ;; 31073e72ca8cSmrg esac 31083e72ca8cSmrg fi 31093e72ca8cSmrg done 31103e72ca8cSmrg IFS="$lt_save_ifs" 31113e72ca8cSmrgelse 31123e72ca8cSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 31133e72ca8cSmrgfi]) 31143e72ca8cSmrgLD="$lt_cv_path_LD" 31153e72ca8cSmrgif test -n "$LD"; then 31163e72ca8cSmrg AC_MSG_RESULT($LD) 31173e72ca8cSmrgelse 31183e72ca8cSmrg AC_MSG_RESULT(no) 31193e72ca8cSmrgfi 31203e72ca8cSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 31213e72ca8cSmrg_LT_PATH_LD_GNU 31223e72ca8cSmrgAC_SUBST([LD]) 312334977a2fSmrg 31243e72ca8cSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 31253e72ca8cSmrg])# LT_PATH_LD 312634977a2fSmrg 31273e72ca8cSmrg# Old names: 31283e72ca8cSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 31293e72ca8cSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 31303e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 31313e72ca8cSmrgdnl AC_DEFUN([AM_PROG_LD], []) 31323e72ca8cSmrgdnl AC_DEFUN([AC_PROG_LD], []) 313334977a2fSmrg 313434977a2fSmrg 31353e72ca8cSmrg# _LT_PATH_LD_GNU 31363e72ca8cSmrg#- -------------- 31373e72ca8cSmrgm4_defun([_LT_PATH_LD_GNU], 31383e72ca8cSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 31393e72ca8cSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 31403e72ca8cSmrgcase `$LD -v 2>&1 </dev/null` in 31413e72ca8cSmrg*GNU* | *'with BFD'*) 31423e72ca8cSmrg lt_cv_prog_gnu_ld=yes 31433e72ca8cSmrg ;; 31443e72ca8cSmrg*) 31453e72ca8cSmrg lt_cv_prog_gnu_ld=no 31463e72ca8cSmrg ;; 31473e72ca8cSmrgesac]) 31483e72ca8cSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 31493e72ca8cSmrg])# _LT_PATH_LD_GNU 3150ee3138f1Smrg 3151ee3138f1Smrg 31523e72ca8cSmrg# _LT_CMD_RELOAD 31533e72ca8cSmrg# -------------- 31543e72ca8cSmrg# find reload flag for linker 31553e72ca8cSmrg# -- PORTME Some linkers may need a different reload flag. 31563e72ca8cSmrgm4_defun([_LT_CMD_RELOAD], 31573e72ca8cSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 31583e72ca8cSmrg lt_cv_ld_reload_flag, 31593e72ca8cSmrg [lt_cv_ld_reload_flag='-r']) 31603e72ca8cSmrgreload_flag=$lt_cv_ld_reload_flag 31613e72ca8cSmrgcase $reload_flag in 31623e72ca8cSmrg"" | " "*) ;; 31633e72ca8cSmrg*) reload_flag=" $reload_flag" ;; 31643e72ca8cSmrgesac 31653e72ca8cSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 31663e72ca8cSmrgcase $host_os in 31673e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 31683e72ca8cSmrg if test "$GCC" != yes; then 31693e72ca8cSmrg reload_cmds=false 31703e72ca8cSmrg fi 31713e72ca8cSmrg ;; 31723e72ca8cSmrg darwin*) 31733e72ca8cSmrg if test "$GCC" = yes; then 31743e72ca8cSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 31753e72ca8cSmrg else 31763e72ca8cSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 31773e72ca8cSmrg fi 31783e72ca8cSmrg ;; 31793e72ca8cSmrgesac 31803e72ca8cSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 31813e72ca8cSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 31823e72ca8cSmrg])# _LT_CMD_RELOAD 3183ee3138f1Smrg 3184ee3138f1Smrg 31853e72ca8cSmrg# _LT_CHECK_MAGIC_METHOD 31863e72ca8cSmrg# ---------------------- 31873e72ca8cSmrg# how to check for library dependencies 31883e72ca8cSmrg# -- PORTME fill in with the dynamic library characteristics 31893e72ca8cSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 31903e72ca8cSmrg[m4_require([_LT_DECL_EGREP]) 31913e72ca8cSmrgm4_require([_LT_DECL_OBJDUMP]) 31923e72ca8cSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 31933e72ca8cSmrglt_cv_deplibs_check_method, 31943e72ca8cSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 31953e72ca8cSmrglt_cv_file_magic_test_file= 31963e72ca8cSmrglt_cv_deplibs_check_method='unknown' 31973e72ca8cSmrg# Need to set the preceding variable on all platforms that support 31983e72ca8cSmrg# interlibrary dependencies. 31993e72ca8cSmrg# 'none' -- dependencies not supported. 32003e72ca8cSmrg# `unknown' -- same as none, but documents that we really don't know. 32013e72ca8cSmrg# 'pass_all' -- all dependencies passed with no checks. 32023e72ca8cSmrg# 'test_compile' -- check by making test program. 32033e72ca8cSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 32043e72ca8cSmrg# which responds to the $file_magic_cmd with a given extended regex. 32053e72ca8cSmrg# If you have `file' or equivalent on your system and you're not sure 32063e72ca8cSmrg# whether `pass_all' will *always* work, you probably want this one. 3207ee3138f1Smrg 32083e72ca8cSmrgcase $host_os in 32093e72ca8cSmrgaix[[4-9]]*) 32103e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 32113e72ca8cSmrg ;; 3212ee3138f1Smrg 32133e72ca8cSmrgbeos*) 32143e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 32153e72ca8cSmrg ;; 3216b425557eSmrg 32173e72ca8cSmrgbsdi[[45]]*) 32183e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 32193e72ca8cSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 32203e72ca8cSmrg lt_cv_file_magic_test_file=/shlib/libc.so 32213e72ca8cSmrg ;; 3222b425557eSmrg 32233e72ca8cSmrgcygwin*) 32243e72ca8cSmrg # func_win32_libid is a shell function defined in ltmain.sh 32253e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 32263e72ca8cSmrg lt_cv_file_magic_cmd='func_win32_libid' 32273e72ca8cSmrg ;; 3228a1ed278cSmrg 32293e72ca8cSmrgmingw* | pw32*) 32303e72ca8cSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 32313e72ca8cSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 32323e72ca8cSmrg # unless we find 'file', for example because we are cross-compiling. 32333e72ca8cSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 32343e72ca8cSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 32353e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 32363e72ca8cSmrg lt_cv_file_magic_cmd='func_win32_libid' 32373e72ca8cSmrg else 32383e72ca8cSmrg # Keep this pattern in sync with the one in func_win32_libid. 32393e72ca8cSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 32403e72ca8cSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32413e72ca8cSmrg fi 32423e72ca8cSmrg ;; 3243ee3138f1Smrg 32443e72ca8cSmrgcegcc*) 32453e72ca8cSmrg # use the weaker test based on 'objdump'. See mingw*. 32463e72ca8cSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 32473e72ca8cSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32483e72ca8cSmrg ;; 3249a1ed278cSmrg 32503e72ca8cSmrgdarwin* | rhapsody*) 32513e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 32523e72ca8cSmrg ;; 3253a1ed278cSmrg 32543e72ca8cSmrgfreebsd* | dragonfly*) 32553e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 32563e72ca8cSmrg case $host_cpu in 32573e72ca8cSmrg i*86 ) 32583e72ca8cSmrg # Not sure whether the presence of OpenBSD here was a mistake. 32593e72ca8cSmrg # Let's accept both of them until this is cleared up. 32603e72ca8cSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 32613e72ca8cSmrg lt_cv_file_magic_cmd=/usr/bin/file 32623e72ca8cSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3263a1ed278cSmrg ;; 3264a1ed278cSmrg esac 32653e72ca8cSmrg else 32663e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 32673e72ca8cSmrg fi 32683e72ca8cSmrg ;; 3269a1ed278cSmrg 32703e72ca8cSmrggnu*) 32713e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 32723e72ca8cSmrg ;; 32733e72ca8cSmrg 32743e72ca8cSmrghaiku*) 32753e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 32763e72ca8cSmrg ;; 32773e72ca8cSmrg 32783e72ca8cSmrghpux10.20* | hpux11*) 32793e72ca8cSmrg lt_cv_file_magic_cmd=/usr/bin/file 32803e72ca8cSmrg case $host_cpu in 32813e72ca8cSmrg ia64*) 32823e72ca8cSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 32833e72ca8cSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 32843e72ca8cSmrg ;; 32853e72ca8cSmrg hppa*64*) 32863e72ca8cSmrg [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]'] 32873e72ca8cSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 32883e72ca8cSmrg ;; 32893e72ca8cSmrg *) 32903e72ca8cSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 32913e72ca8cSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 32923e72ca8cSmrg ;; 32933e72ca8cSmrg esac 32943e72ca8cSmrg ;; 32953e72ca8cSmrg 32963e72ca8cSmrginterix[[3-9]]*) 32973e72ca8cSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 32983e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 32993e72ca8cSmrg ;; 33003e72ca8cSmrg 33013e72ca8cSmrgirix5* | irix6* | nonstopux*) 33023e72ca8cSmrg case $LD in 33033e72ca8cSmrg *-32|*"-32 ") libmagic=32-bit;; 33043e72ca8cSmrg *-n32|*"-n32 ") libmagic=N32;; 33053e72ca8cSmrg *-64|*"-64 ") libmagic=64-bit;; 33063e72ca8cSmrg *) libmagic=never-match;; 33073e72ca8cSmrg esac 33083e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 33093e72ca8cSmrg ;; 33103e72ca8cSmrg 33113e72ca8cSmrg# This must be glibc/ELF. 33123e72ca8cSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 33133e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 33143e72ca8cSmrg ;; 33153e72ca8cSmrg 33163e72ca8cSmrgnetbsd*) 33173e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 33183e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3319b425557eSmrg else 33203e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 33213e72ca8cSmrg fi 33223e72ca8cSmrg ;; 3323ee3138f1Smrg 33243e72ca8cSmrgnewos6*) 33253e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 33263e72ca8cSmrg lt_cv_file_magic_cmd=/usr/bin/file 33273e72ca8cSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 33283e72ca8cSmrg ;; 33293e72ca8cSmrg 33303e72ca8cSmrg*nto* | *qnx*) 33313e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 33323e72ca8cSmrg ;; 33333e72ca8cSmrg 33343e72ca8cSmrgopenbsd*) 33353e72ca8cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 33363e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 33373e72ca8cSmrg else 33383e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 33393e72ca8cSmrg fi 33403e72ca8cSmrg ;; 3341ee3138f1Smrg 33423e72ca8cSmrgosf3* | osf4* | osf5*) 33433e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 33443e72ca8cSmrg ;; 3345ee3138f1Smrg 33463e72ca8cSmrgrdos*) 33473e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 33483e72ca8cSmrg ;; 334934977a2fSmrg 33503e72ca8cSmrgsolaris*) 33513e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 33523e72ca8cSmrg ;; 335334977a2fSmrg 33543e72ca8cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 33553e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 33563e72ca8cSmrg ;; 3357ee3138f1Smrg 33583e72ca8cSmrgsysv4 | sysv4.3*) 33593e72ca8cSmrg case $host_vendor in 33603e72ca8cSmrg motorola) 33613e72ca8cSmrg 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]]' 33623e72ca8cSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 33633e72ca8cSmrg ;; 33643e72ca8cSmrg ncr) 33653e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 33663e72ca8cSmrg ;; 33673e72ca8cSmrg sequent) 33683e72ca8cSmrg lt_cv_file_magic_cmd='/bin/file' 33693e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 33703e72ca8cSmrg ;; 33713e72ca8cSmrg sni) 33723e72ca8cSmrg lt_cv_file_magic_cmd='/bin/file' 33733e72ca8cSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 33743e72ca8cSmrg lt_cv_file_magic_test_file=/lib/libc.so 33753e72ca8cSmrg ;; 33763e72ca8cSmrg siemens) 33773e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 33783e72ca8cSmrg ;; 33793e72ca8cSmrg pc) 33803e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 33813e72ca8cSmrg ;; 33823e72ca8cSmrg esac 33833e72ca8cSmrg ;; 3384a1ed278cSmrg 33853e72ca8cSmrgtpf*) 33863e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 33873e72ca8cSmrg ;; 33883e72ca8cSmrgesac 33893e72ca8cSmrg]) 339034977a2fSmrg 33913e72ca8cSmrgfile_magic_glob= 33923e72ca8cSmrgwant_nocaseglob=no 33933e72ca8cSmrgif test "$build" = "$host"; then 33943e72ca8cSmrg case $host_os in 33953e72ca8cSmrg mingw* | pw32*) 33963e72ca8cSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 33973e72ca8cSmrg want_nocaseglob=yes 33983e72ca8cSmrg else 33993e72ca8cSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 34003e72ca8cSmrg fi 34013e72ca8cSmrg ;; 34023e72ca8cSmrg esac 34033e72ca8cSmrgfi 3404ee3138f1Smrg 34053e72ca8cSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 34063e72ca8cSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 34073e72ca8cSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3408a1ed278cSmrg 34093e72ca8cSmrg_LT_DECL([], [deplibs_check_method], [1], 34103e72ca8cSmrg [Method to check whether dependent libraries are shared objects]) 34113e72ca8cSmrg_LT_DECL([], [file_magic_cmd], [1], 34123e72ca8cSmrg [Command to use when deplibs_check_method = "file_magic"]) 34133e72ca8cSmrg_LT_DECL([], [file_magic_glob], [1], 34143e72ca8cSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 34153e72ca8cSmrg_LT_DECL([], [want_nocaseglob], [1], 34163e72ca8cSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 34173e72ca8cSmrg])# _LT_CHECK_MAGIC_METHOD 3418a1ed278cSmrg 3419a1ed278cSmrg 34203e72ca8cSmrg# LT_PATH_NM 34213e72ca8cSmrg# ---------- 34223e72ca8cSmrg# find the pathname to a BSD- or MS-compatible name lister 34233e72ca8cSmrgAC_DEFUN([LT_PATH_NM], 34243e72ca8cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 34253e72ca8cSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 34263e72ca8cSmrg[if test -n "$NM"; then 34273e72ca8cSmrg # Let the user override the test. 34283e72ca8cSmrg lt_cv_path_NM="$NM" 34293e72ca8cSmrgelse 34303e72ca8cSmrg lt_nm_to_check="${ac_tool_prefix}nm" 34313e72ca8cSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 34323e72ca8cSmrg lt_nm_to_check="$lt_nm_to_check nm" 34333e72ca8cSmrg fi 34343e72ca8cSmrg for lt_tmp_nm in $lt_nm_to_check; do 34353e72ca8cSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 34363e72ca8cSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 34373e72ca8cSmrg IFS="$lt_save_ifs" 34383e72ca8cSmrg test -z "$ac_dir" && ac_dir=. 34393e72ca8cSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 34403e72ca8cSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 34413e72ca8cSmrg # Check to see if the nm accepts a BSD-compat flag. 34423e72ca8cSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 34433e72ca8cSmrg # nm: unknown option "B" ignored 34443e72ca8cSmrg # Tru64's nm complains that /dev/null is an invalid object file 34453e72ca8cSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 34463e72ca8cSmrg */dev/null* | *'Invalid file or object type'*) 34473e72ca8cSmrg lt_cv_path_NM="$tmp_nm -B" 34483e72ca8cSmrg break 34493e72ca8cSmrg ;; 34503e72ca8cSmrg *) 34513e72ca8cSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 34523e72ca8cSmrg */dev/null*) 34533e72ca8cSmrg lt_cv_path_NM="$tmp_nm -p" 34543e72ca8cSmrg break 34553e72ca8cSmrg ;; 34563e72ca8cSmrg *) 34573e72ca8cSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 34583e72ca8cSmrg continue # so that we can try to find one that supports BSD flags 34593e72ca8cSmrg ;; 34603e72ca8cSmrg esac 34613e72ca8cSmrg ;; 34623e72ca8cSmrg esac 34633e72ca8cSmrg fi 34643e72ca8cSmrg done 34653e72ca8cSmrg IFS="$lt_save_ifs" 34663e72ca8cSmrg done 34673e72ca8cSmrg : ${lt_cv_path_NM=no} 34683e72ca8cSmrgfi]) 34693e72ca8cSmrgif test "$lt_cv_path_NM" != "no"; then 34703e72ca8cSmrg NM="$lt_cv_path_NM" 34713e72ca8cSmrgelse 34723e72ca8cSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 34733e72ca8cSmrg if test -n "$DUMPBIN"; then : 34743e72ca8cSmrg # Let the user override the test. 34753e72ca8cSmrg else 34763e72ca8cSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 34773e72ca8cSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 34783e72ca8cSmrg *COFF*) 34793e72ca8cSmrg DUMPBIN="$DUMPBIN -symbols" 3480b425557eSmrg ;; 34813e72ca8cSmrg *) 34823e72ca8cSmrg DUMPBIN=: 3483b425557eSmrg ;; 34843e72ca8cSmrg esac 34853e72ca8cSmrg fi 34863e72ca8cSmrg AC_SUBST([DUMPBIN]) 34873e72ca8cSmrg if test "$DUMPBIN" != ":"; then 34883e72ca8cSmrg NM="$DUMPBIN" 34893e72ca8cSmrg fi 34903e72ca8cSmrgfi 34913e72ca8cSmrgtest -z "$NM" && NM=nm 34923e72ca8cSmrgAC_SUBST([NM]) 34933e72ca8cSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3494a1ed278cSmrg 34953e72ca8cSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 34963e72ca8cSmrg [lt_cv_nm_interface="BSD nm" 34973e72ca8cSmrg echo "int some_variable = 0;" > conftest.$ac_ext 34983e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 34993e72ca8cSmrg (eval "$ac_compile" 2>conftest.err) 35003e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 35013e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 35023e72ca8cSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 35033e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 35043e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 35053e72ca8cSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 35063e72ca8cSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 35073e72ca8cSmrg lt_cv_nm_interface="MS dumpbin" 35083e72ca8cSmrg fi 35093e72ca8cSmrg rm -f conftest*]) 35103e72ca8cSmrg])# LT_PATH_NM 3511a1ed278cSmrg 35123e72ca8cSmrg# Old names: 35133e72ca8cSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 35143e72ca8cSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 35153e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 35163e72ca8cSmrgdnl AC_DEFUN([AM_PROG_NM], []) 35173e72ca8cSmrgdnl AC_DEFUN([AC_PROG_NM], []) 3518a1ed278cSmrg 35193e72ca8cSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 35203e72ca8cSmrg# -------------------------------- 35213e72ca8cSmrg# how to determine the name of the shared library 35223e72ca8cSmrg# associated with a specific link library. 35233e72ca8cSmrg# -- PORTME fill in with the dynamic library characteristics 35243e72ca8cSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 35253e72ca8cSmrg[m4_require([_LT_DECL_EGREP]) 35263e72ca8cSmrgm4_require([_LT_DECL_OBJDUMP]) 35273e72ca8cSmrgm4_require([_LT_DECL_DLLTOOL]) 35283e72ca8cSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 35293e72ca8cSmrglt_cv_sharedlib_from_linklib_cmd, 35303e72ca8cSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3531a1ed278cSmrg 35323e72ca8cSmrgcase $host_os in 35333e72ca8cSmrgcygwin* | mingw* | pw32* | cegcc*) 35343e72ca8cSmrg # two different shell functions defined in ltmain.sh 35353e72ca8cSmrg # decide which to use based on capabilities of $DLLTOOL 35363e72ca8cSmrg case `$DLLTOOL --help 2>&1` in 35373e72ca8cSmrg *--identify-strict*) 35383e72ca8cSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 35393e72ca8cSmrg ;; 35403e72ca8cSmrg *) 35413e72ca8cSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 35423e72ca8cSmrg ;; 35433e72ca8cSmrg esac 35443e72ca8cSmrg ;; 35453e72ca8cSmrg*) 35463e72ca8cSmrg # fallback: assume linklib IS sharedlib 35473e72ca8cSmrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 35483e72ca8cSmrg ;; 35493e72ca8cSmrgesac 35503e72ca8cSmrg]) 35513e72ca8cSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 35523e72ca8cSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3553a1ed278cSmrg 35543e72ca8cSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 35553e72ca8cSmrg [Command to associate shared and link libraries]) 35563e72ca8cSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3557a1ed278cSmrg 3558a1ed278cSmrg 35593e72ca8cSmrg# _LT_PATH_MANIFEST_TOOL 35603e72ca8cSmrg# ---------------------- 35613e72ca8cSmrg# locate the manifest tool 35623e72ca8cSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 35633e72ca8cSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 35643e72ca8cSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 35653e72ca8cSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 35663e72ca8cSmrg [lt_cv_path_mainfest_tool=no 35673e72ca8cSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 35683e72ca8cSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 35693e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 35703e72ca8cSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 35713e72ca8cSmrg lt_cv_path_mainfest_tool=yes 35723e72ca8cSmrg fi 35733e72ca8cSmrg rm -f conftest*]) 35743e72ca8cSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 35753e72ca8cSmrg MANIFEST_TOOL=: 35763e72ca8cSmrgfi 35773e72ca8cSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 35783e72ca8cSmrg])# _LT_PATH_MANIFEST_TOOL 3579a1ed278cSmrg 3580a1ed278cSmrg 35813e72ca8cSmrg# LT_LIB_M 35823e72ca8cSmrg# -------- 35833e72ca8cSmrg# check for math library 35843e72ca8cSmrgAC_DEFUN([LT_LIB_M], 35853e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 35863e72ca8cSmrgLIBM= 35873e72ca8cSmrgcase $host in 35883e72ca8cSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 35893e72ca8cSmrg # These system don't have libm, or don't need it 35903e72ca8cSmrg ;; 35913e72ca8cSmrg*-ncr-sysv4.3*) 35923e72ca8cSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 35933e72ca8cSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 35943e72ca8cSmrg ;; 35953e72ca8cSmrg*) 35963e72ca8cSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 35973e72ca8cSmrg ;; 35983e72ca8cSmrgesac 35993e72ca8cSmrgAC_SUBST([LIBM]) 36003e72ca8cSmrg])# LT_LIB_M 3601a1ed278cSmrg 36023e72ca8cSmrg# Old name: 36033e72ca8cSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 36043e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 36053e72ca8cSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3606a1ed278cSmrg 3607a1ed278cSmrg 36083e72ca8cSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 36093e72ca8cSmrg# ------------------------------- 36103e72ca8cSmrgm4_defun([_LT_COMPILER_NO_RTTI], 36113e72ca8cSmrg[m4_require([_LT_TAG_COMPILER])dnl 3612a1ed278cSmrg 36133e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3614a1ed278cSmrg 36153e72ca8cSmrgif test "$GCC" = yes; then 36163e72ca8cSmrg case $cc_basename in 36173e72ca8cSmrg nvcc*) 36183e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 36193e72ca8cSmrg *) 36203e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 36213e72ca8cSmrg esac 36223e72ca8cSmrg 36233e72ca8cSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 36243e72ca8cSmrg lt_cv_prog_compiler_rtti_exceptions, 36253e72ca8cSmrg [-fno-rtti -fno-exceptions], [], 36263e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 36273e72ca8cSmrgfi 36283e72ca8cSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 36293e72ca8cSmrg [Compiler flag to turn off builtin functions]) 36303e72ca8cSmrg])# _LT_COMPILER_NO_RTTI 3631a1ed278cSmrg 3632a1ed278cSmrg 36333e72ca8cSmrg# _LT_CMD_GLOBAL_SYMBOLS 36343e72ca8cSmrg# ---------------------- 36353e72ca8cSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 36363e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 36373e72ca8cSmrgAC_REQUIRE([AC_PROG_CC])dnl 36383e72ca8cSmrgAC_REQUIRE([AC_PROG_AWK])dnl 36393e72ca8cSmrgAC_REQUIRE([LT_PATH_NM])dnl 36403e72ca8cSmrgAC_REQUIRE([LT_PATH_LD])dnl 36413e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 36423e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 36433e72ca8cSmrgm4_require([_LT_TAG_COMPILER])dnl 3644a1ed278cSmrg 36453e72ca8cSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 36463e72ca8cSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 36473e72ca8cSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 36483e72ca8cSmrg[ 36493e72ca8cSmrg# These are sane defaults that work on at least a few old systems. 36503e72ca8cSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3651a1ed278cSmrg 36523e72ca8cSmrg# Character class describing NM global symbol codes. 36533e72ca8cSmrgsymcode='[[BCDEGRST]]' 3654a1ed278cSmrg 36553e72ca8cSmrg# Regexp to match symbols that can be accessed directly from C. 36563e72ca8cSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3657a1ed278cSmrg 36583e72ca8cSmrg# Define system-specific variables. 36593e72ca8cSmrgcase $host_os in 36603e72ca8cSmrgaix*) 36613e72ca8cSmrg symcode='[[BCDT]]' 36623e72ca8cSmrg ;; 36633e72ca8cSmrgcygwin* | mingw* | pw32* | cegcc*) 36643e72ca8cSmrg symcode='[[ABCDGISTW]]' 36653e72ca8cSmrg ;; 36663e72ca8cSmrghpux*) 36673e72ca8cSmrg if test "$host_cpu" = ia64; then 36683e72ca8cSmrg symcode='[[ABCDEGRST]]' 36693e72ca8cSmrg fi 36703e72ca8cSmrg ;; 36713e72ca8cSmrgirix* | nonstopux*) 36723e72ca8cSmrg symcode='[[BCDEGRST]]' 36733e72ca8cSmrg ;; 36743e72ca8cSmrgosf*) 36753e72ca8cSmrg symcode='[[BCDEGQRST]]' 36763e72ca8cSmrg ;; 36773e72ca8cSmrgsolaris*) 36783e72ca8cSmrg symcode='[[BDRT]]' 36793e72ca8cSmrg ;; 36803e72ca8cSmrgsco3.2v5*) 36813e72ca8cSmrg symcode='[[DT]]' 36823e72ca8cSmrg ;; 36833e72ca8cSmrgsysv4.2uw2*) 36843e72ca8cSmrg symcode='[[DT]]' 36853e72ca8cSmrg ;; 36863e72ca8cSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 36873e72ca8cSmrg symcode='[[ABDT]]' 36883e72ca8cSmrg ;; 36893e72ca8cSmrgsysv4) 36903e72ca8cSmrg symcode='[[DFNSTU]]' 36913e72ca8cSmrg ;; 36923e72ca8cSmrgesac 3693a1ed278cSmrg 36943e72ca8cSmrg# If we're using GNU nm, then use its standard symbol codes. 36953e72ca8cSmrgcase `$NM -V 2>&1` in 36963e72ca8cSmrg*GNU* | *'with BFD'*) 36973e72ca8cSmrg symcode='[[ABCDGIRSTW]]' ;; 36983e72ca8cSmrgesac 3699a1ed278cSmrg 37003e72ca8cSmrg# Transform an extracted symbol line into a proper C declaration. 37013e72ca8cSmrg# Some systems (esp. on ia64) link data and code symbols differently, 37023e72ca8cSmrg# so use this general approach. 37033e72ca8cSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3704a1ed278cSmrg 37053e72ca8cSmrg# Transform an extracted symbol line into symbol name and symbol address 37063e72ca8cSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 37073e72ca8cSmrglt_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'" 3708a1ed278cSmrg 37093e72ca8cSmrg# Handle CRLF in mingw tool chain 37103e72ca8cSmrgopt_cr= 37113e72ca8cSmrgcase $build_os in 37123e72ca8cSmrgmingw*) 37133e72ca8cSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 37143e72ca8cSmrg ;; 37153e72ca8cSmrgesac 3716a1ed278cSmrg 37173e72ca8cSmrg# Try without a prefix underscore, then with it. 37183e72ca8cSmrgfor ac_symprfx in "" "_"; do 3719a1ed278cSmrg 37203e72ca8cSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 37213e72ca8cSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 37223e72ca8cSmrg 37233e72ca8cSmrg # Write the raw and C identifiers. 37243e72ca8cSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 37253e72ca8cSmrg # Fake it for dumpbin and say T for any non-static function 37263e72ca8cSmrg # and D for any global variable. 37273e72ca8cSmrg # Also find C++ and __fastcall symbols from MSVC++, 37283e72ca8cSmrg # which start with @ or ?. 37293e72ca8cSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 37303e72ca8cSmrg" {last_section=section; section=\$ 3};"\ 37313e72ca8cSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 37323e72ca8cSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 37333e72ca8cSmrg" \$ 0!~/External *\|/{next};"\ 37343e72ca8cSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 37353e72ca8cSmrg" {if(hide[section]) next};"\ 37363e72ca8cSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 37373e72ca8cSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 37383e72ca8cSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 37393e72ca8cSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 37403e72ca8cSmrg" ' prfx=^$ac_symprfx]" 37413e72ca8cSmrg else 37423e72ca8cSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 37433e72ca8cSmrg fi 37443e72ca8cSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3745a1ed278cSmrg 37463e72ca8cSmrg # Check to see that the pipe works correctly. 37473e72ca8cSmrg pipe_works=no 37483e72ca8cSmrg 37493e72ca8cSmrg rm -f conftest* 37503e72ca8cSmrg cat > conftest.$ac_ext <<_LT_EOF 37513e72ca8cSmrg#ifdef __cplusplus 37523e72ca8cSmrgextern "C" { 37533e72ca8cSmrg#endif 37543e72ca8cSmrgchar nm_test_var; 37553e72ca8cSmrgvoid nm_test_func(void); 37563e72ca8cSmrgvoid nm_test_func(void){} 37573e72ca8cSmrg#ifdef __cplusplus 37583e72ca8cSmrg} 37593e72ca8cSmrg#endif 37603e72ca8cSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 37613e72ca8cSmrg_LT_EOF 37623e72ca8cSmrg 37633e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 37643e72ca8cSmrg # Now try to grab the symbols. 37653e72ca8cSmrg nlist=conftest.nm 37663e72ca8cSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 37673e72ca8cSmrg # Try sorting and uniquifying the output. 37683e72ca8cSmrg if sort "$nlist" | uniq > "$nlist"T; then 37693e72ca8cSmrg mv -f "$nlist"T "$nlist" 3770a1ed278cSmrg else 37713e72ca8cSmrg rm -f "$nlist"T 3772a1ed278cSmrg fi 3773a1ed278cSmrg 37743e72ca8cSmrg # Make sure that we snagged all the symbols we need. 37753e72ca8cSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 37763e72ca8cSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 37773e72ca8cSmrg cat <<_LT_EOF > conftest.$ac_ext 37783e72ca8cSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 37793e72ca8cSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 37803e72ca8cSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 37813e72ca8cSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 37823e72ca8cSmrg# define LT@&t@_DLSYM_CONST 37833e72ca8cSmrg#elif defined(__osf__) 37843e72ca8cSmrg/* This system does not cope well with relocations in const data. */ 37853e72ca8cSmrg# define LT@&t@_DLSYM_CONST 37863e72ca8cSmrg#else 37873e72ca8cSmrg# define LT@&t@_DLSYM_CONST const 37883e72ca8cSmrg#endif 3789a1ed278cSmrg 37903e72ca8cSmrg#ifdef __cplusplus 37913e72ca8cSmrgextern "C" { 37923e72ca8cSmrg#endif 3793a1ed278cSmrg 37943e72ca8cSmrg_LT_EOF 37953e72ca8cSmrg # Now generate the symbol file. 37963e72ca8cSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3797a1ed278cSmrg 37983e72ca8cSmrg cat <<_LT_EOF >> conftest.$ac_ext 3799a1ed278cSmrg 38003e72ca8cSmrg/* The mapping between symbol names and symbols. */ 38013e72ca8cSmrgLT@&t@_DLSYM_CONST struct { 38023e72ca8cSmrg const char *name; 38033e72ca8cSmrg void *address; 38043e72ca8cSmrg} 38053e72ca8cSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 38063e72ca8cSmrg{ 38073e72ca8cSmrg { "@PROGRAM@", (void *) 0 }, 38083e72ca8cSmrg_LT_EOF 38093e72ca8cSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 38103e72ca8cSmrg cat <<\_LT_EOF >> conftest.$ac_ext 38113e72ca8cSmrg {0, (void *) 0} 38123e72ca8cSmrg}; 3813a1ed278cSmrg 38143e72ca8cSmrg/* This works around a problem in FreeBSD linker */ 38153e72ca8cSmrg#ifdef FREEBSD_WORKAROUND 38163e72ca8cSmrgstatic const void *lt_preloaded_setup() { 38173e72ca8cSmrg return lt__PROGRAM__LTX_preloaded_symbols; 38183e72ca8cSmrg} 38193e72ca8cSmrg#endif 3820a1ed278cSmrg 38213e72ca8cSmrg#ifdef __cplusplus 38223e72ca8cSmrg} 38233e72ca8cSmrg#endif 38243e72ca8cSmrg_LT_EOF 38253e72ca8cSmrg # Now try linking the two files. 38263e72ca8cSmrg mv conftest.$ac_objext conftstm.$ac_objext 38273e72ca8cSmrg lt_globsym_save_LIBS=$LIBS 38283e72ca8cSmrg lt_globsym_save_CFLAGS=$CFLAGS 38293e72ca8cSmrg LIBS="conftstm.$ac_objext" 38303e72ca8cSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 38313e72ca8cSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 38323e72ca8cSmrg pipe_works=yes 3833a1ed278cSmrg fi 38343e72ca8cSmrg LIBS=$lt_globsym_save_LIBS 38353e72ca8cSmrg CFLAGS=$lt_globsym_save_CFLAGS 3836a1ed278cSmrg else 38373e72ca8cSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3838a1ed278cSmrg fi 38393e72ca8cSmrg else 38403e72ca8cSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 38413e72ca8cSmrg fi 38423e72ca8cSmrg else 38433e72ca8cSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 38443e72ca8cSmrg fi 38453e72ca8cSmrg else 38463e72ca8cSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 38473e72ca8cSmrg cat conftest.$ac_ext >&5 3848b425557eSmrg fi 38493e72ca8cSmrg rm -rf conftest* conftst* 385034977a2fSmrg 38513e72ca8cSmrg # Do not use the global_symbol_pipe unless it works. 38523e72ca8cSmrg if test "$pipe_works" = yes; then 38533e72ca8cSmrg break 38543e72ca8cSmrg else 38553e72ca8cSmrg lt_cv_sys_global_symbol_pipe= 38563e72ca8cSmrg fi 38573e72ca8cSmrgdone 38583e72ca8cSmrg]) 38593e72ca8cSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 38603e72ca8cSmrg lt_cv_sys_global_symbol_to_cdecl= 38613e72ca8cSmrgfi 38623e72ca8cSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 38633e72ca8cSmrg AC_MSG_RESULT(failed) 38643e72ca8cSmrgelse 38653e72ca8cSmrg AC_MSG_RESULT(ok) 38663e72ca8cSmrgfi 386734977a2fSmrg 38683e72ca8cSmrg# Response file support. 38693e72ca8cSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 38703e72ca8cSmrg nm_file_list_spec='@' 38713e72ca8cSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 38723e72ca8cSmrg nm_file_list_spec='@' 38733e72ca8cSmrgfi 3874ee3138f1Smrg 38753e72ca8cSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 38763e72ca8cSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 38773e72ca8cSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 38783e72ca8cSmrg [Transform the output of nm in a proper C declaration]) 38793e72ca8cSmrg_LT_DECL([global_symbol_to_c_name_address], 38803e72ca8cSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 38813e72ca8cSmrg [Transform the output of nm in a C name address pair]) 38823e72ca8cSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 38833e72ca8cSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 38843e72ca8cSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 38853e72ca8cSmrg_LT_DECL([], [nm_file_list_spec], [1], 38863e72ca8cSmrg [Specify filename containing input files for $NM]) 38873e72ca8cSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 3888ee3138f1Smrg 3889ee3138f1Smrg 38903e72ca8cSmrg# _LT_COMPILER_PIC([TAGNAME]) 38913e72ca8cSmrg# --------------------------- 38923e72ca8cSmrgm4_defun([_LT_COMPILER_PIC], 38933e72ca8cSmrg[m4_require([_LT_TAG_COMPILER])dnl 38943e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 38953e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 38963e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 389734977a2fSmrg 38983e72ca8cSmrgm4_if([$1], [CXX], [ 38993e72ca8cSmrg # C++ specific cases for pic, static, wl, etc. 39003e72ca8cSmrg if test "$GXX" = yes; then 39013e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 39023e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3903ee3138f1Smrg 39043e72ca8cSmrg case $host_os in 39053e72ca8cSmrg aix*) 39063e72ca8cSmrg # All AIX code is PIC. 39073e72ca8cSmrg if test "$host_cpu" = ia64; then 39083e72ca8cSmrg # AIX 5 now supports IA64 processor 39093e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39103e72ca8cSmrg fi 39113e72ca8cSmrg ;; 3912a1ed278cSmrg 39133e72ca8cSmrg amigaos*) 39143e72ca8cSmrg case $host_cpu in 39153e72ca8cSmrg powerpc) 39163e72ca8cSmrg # see comment about AmigaOS4 .so support 39173e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39183e72ca8cSmrg ;; 39193e72ca8cSmrg m68k) 39203e72ca8cSmrg # FIXME: we need at least 68020 code to build shared libraries, but 39213e72ca8cSmrg # adding the `-m68020' flag to GCC prevents building anything better, 39223e72ca8cSmrg # like `-m68040'. 39233e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 39243e72ca8cSmrg ;; 39253e72ca8cSmrg esac 39263e72ca8cSmrg ;; 3927a1ed278cSmrg 39283e72ca8cSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 39293e72ca8cSmrg # PIC is the default for these OSes. 39303e72ca8cSmrg ;; 39313e72ca8cSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 39323e72ca8cSmrg # This hack is so that the source file can tell whether it is being 39333e72ca8cSmrg # built for inclusion in a dll (and should export symbols for example). 39343e72ca8cSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 39353e72ca8cSmrg # (--disable-auto-import) libraries 39363e72ca8cSmrg m4_if([$1], [GCJ], [], 39373e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39383e72ca8cSmrg ;; 39393e72ca8cSmrg darwin* | rhapsody*) 39403e72ca8cSmrg # PIC is the default on this platform 39413e72ca8cSmrg # Common symbols not allowed in MH_DYLIB files 39423e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 39433e72ca8cSmrg ;; 39443e72ca8cSmrg *djgpp*) 39453e72ca8cSmrg # DJGPP does not support shared libraries at all 39463e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 39473e72ca8cSmrg ;; 39483e72ca8cSmrg haiku*) 39493e72ca8cSmrg # PIC is the default for Haiku. 39503e72ca8cSmrg # The "-static" flag exists, but is broken. 39513e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 39523e72ca8cSmrg ;; 39533e72ca8cSmrg interix[[3-9]]*) 39543e72ca8cSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 39553e72ca8cSmrg # Instead, we relocate shared libraries at runtime. 39563e72ca8cSmrg ;; 39573e72ca8cSmrg sysv4*MP*) 39583e72ca8cSmrg if test -d /usr/nec; then 39593e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 39603e72ca8cSmrg fi 39613e72ca8cSmrg ;; 39623e72ca8cSmrg hpux*) 39633e72ca8cSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 39643e72ca8cSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 39653e72ca8cSmrg # sets the default TLS model and affects inlining. 39663e72ca8cSmrg case $host_cpu in 39673e72ca8cSmrg hppa*64*) 39683e72ca8cSmrg ;; 39693e72ca8cSmrg *) 39703e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39713e72ca8cSmrg ;; 39723e72ca8cSmrg esac 39733e72ca8cSmrg ;; 39743e72ca8cSmrg *qnx* | *nto*) 39753e72ca8cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 39763e72ca8cSmrg # it will coredump. 39773e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 39783e72ca8cSmrg ;; 39793e72ca8cSmrg *) 39803e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39813e72ca8cSmrg ;; 39823e72ca8cSmrg esac 39833e72ca8cSmrg else 39843e72ca8cSmrg case $host_os in 39853e72ca8cSmrg aix[[4-9]]*) 39863e72ca8cSmrg # All AIX code is PIC. 39873e72ca8cSmrg if test "$host_cpu" = ia64; then 39883e72ca8cSmrg # AIX 5 now supports IA64 processor 39893e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39903e72ca8cSmrg else 39913e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 39923e72ca8cSmrg fi 39933e72ca8cSmrg ;; 39943e72ca8cSmrg chorus*) 39953e72ca8cSmrg case $cc_basename in 39963e72ca8cSmrg cxch68*) 39973e72ca8cSmrg # Green Hills C++ Compiler 39983e72ca8cSmrg # _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" 39993e72ca8cSmrg ;; 40003e72ca8cSmrg esac 40013e72ca8cSmrg ;; 40023e72ca8cSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 40033e72ca8cSmrg # This hack is so that the source file can tell whether it is being 40043e72ca8cSmrg # built for inclusion in a dll (and should export symbols for example). 40053e72ca8cSmrg m4_if([$1], [GCJ], [], 40063e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 40073e72ca8cSmrg ;; 40083e72ca8cSmrg dgux*) 40093e72ca8cSmrg case $cc_basename in 40103e72ca8cSmrg ec++*) 40113e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40123e72ca8cSmrg ;; 40133e72ca8cSmrg ghcx*) 40143e72ca8cSmrg # Green Hills C++ Compiler 40153e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 40163e72ca8cSmrg ;; 40173e72ca8cSmrg *) 40183e72ca8cSmrg ;; 40193e72ca8cSmrg esac 40203e72ca8cSmrg ;; 40213e72ca8cSmrg freebsd* | dragonfly*) 40223e72ca8cSmrg # FreeBSD uses GNU C++ 40233e72ca8cSmrg ;; 40243e72ca8cSmrg hpux9* | hpux10* | hpux11*) 40253e72ca8cSmrg case $cc_basename in 40263e72ca8cSmrg CC*) 40273e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40283e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40293e72ca8cSmrg if test "$host_cpu" != ia64; then 40303e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40313e72ca8cSmrg fi 40323e72ca8cSmrg ;; 40333e72ca8cSmrg aCC*) 40343e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40353e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40363e72ca8cSmrg case $host_cpu in 40373e72ca8cSmrg hppa*64*|ia64*) 40383e72ca8cSmrg # +Z the default 40393e72ca8cSmrg ;; 40403e72ca8cSmrg *) 40413e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40423e72ca8cSmrg ;; 40433e72ca8cSmrg esac 40443e72ca8cSmrg ;; 40453e72ca8cSmrg *) 40463e72ca8cSmrg ;; 40473e72ca8cSmrg esac 40483e72ca8cSmrg ;; 40493e72ca8cSmrg interix*) 40503e72ca8cSmrg # This is c89, which is MS Visual C++ (no shared libs) 40513e72ca8cSmrg # Anyone wants to do a port? 40523e72ca8cSmrg ;; 40533e72ca8cSmrg irix5* | irix6* | nonstopux*) 40543e72ca8cSmrg case $cc_basename in 40553e72ca8cSmrg CC*) 40563e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40573e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40583e72ca8cSmrg # CC pic flag -KPIC is the default. 40593e72ca8cSmrg ;; 40603e72ca8cSmrg *) 40613e72ca8cSmrg ;; 40623e72ca8cSmrg esac 40633e72ca8cSmrg ;; 40643e72ca8cSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 40653e72ca8cSmrg case $cc_basename in 40663e72ca8cSmrg KCC*) 40673e72ca8cSmrg # KAI C++ Compiler 40683e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 40693e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40703e72ca8cSmrg ;; 40713e72ca8cSmrg ecpc* ) 40723e72ca8cSmrg # old Intel C++ for x86_64 which still supported -KPIC. 40733e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40743e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40753e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40763e72ca8cSmrg ;; 40773e72ca8cSmrg icpc* ) 40783e72ca8cSmrg # Intel C++, used to be incompatible with GCC. 40793e72ca8cSmrg # ICC 10 doesn't accept -KPIC any more. 40803e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40813e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40823e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40833e72ca8cSmrg ;; 40843e72ca8cSmrg pgCC* | pgcpp*) 40853e72ca8cSmrg # Portland Group C++ compiler 40863e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40873e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 40883e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40893e72ca8cSmrg ;; 40903e72ca8cSmrg cxx*) 40913e72ca8cSmrg # Compaq C++ 40923e72ca8cSmrg # Make sure the PIC flag is empty. It appears that all Alpha 40933e72ca8cSmrg # Linux and Compaq Tru64 Unix objects are PIC. 40943e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 40953e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40963e72ca8cSmrg ;; 40973e72ca8cSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 40983e72ca8cSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 40993e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41003e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 41013e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 41023e72ca8cSmrg ;; 41033e72ca8cSmrg *) 41043e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 41053e72ca8cSmrg *Sun\ C*) 41063e72ca8cSmrg # Sun C++ 5.9 41073e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41083e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41093e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41103e72ca8cSmrg ;; 41113e72ca8cSmrg esac 41123e72ca8cSmrg ;; 41133e72ca8cSmrg esac 41143e72ca8cSmrg ;; 41153e72ca8cSmrg lynxos*) 41163e72ca8cSmrg ;; 41173e72ca8cSmrg m88k*) 41183e72ca8cSmrg ;; 41193e72ca8cSmrg mvs*) 41203e72ca8cSmrg case $cc_basename in 41213e72ca8cSmrg cxx*) 41223e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 41233e72ca8cSmrg ;; 41243e72ca8cSmrg *) 41253e72ca8cSmrg ;; 41263e72ca8cSmrg esac 41273e72ca8cSmrg ;; 41283e72ca8cSmrg netbsd*) 41293e72ca8cSmrg ;; 41303e72ca8cSmrg *qnx* | *nto*) 41313e72ca8cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 41323e72ca8cSmrg # it will coredump. 41333e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 41343e72ca8cSmrg ;; 41353e72ca8cSmrg osf3* | osf4* | osf5*) 41363e72ca8cSmrg case $cc_basename in 41373e72ca8cSmrg KCC*) 41383e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 41393e72ca8cSmrg ;; 41403e72ca8cSmrg RCC*) 41413e72ca8cSmrg # Rational C++ 2.4.1 41423e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41433e72ca8cSmrg ;; 41443e72ca8cSmrg cxx*) 41453e72ca8cSmrg # Digital/Compaq C++ 41463e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41473e72ca8cSmrg # Make sure the PIC flag is empty. It appears that all Alpha 41483e72ca8cSmrg # Linux and Compaq Tru64 Unix objects are PIC. 41493e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 41503e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 41513e72ca8cSmrg ;; 41523e72ca8cSmrg *) 41533e72ca8cSmrg ;; 41543e72ca8cSmrg esac 41553e72ca8cSmrg ;; 41563e72ca8cSmrg psos*) 41573e72ca8cSmrg ;; 41583e72ca8cSmrg solaris*) 41593e72ca8cSmrg case $cc_basename in 41603e72ca8cSmrg CC* | sunCC*) 41613e72ca8cSmrg # Sun C++ 4.2, 5.x and Centerline C++ 41623e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41633e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41643e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41653e72ca8cSmrg ;; 41663e72ca8cSmrg gcx*) 41673e72ca8cSmrg # Green Hills C++ Compiler 41683e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 41693e72ca8cSmrg ;; 41703e72ca8cSmrg *) 41713e72ca8cSmrg ;; 41723e72ca8cSmrg esac 41733e72ca8cSmrg ;; 41743e72ca8cSmrg sunos4*) 41753e72ca8cSmrg case $cc_basename in 41763e72ca8cSmrg CC*) 41773e72ca8cSmrg # Sun C++ 4.x 41783e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41793e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41803e72ca8cSmrg ;; 41813e72ca8cSmrg lcc*) 41823e72ca8cSmrg # Lucid 41833e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41843e72ca8cSmrg ;; 41853e72ca8cSmrg *) 41863e72ca8cSmrg ;; 41873e72ca8cSmrg esac 41883e72ca8cSmrg ;; 41893e72ca8cSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 41903e72ca8cSmrg case $cc_basename in 41913e72ca8cSmrg CC*) 41923e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41933e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41943e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41953e72ca8cSmrg ;; 41963e72ca8cSmrg esac 41973e72ca8cSmrg ;; 41983e72ca8cSmrg tandem*) 41993e72ca8cSmrg case $cc_basename in 42003e72ca8cSmrg NCC*) 42013e72ca8cSmrg # NonStop-UX NCC 3.20 42023e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 42033e72ca8cSmrg ;; 42043e72ca8cSmrg *) 42053e72ca8cSmrg ;; 42063e72ca8cSmrg esac 42073e72ca8cSmrg ;; 42083e72ca8cSmrg vxworks*) 42093e72ca8cSmrg ;; 42103e72ca8cSmrg *) 42113e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 42123e72ca8cSmrg ;; 42133e72ca8cSmrg esac 42143e72ca8cSmrg fi 42153e72ca8cSmrg], 42163e72ca8cSmrg[ 42173e72ca8cSmrg if test "$GCC" = yes; then 42183e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42193e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4220a1ed278cSmrg 42213e72ca8cSmrg case $host_os in 42223e72ca8cSmrg aix*) 42233e72ca8cSmrg # All AIX code is PIC. 42243e72ca8cSmrg if test "$host_cpu" = ia64; then 42253e72ca8cSmrg # AIX 5 now supports IA64 processor 42263e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42273e72ca8cSmrg fi 42283e72ca8cSmrg ;; 4229a1ed278cSmrg 42303e72ca8cSmrg amigaos*) 42313e72ca8cSmrg case $host_cpu in 42323e72ca8cSmrg powerpc) 42333e72ca8cSmrg # see comment about AmigaOS4 .so support 42343e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42353e72ca8cSmrg ;; 42363e72ca8cSmrg m68k) 42373e72ca8cSmrg # FIXME: we need at least 68020 code to build shared libraries, but 42383e72ca8cSmrg # adding the `-m68020' flag to GCC prevents building anything better, 42393e72ca8cSmrg # like `-m68040'. 42403e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42413e72ca8cSmrg ;; 42423e72ca8cSmrg esac 42433e72ca8cSmrg ;; 4244a1ed278cSmrg 42453e72ca8cSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42463e72ca8cSmrg # PIC is the default for these OSes. 42473e72ca8cSmrg ;; 4248a1ed278cSmrg 42493e72ca8cSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 42503e72ca8cSmrg # This hack is so that the source file can tell whether it is being 42513e72ca8cSmrg # built for inclusion in a dll (and should export symbols for example). 42523e72ca8cSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42533e72ca8cSmrg # (--disable-auto-import) libraries 42543e72ca8cSmrg m4_if([$1], [GCJ], [], 42553e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42563e72ca8cSmrg ;; 4257a1ed278cSmrg 42583e72ca8cSmrg darwin* | rhapsody*) 42593e72ca8cSmrg # PIC is the default on this platform 42603e72ca8cSmrg # Common symbols not allowed in MH_DYLIB files 42613e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42623e72ca8cSmrg ;; 4263a1ed278cSmrg 42643e72ca8cSmrg haiku*) 42653e72ca8cSmrg # PIC is the default for Haiku. 42663e72ca8cSmrg # The "-static" flag exists, but is broken. 42673e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 42683e72ca8cSmrg ;; 4269a1ed278cSmrg 42703e72ca8cSmrg hpux*) 42713e72ca8cSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42723e72ca8cSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42733e72ca8cSmrg # sets the default TLS model and affects inlining. 42743e72ca8cSmrg case $host_cpu in 42753e72ca8cSmrg hppa*64*) 42763e72ca8cSmrg # +Z the default 42773e72ca8cSmrg ;; 42783e72ca8cSmrg *) 42793e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42803e72ca8cSmrg ;; 42813e72ca8cSmrg esac 42823e72ca8cSmrg ;; 4283a1ed278cSmrg 42843e72ca8cSmrg interix[[3-9]]*) 42853e72ca8cSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42863e72ca8cSmrg # Instead, we relocate shared libraries at runtime. 42873e72ca8cSmrg ;; 4288a1ed278cSmrg 42893e72ca8cSmrg msdosdjgpp*) 42903e72ca8cSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 42913e72ca8cSmrg # on systems that don't support them. 42923e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 42933e72ca8cSmrg enable_shared=no 42943e72ca8cSmrg ;; 4295a1ed278cSmrg 42963e72ca8cSmrg *nto* | *qnx*) 42973e72ca8cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 42983e72ca8cSmrg # it will coredump. 42993e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 43003e72ca8cSmrg ;; 4301a1ed278cSmrg 43023e72ca8cSmrg sysv4*MP*) 43033e72ca8cSmrg if test -d /usr/nec; then 43043e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 43053e72ca8cSmrg fi 43063e72ca8cSmrg ;; 4307a1ed278cSmrg 43083e72ca8cSmrg *) 43093e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43103e72ca8cSmrg ;; 43113e72ca8cSmrg esac 4312a1ed278cSmrg 43133e72ca8cSmrg case $cc_basename in 43143e72ca8cSmrg nvcc*) # Cuda Compiler Driver 2.2 43153e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 43163e72ca8cSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 43173e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 43183e72ca8cSmrg fi 43193e72ca8cSmrg ;; 43203e72ca8cSmrg esac 4321a1ed278cSmrg else 43223e72ca8cSmrg # PORTME Check for flag to pass linker flags through the system compiler. 43233e72ca8cSmrg case $host_os in 43243e72ca8cSmrg aix*) 43253e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43263e72ca8cSmrg if test "$host_cpu" = ia64; then 43273e72ca8cSmrg # AIX 5 now supports IA64 processor 43283e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43293e72ca8cSmrg else 43303e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43313e72ca8cSmrg fi 43323e72ca8cSmrg ;; 4333ee3138f1Smrg 43343e72ca8cSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 43353e72ca8cSmrg # This hack is so that the source file can tell whether it is being 43363e72ca8cSmrg # built for inclusion in a dll (and should export symbols for example). 43373e72ca8cSmrg m4_if([$1], [GCJ], [], 43383e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43393e72ca8cSmrg ;; 4340ee3138f1Smrg 43413e72ca8cSmrg hpux9* | hpux10* | hpux11*) 43423e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43433e72ca8cSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 43443e72ca8cSmrg # not for PA HP-UX. 43453e72ca8cSmrg case $host_cpu in 43463e72ca8cSmrg hppa*64*|ia64*) 43473e72ca8cSmrg # +Z the default 43483e72ca8cSmrg ;; 43493e72ca8cSmrg *) 43503e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43513e72ca8cSmrg ;; 43523e72ca8cSmrg esac 43533e72ca8cSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 43543e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 43553e72ca8cSmrg ;; 435634977a2fSmrg 43573e72ca8cSmrg irix5* | irix6* | nonstopux*) 43583e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43593e72ca8cSmrg # PIC (with -KPIC) is the default. 43603e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43613e72ca8cSmrg ;; 436234977a2fSmrg 43633e72ca8cSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 43643e72ca8cSmrg case $cc_basename in 43653e72ca8cSmrg # old Intel for x86_64 which still supported -KPIC. 43663e72ca8cSmrg ecc*) 43673e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43683e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43693e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43703e72ca8cSmrg ;; 43713e72ca8cSmrg # icc used to be incompatible with GCC. 43723e72ca8cSmrg # ICC 10 doesn't accept -KPIC any more. 43733e72ca8cSmrg icc* | ifort*) 43743e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43753e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43763e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43773e72ca8cSmrg ;; 43783e72ca8cSmrg # Lahey Fortran 8.1. 43793e72ca8cSmrg lf95*) 43803e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43813e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 43823e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 43833e72ca8cSmrg ;; 43843e72ca8cSmrg nagfor*) 43853e72ca8cSmrg # NAG Fortran compiler 43863e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 43873e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 43883e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43893e72ca8cSmrg ;; 43903e72ca8cSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 43913e72ca8cSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 43923e72ca8cSmrg # which looks to be a dead project) 43933e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43943e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 43953e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43963e72ca8cSmrg ;; 43973e72ca8cSmrg ccc*) 43983e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43993e72ca8cSmrg # All Alpha code is PIC. 44003e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44013e72ca8cSmrg ;; 44023e72ca8cSmrg xl* | bgxl* | bgf* | mpixl*) 44033e72ca8cSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 44043e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44053e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44063e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44073e72ca8cSmrg ;; 44083e72ca8cSmrg *) 44093e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 44103e72ca8cSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 44113e72ca8cSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 44123e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44133e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44143e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 44153e72ca8cSmrg ;; 44163e72ca8cSmrg *Sun\ F* | *Sun*Fortran*) 44173e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44183e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44193e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44203e72ca8cSmrg ;; 44213e72ca8cSmrg *Sun\ C*) 44223e72ca8cSmrg # Sun C 5.9 44233e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44243e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44253e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44263e72ca8cSmrg ;; 44273e72ca8cSmrg *Intel*\ [[CF]]*Compiler*) 44283e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44293e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44303e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44313e72ca8cSmrg ;; 44323e72ca8cSmrg *Portland\ Group*) 44333e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44343e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44353e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44363e72ca8cSmrg ;; 44373e72ca8cSmrg esac 44383e72ca8cSmrg ;; 44393e72ca8cSmrg esac 44403e72ca8cSmrg ;; 444134977a2fSmrg 44423e72ca8cSmrg newsos6) 44433e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44443e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44453e72ca8cSmrg ;; 4446ee3138f1Smrg 44473e72ca8cSmrg *nto* | *qnx*) 44483e72ca8cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44493e72ca8cSmrg # it will coredump. 44503e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44513e72ca8cSmrg ;; 4452ee3138f1Smrg 44533e72ca8cSmrg osf3* | osf4* | osf5*) 44543e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44553e72ca8cSmrg # All OSF/1 code is PIC. 44563e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44573e72ca8cSmrg ;; 4458ee3138f1Smrg 44593e72ca8cSmrg rdos*) 44603e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44613e72ca8cSmrg ;; 4462ee3138f1Smrg 44633e72ca8cSmrg solaris*) 44643e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44653e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44663e72ca8cSmrg case $cc_basename in 44673e72ca8cSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 44683e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 44693e72ca8cSmrg *) 44703e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 44713e72ca8cSmrg esac 44723e72ca8cSmrg ;; 4473ee3138f1Smrg 44743e72ca8cSmrg sunos4*) 44753e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44763e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44773e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44783e72ca8cSmrg ;; 4479ee3138f1Smrg 44803e72ca8cSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 44813e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44823e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44833e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44843e72ca8cSmrg ;; 44853e72ca8cSmrg 44863e72ca8cSmrg sysv4*MP*) 44873e72ca8cSmrg if test -d /usr/nec ;then 44883e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 44893e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44903e72ca8cSmrg fi 44913e72ca8cSmrg ;; 44923e72ca8cSmrg 44933e72ca8cSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 44943e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44953e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44963e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44973e72ca8cSmrg ;; 4498b425557eSmrg 44993e72ca8cSmrg unicos*) 45003e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45013e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45023e72ca8cSmrg ;; 4503b425557eSmrg 45043e72ca8cSmrg uts4*) 45053e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45063e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45073e72ca8cSmrg ;; 4508b425557eSmrg 45093e72ca8cSmrg *) 45103e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45113e72ca8cSmrg ;; 45123e72ca8cSmrg esac 45133e72ca8cSmrg fi 45143e72ca8cSmrg]) 45153e72ca8cSmrgcase $host_os in 45163e72ca8cSmrg # For platforms which do not support PIC, -DPIC is meaningless: 45173e72ca8cSmrg *djgpp*) 45183e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 45193e72ca8cSmrg ;; 45203e72ca8cSmrg *) 45213e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 45223e72ca8cSmrg ;; 45233e72ca8cSmrgesac 4524b425557eSmrg 45253e72ca8cSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 45263e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 45273e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 45283e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4529b425557eSmrg 45303e72ca8cSmrg# 45313e72ca8cSmrg# Check to make sure the PIC flag actually works. 45323e72ca8cSmrg# 45333e72ca8cSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 45343e72ca8cSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 45353e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 45363e72ca8cSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 45373e72ca8cSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 45383e72ca8cSmrg "" | " "*) ;; 45393e72ca8cSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 45403e72ca8cSmrg esac], 45413e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 45423e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 45433e72ca8cSmrgfi 45443e72ca8cSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 45453e72ca8cSmrg [Additional compiler flags for building library objects]) 4546b425557eSmrg 45473e72ca8cSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 45483e72ca8cSmrg [How to pass a linker flag through the compiler]) 45493e72ca8cSmrg# 45503e72ca8cSmrg# Check to make sure the static flag actually works. 45513e72ca8cSmrg# 45523e72ca8cSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 45533e72ca8cSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 45543e72ca8cSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 45553e72ca8cSmrg $lt_tmp_static_flag, 45563e72ca8cSmrg [], 45573e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 45583e72ca8cSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 45593e72ca8cSmrg [Compiler flag to prevent dynamic linking]) 45603e72ca8cSmrg])# _LT_COMPILER_PIC 4561b425557eSmrg 4562ee3138f1Smrg 45633e72ca8cSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 45643e72ca8cSmrg# ---------------------------- 45653e72ca8cSmrg# See if the linker supports building shared libraries. 45663e72ca8cSmrgm4_defun([_LT_LINKER_SHLIBS], 45673e72ca8cSmrg[AC_REQUIRE([LT_PATH_LD])dnl 45683e72ca8cSmrgAC_REQUIRE([LT_PATH_NM])dnl 45693e72ca8cSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 45703e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 45713e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 45723e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 45733e72ca8cSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 45743e72ca8cSmrgm4_require([_LT_TAG_COMPILER])dnl 45753e72ca8cSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 45763e72ca8cSmrgm4_if([$1], [CXX], [ 45773e72ca8cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 45783e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 45793e72ca8cSmrg case $host_os in 45803e72ca8cSmrg aix[[4-9]]*) 45813e72ca8cSmrg # If we're using GNU nm, then we don't want the "-C" option. 45823e72ca8cSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 45833e72ca8cSmrg # Also, AIX nm treats weak defined symbols like other global defined 45843e72ca8cSmrg # symbols, whereas GNU nm marks them as "W". 45853e72ca8cSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 45863e72ca8cSmrg _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' 45873e72ca8cSmrg else 45883e72ca8cSmrg _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' 45893e72ca8cSmrg fi 45903e72ca8cSmrg ;; 45913e72ca8cSmrg pw32*) 45923e72ca8cSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 45933e72ca8cSmrg ;; 45943e72ca8cSmrg cygwin* | mingw* | cegcc*) 45953e72ca8cSmrg case $cc_basename in 45963e72ca8cSmrg cl*) 45973e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 45983e72ca8cSmrg ;; 45993e72ca8cSmrg *) 46003e72ca8cSmrg _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' 46013e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 46023e72ca8cSmrg ;; 46033e72ca8cSmrg esac 46043e72ca8cSmrg ;; 46053e72ca8cSmrg *) 46063e72ca8cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 46073e72ca8cSmrg ;; 46083e72ca8cSmrg esac 46093e72ca8cSmrg], [ 46103e72ca8cSmrg runpath_var= 46113e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 46123e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 46133e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)= 46143e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 46153e72ca8cSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 46163e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 46173e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 46183e72ca8cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 46193e72ca8cSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 46203e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 46213e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 46223e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 46233e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 46243e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 46253e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 46263e72ca8cSmrg _LT_TAGVAR(inherit_rpath, $1)=no 46273e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 46283e72ca8cSmrg _LT_TAGVAR(module_cmds, $1)= 46293e72ca8cSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 46303e72ca8cSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 46313e72ca8cSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 46323e72ca8cSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 46333e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 46343e72ca8cSmrg # include_expsyms should be a list of space-separated symbols to be *always* 46353e72ca8cSmrg # included in the symbol list 46363e72ca8cSmrg _LT_TAGVAR(include_expsyms, $1)= 46373e72ca8cSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 46383e72ca8cSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 46393e72ca8cSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 46403e72ca8cSmrg # as well as any symbol that contains `d'. 46413e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 46423e72ca8cSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 46433e72ca8cSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 46443e72ca8cSmrg # the symbol is explicitly referenced. Since portable code cannot 46453e72ca8cSmrg # rely on this symbol name, it's probably fine to never include it in 46463e72ca8cSmrg # preloaded symbol tables. 46473e72ca8cSmrg # Exclude shared library initialization/finalization symbols. 46483e72ca8cSmrgdnl Note also adjust exclude_expsyms for C++ above. 46493e72ca8cSmrg extract_expsyms_cmds= 4650ee3138f1Smrg 46513e72ca8cSmrg case $host_os in 46523e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 46533e72ca8cSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 46543e72ca8cSmrg # When not using gcc, we currently assume that we are using 46553e72ca8cSmrg # Microsoft Visual C++. 46563e72ca8cSmrg if test "$GCC" != yes; then 46573e72ca8cSmrg with_gnu_ld=no 46583e72ca8cSmrg fi 46593e72ca8cSmrg ;; 46603e72ca8cSmrg interix*) 46613e72ca8cSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 46623e72ca8cSmrg with_gnu_ld=yes 46633e72ca8cSmrg ;; 46643e72ca8cSmrg openbsd*) 46653e72ca8cSmrg with_gnu_ld=no 46663e72ca8cSmrg ;; 46673e72ca8cSmrg esac 466834977a2fSmrg 46693e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 467034977a2fSmrg 46713e72ca8cSmrg # On some targets, GNU ld is compatible enough with the native linker 46723e72ca8cSmrg # that we're better off using the native interface for both. 46733e72ca8cSmrg lt_use_gnu_ld_interface=no 46743e72ca8cSmrg if test "$with_gnu_ld" = yes; then 46753e72ca8cSmrg case $host_os in 46763e72ca8cSmrg aix*) 46773e72ca8cSmrg # The AIX port of GNU ld has always aspired to compatibility 46783e72ca8cSmrg # with the native linker. However, as the warning in the GNU ld 46793e72ca8cSmrg # block says, versions before 2.19.5* couldn't really create working 46803e72ca8cSmrg # shared libraries, regardless of the interface used. 46813e72ca8cSmrg case `$LD -v 2>&1` in 46823e72ca8cSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 46833e72ca8cSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 46843e72ca8cSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 46853e72ca8cSmrg *) 46863e72ca8cSmrg lt_use_gnu_ld_interface=yes 4687a1ed278cSmrg ;; 46883e72ca8cSmrg esac 46893e72ca8cSmrg ;; 46903e72ca8cSmrg *) 46913e72ca8cSmrg lt_use_gnu_ld_interface=yes 46923e72ca8cSmrg ;; 46933e72ca8cSmrg esac 46943e72ca8cSmrg fi 4695a1ed278cSmrg 46963e72ca8cSmrg if test "$lt_use_gnu_ld_interface" = yes; then 46973e72ca8cSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 46983e72ca8cSmrg wlarc='${wl}' 4699a1ed278cSmrg 47003e72ca8cSmrg # Set some defaults for GNU ld with shared library support. These 47013e72ca8cSmrg # are reset later if shared libraries are not supported. Putting them 47023e72ca8cSmrg # here allows them to be overridden if necessary. 47033e72ca8cSmrg runpath_var=LD_RUN_PATH 47043e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 47053e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 47063e72ca8cSmrg # ancient GNU ld didn't support --whole-archive et. al. 47073e72ca8cSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 47083e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 47093e72ca8cSmrg else 47103e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 47113e72ca8cSmrg fi 47123e72ca8cSmrg supports_anon_versioning=no 47133e72ca8cSmrg case `$LD -v 2>&1` in 47143e72ca8cSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 47153e72ca8cSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 47163e72ca8cSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 47173e72ca8cSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 47183e72ca8cSmrg *\ 2.11.*) ;; # other 2.11 versions 47193e72ca8cSmrg *) supports_anon_versioning=yes ;; 47203e72ca8cSmrg esac 4721a1ed278cSmrg 47223e72ca8cSmrg # See if GNU ld supports shared libraries. 47233e72ca8cSmrg case $host_os in 47243e72ca8cSmrg aix[[3-9]]*) 47253e72ca8cSmrg # On AIX/PPC, the GNU linker is very broken 47263e72ca8cSmrg if test "$host_cpu" != ia64; then 47273e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 47283e72ca8cSmrg cat <<_LT_EOF 1>&2 4729a1ed278cSmrg 47303e72ca8cSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 47313e72ca8cSmrg*** to be unable to reliably create shared libraries on AIX. 47323e72ca8cSmrg*** Therefore, libtool is disabling shared libraries support. If you 47333e72ca8cSmrg*** really care for shared libraries, you may want to install binutils 47343e72ca8cSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 47353e72ca8cSmrg*** You will then need to restart the configuration process. 4736a1ed278cSmrg 47373e72ca8cSmrg_LT_EOF 47383e72ca8cSmrg fi 47393e72ca8cSmrg ;; 4740ee3138f1Smrg 47413e72ca8cSmrg amigaos*) 47423e72ca8cSmrg case $host_cpu in 47433e72ca8cSmrg powerpc) 47443e72ca8cSmrg # see comment about AmigaOS4 .so support 47453e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47463e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 47473e72ca8cSmrg ;; 47483e72ca8cSmrg m68k) 47493e72ca8cSmrg _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)' 47503e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47513e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47523e72ca8cSmrg ;; 47533e72ca8cSmrg esac 47543e72ca8cSmrg ;; 4755ee3138f1Smrg 47563e72ca8cSmrg beos*) 47573e72ca8cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 47583e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47593e72ca8cSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 47603e72ca8cSmrg # support --undefined. This deserves some investigation. FIXME 47613e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47623e72ca8cSmrg else 47633e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 47643e72ca8cSmrg fi 47653e72ca8cSmrg ;; 4766ee3138f1Smrg 47673e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 47683e72ca8cSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 47693e72ca8cSmrg # as there is no search path for DLLs. 47703e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47713e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 47723e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47733e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 47743e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 47753e72ca8cSmrg _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' 47763e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4777ee3138f1Smrg 47783e72ca8cSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 47793e72ca8cSmrg _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' 47803e72ca8cSmrg # If the export-symbols file already is a .def file (1st line 47813e72ca8cSmrg # is EXPORTS), use it as is; otherwise, prepend... 47823e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 47833e72ca8cSmrg cp $export_symbols $output_objdir/$soname.def; 47843e72ca8cSmrg else 47853e72ca8cSmrg echo EXPORTS > $output_objdir/$soname.def; 47863e72ca8cSmrg cat $export_symbols >> $output_objdir/$soname.def; 47873e72ca8cSmrg fi~ 47883e72ca8cSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 47893e72ca8cSmrg else 47903e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 47913e72ca8cSmrg fi 47923e72ca8cSmrg ;; 4793ee3138f1Smrg 47943e72ca8cSmrg haiku*) 47953e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47963e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 47973e72ca8cSmrg ;; 4798ee3138f1Smrg 47993e72ca8cSmrg interix[[3-9]]*) 48003e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 48013e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48023e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 48033e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 48043e72ca8cSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 48053e72ca8cSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 48063e72ca8cSmrg # default) and relocated if they conflict, which is a slow very memory 48073e72ca8cSmrg # consuming and fragmenting process. To avoid this, we pick a random, 48083e72ca8cSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 48093e72ca8cSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 48103e72ca8cSmrg _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' 48113e72ca8cSmrg _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' 48123e72ca8cSmrg ;; 4813ee3138f1Smrg 48143e72ca8cSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 48153e72ca8cSmrg tmp_diet=no 48163e72ca8cSmrg if test "$host_os" = linux-dietlibc; then 48173e72ca8cSmrg case $cc_basename in 48183e72ca8cSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 48193e72ca8cSmrg esac 48203e72ca8cSmrg fi 48213e72ca8cSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 48223e72ca8cSmrg && test "$tmp_diet" = no 48233e72ca8cSmrg then 48243e72ca8cSmrg tmp_addflag=' $pic_flag' 48253e72ca8cSmrg tmp_sharedflag='-shared' 48263e72ca8cSmrg case $cc_basename,$host_cpu in 48273e72ca8cSmrg pgcc*) # Portland Group C compiler 48283e72ca8cSmrg _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' 48293e72ca8cSmrg tmp_addflag=' $pic_flag' 48303e72ca8cSmrg ;; 48313e72ca8cSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 48323e72ca8cSmrg # Portland Group f77 and f90 compilers 48333e72ca8cSmrg _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' 48343e72ca8cSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 48353e72ca8cSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 48363e72ca8cSmrg tmp_addflag=' -i_dynamic' ;; 48373e72ca8cSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 48383e72ca8cSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 48393e72ca8cSmrg ifc* | ifort*) # Intel Fortran compiler 48403e72ca8cSmrg tmp_addflag=' -nofor_main' ;; 48413e72ca8cSmrg lf95*) # Lahey Fortran 8.1 48423e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 48433e72ca8cSmrg tmp_sharedflag='--shared' ;; 48443e72ca8cSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 48453e72ca8cSmrg tmp_sharedflag='-qmkshrobj' 48463e72ca8cSmrg tmp_addflag= ;; 48473e72ca8cSmrg nvcc*) # Cuda Compiler Driver 2.2 48483e72ca8cSmrg _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' 48493e72ca8cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 48503e72ca8cSmrg ;; 48513e72ca8cSmrg esac 48523e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 48533e72ca8cSmrg *Sun\ C*) # Sun C 5.9 48543e72ca8cSmrg _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' 48553e72ca8cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 48563e72ca8cSmrg tmp_sharedflag='-G' ;; 48573e72ca8cSmrg *Sun\ F*) # Sun Fortran 8.3 48583e72ca8cSmrg tmp_sharedflag='-G' ;; 48593e72ca8cSmrg esac 48603e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4861ee3138f1Smrg 48623e72ca8cSmrg if test "x$supports_anon_versioning" = xyes; then 48633e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48643e72ca8cSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48653e72ca8cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 48663e72ca8cSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 48673e72ca8cSmrg fi 4868ee3138f1Smrg 48693e72ca8cSmrg case $cc_basename in 48703e72ca8cSmrg xlf* | bgf* | bgxlf* | mpixlf*) 48713e72ca8cSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 48723e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 48733e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 48743e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 48753e72ca8cSmrg if test "x$supports_anon_versioning" = xyes; then 48763e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48773e72ca8cSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48783e72ca8cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 48793e72ca8cSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 48803e72ca8cSmrg fi 48813e72ca8cSmrg ;; 4882b425557eSmrg esac 48833e72ca8cSmrg else 48843e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 48853e72ca8cSmrg fi 48863e72ca8cSmrg ;; 4887ee3138f1Smrg 48883e72ca8cSmrg netbsd*) 48893e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 48903e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 48913e72ca8cSmrg wlarc= 48923e72ca8cSmrg else 48933e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 48943e72ca8cSmrg _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' 48953e72ca8cSmrg fi 48963e72ca8cSmrg ;; 48973e72ca8cSmrg 48983e72ca8cSmrg solaris*) 48993e72ca8cSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4900a1ed278cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49013e72ca8cSmrg cat <<_LT_EOF 1>&2 4902ee3138f1Smrg 49033e72ca8cSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 49043e72ca8cSmrg*** create shared libraries on Solaris systems. Therefore, libtool 49053e72ca8cSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 49063e72ca8cSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 49073e72ca8cSmrg*** your PATH or compiler configuration so that the native linker is 49083e72ca8cSmrg*** used, and then restart. 4909ee3138f1Smrg 49103e72ca8cSmrg_LT_EOF 49113e72ca8cSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49123e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49133e72ca8cSmrg _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' 49143e72ca8cSmrg else 49153e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49163e72ca8cSmrg fi 49173e72ca8cSmrg ;; 4918ee3138f1Smrg 49193e72ca8cSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 49203e72ca8cSmrg case `$LD -v 2>&1` in 49213e72ca8cSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 49223e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49233e72ca8cSmrg cat <<_LT_EOF 1>&2 4924ee3138f1Smrg 49253e72ca8cSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 49263e72ca8cSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 49273e72ca8cSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 49283e72ca8cSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 49293e72ca8cSmrg*** your PATH or compiler configuration so that the native linker is 49303e72ca8cSmrg*** used, and then restart. 493134977a2fSmrg 49323e72ca8cSmrg_LT_EOF 4933a1ed278cSmrg ;; 49343e72ca8cSmrg *) 49353e72ca8cSmrg # For security reasons, it is highly recommended that you always 49363e72ca8cSmrg # use absolute paths for naming shared libraries, and exclude the 49373e72ca8cSmrg # DT_RUNPATH tag from executables and libraries. But doing so 49383e72ca8cSmrg # requires that you compile everything twice, which is a pain. 49393e72ca8cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49403e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49413e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49423e72ca8cSmrg _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' 49433e72ca8cSmrg else 49443e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4945a1ed278cSmrg fi 4946a1ed278cSmrg ;; 49473e72ca8cSmrg esac 49483e72ca8cSmrg ;; 4949ee3138f1Smrg 49503e72ca8cSmrg sunos4*) 49513e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 49523e72ca8cSmrg wlarc= 49533e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 49543e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 49553e72ca8cSmrg ;; 4956a1ed278cSmrg 49573e72ca8cSmrg *) 49583e72ca8cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49593e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49603e72ca8cSmrg _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' 49613e72ca8cSmrg else 49623e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49633e72ca8cSmrg fi 49643e72ca8cSmrg ;; 49653e72ca8cSmrg esac 4966ee3138f1Smrg 49673e72ca8cSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 49683e72ca8cSmrg runpath_var= 49693e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49703e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49713e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49723e72ca8cSmrg fi 49733e72ca8cSmrg else 49743e72ca8cSmrg # PORTME fill in a description of your system's linker (not GNU ld) 49753e72ca8cSmrg case $host_os in 49763e72ca8cSmrg aix3*) 49773e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 49783e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 49793e72ca8cSmrg _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' 49803e72ca8cSmrg # Note: this linker hardcodes the directories in LIBPATH if there 49813e72ca8cSmrg # are no directories specified by -L. 49823e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 49833e72ca8cSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 49843e72ca8cSmrg # Neither direct hardcoding nor static linking is supported with a 49853e72ca8cSmrg # broken collect2. 49863e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 49873e72ca8cSmrg fi 49883e72ca8cSmrg ;; 4989a1ed278cSmrg 49903e72ca8cSmrg aix[[4-9]]*) 49913e72ca8cSmrg if test "$host_cpu" = ia64; then 49923e72ca8cSmrg # On IA64, the linker does run time linking by default, so we don't 49933e72ca8cSmrg # have to do anything special. 49943e72ca8cSmrg aix_use_runtimelinking=no 49953e72ca8cSmrg exp_sym_flag='-Bexport' 49963e72ca8cSmrg no_entry_flag="" 49973e72ca8cSmrg else 49983e72ca8cSmrg # If we're using GNU nm, then we don't want the "-C" option. 49993e72ca8cSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 50003e72ca8cSmrg # Also, AIX nm treats weak defined symbols like other global 50013e72ca8cSmrg # defined symbols, whereas GNU nm marks them as "W". 50023e72ca8cSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 50033e72ca8cSmrg _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' 50043e72ca8cSmrg else 50053e72ca8cSmrg _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' 50063e72ca8cSmrg fi 50073e72ca8cSmrg aix_use_runtimelinking=no 5008a1ed278cSmrg 50093e72ca8cSmrg # Test if we are trying to use run time linking or normal 50103e72ca8cSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 50113e72ca8cSmrg # need to do runtime linking. 50123e72ca8cSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 50133e72ca8cSmrg for ld_flag in $LDFLAGS; do 50143e72ca8cSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 50153e72ca8cSmrg aix_use_runtimelinking=yes 50163e72ca8cSmrg break 50173e72ca8cSmrg fi 50183e72ca8cSmrg done 50193e72ca8cSmrg ;; 50203e72ca8cSmrg esac 5021a1ed278cSmrg 50223e72ca8cSmrg exp_sym_flag='-bexport' 50233e72ca8cSmrg no_entry_flag='-bnoentry' 50243e72ca8cSmrg fi 5025a1ed278cSmrg 50263e72ca8cSmrg # When large executables or shared objects are built, AIX ld can 50273e72ca8cSmrg # have problems creating the table of contents. If linking a library 50283e72ca8cSmrg # or program results in "error TOC overflow" add -mminimal-toc to 50293e72ca8cSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 50303e72ca8cSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5031a1ed278cSmrg 50323e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='' 50333e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 50343e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 50353e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 50363e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 50373e72ca8cSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5038a1ed278cSmrg 50393e72ca8cSmrg if test "$GCC" = yes; then 50403e72ca8cSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 50413e72ca8cSmrg # We only want to do this on AIX 4.2 and lower, the check 50423e72ca8cSmrg # below for broken collect2 doesn't work under 4.3+ 50433e72ca8cSmrg collect2name=`${CC} -print-prog-name=collect2` 50443e72ca8cSmrg if test -f "$collect2name" && 50453e72ca8cSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 50463e72ca8cSmrg then 50473e72ca8cSmrg # We have reworked collect2 50483e72ca8cSmrg : 50493e72ca8cSmrg else 50503e72ca8cSmrg # We have old collect2 50513e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 50523e72ca8cSmrg # It fails to find uninstalled libraries when the uninstalled 50533e72ca8cSmrg # path is not listed in the libpath. Setting hardcode_minus_L 50543e72ca8cSmrg # to unsupported forces relinking 50553e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 50563e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50573e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 50583e72ca8cSmrg fi 50593e72ca8cSmrg ;; 50603e72ca8cSmrg esac 50613e72ca8cSmrg shared_flag='-shared' 50623e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 50633e72ca8cSmrg shared_flag="$shared_flag "'${wl}-G' 50643e72ca8cSmrg fi 50653e72ca8cSmrg else 50663e72ca8cSmrg # not using gcc 50673e72ca8cSmrg if test "$host_cpu" = ia64; then 50683e72ca8cSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 50693e72ca8cSmrg # chokes on -Wl,-G. The following line is correct: 50703e72ca8cSmrg shared_flag='-G' 50713e72ca8cSmrg else 50723e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 50733e72ca8cSmrg shared_flag='${wl}-G' 50743e72ca8cSmrg else 50753e72ca8cSmrg shared_flag='${wl}-bM:SRE' 50763e72ca8cSmrg fi 50773e72ca8cSmrg fi 50783e72ca8cSmrg fi 5079a1ed278cSmrg 50803e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 50813e72ca8cSmrg # It seems that -bexpall does not export symbols beginning with 50823e72ca8cSmrg # underscore (_), so it is better to generate a list of symbols to export. 50833e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 50843e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 50853e72ca8cSmrg # Warning - without using the other runtime loading flags (-brtl), 50863e72ca8cSmrg # -berok will link without error, but may produce a broken library. 50873e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 50883e72ca8cSmrg # Determine the default libpath from the value encoded in an 50893e72ca8cSmrg # empty executable. 50903e72ca8cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 50913e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 50923e72ca8cSmrg _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" 50933e72ca8cSmrg else 50943e72ca8cSmrg if test "$host_cpu" = ia64; then 50953e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 50963e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 50973e72ca8cSmrg _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" 50983e72ca8cSmrg else 50993e72ca8cSmrg # Determine the default libpath from the value encoded in an 51003e72ca8cSmrg # empty executable. 51013e72ca8cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 51023e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 51033e72ca8cSmrg # Warning - without using the other run time loading flags, 51043e72ca8cSmrg # -berok will link without error, but may produce a broken library. 51053e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 51063e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 51073e72ca8cSmrg if test "$with_gnu_ld" = yes; then 51083e72ca8cSmrg # We only use this code for GNU lds that support --whole-archive. 51093e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 51103e72ca8cSmrg else 51113e72ca8cSmrg # Exported symbols can be pulled into shared objects from archives 51123e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 51133e72ca8cSmrg fi 51143e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 51153e72ca8cSmrg # This is similar to how AIX traditionally builds its shared libraries. 51163e72ca8cSmrg _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' 51173e72ca8cSmrg fi 51183e72ca8cSmrg fi 51193e72ca8cSmrg ;; 5120a1ed278cSmrg 51213e72ca8cSmrg amigaos*) 51223e72ca8cSmrg case $host_cpu in 51233e72ca8cSmrg powerpc) 51243e72ca8cSmrg # see comment about AmigaOS4 .so support 51253e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 51263e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51273e72ca8cSmrg ;; 51283e72ca8cSmrg m68k) 51293e72ca8cSmrg _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)' 51303e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51313e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51323e72ca8cSmrg ;; 51333e72ca8cSmrg esac 51343e72ca8cSmrg ;; 5135ee3138f1Smrg 51363e72ca8cSmrg bsdi[[45]]*) 51373e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 51383e72ca8cSmrg ;; 5139ee3138f1Smrg 51403e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 51413e72ca8cSmrg # When not using gcc, we currently assume that we are using 51423e72ca8cSmrg # Microsoft Visual C++. 51433e72ca8cSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 51443e72ca8cSmrg # no search path for DLLs. 51453e72ca8cSmrg case $cc_basename in 51463e72ca8cSmrg cl*) 51473e72ca8cSmrg # Native MSVC 51483e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 51493e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51503e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 51513e72ca8cSmrg _LT_TAGVAR(file_list_spec, $1)='@' 51523e72ca8cSmrg # Tell ltmain to make .lib files, not .a files. 51533e72ca8cSmrg libext=lib 51543e72ca8cSmrg # Tell ltmain to make .dll files, not .so files. 51553e72ca8cSmrg shrext_cmds=".dll" 51563e72ca8cSmrg # FIXME: Setting linknames here is a bad hack. 51573e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 51583e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 51593e72ca8cSmrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 51603e72ca8cSmrg else 51613e72ca8cSmrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 51623e72ca8cSmrg fi~ 51633e72ca8cSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 51643e72ca8cSmrg linknames=' 51653e72ca8cSmrg # The linker will not automatically build a static lib if we build a DLL. 51663e72ca8cSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 51673e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51683e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 51693e72ca8cSmrg _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' 51703e72ca8cSmrg # Don't use ranlib 51713e72ca8cSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 51723e72ca8cSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 51733e72ca8cSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 51743e72ca8cSmrg case $lt_outputfile in 51753e72ca8cSmrg *.exe|*.EXE) ;; 51763e72ca8cSmrg *) 51773e72ca8cSmrg lt_outputfile="$lt_outputfile.exe" 51783e72ca8cSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 51793e72ca8cSmrg ;; 51803e72ca8cSmrg esac~ 51813e72ca8cSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 51823e72ca8cSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 51833e72ca8cSmrg $RM "$lt_outputfile.manifest"; 51843e72ca8cSmrg fi' 51853e72ca8cSmrg ;; 51863e72ca8cSmrg *) 51873e72ca8cSmrg # Assume MSVC wrapper 51883e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 51893e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51903e72ca8cSmrg # Tell ltmain to make .lib files, not .a files. 51913e72ca8cSmrg libext=lib 51923e72ca8cSmrg # Tell ltmain to make .dll files, not .so files. 51933e72ca8cSmrg shrext_cmds=".dll" 51943e72ca8cSmrg # FIXME: Setting linknames here is a bad hack. 51953e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 51963e72ca8cSmrg # The linker will automatically build a .lib file if we build a DLL. 51973e72ca8cSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 51983e72ca8cSmrg # FIXME: Should let the user specify the lib program. 51993e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 52003e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 52013e72ca8cSmrg ;; 52023e72ca8cSmrg esac 52033e72ca8cSmrg ;; 5204ee3138f1Smrg 52053e72ca8cSmrg darwin* | rhapsody*) 52063e72ca8cSmrg _LT_DARWIN_LINKER_FEATURES($1) 52073e72ca8cSmrg ;; 520834977a2fSmrg 52093e72ca8cSmrg dgux*) 52103e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 52113e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 52123e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52133e72ca8cSmrg ;; 5214ee3138f1Smrg 52153e72ca8cSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 52163e72ca8cSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 52173e72ca8cSmrg # does not break anything, and helps significantly (at the cost of a little 52183e72ca8cSmrg # extra space). 52193e72ca8cSmrg freebsd2.2*) 52203e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 52213e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52223e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52233e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52243e72ca8cSmrg ;; 5225ee3138f1Smrg 52263e72ca8cSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 52273e72ca8cSmrg freebsd2.*) 52283e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 52293e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52303e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52313e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52323e72ca8cSmrg ;; 5233ee3138f1Smrg 52343e72ca8cSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 52353e72ca8cSmrg freebsd* | dragonfly*) 52363e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 52373e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52383e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5239a1ed278cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52403e72ca8cSmrg ;; 5241ee3138f1Smrg 52423e72ca8cSmrg hpux9*) 52433e72ca8cSmrg if test "$GCC" = yes; then 52443e72ca8cSmrg _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' 52453e72ca8cSmrg else 52463e72ca8cSmrg _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' 52473e72ca8cSmrg fi 52483e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52493e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52503e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52513e72ca8cSmrg 52523e72ca8cSmrg # hardcode_minus_L: Not really in the search PATH, 52533e72ca8cSmrg # but as the default location of the library. 52543e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52553e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52563e72ca8cSmrg ;; 52573e72ca8cSmrg 52583e72ca8cSmrg hpux10*) 52593e72ca8cSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 52603e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52613e72ca8cSmrg else 52623e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 52633e72ca8cSmrg fi 52643e72ca8cSmrg if test "$with_gnu_ld" = no; then 52653e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52663e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52673e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52683e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 52693e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52703e72ca8cSmrg # hardcode_minus_L: Not really in the search PATH, 52713e72ca8cSmrg # but as the default location of the library. 52723e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52733e72ca8cSmrg fi 52743e72ca8cSmrg ;; 52753e72ca8cSmrg 52763e72ca8cSmrg hpux11*) 52773e72ca8cSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 52783e72ca8cSmrg case $host_cpu in 52793e72ca8cSmrg hppa*64*) 52803e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52813e72ca8cSmrg ;; 52823e72ca8cSmrg ia64*) 52833e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5284b425557eSmrg ;; 5285a1ed278cSmrg *) 52863e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5287a1ed278cSmrg ;; 52883e72ca8cSmrg esac 52893e72ca8cSmrg else 52903e72ca8cSmrg case $host_cpu in 52913e72ca8cSmrg hppa*64*) 52923e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52933e72ca8cSmrg ;; 52943e72ca8cSmrg ia64*) 52953e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 52963e72ca8cSmrg ;; 52973e72ca8cSmrg *) 52983e72ca8cSmrg m4_if($1, [], [ 52993e72ca8cSmrg # Older versions of the 11.00 compiler do not understand -b yet 53003e72ca8cSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 53013e72ca8cSmrg _LT_LINKER_OPTION([if $CC understands -b], 53023e72ca8cSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 53033e72ca8cSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 53043e72ca8cSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 53053e72ca8cSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 53063e72ca8cSmrg ;; 53073e72ca8cSmrg esac 53083e72ca8cSmrg fi 53093e72ca8cSmrg if test "$with_gnu_ld" = no; then 53103e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 53113e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5312ee3138f1Smrg 53133e72ca8cSmrg case $host_cpu in 53143e72ca8cSmrg hppa*64*|ia64*) 53153e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 53163e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53173e72ca8cSmrg ;; 53183e72ca8cSmrg *) 53193e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53203e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53213e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5322a1ed278cSmrg 53233e72ca8cSmrg # hardcode_minus_L: Not really in the search PATH, 53243e72ca8cSmrg # but as the default location of the library. 53253e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53263e72ca8cSmrg ;; 5327a1ed278cSmrg esac 53283e72ca8cSmrg fi 5329b425557eSmrg ;; 5330ee3138f1Smrg 53313e72ca8cSmrg irix5* | irix6* | nonstopux*) 53323e72ca8cSmrg if test "$GCC" = yes; then 53333e72ca8cSmrg _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' 53343e72ca8cSmrg # Try to use the -exported_symbol ld option, if it does not 53353e72ca8cSmrg # work, assume that -exports_file does not work either and 53363e72ca8cSmrg # implicitly export all symbols. 53373e72ca8cSmrg # This should be the same for all languages, so no per-tag cache variable. 53383e72ca8cSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 53393e72ca8cSmrg [lt_cv_irix_exported_symbol], 53403e72ca8cSmrg [save_LDFLAGS="$LDFLAGS" 53413e72ca8cSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 53423e72ca8cSmrg AC_LINK_IFELSE( 53433e72ca8cSmrg [AC_LANG_SOURCE( 53443e72ca8cSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 53453e72ca8cSmrg [C++], [[int foo (void) { return 0; }]], 53463e72ca8cSmrg [Fortran 77], [[ 53473e72ca8cSmrg subroutine foo 53483e72ca8cSmrg end]], 53493e72ca8cSmrg [Fortran], [[ 53503e72ca8cSmrg subroutine foo 53513e72ca8cSmrg end]])])], 53523e72ca8cSmrg [lt_cv_irix_exported_symbol=yes], 53533e72ca8cSmrg [lt_cv_irix_exported_symbol=no]) 53543e72ca8cSmrg LDFLAGS="$save_LDFLAGS"]) 53553e72ca8cSmrg if test "$lt_cv_irix_exported_symbol" = yes; then 53563e72ca8cSmrg _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' 53573e72ca8cSmrg fi 53583e72ca8cSmrg else 53593e72ca8cSmrg _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' 53603e72ca8cSmrg _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' 53613e72ca8cSmrg fi 53623e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 53633e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53643e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53653e72ca8cSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 53663e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 53673e72ca8cSmrg ;; 5368a1ed278cSmrg 53693e72ca8cSmrg netbsd*) 53703e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 53713e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 53723e72ca8cSmrg else 53733e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 53743e72ca8cSmrg fi 53753e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 53763e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53773e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53783e72ca8cSmrg ;; 5379a1ed278cSmrg 53803e72ca8cSmrg newsos6) 53813e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 53823e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53833e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53843e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53853e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53863e72ca8cSmrg ;; 538734977a2fSmrg 53883e72ca8cSmrg *nto* | *qnx*) 53893e72ca8cSmrg ;; 5390ee3138f1Smrg 53913e72ca8cSmrg openbsd*) 53923e72ca8cSmrg if test -f /usr/libexec/ld.so; then 53933e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53943e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53953e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53963e72ca8cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 53973e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 53983e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 53993e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54003e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 54013e72ca8cSmrg else 54023e72ca8cSmrg case $host_os in 54033e72ca8cSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 54043e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 54053e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54063e72ca8cSmrg ;; 54073e72ca8cSmrg *) 54083e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 54093e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54103e72ca8cSmrg ;; 54113e72ca8cSmrg esac 54123e72ca8cSmrg fi 54133e72ca8cSmrg else 54143e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 54153e72ca8cSmrg fi 54163e72ca8cSmrg ;; 5417ee3138f1Smrg 54183e72ca8cSmrg os2*) 54193e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54203e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54213e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 54223e72ca8cSmrg _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' 54233e72ca8cSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 54243e72ca8cSmrg ;; 5425ee3138f1Smrg 54263e72ca8cSmrg osf3*) 54273e72ca8cSmrg if test "$GCC" = yes; then 54283e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 54293e72ca8cSmrg _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' 54303e72ca8cSmrg else 54313e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 54323e72ca8cSmrg _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' 54333e72ca8cSmrg fi 54343e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54353e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54363e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54373e72ca8cSmrg ;; 5438ee3138f1Smrg 54393e72ca8cSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 54403e72ca8cSmrg if test "$GCC" = yes; then 54413e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 54423e72ca8cSmrg _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' 54433e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54443e72ca8cSmrg else 54453e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 54463e72ca8cSmrg _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' 54473e72ca8cSmrg _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~ 54483e72ca8cSmrg $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' 5449ee3138f1Smrg 54503e72ca8cSmrg # Both c and cxx compiler support -rpath directly 54513e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 54523e72ca8cSmrg fi 54533e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54543e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54553e72ca8cSmrg ;; 5456ee3138f1Smrg 54573e72ca8cSmrg solaris*) 54583e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 54593e72ca8cSmrg if test "$GCC" = yes; then 54603e72ca8cSmrg wlarc='${wl}' 54613e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 54623e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54633e72ca8cSmrg $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' 54643e72ca8cSmrg else 54653e72ca8cSmrg case `$CC -V 2>&1` in 54663e72ca8cSmrg *"Compilers 5.0"*) 54673e72ca8cSmrg wlarc='' 54683e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 54693e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54703e72ca8cSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 54713e72ca8cSmrg ;; 54723e72ca8cSmrg *) 54733e72ca8cSmrg wlarc='${wl}' 54743e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 54753e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54763e72ca8cSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 54773e72ca8cSmrg ;; 54783e72ca8cSmrg esac 54793e72ca8cSmrg fi 54803e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54813e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 54823e72ca8cSmrg case $host_os in 54833e72ca8cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 54843e72ca8cSmrg *) 54853e72ca8cSmrg # The compiler driver will combine and reorder linker options, 54863e72ca8cSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 54873e72ca8cSmrg # but is careful enough not to reorder. 54883e72ca8cSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 54893e72ca8cSmrg if test "$GCC" = yes; then 54903e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 54913e72ca8cSmrg else 54923e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 54933e72ca8cSmrg fi 54943e72ca8cSmrg ;; 54953e72ca8cSmrg esac 54963e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 54973e72ca8cSmrg ;; 549834977a2fSmrg 54993e72ca8cSmrg sunos4*) 55003e72ca8cSmrg if test "x$host_vendor" = xsequent; then 55013e72ca8cSmrg # Use $CC to link under sequent, because it throws in some extra .o 55023e72ca8cSmrg # files that make .init and .fini sections work. 55033e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 55043e72ca8cSmrg else 55053e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 55063e72ca8cSmrg fi 55073e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55083e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 55093e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55103e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55113e72ca8cSmrg ;; 551234977a2fSmrg 55133e72ca8cSmrg sysv4) 55143e72ca8cSmrg case $host_vendor in 55153e72ca8cSmrg sni) 55163e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55173e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 55183e72ca8cSmrg ;; 55193e72ca8cSmrg siemens) 55203e72ca8cSmrg ## LD is ld it makes a PLAMLIB 55213e72ca8cSmrg ## CC just makes a GrossModule. 55223e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 55233e72ca8cSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 55243e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 55253e72ca8cSmrg ;; 55263e72ca8cSmrg motorola) 55273e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55283e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 55293e72ca8cSmrg ;; 55303e72ca8cSmrg esac 55313e72ca8cSmrg runpath_var='LD_RUN_PATH' 55323e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55333e72ca8cSmrg ;; 5534a1ed278cSmrg 55353e72ca8cSmrg sysv4.3*) 55363e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55373e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55383e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 55393e72ca8cSmrg ;; 5540a1ed278cSmrg 55413e72ca8cSmrg sysv4*MP*) 55423e72ca8cSmrg if test -d /usr/nec; then 55433e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55443e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55453e72ca8cSmrg runpath_var=LD_RUN_PATH 55463e72ca8cSmrg hardcode_runpath_var=yes 55473e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 55483e72ca8cSmrg fi 55493e72ca8cSmrg ;; 5550a1ed278cSmrg 55513e72ca8cSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 55523e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55533e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55543e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55553e72ca8cSmrg runpath_var='LD_RUN_PATH' 5556a1ed278cSmrg 55573e72ca8cSmrg if test "$GCC" = yes; then 55583e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55593e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55603e72ca8cSmrg else 55613e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55623e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55633e72ca8cSmrg fi 55643e72ca8cSmrg ;; 5565a1ed278cSmrg 55663e72ca8cSmrg sysv5* | sco3.2v5* | sco5v6*) 55673e72ca8cSmrg # Note: We can NOT use -z defs as we might desire, because we do not 55683e72ca8cSmrg # link with -lc, and that would cause any symbols used from libc to 55693e72ca8cSmrg # always be unresolved, which means just about no library would 55703e72ca8cSmrg # ever link correctly. If we're not using GNU ld we use -z text 55713e72ca8cSmrg # though, which does catch some bad symbols but isn't as heavy-handed 55723e72ca8cSmrg # as -z defs. 55733e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55743e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 55753e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55763e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55773e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 55783e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 55793e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55803e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 55813e72ca8cSmrg runpath_var='LD_RUN_PATH' 5582a1ed278cSmrg 55833e72ca8cSmrg if test "$GCC" = yes; then 55843e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55853e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55863e72ca8cSmrg else 55873e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55883e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55893e72ca8cSmrg fi 55903e72ca8cSmrg ;; 559134977a2fSmrg 55923e72ca8cSmrg uts4*) 55933e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55943e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55953e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55963e72ca8cSmrg ;; 559734977a2fSmrg 55983e72ca8cSmrg *) 55993e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56003e72ca8cSmrg ;; 5601a1ed278cSmrg esac 5602ee3138f1Smrg 56033e72ca8cSmrg if test x$host_vendor = xsni; then 56043e72ca8cSmrg case $host in 56053e72ca8cSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 56063e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 56073e72ca8cSmrg ;; 56083e72ca8cSmrg esac 56093e72ca8cSmrg fi 56103e72ca8cSmrg fi 56113e72ca8cSmrg]) 56123e72ca8cSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 56133e72ca8cSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5614ee3138f1Smrg 56153e72ca8cSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5616ee3138f1Smrg 56173e72ca8cSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 56183e72ca8cSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 56193e72ca8cSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 56203e72ca8cSmrg [The commands to extract the exported symbol list from a shared archive]) 5621ee3138f1Smrg 56223e72ca8cSmrg# 56233e72ca8cSmrg# Do we need to explicitly link libc? 56243e72ca8cSmrg# 56253e72ca8cSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 56263e72ca8cSmrgx|xyes) 56273e72ca8cSmrg # Assume -lc should be added 56283e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 562934977a2fSmrg 56303e72ca8cSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 56313e72ca8cSmrg case $_LT_TAGVAR(archive_cmds, $1) in 56323e72ca8cSmrg *'~'*) 56333e72ca8cSmrg # FIXME: we may have to deal with multi-command sequences. 5634b425557eSmrg ;; 56353e72ca8cSmrg '$CC '*) 56363e72ca8cSmrg # Test whether the compiler implicitly links with -lc since on some 56373e72ca8cSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 56383e72ca8cSmrg # to ld, don't add -lc before -lgcc. 56393e72ca8cSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 56403e72ca8cSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 56413e72ca8cSmrg [$RM conftest* 56423e72ca8cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5643ee3138f1Smrg 56443e72ca8cSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 56453e72ca8cSmrg soname=conftest 56463e72ca8cSmrg lib=conftest 56473e72ca8cSmrg libobjs=conftest.$ac_objext 56483e72ca8cSmrg deplibs= 56493e72ca8cSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 56503e72ca8cSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 56513e72ca8cSmrg compiler_flags=-v 56523e72ca8cSmrg linker_flags=-v 56533e72ca8cSmrg verstring= 56543e72ca8cSmrg output_objdir=. 56553e72ca8cSmrg libname=conftest 56563e72ca8cSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 56573e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 56583e72ca8cSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 56593e72ca8cSmrg then 56603e72ca8cSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 56613e72ca8cSmrg else 56623e72ca8cSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56633e72ca8cSmrg fi 56643e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 56653e72ca8cSmrg else 56663e72ca8cSmrg cat conftest.err 1>&5 56673e72ca8cSmrg fi 56683e72ca8cSmrg $RM conftest* 56693e72ca8cSmrg ]) 56703e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5671b425557eSmrg ;; 5672a1ed278cSmrg esac 56733e72ca8cSmrg fi 5674a1ed278cSmrg ;; 5675a1ed278cSmrgesac 5676a1ed278cSmrg 56773e72ca8cSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 56783e72ca8cSmrg [Whether or not to add -lc for building shared libraries]) 56793e72ca8cSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 56803e72ca8cSmrg [enable_shared_with_static_runtimes], [0], 56813e72ca8cSmrg [Whether or not to disallow shared libs when runtime libs are static]) 56823e72ca8cSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 56833e72ca8cSmrg [Compiler flag to allow reflexive dlopens]) 56843e72ca8cSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 56853e72ca8cSmrg [Compiler flag to generate shared objects directly from archives]) 56863e72ca8cSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 56873e72ca8cSmrg [Whether the compiler copes with passing no objects directly]) 56883e72ca8cSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 56893e72ca8cSmrg [Create an old-style archive from a shared archive]) 56903e72ca8cSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 56913e72ca8cSmrg [Create a temporary old-style archive to link instead of a shared archive]) 56923e72ca8cSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 56933e72ca8cSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 56943e72ca8cSmrg_LT_TAGDECL([], [module_cmds], [2], 56953e72ca8cSmrg [Commands used to build a loadable module if different from building 56963e72ca8cSmrg a shared archive.]) 56973e72ca8cSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 56983e72ca8cSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 56993e72ca8cSmrg [Whether we are building with GNU ld or not]) 57003e72ca8cSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 57013e72ca8cSmrg [Flag that allows shared libraries with undefined symbols to be built]) 57023e72ca8cSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 57033e72ca8cSmrg [Flag that enforces no undefined symbols]) 57043e72ca8cSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 57053e72ca8cSmrg [Flag to hardcode $libdir into a binary during linking. 57063e72ca8cSmrg This must work even if $libdir does not exist]) 57073e72ca8cSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 57083e72ca8cSmrg [Whether we need a single "-rpath" flag with a separated argument]) 57093e72ca8cSmrg_LT_TAGDECL([], [hardcode_direct], [0], 57103e72ca8cSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57113e72ca8cSmrg DIR into the resulting binary]) 57123e72ca8cSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 57133e72ca8cSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57143e72ca8cSmrg DIR into the resulting binary and the resulting library dependency is 57153e72ca8cSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 57163e72ca8cSmrg library is relocated]) 57173e72ca8cSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 57183e72ca8cSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 57193e72ca8cSmrg into the resulting binary]) 57203e72ca8cSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 57213e72ca8cSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 57223e72ca8cSmrg into the resulting binary]) 57233e72ca8cSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 57243e72ca8cSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 57253e72ca8cSmrg into the library and all subsequent libraries and executables linked 57263e72ca8cSmrg against it]) 57273e72ca8cSmrg_LT_TAGDECL([], [inherit_rpath], [0], 57283e72ca8cSmrg [Set to yes if linker adds runtime paths of dependent libraries 57293e72ca8cSmrg to runtime path list]) 57303e72ca8cSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 57313e72ca8cSmrg [Whether libtool must link a program against all its dependency libraries]) 57323e72ca8cSmrg_LT_TAGDECL([], [always_export_symbols], [0], 57333e72ca8cSmrg [Set to "yes" if exported symbols are required]) 57343e72ca8cSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 57353e72ca8cSmrg [The commands to list exported symbols]) 57363e72ca8cSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 57373e72ca8cSmrg [Symbols that should not be listed in the preloaded symbols]) 57383e72ca8cSmrg_LT_TAGDECL([], [include_expsyms], [1], 57393e72ca8cSmrg [Symbols that must always be exported]) 57403e72ca8cSmrg_LT_TAGDECL([], [prelink_cmds], [2], 57413e72ca8cSmrg [Commands necessary for linking programs (against libraries) with templates]) 57423e72ca8cSmrg_LT_TAGDECL([], [postlink_cmds], [2], 57433e72ca8cSmrg [Commands necessary for finishing linking programs]) 57443e72ca8cSmrg_LT_TAGDECL([], [file_list_spec], [1], 57453e72ca8cSmrg [Specify filename containing input files]) 57463e72ca8cSmrgdnl FIXME: Not yet implemented 57473e72ca8cSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 57483e72ca8cSmrgdnl [Compiler flag to generate thread safe objects]) 57493e72ca8cSmrg])# _LT_LINKER_SHLIBS 5750a1ed278cSmrg 5751a1ed278cSmrg 57523e72ca8cSmrg# _LT_LANG_C_CONFIG([TAG]) 57533e72ca8cSmrg# ------------------------ 57543e72ca8cSmrg# Ensure that the configuration variables for a C compiler are suitably 57553e72ca8cSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 57563e72ca8cSmrg# the compiler configuration to `libtool'. 57573e72ca8cSmrgm4_defun([_LT_LANG_C_CONFIG], 57583e72ca8cSmrg[m4_require([_LT_DECL_EGREP])dnl 57593e72ca8cSmrglt_save_CC="$CC" 57603e72ca8cSmrgAC_LANG_PUSH(C) 5761a1ed278cSmrg 57623e72ca8cSmrg# Source file extension for C test sources. 57633e72ca8cSmrgac_ext=c 576434977a2fSmrg 57653e72ca8cSmrg# Object file extension for compiled C test sources. 5766a1ed278cSmrgobjext=o 5767a1ed278cSmrg_LT_TAGVAR(objext, $1)=$objext 576834977a2fSmrg 57693e72ca8cSmrg# Code to be used in simple compile tests 57703e72ca8cSmrglt_simple_compile_test_code="int some_variable = 0;" 577134977a2fSmrg 57723e72ca8cSmrg# Code to be used in simple link tests 57733e72ca8cSmrglt_simple_link_test_code='int main(){return(0);}' 5774ee3138f1Smrg 57753e72ca8cSmrg_LT_TAG_COMPILER 57763e72ca8cSmrg# Save the default compiler, since it gets overwritten when the other 57773e72ca8cSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 57783e72ca8cSmrgcompiler_DEFAULT=$CC 5779ee3138f1Smrg 57803e72ca8cSmrg# save warnings/boilerplate of simple test code 57813e72ca8cSmrg_LT_COMPILER_BOILERPLATE 57823e72ca8cSmrg_LT_LINKER_BOILERPLATE 5783a1ed278cSmrg 57843e72ca8cSmrgif test -n "$compiler"; then 57853e72ca8cSmrg _LT_COMPILER_NO_RTTI($1) 57863e72ca8cSmrg _LT_COMPILER_PIC($1) 57873e72ca8cSmrg _LT_COMPILER_C_O($1) 57883e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 57893e72ca8cSmrg _LT_LINKER_SHLIBS($1) 57903e72ca8cSmrg _LT_SYS_DYNAMIC_LINKER($1) 57913e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 57923e72ca8cSmrg LT_SYS_DLOPEN_SELF 57933e72ca8cSmrg _LT_CMD_STRIPLIB 5794ee3138f1Smrg 57953e72ca8cSmrg # Report which library types will actually be built 57963e72ca8cSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 57973e72ca8cSmrg AC_MSG_RESULT([$can_build_shared]) 5798ee3138f1Smrg 57993e72ca8cSmrg AC_MSG_CHECKING([whether to build shared libraries]) 58003e72ca8cSmrg test "$can_build_shared" = "no" && enable_shared=no 5801ee3138f1Smrg 58023e72ca8cSmrg # On AIX, shared libraries and static libraries use the same namespace, and 58033e72ca8cSmrg # are all built from PIC. 58043e72ca8cSmrg case $host_os in 58053e72ca8cSmrg aix3*) 58063e72ca8cSmrg test "$enable_shared" = yes && enable_static=no 58073e72ca8cSmrg if test -n "$RANLIB"; then 58083e72ca8cSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 58093e72ca8cSmrg postinstall_cmds='$RANLIB $lib' 58103e72ca8cSmrg fi 58113e72ca8cSmrg ;; 5812ee3138f1Smrg 58133e72ca8cSmrg aix[[4-9]]*) 58143e72ca8cSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 58153e72ca8cSmrg test "$enable_shared" = yes && enable_static=no 58163e72ca8cSmrg fi 58173e72ca8cSmrg ;; 58183e72ca8cSmrg esac 58193e72ca8cSmrg AC_MSG_RESULT([$enable_shared]) 5820ee3138f1Smrg 58213e72ca8cSmrg AC_MSG_CHECKING([whether to build static libraries]) 58223e72ca8cSmrg # Make sure either enable_shared or enable_static is yes. 58233e72ca8cSmrg test "$enable_shared" = yes || enable_static=yes 58243e72ca8cSmrg AC_MSG_RESULT([$enable_static]) 5825a1ed278cSmrg 58263e72ca8cSmrg _LT_CONFIG($1) 58273e72ca8cSmrgfi 5828a1ed278cSmrgAC_LANG_POP 58293e72ca8cSmrgCC="$lt_save_CC" 58303e72ca8cSmrg])# _LT_LANG_C_CONFIG 5831a1ed278cSmrg 5832a1ed278cSmrg 58333e72ca8cSmrg# _LT_LANG_CXX_CONFIG([TAG]) 58343e72ca8cSmrg# -------------------------- 58353e72ca8cSmrg# Ensure that the configuration variables for a C++ compiler are suitably 58363e72ca8cSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 58373e72ca8cSmrg# the compiler configuration to `libtool'. 58383e72ca8cSmrgm4_defun([_LT_LANG_CXX_CONFIG], 58393e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 58403e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 58413e72ca8cSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 58423e72ca8cSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 58433e72ca8cSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 58443e72ca8cSmrg (test "X$CXX" != "Xg++"))) ; then 58453e72ca8cSmrg AC_PROG_CXXCPP 58463e72ca8cSmrgelse 58473e72ca8cSmrg _lt_caught_CXX_error=yes 5848a1ed278cSmrgfi 5849a1ed278cSmrg 58503e72ca8cSmrgAC_LANG_PUSH(C++) 5851a1ed278cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5852a1ed278cSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 5853a1ed278cSmrg_LT_TAGVAR(always_export_symbols, $1)=no 5854a1ed278cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 58553e72ca8cSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 5856a1ed278cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5857a1ed278cSmrg_LT_TAGVAR(hardcode_direct, $1)=no 5858a1ed278cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5859a1ed278cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5860a1ed278cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5861a1ed278cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 58623e72ca8cSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5863a1ed278cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 5864a1ed278cSmrg_LT_TAGVAR(inherit_rpath, $1)=no 5865a1ed278cSmrg_LT_TAGVAR(module_cmds, $1)= 5866a1ed278cSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 5867a1ed278cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5868a1ed278cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5869a1ed278cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 5870a1ed278cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5871a1ed278cSmrg_LT_TAGVAR(no_undefined_flag, $1)= 5872a1ed278cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5873a1ed278cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5874ee3138f1Smrg 58753e72ca8cSmrg# Source file extension for C++ test sources. 58763e72ca8cSmrgac_ext=cpp 587734977a2fSmrg 58783e72ca8cSmrg# Object file extension for compiled C++ test sources. 5879a1ed278cSmrgobjext=o 5880a1ed278cSmrg_LT_TAGVAR(objext, $1)=$objext 588134977a2fSmrg 5882a1ed278cSmrg# No sense in running all these tests if we already determined that 58833e72ca8cSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 5884a1ed278cSmrg# are currently assumed to apply to all compilers on this platform, 5885a1ed278cSmrg# and will be corrupted by setting them based on a non-working compiler. 58863e72ca8cSmrgif test "$_lt_caught_CXX_error" != yes; then 5887a1ed278cSmrg # Code to be used in simple compile tests 58883e72ca8cSmrg lt_simple_compile_test_code="int some_variable = 0;" 588934977a2fSmrg 5890a1ed278cSmrg # Code to be used in simple link tests 58913e72ca8cSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 589234977a2fSmrg 5893a1ed278cSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5894a1ed278cSmrg _LT_TAG_COMPILER 589534977a2fSmrg 5896a1ed278cSmrg # save warnings/boilerplate of simple test code 5897a1ed278cSmrg _LT_COMPILER_BOILERPLATE 5898a1ed278cSmrg _LT_LINKER_BOILERPLATE 589934977a2fSmrg 5900a1ed278cSmrg # Allow CC to be a program name with arguments. 59013e72ca8cSmrg lt_save_CC=$CC 59023e72ca8cSmrg lt_save_CFLAGS=$CFLAGS 59033e72ca8cSmrg lt_save_LD=$LD 5904a1ed278cSmrg lt_save_GCC=$GCC 59053e72ca8cSmrg GCC=$GXX 59063e72ca8cSmrg lt_save_with_gnu_ld=$with_gnu_ld 59073e72ca8cSmrg lt_save_path_LD=$lt_cv_path_LD 59083e72ca8cSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 59093e72ca8cSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 59103e72ca8cSmrg else 59113e72ca8cSmrg $as_unset lt_cv_prog_gnu_ld 59123e72ca8cSmrg fi 59133e72ca8cSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 59143e72ca8cSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 59153e72ca8cSmrg else 59163e72ca8cSmrg $as_unset lt_cv_path_LD 59173e72ca8cSmrg fi 59183e72ca8cSmrg test -z "${LDCXX+set}" || LD=$LDCXX 59193e72ca8cSmrg CC=${CXX-"c++"} 59203e72ca8cSmrg CFLAGS=$CXXFLAGS 5921a1ed278cSmrg compiler=$CC 5922a1ed278cSmrg _LT_TAGVAR(compiler, $1)=$CC 5923a1ed278cSmrg _LT_CC_BASENAME([$compiler]) 5924b425557eSmrg 5925a1ed278cSmrg if test -n "$compiler"; then 59263e72ca8cSmrg # We don't want -fno-exception when compiling C++ code, so set the 59273e72ca8cSmrg # no_builtin_flag separately 59283e72ca8cSmrg if test "$GXX" = yes; then 59293e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 59303e72ca8cSmrg else 59313e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 59323e72ca8cSmrg fi 59333e72ca8cSmrg 59343e72ca8cSmrg if test "$GXX" = yes; then 59353e72ca8cSmrg # Set up default GNU C++ configuration 59363e72ca8cSmrg 59373e72ca8cSmrg LT_PATH_LD 59383e72ca8cSmrg 59393e72ca8cSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 59403e72ca8cSmrg # archiving commands below assume that GNU ld is being used. 59413e72ca8cSmrg if test "$with_gnu_ld" = yes; then 59423e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 59433e72ca8cSmrg _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' 59443e72ca8cSmrg 59453e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59463e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59473e72ca8cSmrg 59483e72ca8cSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 59493e72ca8cSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 59503e72ca8cSmrg # investigate it a little bit more. (MM) 59513e72ca8cSmrg wlarc='${wl}' 59523e72ca8cSmrg 59533e72ca8cSmrg # ancient GNU ld didn't support --whole-archive et. al. 59543e72ca8cSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 59553e72ca8cSmrg $GREP 'no-whole-archive' > /dev/null; then 59563e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 59573e72ca8cSmrg else 59583e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59593e72ca8cSmrg fi 59603e72ca8cSmrg else 59613e72ca8cSmrg with_gnu_ld=no 59623e72ca8cSmrg wlarc= 59633e72ca8cSmrg 59643e72ca8cSmrg # A generic and very simple default shared library creation 59653e72ca8cSmrg # command for GNU C++ for the case where it uses the native 59663e72ca8cSmrg # linker, instead of GNU ld. If possible, this setting should 59673e72ca8cSmrg # overridden to take advantage of the native linker features on 59683e72ca8cSmrg # the platform it is being used on. 59693e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 59703e72ca8cSmrg fi 59713e72ca8cSmrg 59723e72ca8cSmrg # Commands to make compiler produce verbose output that lists 59733e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 59743e72ca8cSmrg # linking a shared library. 59753e72ca8cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5976a1ed278cSmrg 59773e72ca8cSmrg else 59783e72ca8cSmrg GXX=no 59793e72ca8cSmrg with_gnu_ld=no 59803e72ca8cSmrg wlarc= 59813e72ca8cSmrg fi 5982a1ed278cSmrg 59833e72ca8cSmrg # PORTME: fill in a description of your system's C++ link characteristics 59843e72ca8cSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 59853e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5986a1ed278cSmrg case $host_os in 5987a1ed278cSmrg aix3*) 59883e72ca8cSmrg # FIXME: insert proper C++ library support 59893e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5990a1ed278cSmrg ;; 5991a1ed278cSmrg aix[[4-9]]*) 59923e72ca8cSmrg if test "$host_cpu" = ia64; then 59933e72ca8cSmrg # On IA64, the linker does run time linking by default, so we don't 59943e72ca8cSmrg # have to do anything special. 59953e72ca8cSmrg aix_use_runtimelinking=no 59963e72ca8cSmrg exp_sym_flag='-Bexport' 59973e72ca8cSmrg no_entry_flag="" 59983e72ca8cSmrg else 59993e72ca8cSmrg aix_use_runtimelinking=no 600034977a2fSmrg 60013e72ca8cSmrg # Test if we are trying to use run time linking or normal 60023e72ca8cSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 60033e72ca8cSmrg # need to do runtime linking. 60043e72ca8cSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 60053e72ca8cSmrg for ld_flag in $LDFLAGS; do 60063e72ca8cSmrg case $ld_flag in 60073e72ca8cSmrg *-brtl*) 60083e72ca8cSmrg aix_use_runtimelinking=yes 60093e72ca8cSmrg break 60103e72ca8cSmrg ;; 60113e72ca8cSmrg esac 60123e72ca8cSmrg done 60133e72ca8cSmrg ;; 60143e72ca8cSmrg esac 6015ee3138f1Smrg 60163e72ca8cSmrg exp_sym_flag='-bexport' 60173e72ca8cSmrg no_entry_flag='-bnoentry' 60183e72ca8cSmrg fi 6019ee3138f1Smrg 60203e72ca8cSmrg # When large executables or shared objects are built, AIX ld can 60213e72ca8cSmrg # have problems creating the table of contents. If linking a library 60223e72ca8cSmrg # or program results in "error TOC overflow" add -mminimal-toc to 60233e72ca8cSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 60243e72ca8cSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6025a1ed278cSmrg 60263e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='' 60273e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 60283e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60293e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60303e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60313e72ca8cSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6032a1ed278cSmrg 60333e72ca8cSmrg if test "$GXX" = yes; then 60343e72ca8cSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 60353e72ca8cSmrg # We only want to do this on AIX 4.2 and lower, the check 60363e72ca8cSmrg # below for broken collect2 doesn't work under 4.3+ 60373e72ca8cSmrg collect2name=`${CC} -print-prog-name=collect2` 60383e72ca8cSmrg if test -f "$collect2name" && 60393e72ca8cSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 60403e72ca8cSmrg then 60413e72ca8cSmrg # We have reworked collect2 60423e72ca8cSmrg : 60433e72ca8cSmrg else 60443e72ca8cSmrg # We have old collect2 60453e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 60463e72ca8cSmrg # It fails to find uninstalled libraries when the uninstalled 60473e72ca8cSmrg # path is not listed in the libpath. Setting hardcode_minus_L 60483e72ca8cSmrg # to unsupported forces relinking 60493e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60503e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60513e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 60523e72ca8cSmrg fi 60533e72ca8cSmrg esac 60543e72ca8cSmrg shared_flag='-shared' 60553e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 60563e72ca8cSmrg shared_flag="$shared_flag "'${wl}-G' 60573e72ca8cSmrg fi 60583e72ca8cSmrg else 60593e72ca8cSmrg # not using gcc 60603e72ca8cSmrg if test "$host_cpu" = ia64; then 60613e72ca8cSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 60623e72ca8cSmrg # chokes on -Wl,-G. The following line is correct: 60633e72ca8cSmrg shared_flag='-G' 60643e72ca8cSmrg else 60653e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 60663e72ca8cSmrg shared_flag='${wl}-G' 60673e72ca8cSmrg else 60683e72ca8cSmrg shared_flag='${wl}-bM:SRE' 60693e72ca8cSmrg fi 60703e72ca8cSmrg fi 60713e72ca8cSmrg fi 6072ee3138f1Smrg 60733e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 60743e72ca8cSmrg # It seems that -bexpall does not export symbols beginning with 60753e72ca8cSmrg # underscore (_), so it is better to generate a list of symbols to 60763e72ca8cSmrg # export. 60773e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 60783e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 60793e72ca8cSmrg # Warning - without using the other runtime loading flags (-brtl), 60803e72ca8cSmrg # -berok will link without error, but may produce a broken library. 60813e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 60823e72ca8cSmrg # Determine the default libpath from the value encoded in an empty 60833e72ca8cSmrg # executable. 60843e72ca8cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 60853e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6086ee3138f1Smrg 60873e72ca8cSmrg _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" 60883e72ca8cSmrg else 60893e72ca8cSmrg if test "$host_cpu" = ia64; then 60903e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 60913e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 60923e72ca8cSmrg _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" 60933e72ca8cSmrg else 60943e72ca8cSmrg # Determine the default libpath from the value encoded in an 60953e72ca8cSmrg # empty executable. 60963e72ca8cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 60973e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60983e72ca8cSmrg # Warning - without using the other run time loading flags, 60993e72ca8cSmrg # -berok will link without error, but may produce a broken library. 61003e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 61013e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 61023e72ca8cSmrg if test "$with_gnu_ld" = yes; then 61033e72ca8cSmrg # We only use this code for GNU lds that support --whole-archive. 61043e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 61053e72ca8cSmrg else 61063e72ca8cSmrg # Exported symbols can be pulled into shared objects from archives 61073e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 61083e72ca8cSmrg fi 61093e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61103e72ca8cSmrg # This is similar to how AIX traditionally builds its shared 61113e72ca8cSmrg # libraries. 61123e72ca8cSmrg _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' 61133e72ca8cSmrg fi 61143e72ca8cSmrg fi 61153e72ca8cSmrg ;; 6116a1ed278cSmrg 61173e72ca8cSmrg beos*) 61183e72ca8cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 61193e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61203e72ca8cSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 61213e72ca8cSmrg # support --undefined. This deserves some investigation. FIXME 61223e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 61233e72ca8cSmrg else 61243e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61253e72ca8cSmrg fi 61263e72ca8cSmrg ;; 6127a1ed278cSmrg 61283e72ca8cSmrg chorus*) 61293e72ca8cSmrg case $cc_basename in 61303e72ca8cSmrg *) 61313e72ca8cSmrg # FIXME: insert proper C++ library support 61323e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61333e72ca8cSmrg ;; 61343e72ca8cSmrg esac 61353e72ca8cSmrg ;; 6136a1ed278cSmrg 61373e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 61383e72ca8cSmrg case $GXX,$cc_basename in 61393e72ca8cSmrg ,cl* | no,cl*) 61403e72ca8cSmrg # Native MSVC 61413e72ca8cSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 61423e72ca8cSmrg # no search path for DLLs. 61433e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 61443e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61453e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 61463e72ca8cSmrg _LT_TAGVAR(file_list_spec, $1)='@' 61473e72ca8cSmrg # Tell ltmain to make .lib files, not .a files. 61483e72ca8cSmrg libext=lib 61493e72ca8cSmrg # Tell ltmain to make .dll files, not .so files. 61503e72ca8cSmrg shrext_cmds=".dll" 61513e72ca8cSmrg # FIXME: Setting linknames here is a bad hack. 61523e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 61533e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 61543e72ca8cSmrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 61553e72ca8cSmrg else 61563e72ca8cSmrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 61573e72ca8cSmrg fi~ 61583e72ca8cSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 61593e72ca8cSmrg linknames=' 61603e72ca8cSmrg # The linker will not automatically build a static lib if we build a DLL. 61613e72ca8cSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 61623e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 61633e72ca8cSmrg # Don't use ranlib 61643e72ca8cSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 61653e72ca8cSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 61663e72ca8cSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 61673e72ca8cSmrg case $lt_outputfile in 61683e72ca8cSmrg *.exe|*.EXE) ;; 61693e72ca8cSmrg *) 61703e72ca8cSmrg lt_outputfile="$lt_outputfile.exe" 61713e72ca8cSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 61723e72ca8cSmrg ;; 61733e72ca8cSmrg esac~ 61743e72ca8cSmrg func_to_tool_file "$lt_outputfile"~ 61753e72ca8cSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 61763e72ca8cSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 61773e72ca8cSmrg $RM "$lt_outputfile.manifest"; 61783e72ca8cSmrg fi' 61793e72ca8cSmrg ;; 61803e72ca8cSmrg *) 61813e72ca8cSmrg # g++ 61823e72ca8cSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 61833e72ca8cSmrg # as there is no search path for DLLs. 61843e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61853e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 61863e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61873e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 61883e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 61893e72ca8cSmrg 61903e72ca8cSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 61913e72ca8cSmrg _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' 61923e72ca8cSmrg # If the export-symbols file already is a .def file (1st line 61933e72ca8cSmrg # is EXPORTS), use it as is; otherwise, prepend... 61943e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 61953e72ca8cSmrg cp $export_symbols $output_objdir/$soname.def; 61963e72ca8cSmrg else 61973e72ca8cSmrg echo EXPORTS > $output_objdir/$soname.def; 61983e72ca8cSmrg cat $export_symbols >> $output_objdir/$soname.def; 61993e72ca8cSmrg fi~ 62003e72ca8cSmrg $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' 62013e72ca8cSmrg else 62023e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62033e72ca8cSmrg fi 62043e72ca8cSmrg ;; 62053e72ca8cSmrg esac 62063e72ca8cSmrg ;; 62073e72ca8cSmrg darwin* | rhapsody*) 62083e72ca8cSmrg _LT_DARWIN_LINKER_FEATURES($1) 62093e72ca8cSmrg ;; 6210ee3138f1Smrg 62113e72ca8cSmrg dgux*) 62123e72ca8cSmrg case $cc_basename in 62133e72ca8cSmrg ec++*) 62143e72ca8cSmrg # FIXME: insert proper C++ library support 62153e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62163e72ca8cSmrg ;; 62173e72ca8cSmrg ghcx*) 62183e72ca8cSmrg # Green Hills C++ Compiler 62193e72ca8cSmrg # FIXME: insert proper C++ library support 62203e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62213e72ca8cSmrg ;; 62223e72ca8cSmrg *) 62233e72ca8cSmrg # FIXME: insert proper C++ library support 62243e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62253e72ca8cSmrg ;; 62263e72ca8cSmrg esac 62273e72ca8cSmrg ;; 6228ee3138f1Smrg 62293e72ca8cSmrg freebsd2.*) 62303e72ca8cSmrg # C++ shared libraries reported to be fairly broken before 62313e72ca8cSmrg # switch to ELF 62323e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62333e72ca8cSmrg ;; 62343e72ca8cSmrg 62353e72ca8cSmrg freebsd-elf*) 62363e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62373e72ca8cSmrg ;; 62383e72ca8cSmrg 62393e72ca8cSmrg freebsd* | dragonfly*) 62403e72ca8cSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 62413e72ca8cSmrg # conventions 62423e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 62433e72ca8cSmrg ;; 62443e72ca8cSmrg 62453e72ca8cSmrg gnu*) 62463e72ca8cSmrg ;; 62473e72ca8cSmrg 62483e72ca8cSmrg haiku*) 62493e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 62503e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 62513e72ca8cSmrg ;; 6252ee3138f1Smrg 62533e72ca8cSmrg hpux9*) 62543e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62553e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62563e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62573e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62583e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 62593e72ca8cSmrg # but as the default 62603e72ca8cSmrg # location of the library. 6261ee3138f1Smrg 62623e72ca8cSmrg case $cc_basename in 62633e72ca8cSmrg CC*) 62643e72ca8cSmrg # FIXME: insert proper C++ library support 62653e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62663e72ca8cSmrg ;; 62673e72ca8cSmrg aCC*) 62683e72ca8cSmrg _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' 62693e72ca8cSmrg # Commands to make compiler produce verbose output that lists 62703e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 62713e72ca8cSmrg # linking a shared library. 62723e72ca8cSmrg # 62733e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 62743e72ca8cSmrg # explicitly linking system object files so we need to strip them 62753e72ca8cSmrg # from the output so that they don't get included in the library 62763e72ca8cSmrg # dependencies. 62773e72ca8cSmrg 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"' 62783e72ca8cSmrg ;; 62793e72ca8cSmrg *) 62803e72ca8cSmrg if test "$GXX" = yes; then 62813e72ca8cSmrg _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' 62823e72ca8cSmrg else 62833e72ca8cSmrg # FIXME: insert proper C++ library support 62843e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62853e72ca8cSmrg fi 62863e72ca8cSmrg ;; 62873e72ca8cSmrg esac 62883e72ca8cSmrg ;; 6289ee3138f1Smrg 62903e72ca8cSmrg hpux10*|hpux11*) 62913e72ca8cSmrg if test $with_gnu_ld = no; then 62923e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62933e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6294a1ed278cSmrg 62953e72ca8cSmrg case $host_cpu in 62963e72ca8cSmrg hppa*64*|ia64*) 62973e72ca8cSmrg ;; 62983e72ca8cSmrg *) 62993e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63003e72ca8cSmrg ;; 63013e72ca8cSmrg esac 63023e72ca8cSmrg fi 63033e72ca8cSmrg case $host_cpu in 63043e72ca8cSmrg hppa*64*|ia64*) 63053e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 63063e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63073e72ca8cSmrg ;; 63083e72ca8cSmrg *) 63093e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63103e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63113e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 63123e72ca8cSmrg # but as the default 63133e72ca8cSmrg # location of the library. 63143e72ca8cSmrg ;; 63153e72ca8cSmrg esac 6316a1ed278cSmrg 63173e72ca8cSmrg case $cc_basename in 63183e72ca8cSmrg CC*) 63193e72ca8cSmrg # FIXME: insert proper C++ library support 63203e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 63213e72ca8cSmrg ;; 63223e72ca8cSmrg aCC*) 63233e72ca8cSmrg case $host_cpu in 63243e72ca8cSmrg hppa*64*) 63253e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63263e72ca8cSmrg ;; 63273e72ca8cSmrg ia64*) 63283e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63293e72ca8cSmrg ;; 63303e72ca8cSmrg *) 63313e72ca8cSmrg _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' 63323e72ca8cSmrg ;; 63333e72ca8cSmrg esac 63343e72ca8cSmrg # Commands to make compiler produce verbose output that lists 63353e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 63363e72ca8cSmrg # linking a shared library. 63373e72ca8cSmrg # 63383e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 63393e72ca8cSmrg # explicitly linking system object files so we need to strip them 63403e72ca8cSmrg # from the output so that they don't get included in the library 63413e72ca8cSmrg # dependencies. 63423e72ca8cSmrg 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"' 63433e72ca8cSmrg ;; 63443e72ca8cSmrg *) 63453e72ca8cSmrg if test "$GXX" = yes; then 63463e72ca8cSmrg if test $with_gnu_ld = no; then 63473e72ca8cSmrg case $host_cpu in 63483e72ca8cSmrg hppa*64*) 63493e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63503e72ca8cSmrg ;; 63513e72ca8cSmrg ia64*) 63523e72ca8cSmrg _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' 63533e72ca8cSmrg ;; 63543e72ca8cSmrg *) 63553e72ca8cSmrg _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' 63563e72ca8cSmrg ;; 63573e72ca8cSmrg esac 63583e72ca8cSmrg fi 63593e72ca8cSmrg else 63603e72ca8cSmrg # FIXME: insert proper C++ library support 63613e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 63623e72ca8cSmrg fi 63633e72ca8cSmrg ;; 63643e72ca8cSmrg esac 63653e72ca8cSmrg ;; 6366a1ed278cSmrg 63673e72ca8cSmrg interix[[3-9]]*) 63683e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 63693e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63703e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 63713e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63723e72ca8cSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 63733e72ca8cSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 63743e72ca8cSmrg # default) and relocated if they conflict, which is a slow very memory 63753e72ca8cSmrg # consuming and fragmenting process. To avoid this, we pick a random, 63763e72ca8cSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 63773e72ca8cSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 63783e72ca8cSmrg _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' 63793e72ca8cSmrg _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' 63803e72ca8cSmrg ;; 63813e72ca8cSmrg irix5* | irix6*) 63823e72ca8cSmrg case $cc_basename in 63833e72ca8cSmrg CC*) 63843e72ca8cSmrg # SGI C++ 63853e72ca8cSmrg _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' 6386ee3138f1Smrg 63873e72ca8cSmrg # Archives containing C++ object files must be created using 63883e72ca8cSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 63893e72ca8cSmrg # necessary to make sure instantiated templates are included 63903e72ca8cSmrg # in the archive. 63913e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 63923e72ca8cSmrg ;; 63933e72ca8cSmrg *) 63943e72ca8cSmrg if test "$GXX" = yes; then 63953e72ca8cSmrg if test "$with_gnu_ld" = no; then 63963e72ca8cSmrg _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' 63973e72ca8cSmrg else 63983e72ca8cSmrg _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' 63993e72ca8cSmrg fi 64003e72ca8cSmrg fi 64013e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 64023e72ca8cSmrg ;; 64033e72ca8cSmrg esac 64043e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64053e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64063e72ca8cSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 64073e72ca8cSmrg ;; 640834977a2fSmrg 64093e72ca8cSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 64103e72ca8cSmrg case $cc_basename in 64113e72ca8cSmrg KCC*) 64123e72ca8cSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 641334977a2fSmrg 64143e72ca8cSmrg # KCC will only create a shared library if the output file 64153e72ca8cSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 64163e72ca8cSmrg # to its proper name (with version) after linking. 64173e72ca8cSmrg _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' 64183e72ca8cSmrg _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' 64193e72ca8cSmrg # Commands to make compiler produce verbose output that lists 64203e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 64213e72ca8cSmrg # linking a shared library. 64223e72ca8cSmrg # 64233e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 64243e72ca8cSmrg # explicitly linking system object files so we need to strip them 64253e72ca8cSmrg # from the output so that they don't get included in the library 64263e72ca8cSmrg # dependencies. 64273e72ca8cSmrg 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"' 642834977a2fSmrg 64293e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64303e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6431a1ed278cSmrg 64323e72ca8cSmrg # Archives containing C++ object files must be created using 64333e72ca8cSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 64343e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 64353e72ca8cSmrg ;; 64363e72ca8cSmrg icpc* | ecpc* ) 64373e72ca8cSmrg # Intel C++ 64383e72ca8cSmrg with_gnu_ld=yes 64393e72ca8cSmrg # version 8.0 and above of icpc choke on multiply defined symbols 64403e72ca8cSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 64413e72ca8cSmrg # earlier do not add the objects themselves. 64423e72ca8cSmrg case `$CC -V 2>&1` in 64433e72ca8cSmrg *"Version 7."*) 64443e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64453e72ca8cSmrg _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' 64463e72ca8cSmrg ;; 64473e72ca8cSmrg *) # Version 8.0 or newer 64483e72ca8cSmrg tmp_idyn= 64493e72ca8cSmrg case $host_cpu in 64503e72ca8cSmrg ia64*) tmp_idyn=' -i_dynamic';; 64513e72ca8cSmrg esac 64523e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 64533e72ca8cSmrg _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' 64543e72ca8cSmrg ;; 64553e72ca8cSmrg esac 64563e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 64573e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64583e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64593e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 64603e72ca8cSmrg ;; 64613e72ca8cSmrg pgCC* | pgcpp*) 64623e72ca8cSmrg # Portland Group C++ compiler 64633e72ca8cSmrg case `$CC -V` in 64643e72ca8cSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 64653e72ca8cSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 64663e72ca8cSmrg rm -rf $tpldir~ 64673e72ca8cSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 64683e72ca8cSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 64693e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 64703e72ca8cSmrg rm -rf $tpldir~ 64713e72ca8cSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 64723e72ca8cSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 64733e72ca8cSmrg $RANLIB $oldlib' 64743e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 64753e72ca8cSmrg rm -rf $tpldir~ 64763e72ca8cSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 64773e72ca8cSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64783e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 64793e72ca8cSmrg rm -rf $tpldir~ 64803e72ca8cSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 64813e72ca8cSmrg $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' 64823e72ca8cSmrg ;; 64833e72ca8cSmrg *) # Version 6 and above use weak symbols 64843e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64853e72ca8cSmrg _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' 64863e72ca8cSmrg ;; 64873e72ca8cSmrg esac 6488a1ed278cSmrg 64893e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 64903e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64913e72ca8cSmrg _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' 64923e72ca8cSmrg ;; 64933e72ca8cSmrg cxx*) 64943e72ca8cSmrg # Compaq C++ 64953e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64963e72ca8cSmrg _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' 6497a1ed278cSmrg 64983e72ca8cSmrg runpath_var=LD_RUN_PATH 64993e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 65003e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6501a1ed278cSmrg 65023e72ca8cSmrg # Commands to make compiler produce verbose output that lists 65033e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 65043e72ca8cSmrg # linking a shared library. 65053e72ca8cSmrg # 65063e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 65073e72ca8cSmrg # explicitly linking system object files so we need to strip them 65083e72ca8cSmrg # from the output so that they don't get included in the library 65093e72ca8cSmrg # dependencies. 65103e72ca8cSmrg 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' 65113e72ca8cSmrg ;; 65123e72ca8cSmrg xl* | mpixl* | bgxl*) 65133e72ca8cSmrg # IBM XL 8.0 on PPC, with GNU ld 65143e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65153e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 65163e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 65173e72ca8cSmrg if test "x$supports_anon_versioning" = xyes; then 65183e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 65193e72ca8cSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 65203e72ca8cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 65213e72ca8cSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 65223e72ca8cSmrg fi 65233e72ca8cSmrg ;; 65243e72ca8cSmrg *) 65253e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 65263e72ca8cSmrg *Sun\ C*) 65273e72ca8cSmrg # Sun C++ 5.9 65283e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 65293e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 65303e72ca8cSmrg _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' 65313e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65323e72ca8cSmrg _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' 65333e72ca8cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6534a1ed278cSmrg 65353e72ca8cSmrg # Not sure whether something based on 65363e72ca8cSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 65373e72ca8cSmrg # would be better. 65383e72ca8cSmrg output_verbose_link_cmd='func_echo_all' 6539a1ed278cSmrg 65403e72ca8cSmrg # Archives containing C++ object files must be created using 65413e72ca8cSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 65423e72ca8cSmrg # necessary to make sure instantiated templates are included 65433e72ca8cSmrg # in the archive. 65443e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 65453e72ca8cSmrg ;; 65463e72ca8cSmrg esac 65473e72ca8cSmrg ;; 65483e72ca8cSmrg esac 65493e72ca8cSmrg ;; 6550a1ed278cSmrg 65513e72ca8cSmrg lynxos*) 65523e72ca8cSmrg # FIXME: insert proper C++ library support 65533e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65543e72ca8cSmrg ;; 6555a1ed278cSmrg 65563e72ca8cSmrg m88k*) 65573e72ca8cSmrg # FIXME: insert proper C++ library support 65583e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65593e72ca8cSmrg ;; 6560a1ed278cSmrg 65613e72ca8cSmrg mvs*) 65623e72ca8cSmrg case $cc_basename in 65633e72ca8cSmrg cxx*) 65643e72ca8cSmrg # FIXME: insert proper C++ library support 65653e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65663e72ca8cSmrg ;; 65673e72ca8cSmrg *) 65683e72ca8cSmrg # FIXME: insert proper C++ library support 65693e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65703e72ca8cSmrg ;; 65713e72ca8cSmrg esac 65723e72ca8cSmrg ;; 6573a1ed278cSmrg 65743e72ca8cSmrg netbsd*) 65753e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 65763e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 65773e72ca8cSmrg wlarc= 65783e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65793e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65803e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65813e72ca8cSmrg fi 65823e72ca8cSmrg # Workaround some broken pre-1.5 toolchains 65833e72ca8cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 65843e72ca8cSmrg ;; 6585a1ed278cSmrg 65863e72ca8cSmrg *nto* | *qnx*) 65873e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 65883e72ca8cSmrg ;; 6589a1ed278cSmrg 65903e72ca8cSmrg openbsd2*) 65913e72ca8cSmrg # C++ shared libraries are fairly broken 65923e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65933e72ca8cSmrg ;; 6594a1ed278cSmrg 65953e72ca8cSmrg openbsd*) 65963e72ca8cSmrg if test -f /usr/libexec/ld.so; then 65973e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65983e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65993e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 66003e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 66013e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 66023e72ca8cSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 66033e72ca8cSmrg _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' 66043e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 66053e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 66063e72ca8cSmrg fi 66073e72ca8cSmrg output_verbose_link_cmd=func_echo_all 66083e72ca8cSmrg else 66093e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66103e72ca8cSmrg fi 66113e72ca8cSmrg ;; 6612a1ed278cSmrg 66133e72ca8cSmrg osf3* | osf4* | osf5*) 66143e72ca8cSmrg case $cc_basename in 66153e72ca8cSmrg KCC*) 66163e72ca8cSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6617a1ed278cSmrg 66183e72ca8cSmrg # KCC will only create a shared library if the output file 66193e72ca8cSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 66203e72ca8cSmrg # to its proper name (with version) after linking. 66213e72ca8cSmrg _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' 6622a1ed278cSmrg 66233e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 66243e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6625a1ed278cSmrg 66263e72ca8cSmrg # Archives containing C++ object files must be created using 66273e72ca8cSmrg # the KAI C++ compiler. 66283e72ca8cSmrg case $host in 66293e72ca8cSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 66303e72ca8cSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 66313e72ca8cSmrg esac 66323e72ca8cSmrg ;; 66333e72ca8cSmrg RCC*) 66343e72ca8cSmrg # Rational C++ 2.4.1 66353e72ca8cSmrg # FIXME: insert proper C++ library support 66363e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66373e72ca8cSmrg ;; 66383e72ca8cSmrg cxx*) 66393e72ca8cSmrg case $host in 66403e72ca8cSmrg osf3*) 66413e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 66423e72ca8cSmrg _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' 66433e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66443e72ca8cSmrg ;; 66453e72ca8cSmrg *) 66463e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 66473e72ca8cSmrg _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' 66483e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 66493e72ca8cSmrg echo "-hidden">> $lib.exp~ 66503e72ca8cSmrg $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~ 66513e72ca8cSmrg $RM $lib.exp' 66523e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 66533e72ca8cSmrg ;; 66543e72ca8cSmrg esac 6655a1ed278cSmrg 66563e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6657a1ed278cSmrg 66583e72ca8cSmrg # Commands to make compiler produce verbose output that lists 66593e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 66603e72ca8cSmrg # linking a shared library. 66613e72ca8cSmrg # 66623e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 66633e72ca8cSmrg # explicitly linking system object files so we need to strip them 66643e72ca8cSmrg # from the output so that they don't get included in the library 66653e72ca8cSmrg # dependencies. 66663e72ca8cSmrg 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"' 66673e72ca8cSmrg ;; 66683e72ca8cSmrg *) 66693e72ca8cSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 66703e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 66713e72ca8cSmrg case $host in 66723e72ca8cSmrg osf3*) 66733e72ca8cSmrg _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' 66743e72ca8cSmrg ;; 66753e72ca8cSmrg *) 66763e72ca8cSmrg _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' 66773e72ca8cSmrg ;; 66783e72ca8cSmrg esac 6679a1ed278cSmrg 66803e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66813e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6682a1ed278cSmrg 66833e72ca8cSmrg # Commands to make compiler produce verbose output that lists 66843e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 66853e72ca8cSmrg # linking a shared library. 66863e72ca8cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6687a1ed278cSmrg 66883e72ca8cSmrg else 66893e72ca8cSmrg # FIXME: insert proper C++ library support 66903e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66913e72ca8cSmrg fi 66923e72ca8cSmrg ;; 66933e72ca8cSmrg esac 66943e72ca8cSmrg ;; 6695a1ed278cSmrg 66963e72ca8cSmrg psos*) 66973e72ca8cSmrg # FIXME: insert proper C++ library support 66983e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66993e72ca8cSmrg ;; 6700a1ed278cSmrg 67013e72ca8cSmrg sunos4*) 67023e72ca8cSmrg case $cc_basename in 67033e72ca8cSmrg CC*) 67043e72ca8cSmrg # Sun C++ 4.x 67053e72ca8cSmrg # FIXME: insert proper C++ library support 67063e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67073e72ca8cSmrg ;; 67083e72ca8cSmrg lcc*) 67093e72ca8cSmrg # Lucid 67103e72ca8cSmrg # FIXME: insert proper C++ library support 67113e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67123e72ca8cSmrg ;; 67133e72ca8cSmrg *) 67143e72ca8cSmrg # FIXME: insert proper C++ library support 67153e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67163e72ca8cSmrg ;; 67173e72ca8cSmrg esac 67183e72ca8cSmrg ;; 6719b425557eSmrg 67203e72ca8cSmrg solaris*) 67213e72ca8cSmrg case $cc_basename in 67223e72ca8cSmrg CC* | sunCC*) 67233e72ca8cSmrg # Sun C++ 4.2, 5.x and Centerline C++ 67243e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 67253e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 67263e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 67273e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67283e72ca8cSmrg $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' 67293e72ca8cSmrg 67303e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 67313e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67323e72ca8cSmrg case $host_os in 67333e72ca8cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67343e72ca8cSmrg *) 67353e72ca8cSmrg # The compiler driver will combine and reorder linker options, 67363e72ca8cSmrg # but understands `-z linker_flag'. 67373e72ca8cSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 67383e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 67393e72ca8cSmrg ;; 67403e72ca8cSmrg esac 67413e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6742ee3138f1Smrg 67433e72ca8cSmrg output_verbose_link_cmd='func_echo_all' 6744ee3138f1Smrg 67453e72ca8cSmrg # Archives containing C++ object files must be created using 67463e72ca8cSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 67473e72ca8cSmrg # necessary to make sure instantiated templates are included 67483e72ca8cSmrg # in the archive. 67493e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 67503e72ca8cSmrg ;; 67513e72ca8cSmrg gcx*) 67523e72ca8cSmrg # Green Hills C++ Compiler 67533e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6754ee3138f1Smrg 67553e72ca8cSmrg # The C++ compiler must be used to create the archive. 67563e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 67573e72ca8cSmrg ;; 67583e72ca8cSmrg *) 67593e72ca8cSmrg # GNU C++ compiler with Solaris linker 67603e72ca8cSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 67613e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 67623e72ca8cSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 67633e72ca8cSmrg _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' 67643e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67653e72ca8cSmrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6766a1ed278cSmrg 67673e72ca8cSmrg # Commands to make compiler produce verbose output that lists 67683e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 67693e72ca8cSmrg # linking a shared library. 67703e72ca8cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67713e72ca8cSmrg else 67723e72ca8cSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 67733e72ca8cSmrg # platform. 67743e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67753e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67763e72ca8cSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6777ee3138f1Smrg 67783e72ca8cSmrg # Commands to make compiler produce verbose output that lists 67793e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 67803e72ca8cSmrg # linking a shared library. 67813e72ca8cSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67823e72ca8cSmrg fi 6783ee3138f1Smrg 67843e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 67853e72ca8cSmrg case $host_os in 67863e72ca8cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67873e72ca8cSmrg *) 67883e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 67893e72ca8cSmrg ;; 67903e72ca8cSmrg esac 67913e72ca8cSmrg fi 67923e72ca8cSmrg ;; 67933e72ca8cSmrg esac 67943e72ca8cSmrg ;; 6795ee3138f1Smrg 67963e72ca8cSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 67973e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 67983e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67993e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68003e72ca8cSmrg runpath_var='LD_RUN_PATH' 6801ee3138f1Smrg 68023e72ca8cSmrg case $cc_basename in 68033e72ca8cSmrg CC*) 68043e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68053e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68063e72ca8cSmrg ;; 68073e72ca8cSmrg *) 68083e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68093e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68103e72ca8cSmrg ;; 68113e72ca8cSmrg esac 68123e72ca8cSmrg ;; 68133e72ca8cSmrg 68143e72ca8cSmrg sysv5* | sco3.2v5* | sco5v6*) 68153e72ca8cSmrg # Note: We can NOT use -z defs as we might desire, because we do not 68163e72ca8cSmrg # link with -lc, and that would cause any symbols used from libc to 68173e72ca8cSmrg # always be unresolved, which means just about no library would 68183e72ca8cSmrg # ever link correctly. If we're not using GNU ld we use -z text 68193e72ca8cSmrg # though, which does catch some bad symbols but isn't as heavy-handed 68203e72ca8cSmrg # as -z defs. 68213e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 68223e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 68233e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68243e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68253e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 68263e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 68273e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 68283e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 68293e72ca8cSmrg runpath_var='LD_RUN_PATH' 6830ee3138f1Smrg 68313e72ca8cSmrg case $cc_basename in 68323e72ca8cSmrg CC*) 68333e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68343e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68353e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 68363e72ca8cSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 68373e72ca8cSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 68383e72ca8cSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 68393e72ca8cSmrg ;; 68403e72ca8cSmrg *) 68413e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68423e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68433e72ca8cSmrg ;; 68443e72ca8cSmrg esac 68453e72ca8cSmrg ;; 6846ee3138f1Smrg 68473e72ca8cSmrg tandem*) 68483e72ca8cSmrg case $cc_basename in 68493e72ca8cSmrg NCC*) 68503e72ca8cSmrg # NonStop-UX NCC 3.20 68513e72ca8cSmrg # FIXME: insert proper C++ library support 68523e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68533e72ca8cSmrg ;; 68543e72ca8cSmrg *) 68553e72ca8cSmrg # FIXME: insert proper C++ library support 68563e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68573e72ca8cSmrg ;; 68583e72ca8cSmrg esac 68593e72ca8cSmrg ;; 6860ee3138f1Smrg 68613e72ca8cSmrg vxworks*) 68623e72ca8cSmrg # FIXME: insert proper C++ library support 68633e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68643e72ca8cSmrg ;; 6865ee3138f1Smrg 68663e72ca8cSmrg *) 68673e72ca8cSmrg # FIXME: insert proper C++ library support 68683e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68693e72ca8cSmrg ;; 68703e72ca8cSmrg esac 6871ee3138f1Smrg 68723e72ca8cSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 68733e72ca8cSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6874b425557eSmrg 68753e72ca8cSmrg _LT_TAGVAR(GCC, $1)="$GXX" 68763e72ca8cSmrg _LT_TAGVAR(LD, $1)="$LD" 6877ee3138f1Smrg 68783e72ca8cSmrg ## CAVEAT EMPTOR: 68793e72ca8cSmrg ## There is no encapsulation within the following macros, do not change 68803e72ca8cSmrg ## the running order or otherwise move them around unless you know exactly 68813e72ca8cSmrg ## what you are doing... 68823e72ca8cSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 68833e72ca8cSmrg _LT_COMPILER_PIC($1) 68843e72ca8cSmrg _LT_COMPILER_C_O($1) 68853e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 68863e72ca8cSmrg _LT_LINKER_SHLIBS($1) 68873e72ca8cSmrg _LT_SYS_DYNAMIC_LINKER($1) 68883e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6889ee3138f1Smrg 68903e72ca8cSmrg _LT_CONFIG($1) 68913e72ca8cSmrg fi # test -n "$compiler" 6892ee3138f1Smrg 68933e72ca8cSmrg CC=$lt_save_CC 68943e72ca8cSmrg CFLAGS=$lt_save_CFLAGS 68953e72ca8cSmrg LDCXX=$LD 68963e72ca8cSmrg LD=$lt_save_LD 68973e72ca8cSmrg GCC=$lt_save_GCC 68983e72ca8cSmrg with_gnu_ld=$lt_save_with_gnu_ld 68993e72ca8cSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 69003e72ca8cSmrg lt_cv_path_LD=$lt_save_path_LD 69013e72ca8cSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 69023e72ca8cSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 69033e72ca8cSmrgfi # test "$_lt_caught_CXX_error" != yes 6904ee3138f1Smrg 69053e72ca8cSmrgAC_LANG_POP 69063e72ca8cSmrg])# _LT_LANG_CXX_CONFIG 6907ee3138f1Smrg 6908ee3138f1Smrg 69093e72ca8cSmrg# _LT_FUNC_STRIPNAME_CNF 69103e72ca8cSmrg# ---------------------- 69113e72ca8cSmrg# func_stripname_cnf prefix suffix name 6912a1ed278cSmrg# strip PREFIX and SUFFIX off of NAME. 6913a1ed278cSmrg# PREFIX and SUFFIX must not contain globbing or regex special 6914a1ed278cSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 6915a1ed278cSmrg# dot (in which case that matches only a dot). 69163e72ca8cSmrg# 69173e72ca8cSmrg# This function is identical to the (non-XSI) version of func_stripname, 69183e72ca8cSmrg# except this one can be used by m4 code that may be executed by configure, 69193e72ca8cSmrg# rather than the libtool script. 69203e72ca8cSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 69213e72ca8cSmrgAC_REQUIRE([_LT_DECL_SED]) 69223e72ca8cSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 69233e72ca8cSmrgfunc_stripname_cnf () 6924a1ed278cSmrg{ 6925a1ed278cSmrg case ${2} in 69263e72ca8cSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 69273e72ca8cSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6928a1ed278cSmrg esac 69293e72ca8cSmrg} # func_stripname_cnf 69303e72ca8cSmrg])# _LT_FUNC_STRIPNAME_CNF 6931ee3138f1Smrg 69323e72ca8cSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 69333e72ca8cSmrg# --------------------------------- 69343e72ca8cSmrg# Figure out "hidden" library dependencies from verbose 69353e72ca8cSmrg# compiler output when linking a shared library. 69363e72ca8cSmrg# Parse the compiler output and extract the necessary 69373e72ca8cSmrg# objects, libraries and library flags. 69383e72ca8cSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 69393e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 69403e72ca8cSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 69413e72ca8cSmrg# Dependencies to place before and after the object being linked: 69423e72ca8cSmrg_LT_TAGVAR(predep_objects, $1)= 69433e72ca8cSmrg_LT_TAGVAR(postdep_objects, $1)= 69443e72ca8cSmrg_LT_TAGVAR(predeps, $1)= 69453e72ca8cSmrg_LT_TAGVAR(postdeps, $1)= 69463e72ca8cSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6947ee3138f1Smrg 69483e72ca8cSmrgdnl we can't use the lt_simple_compile_test_code here, 69493e72ca8cSmrgdnl because it contains code intended for an executable, 69503e72ca8cSmrgdnl not a library. It's possible we should let each 69513e72ca8cSmrgdnl tag define a new lt_????_link_test_code variable, 69523e72ca8cSmrgdnl but it's only used here... 69533e72ca8cSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 69543e72ca8cSmrgint a; 69553e72ca8cSmrgvoid foo (void) { a = 0; } 6956a1ed278cSmrg_LT_EOF 69573e72ca8cSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 69583e72ca8cSmrgclass Foo 6959a1ed278cSmrg{ 69603e72ca8cSmrgpublic: 69613e72ca8cSmrg Foo (void) { a = 0; } 69623e72ca8cSmrgprivate: 69633e72ca8cSmrg int a; 69643e72ca8cSmrg}; 6965a1ed278cSmrg_LT_EOF 69663e72ca8cSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 69673e72ca8cSmrg subroutine foo 69683e72ca8cSmrg implicit none 69693e72ca8cSmrg integer*4 a 69703e72ca8cSmrg a=0 69713e72ca8cSmrg return 69723e72ca8cSmrg end 6973a1ed278cSmrg_LT_EOF 69743e72ca8cSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 69753e72ca8cSmrg subroutine foo 69763e72ca8cSmrg implicit none 69773e72ca8cSmrg integer a 69783e72ca8cSmrg a=0 69793e72ca8cSmrg return 69803e72ca8cSmrg end 69813e72ca8cSmrg_LT_EOF 69823e72ca8cSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 69833e72ca8cSmrgpublic class foo { 69843e72ca8cSmrg private int a; 69853e72ca8cSmrg public void bar (void) { 69863e72ca8cSmrg a = 0; 69873e72ca8cSmrg } 69883e72ca8cSmrg}; 69893e72ca8cSmrg_LT_EOF 69903e72ca8cSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 69913e72ca8cSmrgpackage foo 69923e72ca8cSmrgfunc foo() { 69933e72ca8cSmrg} 69943e72ca8cSmrg_LT_EOF 69953e72ca8cSmrg]) 6996ee3138f1Smrg 69973e72ca8cSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 69983e72ca8cSmrgcase "$CC $CFLAGS " in #( 69993e72ca8cSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 70003e72ca8cSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 70013e72ca8cSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 70023e72ca8cSmrgesac 7003ee3138f1Smrg 70043e72ca8cSmrgdnl Parse the compiler output and extract the necessary 70053e72ca8cSmrgdnl objects, libraries and library flags. 70063e72ca8cSmrgif AC_TRY_EVAL(ac_compile); then 70073e72ca8cSmrg # Parse the compiler output and extract the necessary 70083e72ca8cSmrg # objects, libraries and library flags. 7009ee3138f1Smrg 70103e72ca8cSmrg # Sentinel used to keep track of whether or not we are before 70113e72ca8cSmrg # the conftest object file. 70123e72ca8cSmrg pre_test_object_deps_done=no 7013ee3138f1Smrg 70143e72ca8cSmrg for p in `eval "$output_verbose_link_cmd"`; do 70153e72ca8cSmrg case ${prev}${p} in 7016ee3138f1Smrg 70173e72ca8cSmrg -L* | -R* | -l*) 70183e72ca8cSmrg # Some compilers place space between "-{L,R}" and the path. 70193e72ca8cSmrg # Remove the space. 70203e72ca8cSmrg if test $p = "-L" || 70213e72ca8cSmrg test $p = "-R"; then 70223e72ca8cSmrg prev=$p 70233e72ca8cSmrg continue 70243e72ca8cSmrg fi 7025ee3138f1Smrg 70263e72ca8cSmrg # Expand the sysroot to ease extracting the directories later. 70273e72ca8cSmrg if test -z "$prev"; then 70283e72ca8cSmrg case $p in 70293e72ca8cSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 70303e72ca8cSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 70313e72ca8cSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 70323e72ca8cSmrg esac 70333e72ca8cSmrg fi 70343e72ca8cSmrg case $p in 70353e72ca8cSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 70363e72ca8cSmrg esac 70373e72ca8cSmrg if test "$pre_test_object_deps_done" = no; then 70383e72ca8cSmrg case ${prev} in 70393e72ca8cSmrg -L | -R) 70403e72ca8cSmrg # Internal compiler library paths should come after those 70413e72ca8cSmrg # provided the user. The postdeps already come after the 70423e72ca8cSmrg # user supplied libs so there is no need to process them. 70433e72ca8cSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 70443e72ca8cSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 70453e72ca8cSmrg else 70463e72ca8cSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 70473e72ca8cSmrg fi 70483e72ca8cSmrg ;; 70493e72ca8cSmrg # The "-l" case would never come before the object being 70503e72ca8cSmrg # linked, so don't bother handling this case. 70513e72ca8cSmrg esac 70523e72ca8cSmrg else 70533e72ca8cSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 70543e72ca8cSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 70553e72ca8cSmrg else 70563e72ca8cSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 70573e72ca8cSmrg fi 70583e72ca8cSmrg fi 70593e72ca8cSmrg prev= 70603e72ca8cSmrg ;; 7061ee3138f1Smrg 70623e72ca8cSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 70633e72ca8cSmrg *.$objext) 70643e72ca8cSmrg # This assumes that the test object file only shows up 70653e72ca8cSmrg # once in the compiler output. 70663e72ca8cSmrg if test "$p" = "conftest.$objext"; then 70673e72ca8cSmrg pre_test_object_deps_done=yes 70683e72ca8cSmrg continue 70693e72ca8cSmrg fi 7070ee3138f1Smrg 70713e72ca8cSmrg if test "$pre_test_object_deps_done" = no; then 70723e72ca8cSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 70733e72ca8cSmrg _LT_TAGVAR(predep_objects, $1)="$p" 70743e72ca8cSmrg else 70753e72ca8cSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 70763e72ca8cSmrg fi 70773e72ca8cSmrg else 70783e72ca8cSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 70793e72ca8cSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 70803e72ca8cSmrg else 70813e72ca8cSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 70823e72ca8cSmrg fi 70833e72ca8cSmrg fi 70843e72ca8cSmrg ;; 7085ee3138f1Smrg 70863e72ca8cSmrg *) ;; # Ignore the rest. 70873e72ca8cSmrg 70883e72ca8cSmrg esac 70893e72ca8cSmrg done 7090ee3138f1Smrg 70913e72ca8cSmrg # Clean up. 70923e72ca8cSmrg rm -f a.out a.exe 70933e72ca8cSmrgelse 70943e72ca8cSmrg echo "libtool.m4: error: problem compiling $1 test program" 70953e72ca8cSmrgfi 709634977a2fSmrg 70973e72ca8cSmrg$RM -f confest.$objext 70983e72ca8cSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 709934977a2fSmrg 71003e72ca8cSmrg# PORTME: override above test on systems where it is broken 71013e72ca8cSmrgm4_if([$1], [CXX], 71023e72ca8cSmrg[case $host_os in 71033e72ca8cSmrginterix[[3-9]]*) 71043e72ca8cSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 71053e72ca8cSmrg # hack all around it, let's just trust "g++" to DTRT. 71063e72ca8cSmrg _LT_TAGVAR(predep_objects,$1)= 71073e72ca8cSmrg _LT_TAGVAR(postdep_objects,$1)= 71083e72ca8cSmrg _LT_TAGVAR(postdeps,$1)= 7109a1ed278cSmrg ;; 711034977a2fSmrg 71113e72ca8cSmrglinux*) 71123e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 71133e72ca8cSmrg *Sun\ C*) 71143e72ca8cSmrg # Sun C++ 5.9 7115a1ed278cSmrg 71163e72ca8cSmrg # The more standards-conforming stlport4 library is 71173e72ca8cSmrg # incompatible with the Cstd library. Avoid specifying 71183e72ca8cSmrg # it if it's in CXXFLAGS. Ignore libCrun as 71193e72ca8cSmrg # -library=stlport4 depends on it. 71203e72ca8cSmrg case " $CXX $CXXFLAGS " in 71213e72ca8cSmrg *" -library=stlport4 "*) 71223e72ca8cSmrg solaris_use_stlport4=yes 71233e72ca8cSmrg ;; 71243e72ca8cSmrg esac 712534977a2fSmrg 71263e72ca8cSmrg if test "$solaris_use_stlport4" != yes; then 71273e72ca8cSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71283e72ca8cSmrg fi 71293e72ca8cSmrg ;; 71303e72ca8cSmrg esac 71313e72ca8cSmrg ;; 713234977a2fSmrg 71333e72ca8cSmrgsolaris*) 71343e72ca8cSmrg case $cc_basename in 71353e72ca8cSmrg CC* | sunCC*) 71363e72ca8cSmrg # The more standards-conforming stlport4 library is 71373e72ca8cSmrg # incompatible with the Cstd library. Avoid specifying 71383e72ca8cSmrg # it if it's in CXXFLAGS. Ignore libCrun as 71393e72ca8cSmrg # -library=stlport4 depends on it. 71403e72ca8cSmrg case " $CXX $CXXFLAGS " in 71413e72ca8cSmrg *" -library=stlport4 "*) 71423e72ca8cSmrg solaris_use_stlport4=yes 71433e72ca8cSmrg ;; 71443e72ca8cSmrg esac 71453e72ca8cSmrg 71463e72ca8cSmrg # Adding this requires a known-good setup of shared libraries for 71473e72ca8cSmrg # Sun compiler versions before 5.6, else PIC objects from an old 71483e72ca8cSmrg # archive will be linked into the output, leading to subtle bugs. 71493e72ca8cSmrg if test "$solaris_use_stlport4" != yes; then 71503e72ca8cSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71513e72ca8cSmrg fi 71523e72ca8cSmrg ;; 71533e72ca8cSmrg esac 71543e72ca8cSmrg ;; 71553e72ca8cSmrgesac 7156a1ed278cSmrg]) 715734977a2fSmrg 71583e72ca8cSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 71593e72ca8cSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 71603e72ca8cSmrgesac 71613e72ca8cSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 71623e72ca8cSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 71633e72ca8cSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 71643e72ca8cSmrgfi 71653e72ca8cSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 71663e72ca8cSmrg [The directories searched by this compiler when creating a shared library]) 71673e72ca8cSmrg_LT_TAGDECL([], [predep_objects], [1], 71683e72ca8cSmrg [Dependencies to place before and after the objects being linked to 71693e72ca8cSmrg create a shared library]) 71703e72ca8cSmrg_LT_TAGDECL([], [postdep_objects], [1]) 71713e72ca8cSmrg_LT_TAGDECL([], [predeps], [1]) 71723e72ca8cSmrg_LT_TAGDECL([], [postdeps], [1]) 71733e72ca8cSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 71743e72ca8cSmrg [The library search path used internally by the compiler when linking 71753e72ca8cSmrg a shared library]) 71763e72ca8cSmrg])# _LT_SYS_HIDDEN_LIBDEPS 7177ee3138f1Smrg 717834977a2fSmrg 7179414bd68fSmrg# _LT_LANG_F77_CONFIG([TAG]) 7180414bd68fSmrg# -------------------------- 7181414bd68fSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 7182414bd68fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7183414bd68fSmrg# to write the compiler configuration to `libtool'. 7184414bd68fSmrgm4_defun([_LT_LANG_F77_CONFIG], 7185414bd68fSmrg[AC_LANG_PUSH(Fortran 77) 7186414bd68fSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 7187414bd68fSmrg _lt_disable_F77=yes 7188414bd68fSmrgfi 7189414bd68fSmrg 7190414bd68fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7191414bd68fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7192414bd68fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7193414bd68fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7194414bd68fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7195414bd68fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7196414bd68fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7197414bd68fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7198414bd68fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7199414bd68fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7200414bd68fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7201414bd68fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7202414bd68fSmrg_LT_TAGVAR(module_cmds, $1)= 7203414bd68fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7204414bd68fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7205414bd68fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7206414bd68fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7207414bd68fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7208414bd68fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7209414bd68fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7210414bd68fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7211414bd68fSmrg 7212414bd68fSmrg# Source file extension for f77 test sources. 7213414bd68fSmrgac_ext=f 7214414bd68fSmrg 7215414bd68fSmrg# Object file extension for compiled f77 test sources. 7216414bd68fSmrgobjext=o 7217414bd68fSmrg_LT_TAGVAR(objext, $1)=$objext 7218414bd68fSmrg 7219414bd68fSmrg# No sense in running all these tests if we already determined that 7220414bd68fSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 7221414bd68fSmrg# are currently assumed to apply to all compilers on this platform, 7222414bd68fSmrg# and will be corrupted by setting them based on a non-working compiler. 7223414bd68fSmrgif test "$_lt_disable_F77" != yes; then 7224414bd68fSmrg # Code to be used in simple compile tests 7225414bd68fSmrg lt_simple_compile_test_code="\ 7226414bd68fSmrg subroutine t 7227414bd68fSmrg return 7228414bd68fSmrg end 7229414bd68fSmrg" 7230414bd68fSmrg 7231414bd68fSmrg # Code to be used in simple link tests 7232414bd68fSmrg lt_simple_link_test_code="\ 7233414bd68fSmrg program t 7234414bd68fSmrg end 7235414bd68fSmrg" 7236414bd68fSmrg 7237414bd68fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7238414bd68fSmrg _LT_TAG_COMPILER 7239414bd68fSmrg 7240414bd68fSmrg # save warnings/boilerplate of simple test code 7241414bd68fSmrg _LT_COMPILER_BOILERPLATE 7242414bd68fSmrg _LT_LINKER_BOILERPLATE 7243414bd68fSmrg 7244414bd68fSmrg # Allow CC to be a program name with arguments. 7245414bd68fSmrg lt_save_CC="$CC" 7246414bd68fSmrg lt_save_GCC=$GCC 7247414bd68fSmrg lt_save_CFLAGS=$CFLAGS 7248414bd68fSmrg CC=${F77-"f77"} 7249414bd68fSmrg CFLAGS=$FFLAGS 7250414bd68fSmrg compiler=$CC 7251414bd68fSmrg _LT_TAGVAR(compiler, $1)=$CC 7252414bd68fSmrg _LT_CC_BASENAME([$compiler]) 7253414bd68fSmrg GCC=$G77 7254414bd68fSmrg if test -n "$compiler"; then 7255414bd68fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7256414bd68fSmrg AC_MSG_RESULT([$can_build_shared]) 7257414bd68fSmrg 7258414bd68fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7259414bd68fSmrg test "$can_build_shared" = "no" && enable_shared=no 7260414bd68fSmrg 7261414bd68fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7262414bd68fSmrg # are all built from PIC. 7263414bd68fSmrg case $host_os in 7264414bd68fSmrg aix3*) 7265414bd68fSmrg test "$enable_shared" = yes && enable_static=no 7266414bd68fSmrg if test -n "$RANLIB"; then 7267414bd68fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7268414bd68fSmrg postinstall_cmds='$RANLIB $lib' 7269414bd68fSmrg fi 7270414bd68fSmrg ;; 7271414bd68fSmrg aix[[4-9]]*) 7272414bd68fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7273414bd68fSmrg test "$enable_shared" = yes && enable_static=no 7274414bd68fSmrg fi 7275414bd68fSmrg ;; 7276414bd68fSmrg esac 7277414bd68fSmrg AC_MSG_RESULT([$enable_shared]) 7278414bd68fSmrg 7279414bd68fSmrg AC_MSG_CHECKING([whether to build static libraries]) 7280414bd68fSmrg # Make sure either enable_shared or enable_static is yes. 7281414bd68fSmrg test "$enable_shared" = yes || enable_static=yes 7282414bd68fSmrg AC_MSG_RESULT([$enable_static]) 7283414bd68fSmrg 7284414bd68fSmrg _LT_TAGVAR(GCC, $1)="$G77" 7285414bd68fSmrg _LT_TAGVAR(LD, $1)="$LD" 7286414bd68fSmrg 7287414bd68fSmrg ## CAVEAT EMPTOR: 7288414bd68fSmrg ## There is no encapsulation within the following macros, do not change 7289414bd68fSmrg ## the running order or otherwise move them around unless you know exactly 7290414bd68fSmrg ## what you are doing... 7291414bd68fSmrg _LT_COMPILER_PIC($1) 7292414bd68fSmrg _LT_COMPILER_C_O($1) 7293414bd68fSmrg _LT_COMPILER_FILE_LOCKS($1) 7294414bd68fSmrg _LT_LINKER_SHLIBS($1) 7295414bd68fSmrg _LT_SYS_DYNAMIC_LINKER($1) 7296414bd68fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7297414bd68fSmrg 7298414bd68fSmrg _LT_CONFIG($1) 7299414bd68fSmrg fi # test -n "$compiler" 7300414bd68fSmrg 7301414bd68fSmrg GCC=$lt_save_GCC 7302414bd68fSmrg CC="$lt_save_CC" 7303414bd68fSmrg CFLAGS="$lt_save_CFLAGS" 7304414bd68fSmrgfi # test "$_lt_disable_F77" != yes 7305414bd68fSmrg 7306414bd68fSmrgAC_LANG_POP 7307414bd68fSmrg])# _LT_LANG_F77_CONFIG 7308414bd68fSmrg 7309414bd68fSmrg 7310414bd68fSmrg# _LT_LANG_FC_CONFIG([TAG]) 7311414bd68fSmrg# ------------------------- 7312414bd68fSmrg# Ensure that the configuration variables for a Fortran compiler are 73133e72ca8cSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 73143e72ca8cSmrg# to write the compiler configuration to `libtool'. 7315414bd68fSmrgm4_defun([_LT_LANG_FC_CONFIG], 7316414bd68fSmrg[AC_LANG_PUSH(Fortran) 7317414bd68fSmrg 7318414bd68fSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 7319414bd68fSmrg _lt_disable_FC=yes 73203e72ca8cSmrgfi 73213e72ca8cSmrg 73223e72ca8cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 73233e72ca8cSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 73243e72ca8cSmrg_LT_TAGVAR(always_export_symbols, $1)=no 73253e72ca8cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 73263e72ca8cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 73273e72ca8cSmrg_LT_TAGVAR(hardcode_direct, $1)=no 73283e72ca8cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 73293e72ca8cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 73303e72ca8cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 73313e72ca8cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 73323e72ca8cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 73333e72ca8cSmrg_LT_TAGVAR(inherit_rpath, $1)=no 73343e72ca8cSmrg_LT_TAGVAR(module_cmds, $1)= 73353e72ca8cSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 73363e72ca8cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 73373e72ca8cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 73383e72ca8cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 73393e72ca8cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 73403e72ca8cSmrg_LT_TAGVAR(no_undefined_flag, $1)= 73413e72ca8cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 73423e72ca8cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 734334977a2fSmrg 7344414bd68fSmrg# Source file extension for fc test sources. 7345414bd68fSmrgac_ext=${ac_fc_srcext-f} 734634977a2fSmrg 7347414bd68fSmrg# Object file extension for compiled fc test sources. 73483e72ca8cSmrgobjext=o 73493e72ca8cSmrg_LT_TAGVAR(objext, $1)=$objext 735034977a2fSmrg 73513e72ca8cSmrg# No sense in running all these tests if we already determined that 7352414bd68fSmrg# the FC compiler isn't working. Some variables (like enable_shared) 73533e72ca8cSmrg# are currently assumed to apply to all compilers on this platform, 73543e72ca8cSmrg# and will be corrupted by setting them based on a non-working compiler. 7355414bd68fSmrgif test "$_lt_disable_FC" != yes; then 73563e72ca8cSmrg # Code to be used in simple compile tests 73573e72ca8cSmrg lt_simple_compile_test_code="\ 73583e72ca8cSmrg subroutine t 73593e72ca8cSmrg return 73603e72ca8cSmrg end 73613e72ca8cSmrg" 736234977a2fSmrg 73633e72ca8cSmrg # Code to be used in simple link tests 73643e72ca8cSmrg lt_simple_link_test_code="\ 73653e72ca8cSmrg program t 73663e72ca8cSmrg end 73673e72ca8cSmrg" 736834977a2fSmrg 73693e72ca8cSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 73703e72ca8cSmrg _LT_TAG_COMPILER 737134977a2fSmrg 73723e72ca8cSmrg # save warnings/boilerplate of simple test code 73733e72ca8cSmrg _LT_COMPILER_BOILERPLATE 73743e72ca8cSmrg _LT_LINKER_BOILERPLATE 737534977a2fSmrg 73763e72ca8cSmrg # Allow CC to be a program name with arguments. 73773e72ca8cSmrg lt_save_CC="$CC" 73783e72ca8cSmrg lt_save_GCC=$GCC 73793e72ca8cSmrg lt_save_CFLAGS=$CFLAGS 7380414bd68fSmrg CC=${FC-"f95"} 7381414bd68fSmrg CFLAGS=$FCFLAGS 73823e72ca8cSmrg compiler=$CC 7383414bd68fSmrg GCC=$ac_cv_fc_compiler_gnu 7384414bd68fSmrg 73853e72ca8cSmrg _LT_TAGVAR(compiler, $1)=$CC 73863e72ca8cSmrg _LT_CC_BASENAME([$compiler]) 7387414bd68fSmrg 73883e72ca8cSmrg if test -n "$compiler"; then 73893e72ca8cSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 73903e72ca8cSmrg AC_MSG_RESULT([$can_build_shared]) 7391ee3138f1Smrg 73923e72ca8cSmrg AC_MSG_CHECKING([whether to build shared libraries]) 73933e72ca8cSmrg test "$can_build_shared" = "no" && enable_shared=no 7394ee3138f1Smrg 73953e72ca8cSmrg # On AIX, shared libraries and static libraries use the same namespace, and 73963e72ca8cSmrg # are all built from PIC. 73973e72ca8cSmrg case $host_os in 73983e72ca8cSmrg aix3*) 73993e72ca8cSmrg test "$enable_shared" = yes && enable_static=no 74003e72ca8cSmrg if test -n "$RANLIB"; then 74013e72ca8cSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 74023e72ca8cSmrg postinstall_cmds='$RANLIB $lib' 74033e72ca8cSmrg fi 74043e72ca8cSmrg ;; 74053e72ca8cSmrg aix[[4-9]]*) 74063e72ca8cSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 74073e72ca8cSmrg test "$enable_shared" = yes && enable_static=no 7408a1ed278cSmrg fi 74093e72ca8cSmrg ;; 74103e72ca8cSmrg esac 74113e72ca8cSmrg AC_MSG_RESULT([$enable_shared]) 7412ee3138f1Smrg 74133e72ca8cSmrg AC_MSG_CHECKING([whether to build static libraries]) 74143e72ca8cSmrg # Make sure either enable_shared or enable_static is yes. 74153e72ca8cSmrg test "$enable_shared" = yes || enable_static=yes 74163e72ca8cSmrg AC_MSG_RESULT([$enable_static]) 7417ee3138f1Smrg 7418414bd68fSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 74193e72ca8cSmrg _LT_TAGVAR(LD, $1)="$LD" 7420ee3138f1Smrg 74213e72ca8cSmrg ## CAVEAT EMPTOR: 74223e72ca8cSmrg ## There is no encapsulation within the following macros, do not change 74233e72ca8cSmrg ## the running order or otherwise move them around unless you know exactly 74243e72ca8cSmrg ## what you are doing... 7425414bd68fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 74263e72ca8cSmrg _LT_COMPILER_PIC($1) 74273e72ca8cSmrg _LT_COMPILER_C_O($1) 74283e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 74293e72ca8cSmrg _LT_LINKER_SHLIBS($1) 74303e72ca8cSmrg _LT_SYS_DYNAMIC_LINKER($1) 74313e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7432ee3138f1Smrg 74333e72ca8cSmrg _LT_CONFIG($1) 74343e72ca8cSmrg fi # test -n "$compiler" 7435a1ed278cSmrg 74363e72ca8cSmrg GCC=$lt_save_GCC 7437414bd68fSmrg CC=$lt_save_CC 7438414bd68fSmrg CFLAGS=$lt_save_CFLAGS 7439414bd68fSmrgfi # test "$_lt_disable_FC" != yes 7440a1ed278cSmrg 74413e72ca8cSmrgAC_LANG_POP 7442414bd68fSmrg])# _LT_LANG_FC_CONFIG 7443ee3138f1Smrg 7444ee3138f1Smrg 7445414bd68fSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 7446414bd68fSmrg# -------------------------- 7447414bd68fSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7448414bd68fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 74493e72ca8cSmrg# to write the compiler configuration to `libtool'. 7450414bd68fSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 7451414bd68fSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7452414bd68fSmrgAC_LANG_SAVE 7453ee3138f1Smrg 7454414bd68fSmrg# Source file extension for Java test sources. 7455414bd68fSmrgac_ext=java 7456414bd68fSmrg 7457414bd68fSmrg# Object file extension for compiled Java test sources. 7458414bd68fSmrgobjext=o 7459414bd68fSmrg_LT_TAGVAR(objext, $1)=$objext 7460414bd68fSmrg 7461414bd68fSmrg# Code to be used in simple compile tests 7462414bd68fSmrglt_simple_compile_test_code="class foo {}" 7463414bd68fSmrg 7464414bd68fSmrg# Code to be used in simple link tests 7465414bd68fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7466414bd68fSmrg 7467414bd68fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7468414bd68fSmrg_LT_TAG_COMPILER 7469414bd68fSmrg 7470414bd68fSmrg# save warnings/boilerplate of simple test code 7471414bd68fSmrg_LT_COMPILER_BOILERPLATE 7472414bd68fSmrg_LT_LINKER_BOILERPLATE 7473414bd68fSmrg 7474414bd68fSmrg# Allow CC to be a program name with arguments. 7475414bd68fSmrglt_save_CC=$CC 7476414bd68fSmrglt_save_CFLAGS=$CFLAGS 7477414bd68fSmrglt_save_GCC=$GCC 7478414bd68fSmrgGCC=yes 7479414bd68fSmrgCC=${GCJ-"gcj"} 7480414bd68fSmrgCFLAGS=$GCJFLAGS 7481414bd68fSmrgcompiler=$CC 7482414bd68fSmrg_LT_TAGVAR(compiler, $1)=$CC 7483414bd68fSmrg_LT_TAGVAR(LD, $1)="$LD" 7484414bd68fSmrg_LT_CC_BASENAME([$compiler]) 7485414bd68fSmrg 7486414bd68fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7487414bd68fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7488414bd68fSmrg 7489414bd68fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7490414bd68fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7491414bd68fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7492414bd68fSmrg 7493414bd68fSmrgif test -n "$compiler"; then 7494414bd68fSmrg _LT_COMPILER_NO_RTTI($1) 7495414bd68fSmrg _LT_COMPILER_PIC($1) 7496414bd68fSmrg _LT_COMPILER_C_O($1) 7497414bd68fSmrg _LT_COMPILER_FILE_LOCKS($1) 7498414bd68fSmrg _LT_LINKER_SHLIBS($1) 7499414bd68fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7500414bd68fSmrg 7501414bd68fSmrg _LT_CONFIG($1) 75023e72ca8cSmrgfi 750334977a2fSmrg 7504414bd68fSmrgAC_LANG_RESTORE 7505414bd68fSmrg 7506414bd68fSmrgGCC=$lt_save_GCC 7507414bd68fSmrgCC=$lt_save_CC 7508414bd68fSmrgCFLAGS=$lt_save_CFLAGS 7509414bd68fSmrg])# _LT_LANG_GCJ_CONFIG 7510414bd68fSmrg 7511414bd68fSmrg 7512414bd68fSmrg# _LT_LANG_GO_CONFIG([TAG]) 7513414bd68fSmrg# -------------------------- 7514414bd68fSmrg# Ensure that the configuration variables for the GNU Go compiler 7515414bd68fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7516414bd68fSmrg# to write the compiler configuration to `libtool'. 7517414bd68fSmrgm4_defun([_LT_LANG_GO_CONFIG], 7518414bd68fSmrg[AC_REQUIRE([LT_PROG_GO])dnl 7519414bd68fSmrgAC_LANG_SAVE 7520414bd68fSmrg 7521414bd68fSmrg# Source file extension for Go test sources. 7522414bd68fSmrgac_ext=go 7523414bd68fSmrg 7524414bd68fSmrg# Object file extension for compiled Go test sources. 7525414bd68fSmrgobjext=o 7526414bd68fSmrg_LT_TAGVAR(objext, $1)=$objext 7527414bd68fSmrg 7528414bd68fSmrg# Code to be used in simple compile tests 7529414bd68fSmrglt_simple_compile_test_code="package main; func main() { }" 7530414bd68fSmrg 7531414bd68fSmrg# Code to be used in simple link tests 7532414bd68fSmrglt_simple_link_test_code='package main; func main() { }' 7533414bd68fSmrg 7534414bd68fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7535414bd68fSmrg_LT_TAG_COMPILER 7536414bd68fSmrg 7537414bd68fSmrg# save warnings/boilerplate of simple test code 7538414bd68fSmrg_LT_COMPILER_BOILERPLATE 7539414bd68fSmrg_LT_LINKER_BOILERPLATE 7540414bd68fSmrg 7541414bd68fSmrg# Allow CC to be a program name with arguments. 7542414bd68fSmrglt_save_CC=$CC 7543414bd68fSmrglt_save_CFLAGS=$CFLAGS 7544414bd68fSmrglt_save_GCC=$GCC 7545414bd68fSmrgGCC=yes 7546414bd68fSmrgCC=${GOC-"gccgo"} 7547414bd68fSmrgCFLAGS=$GOFLAGS 7548414bd68fSmrgcompiler=$CC 7549414bd68fSmrg_LT_TAGVAR(compiler, $1)=$CC 7550414bd68fSmrg_LT_TAGVAR(LD, $1)="$LD" 7551414bd68fSmrg_LT_CC_BASENAME([$compiler]) 7552414bd68fSmrg 7553414bd68fSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 75543e72ca8cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7555414bd68fSmrg 75563e72ca8cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 75573e72ca8cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 75583e72ca8cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 755934977a2fSmrg 7560414bd68fSmrgif test -n "$compiler"; then 7561414bd68fSmrg _LT_COMPILER_NO_RTTI($1) 7562414bd68fSmrg _LT_COMPILER_PIC($1) 7563414bd68fSmrg _LT_COMPILER_C_O($1) 7564414bd68fSmrg _LT_COMPILER_FILE_LOCKS($1) 7565414bd68fSmrg _LT_LINKER_SHLIBS($1) 7566414bd68fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7567ee3138f1Smrg 7568414bd68fSmrg _LT_CONFIG($1) 7569414bd68fSmrgfi 7570414bd68fSmrg 7571414bd68fSmrgAC_LANG_RESTORE 7572414bd68fSmrg 7573414bd68fSmrgGCC=$lt_save_GCC 7574414bd68fSmrgCC=$lt_save_CC 7575414bd68fSmrgCFLAGS=$lt_save_CFLAGS 7576414bd68fSmrg])# _LT_LANG_GO_CONFIG 7577414bd68fSmrg 7578414bd68fSmrg 7579414bd68fSmrg# _LT_LANG_RC_CONFIG([TAG]) 7580414bd68fSmrg# ------------------------- 7581414bd68fSmrg# Ensure that the configuration variables for the Windows resource compiler 7582414bd68fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7583414bd68fSmrg# to write the compiler configuration to `libtool'. 7584414bd68fSmrgm4_defun([_LT_LANG_RC_CONFIG], 7585414bd68fSmrg[AC_REQUIRE([LT_PROG_RC])dnl 7586414bd68fSmrgAC_LANG_SAVE 7587414bd68fSmrg 7588414bd68fSmrg# Source file extension for RC test sources. 7589414bd68fSmrgac_ext=rc 7590414bd68fSmrg 7591414bd68fSmrg# Object file extension for compiled RC test sources. 75923e72ca8cSmrgobjext=o 75933e72ca8cSmrg_LT_TAGVAR(objext, $1)=$objext 7594ee3138f1Smrg 7595414bd68fSmrg# Code to be used in simple compile tests 7596414bd68fSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7597414bd68fSmrg 7598414bd68fSmrg# Code to be used in simple link tests 7599414bd68fSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 7600414bd68fSmrg 7601414bd68fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7602414bd68fSmrg_LT_TAG_COMPILER 7603414bd68fSmrg 7604414bd68fSmrg# save warnings/boilerplate of simple test code 7605414bd68fSmrg_LT_COMPILER_BOILERPLATE 7606414bd68fSmrg_LT_LINKER_BOILERPLATE 7607414bd68fSmrg 7608414bd68fSmrg# Allow CC to be a program name with arguments. 7609414bd68fSmrglt_save_CC="$CC" 7610414bd68fSmrglt_save_CFLAGS=$CFLAGS 7611414bd68fSmrglt_save_GCC=$GCC 7612414bd68fSmrgGCC= 7613414bd68fSmrgCC=${RC-"windres"} 7614414bd68fSmrgCFLAGS= 7615414bd68fSmrgcompiler=$CC 7616414bd68fSmrg_LT_TAGVAR(compiler, $1)=$CC 7617414bd68fSmrg_LT_CC_BASENAME([$compiler]) 7618414bd68fSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7619414bd68fSmrg 7620414bd68fSmrgif test -n "$compiler"; then 7621414bd68fSmrg : 7622414bd68fSmrg _LT_CONFIG($1) 7623414bd68fSmrgfi 7624414bd68fSmrg 7625414bd68fSmrgGCC=$lt_save_GCC 7626414bd68fSmrgAC_LANG_RESTORE 7627414bd68fSmrgCC=$lt_save_CC 7628414bd68fSmrgCFLAGS=$lt_save_CFLAGS 7629414bd68fSmrg])# _LT_LANG_RC_CONFIG 7630414bd68fSmrg 76313e72ca8cSmrg 7632414bd68fSmrg# LT_PROG_GCJ 7633414bd68fSmrg# ----------- 7634414bd68fSmrgAC_DEFUN([LT_PROG_GCJ], 7635414bd68fSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7636414bd68fSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7637414bd68fSmrg [AC_CHECK_TOOL(GCJ, gcj,) 7638414bd68fSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7639414bd68fSmrg AC_SUBST(GCJFLAGS)])])[]dnl 7640414bd68fSmrg]) 76413e72ca8cSmrg 7642414bd68fSmrg# Old name: 7643414bd68fSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7644414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 7645414bd68fSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 76463e72ca8cSmrg 76473e72ca8cSmrg 7648414bd68fSmrg# LT_PROG_GO 7649414bd68fSmrg# ---------- 7650414bd68fSmrgAC_DEFUN([LT_PROG_GO], 7651414bd68fSmrg[AC_CHECK_TOOL(GOC, gccgo,) 7652414bd68fSmrg]) 7653ee3138f1Smrg 7654ee3138f1Smrg 7655414bd68fSmrg# LT_PROG_RC 7656414bd68fSmrg# ---------- 7657414bd68fSmrgAC_DEFUN([LT_PROG_RC], 7658414bd68fSmrg[AC_CHECK_TOOL(RC, windres,) 7659414bd68fSmrg]) 7660ee3138f1Smrg 7661414bd68fSmrg# Old name: 7662414bd68fSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7663414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 7664414bd68fSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 766534977a2fSmrg 766634977a2fSmrg 7667414bd68fSmrg# _LT_DECL_EGREP 7668414bd68fSmrg# -------------- 7669414bd68fSmrg# If we don't have a new enough Autoconf to choose the best grep 7670414bd68fSmrg# available, choose the one first in the user's PATH. 7671414bd68fSmrgm4_defun([_LT_DECL_EGREP], 7672414bd68fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7673414bd68fSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7674414bd68fSmrgtest -z "$GREP" && GREP=grep 7675414bd68fSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7676414bd68fSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7677414bd68fSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7678414bd68fSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7679414bd68fSmrgAC_SUBST([GREP]) 7680414bd68fSmrg]) 768134977a2fSmrg 768234977a2fSmrg 7683414bd68fSmrg# _LT_DECL_OBJDUMP 7684414bd68fSmrg# -------------- 7685414bd68fSmrg# If we don't have a new enough Autoconf to choose the best objdump 7686414bd68fSmrg# available, choose the one first in the user's PATH. 7687414bd68fSmrgm4_defun([_LT_DECL_OBJDUMP], 7688414bd68fSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7689414bd68fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7690414bd68fSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7691414bd68fSmrgAC_SUBST([OBJDUMP]) 7692414bd68fSmrg]) 769334977a2fSmrg 7694414bd68fSmrg# _LT_DECL_DLLTOOL 7695414bd68fSmrg# ---------------- 7696414bd68fSmrg# Ensure DLLTOOL variable is set. 7697414bd68fSmrgm4_defun([_LT_DECL_DLLTOOL], 7698414bd68fSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7699414bd68fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7700414bd68fSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7701414bd68fSmrgAC_SUBST([DLLTOOL]) 7702414bd68fSmrg]) 770334977a2fSmrg 7704414bd68fSmrg# _LT_DECL_SED 7705414bd68fSmrg# ------------ 7706414bd68fSmrg# Check for a fully-functional sed program, that truncates 7707414bd68fSmrg# as few characters as possible. Prefer GNU sed if found. 7708414bd68fSmrgm4_defun([_LT_DECL_SED], 7709414bd68fSmrg[AC_PROG_SED 7710414bd68fSmrgtest -z "$SED" && SED=sed 7711414bd68fSmrgXsed="$SED -e 1s/^X//" 7712414bd68fSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7713414bd68fSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7714414bd68fSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7715414bd68fSmrg])# _LT_DECL_SED 771634977a2fSmrg 7717414bd68fSmrgm4_ifndef([AC_PROG_SED], [ 7718414bd68fSmrg# NOTE: This macro has been submitted for inclusion into # 7719414bd68fSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7720414bd68fSmrg# a released version of Autoconf we should remove this # 7721414bd68fSmrg# macro and use it instead. # 7722414bd68fSmrg 7723414bd68fSmrgm4_defun([AC_PROG_SED], 7724414bd68fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7725414bd68fSmrgAC_CACHE_VAL(lt_cv_path_SED, 7726414bd68fSmrg[# Loop through the user's path and test for sed and gsed. 7727414bd68fSmrg# Then use that list of sed's as ones to test for truncation. 7728414bd68fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7729414bd68fSmrgfor as_dir in $PATH 7730414bd68fSmrgdo 7731414bd68fSmrg IFS=$as_save_IFS 7732414bd68fSmrg test -z "$as_dir" && as_dir=. 7733414bd68fSmrg for lt_ac_prog in sed gsed; do 7734414bd68fSmrg for ac_exec_ext in '' $ac_executable_extensions; do 7735414bd68fSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7736414bd68fSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7737414bd68fSmrg fi 7738414bd68fSmrg done 7739414bd68fSmrg done 7740414bd68fSmrgdone 7741414bd68fSmrgIFS=$as_save_IFS 7742414bd68fSmrglt_ac_max=0 7743414bd68fSmrglt_ac_count=0 7744414bd68fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7745414bd68fSmrg# along with /bin/sed that truncates output. 7746414bd68fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7747414bd68fSmrg test ! -f $lt_ac_sed && continue 7748414bd68fSmrg cat /dev/null > conftest.in 7749414bd68fSmrg lt_ac_count=0 7750414bd68fSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7751414bd68fSmrg # Check for GNU sed and select it if it is found. 7752414bd68fSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7753414bd68fSmrg lt_cv_path_SED=$lt_ac_sed 7754414bd68fSmrg break 7755414bd68fSmrg fi 7756414bd68fSmrg while true; do 7757414bd68fSmrg cat conftest.in conftest.in >conftest.tmp 7758414bd68fSmrg mv conftest.tmp conftest.in 7759414bd68fSmrg cp conftest.in conftest.nl 7760414bd68fSmrg echo >>conftest.nl 7761414bd68fSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7762414bd68fSmrg cmp -s conftest.out conftest.nl || break 7763414bd68fSmrg # 10000 chars as input seems more than enough 7764414bd68fSmrg test $lt_ac_count -gt 10 && break 7765414bd68fSmrg lt_ac_count=`expr $lt_ac_count + 1` 7766414bd68fSmrg if test $lt_ac_count -gt $lt_ac_max; then 7767414bd68fSmrg lt_ac_max=$lt_ac_count 7768414bd68fSmrg lt_cv_path_SED=$lt_ac_sed 7769414bd68fSmrg fi 7770414bd68fSmrg done 7771414bd68fSmrgdone 7772414bd68fSmrg]) 7773414bd68fSmrgSED=$lt_cv_path_SED 7774414bd68fSmrgAC_SUBST([SED]) 7775414bd68fSmrgAC_MSG_RESULT([$SED]) 7776414bd68fSmrg])#AC_PROG_SED 7777414bd68fSmrg])#m4_ifndef 7778a1ed278cSmrg 7779414bd68fSmrg# Old name: 7780414bd68fSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7781414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 7782414bd68fSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 778334977a2fSmrg 778434977a2fSmrg 7785414bd68fSmrg# _LT_CHECK_SHELL_FEATURES 7786414bd68fSmrg# ------------------------ 7787414bd68fSmrg# Find out whether the shell is Bourne or XSI compatible, 7788414bd68fSmrg# or has some other useful features. 7789414bd68fSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7790414bd68fSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7791414bd68fSmrg# Try some XSI features 7792414bd68fSmrgxsi_shell=no 7793414bd68fSmrg( _lt_dummy="a/b/c" 7794414bd68fSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7795414bd68fSmrg = c,a/b,b/c, \ 7796414bd68fSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7797414bd68fSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7798414bd68fSmrg && xsi_shell=yes 7799414bd68fSmrgAC_MSG_RESULT([$xsi_shell]) 7800414bd68fSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 780134977a2fSmrg 7802414bd68fSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7803414bd68fSmrglt_shell_append=no 7804414bd68fSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7805414bd68fSmrg >/dev/null 2>&1 \ 7806414bd68fSmrg && lt_shell_append=yes 7807414bd68fSmrgAC_MSG_RESULT([$lt_shell_append]) 7808414bd68fSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 78093e72ca8cSmrg 7810414bd68fSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7811414bd68fSmrg lt_unset=unset 7812414bd68fSmrgelse 7813414bd68fSmrg lt_unset=false 7814414bd68fSmrgfi 7815414bd68fSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 781634977a2fSmrg 7817414bd68fSmrg# test EBCDIC or ASCII 7818414bd68fSmrgcase `echo X|tr X '\101'` in 7819414bd68fSmrg A) # ASCII based system 7820414bd68fSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7821414bd68fSmrg lt_SP2NL='tr \040 \012' 7822414bd68fSmrg lt_NL2SP='tr \015\012 \040\040' 7823414bd68fSmrg ;; 7824414bd68fSmrg *) # EBCDIC based system 7825414bd68fSmrg lt_SP2NL='tr \100 \n' 7826414bd68fSmrg lt_NL2SP='tr \r\n \100\100' 7827414bd68fSmrg ;; 7828414bd68fSmrgesac 7829414bd68fSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7830414bd68fSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7831414bd68fSmrg])# _LT_CHECK_SHELL_FEATURES 783234977a2fSmrg 783334977a2fSmrg 7834414bd68fSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7835414bd68fSmrg# ------------------------------------------------------ 7836414bd68fSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7837414bd68fSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7838414bd68fSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 7839414bd68fSmrg[dnl { 7840414bd68fSmrgsed -e '/^$1 ()$/,/^} # $1 /c\ 7841414bd68fSmrg$1 ()\ 7842414bd68fSmrg{\ 7843414bd68fSmrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7844414bd68fSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7845414bd68fSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7846414bd68fSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7847414bd68fSmrgtest 0 -eq $? || _lt_function_replace_fail=: 7848414bd68fSmrg]) 784934977a2fSmrg 785034977a2fSmrg 7851414bd68fSmrg# _LT_PROG_REPLACE_SHELLFNS 7852414bd68fSmrg# ------------------------- 7853414bd68fSmrg# Replace existing portable implementations of several shell functions with 7854414bd68fSmrg# equivalent extended shell implementations where those features are available.. 7855414bd68fSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7856414bd68fSmrg[if test x"$xsi_shell" = xyes; then 7857414bd68fSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7858414bd68fSmrg case ${1} in 7859414bd68fSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7860414bd68fSmrg * ) func_dirname_result="${3}" ;; 7861414bd68fSmrg esac]) 7862ee3138f1Smrg 7863414bd68fSmrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7864414bd68fSmrg func_basename_result="${1##*/}"]) 7865ee3138f1Smrg 7866414bd68fSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7867414bd68fSmrg case ${1} in 7868414bd68fSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7869414bd68fSmrg * ) func_dirname_result="${3}" ;; 7870414bd68fSmrg esac 7871414bd68fSmrg func_basename_result="${1##*/}"]) 7872ee3138f1Smrg 7873414bd68fSmrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7874414bd68fSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7875414bd68fSmrg # positional parameters, so assign one to ordinary parameter first. 7876414bd68fSmrg func_stripname_result=${3} 7877414bd68fSmrg func_stripname_result=${func_stripname_result#"${1}"} 7878414bd68fSmrg func_stripname_result=${func_stripname_result%"${2}"}]) 7879ee3138f1Smrg 7880414bd68fSmrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7881414bd68fSmrg func_split_long_opt_name=${1%%=*} 7882414bd68fSmrg func_split_long_opt_arg=${1#*=}]) 7883ee3138f1Smrg 7884414bd68fSmrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7885414bd68fSmrg func_split_short_opt_arg=${1#??} 7886414bd68fSmrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 7887ee3138f1Smrg 7888414bd68fSmrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7889414bd68fSmrg case ${1} in 7890414bd68fSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7891414bd68fSmrg *) func_lo2o_result=${1} ;; 7892414bd68fSmrg esac]) 7893ee3138f1Smrg 7894414bd68fSmrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 789534977a2fSmrg 7896414bd68fSmrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7897a1ed278cSmrg 7898414bd68fSmrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7899414bd68fSmrgfi 7900a1ed278cSmrg 7901414bd68fSmrgif test x"$lt_shell_append" = xyes; then 7902414bd68fSmrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7903a1ed278cSmrg 7904414bd68fSmrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7905414bd68fSmrg func_quote_for_eval "${2}" 7906414bd68fSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7907414bd68fSmrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 7908a1ed278cSmrg 7909414bd68fSmrg # Save a `func_append' function call where possible by direct use of '+=' 7910414bd68fSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7911414bd68fSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7912414bd68fSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7913414bd68fSmrg test 0 -eq $? || _lt_function_replace_fail=: 7914414bd68fSmrgelse 7915414bd68fSmrg # Save a `func_append' function call even when '+=' is not available 7916414bd68fSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7917414bd68fSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7918414bd68fSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7919414bd68fSmrg test 0 -eq $? || _lt_function_replace_fail=: 7920414bd68fSmrgfi 7921a1ed278cSmrg 7922414bd68fSmrgif test x"$_lt_function_replace_fail" = x":"; then 7923414bd68fSmrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7924414bd68fSmrgfi 7925414bd68fSmrg]) 7926a1ed278cSmrg 7927414bd68fSmrg# _LT_PATH_CONVERSION_FUNCTIONS 7928414bd68fSmrg# ----------------------------- 7929414bd68fSmrg# Determine which file name conversion functions should be used by 7930414bd68fSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7931414bd68fSmrg# for certain cross-compile configurations and native mingw. 7932414bd68fSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7933414bd68fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7934414bd68fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7935414bd68fSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 7936414bd68fSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7937414bd68fSmrg[case $host in 7938414bd68fSmrg *-*-mingw* ) 7939414bd68fSmrg case $build in 7940414bd68fSmrg *-*-mingw* ) # actually msys 7941414bd68fSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7942414bd68fSmrg ;; 7943414bd68fSmrg *-*-cygwin* ) 7944414bd68fSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7945414bd68fSmrg ;; 7946414bd68fSmrg * ) # otherwise, assume *nix 7947414bd68fSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7948414bd68fSmrg ;; 7949414bd68fSmrg esac 7950414bd68fSmrg ;; 7951414bd68fSmrg *-*-cygwin* ) 7952414bd68fSmrg case $build in 7953414bd68fSmrg *-*-mingw* ) # actually msys 7954414bd68fSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7955414bd68fSmrg ;; 7956414bd68fSmrg *-*-cygwin* ) 7957414bd68fSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 7958414bd68fSmrg ;; 7959414bd68fSmrg * ) # otherwise, assume *nix 7960414bd68fSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7961414bd68fSmrg ;; 7962414bd68fSmrg esac 7963414bd68fSmrg ;; 7964414bd68fSmrg * ) # unhandled hosts (and "normal" native builds) 7965414bd68fSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 7966414bd68fSmrg ;; 7967414bd68fSmrgesac 7968414bd68fSmrg]) 7969414bd68fSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 7970414bd68fSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7971414bd68fSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7972414bd68fSmrg [0], [convert $build file names to $host format])dnl 7973a1ed278cSmrg 7974414bd68fSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7975414bd68fSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7976414bd68fSmrg[#assume ordinary cross tools, or native build. 7977414bd68fSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 7978414bd68fSmrgcase $host in 7979414bd68fSmrg *-*-mingw* ) 7980414bd68fSmrg case $build in 7981414bd68fSmrg *-*-mingw* ) # actually msys 7982414bd68fSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7983414bd68fSmrg ;; 7984414bd68fSmrg esac 7985414bd68fSmrg ;; 7986414bd68fSmrgesac 7987414bd68fSmrg]) 7988414bd68fSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7989414bd68fSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7990414bd68fSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7991414bd68fSmrg [0], [convert $build files to toolchain format])dnl 7992414bd68fSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 7993a1ed278cSmrg 7994414bd68fSmrg# Helper functions for option handling. -*- Autoconf -*- 7995414bd68fSmrg# 7996414bd68fSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 7997414bd68fSmrg# Inc. 7998414bd68fSmrg# Written by Gary V. Vaughan, 2004 7999414bd68fSmrg# 8000414bd68fSmrg# This file is free software; the Free Software Foundation gives 8001414bd68fSmrg# unlimited permission to copy and/or distribute it, with or without 8002414bd68fSmrg# modifications, as long as this notice is preserved. 8003ee3138f1Smrg 8004414bd68fSmrg# serial 7 ltoptions.m4 8005ee3138f1Smrg 8006414bd68fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8007414bd68fSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8008ee3138f1Smrg 8009b425557eSmrg 8010414bd68fSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8011414bd68fSmrg# ------------------------------------------ 8012414bd68fSmrgm4_define([_LT_MANGLE_OPTION], 8013414bd68fSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8014ee3138f1Smrg 8015ee3138f1Smrg 8016414bd68fSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8017414bd68fSmrg# --------------------------------------- 8018414bd68fSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8019414bd68fSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8020414bd68fSmrg# saved as a flag. 8021414bd68fSmrgm4_define([_LT_SET_OPTION], 8022414bd68fSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8023414bd68fSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8024414bd68fSmrg _LT_MANGLE_DEFUN([$1], [$2]), 8025414bd68fSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 8026414bd68fSmrg]) 8027ee3138f1Smrg 802834977a2fSmrg 8029414bd68fSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8030414bd68fSmrg# ------------------------------------------------------------ 8031414bd68fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8032414bd68fSmrgm4_define([_LT_IF_OPTION], 8033414bd68fSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 803434977a2fSmrg 803534977a2fSmrg 8036414bd68fSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8037414bd68fSmrg# ------------------------------------------------------- 8038414bd68fSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8039414bd68fSmrg# are set. 8040414bd68fSmrgm4_define([_LT_UNLESS_OPTIONS], 8041414bd68fSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8042414bd68fSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8043414bd68fSmrg [m4_define([$0_found])])])[]dnl 8044414bd68fSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8045414bd68fSmrg])[]dnl 8046414bd68fSmrg]) 804734977a2fSmrg 804834977a2fSmrg 8049414bd68fSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8050414bd68fSmrg# ---------------------------------------- 8051414bd68fSmrg# OPTION-LIST is a space-separated list of Libtool options associated 8052414bd68fSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 8053414bd68fSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8054414bd68fSmrg# the unknown option and exit. 8055414bd68fSmrgm4_defun([_LT_SET_OPTIONS], 8056414bd68fSmrg[# Set options 8057414bd68fSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8058414bd68fSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 8059ee3138f1Smrg 8060414bd68fSmrgm4_if([$1],[LT_INIT],[ 8061414bd68fSmrg dnl 8062414bd68fSmrg dnl Simply set some default values (i.e off) if boolean options were not 8063414bd68fSmrg dnl specified: 8064414bd68fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8065414bd68fSmrg ]) 8066414bd68fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8067414bd68fSmrg ]) 8068414bd68fSmrg dnl 8069414bd68fSmrg dnl If no reference was made to various pairs of opposing options, then 8070414bd68fSmrg dnl we run the default mode handler for the pair. For example, if neither 8071414bd68fSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 8072414bd68fSmrg dnl archives by default: 8073414bd68fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8074414bd68fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8075414bd68fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8076414bd68fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8077414bd68fSmrg [_LT_ENABLE_FAST_INSTALL]) 8078414bd68fSmrg ]) 8079414bd68fSmrg])# _LT_SET_OPTIONS 80803e72ca8cSmrg 8081ee3138f1Smrg 8082ee3138f1Smrg 8083414bd68fSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8084414bd68fSmrg# ----------------------------------------- 8085414bd68fSmrgm4_define([_LT_MANGLE_DEFUN], 8086414bd68fSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8087ee3138f1Smrg 8088ee3138f1Smrg 8089414bd68fSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8090414bd68fSmrg# ----------------------------------------------- 8091414bd68fSmrgm4_define([LT_OPTION_DEFINE], 8092414bd68fSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8093414bd68fSmrg])# LT_OPTION_DEFINE 8094ee3138f1Smrg 8095ee3138f1Smrg 8096414bd68fSmrg# dlopen 8097414bd68fSmrg# ------ 8098414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 80993e72ca8cSmrg]) 8100ee3138f1Smrg 8101414bd68fSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 8102414bd68fSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 8103414bd68fSmrgAC_DIAGNOSE([obsolete], 8104414bd68fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8105414bd68fSmrgput the `dlopen' option into LT_INIT's first parameter.]) 81063e72ca8cSmrg]) 8107ee3138f1Smrg 81083e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 8109414bd68fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8110ee3138f1Smrg 8111ee3138f1Smrg 8112414bd68fSmrg# win32-dll 8113414bd68fSmrg# --------- 8114414bd68fSmrg# Declare package support for building win32 dll's. 8115414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8116414bd68fSmrg[enable_win32_dll=yes 8117ee3138f1Smrg 8118414bd68fSmrgcase $host in 8119414bd68fSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8120414bd68fSmrg AC_CHECK_TOOL(AS, as, false) 8121414bd68fSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8122414bd68fSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 8123414bd68fSmrg ;; 8124414bd68fSmrgesac 8125b425557eSmrg 8126414bd68fSmrgtest -z "$AS" && AS=as 8127414bd68fSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8128b425557eSmrg 81293e72ca8cSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8130414bd68fSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8131414bd68fSmrg 8132414bd68fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8133414bd68fSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8134414bd68fSmrg])# win32-dll 8135414bd68fSmrg 8136414bd68fSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8137414bd68fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8138414bd68fSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 8139414bd68fSmrgAC_DIAGNOSE([obsolete], 8140414bd68fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8141414bd68fSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 81423e72ca8cSmrg]) 8143b425557eSmrg 8144414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 8145414bd68fSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8146414bd68fSmrg 8147414bd68fSmrg 8148414bd68fSmrg# _LT_ENABLE_SHARED([DEFAULT]) 8149414bd68fSmrg# ---------------------------- 8150414bd68fSmrg# implement the --enable-shared flag, and supports the `shared' and 8151414bd68fSmrg# `disable-shared' LT_INIT options. 8152414bd68fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8153414bd68fSmrgm4_define([_LT_ENABLE_SHARED], 8154414bd68fSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8155414bd68fSmrgAC_ARG_ENABLE([shared], 8156414bd68fSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8157414bd68fSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8158414bd68fSmrg [p=${PACKAGE-default} 8159414bd68fSmrg case $enableval in 8160414bd68fSmrg yes) enable_shared=yes ;; 8161414bd68fSmrg no) enable_shared=no ;; 8162414bd68fSmrg *) 8163414bd68fSmrg enable_shared=no 8164414bd68fSmrg # Look at the argument we got. We use all the common list separators. 8165414bd68fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8166414bd68fSmrg for pkg in $enableval; do 8167414bd68fSmrg IFS="$lt_save_ifs" 8168414bd68fSmrg if test "X$pkg" = "X$p"; then 8169414bd68fSmrg enable_shared=yes 8170414bd68fSmrg fi 8171414bd68fSmrg done 8172414bd68fSmrg IFS="$lt_save_ifs" 8173414bd68fSmrg ;; 8174414bd68fSmrg esac], 8175414bd68fSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8176414bd68fSmrg 8177414bd68fSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8178414bd68fSmrg [Whether or not to build shared libraries]) 8179414bd68fSmrg])# _LT_ENABLE_SHARED 8180b425557eSmrg 8181414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8182414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8183b425557eSmrg 8184414bd68fSmrg# Old names: 8185414bd68fSmrgAC_DEFUN([AC_ENABLE_SHARED], 8186414bd68fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8187a1ed278cSmrg]) 8188b425557eSmrg 8189414bd68fSmrgAC_DEFUN([AC_DISABLE_SHARED], 8190414bd68fSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8191414bd68fSmrg]) 8192414bd68fSmrg 8193414bd68fSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8194414bd68fSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8195414bd68fSmrg 81963e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 8197414bd68fSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8198414bd68fSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8199b425557eSmrg 8200ee3138f1Smrg 8201ee3138f1Smrg 8202414bd68fSmrg# _LT_ENABLE_STATIC([DEFAULT]) 8203414bd68fSmrg# ---------------------------- 8204414bd68fSmrg# implement the --enable-static flag, and support the `static' and 8205414bd68fSmrg# `disable-static' LT_INIT options. 8206414bd68fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8207414bd68fSmrgm4_define([_LT_ENABLE_STATIC], 8208414bd68fSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8209414bd68fSmrgAC_ARG_ENABLE([static], 8210414bd68fSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8211414bd68fSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8212414bd68fSmrg [p=${PACKAGE-default} 8213414bd68fSmrg case $enableval in 8214414bd68fSmrg yes) enable_static=yes ;; 8215414bd68fSmrg no) enable_static=no ;; 8216414bd68fSmrg *) 8217414bd68fSmrg enable_static=no 8218414bd68fSmrg # Look at the argument we got. We use all the common list separators. 8219414bd68fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8220414bd68fSmrg for pkg in $enableval; do 8221414bd68fSmrg IFS="$lt_save_ifs" 8222414bd68fSmrg if test "X$pkg" = "X$p"; then 8223414bd68fSmrg enable_static=yes 8224414bd68fSmrg fi 8225414bd68fSmrg done 8226414bd68fSmrg IFS="$lt_save_ifs" 8227414bd68fSmrg ;; 8228414bd68fSmrg esac], 8229414bd68fSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8230ee3138f1Smrg 8231414bd68fSmrg _LT_DECL([build_old_libs], [enable_static], [0], 8232414bd68fSmrg [Whether or not to build static libraries]) 8233414bd68fSmrg])# _LT_ENABLE_STATIC 8234ee3138f1Smrg 8235414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8236414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 82373e72ca8cSmrg 8238414bd68fSmrg# Old names: 8239414bd68fSmrgAC_DEFUN([AC_ENABLE_STATIC], 8240414bd68fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8241414bd68fSmrg]) 82423e72ca8cSmrg 8243414bd68fSmrgAC_DEFUN([AC_DISABLE_STATIC], 8244414bd68fSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8245a1ed278cSmrg]) 824634977a2fSmrg 8247414bd68fSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8248414bd68fSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 824934977a2fSmrg 8250414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 8251414bd68fSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8252414bd68fSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 82533e72ca8cSmrg 82543e72ca8cSmrg 825534977a2fSmrg 8256414bd68fSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8257414bd68fSmrg# ---------------------------------- 8258414bd68fSmrg# implement the --enable-fast-install flag, and support the `fast-install' 8259414bd68fSmrg# and `disable-fast-install' LT_INIT options. 8260414bd68fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8261414bd68fSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 8262414bd68fSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8263414bd68fSmrgAC_ARG_ENABLE([fast-install], 8264414bd68fSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8265414bd68fSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8266414bd68fSmrg [p=${PACKAGE-default} 8267414bd68fSmrg case $enableval in 8268414bd68fSmrg yes) enable_fast_install=yes ;; 8269414bd68fSmrg no) enable_fast_install=no ;; 8270414bd68fSmrg *) 8271414bd68fSmrg enable_fast_install=no 8272414bd68fSmrg # Look at the argument we got. We use all the common list separators. 8273414bd68fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8274414bd68fSmrg for pkg in $enableval; do 8275414bd68fSmrg IFS="$lt_save_ifs" 8276414bd68fSmrg if test "X$pkg" = "X$p"; then 8277414bd68fSmrg enable_fast_install=yes 8278414bd68fSmrg fi 8279414bd68fSmrg done 8280414bd68fSmrg IFS="$lt_save_ifs" 8281414bd68fSmrg ;; 8282414bd68fSmrg esac], 8283414bd68fSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 828434977a2fSmrg 8285414bd68fSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 8286414bd68fSmrg [Whether or not to optimize for fast installation])dnl 8287414bd68fSmrg])# _LT_ENABLE_FAST_INSTALL 8288414bd68fSmrg 8289414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8290414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8291414bd68fSmrg 8292414bd68fSmrg# Old names: 8293414bd68fSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8294414bd68fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8295414bd68fSmrgAC_DIAGNOSE([obsolete], 8296414bd68fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8297414bd68fSmrgthe `fast-install' option into LT_INIT's first parameter.]) 8298414bd68fSmrg]) 8299414bd68fSmrg 8300414bd68fSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8301414bd68fSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8302414bd68fSmrgAC_DIAGNOSE([obsolete], 8303414bd68fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8304414bd68fSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 8305414bd68fSmrg]) 83063e72ca8cSmrg 8307414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 8308414bd68fSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8309414bd68fSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 83103e72ca8cSmrg 83113e72ca8cSmrg 8312414bd68fSmrg# _LT_WITH_PIC([MODE]) 8313414bd68fSmrg# -------------------- 8314414bd68fSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 8315414bd68fSmrg# LT_INIT options. 8316414bd68fSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 8317414bd68fSmrgm4_define([_LT_WITH_PIC], 8318414bd68fSmrg[AC_ARG_WITH([pic], 8319414bd68fSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8320414bd68fSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8321414bd68fSmrg [lt_p=${PACKAGE-default} 8322414bd68fSmrg case $withval in 8323414bd68fSmrg yes|no) pic_mode=$withval ;; 8324414bd68fSmrg *) 8325414bd68fSmrg pic_mode=default 8326414bd68fSmrg # Look at the argument we got. We use all the common list separators. 8327414bd68fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8328414bd68fSmrg for lt_pkg in $withval; do 8329414bd68fSmrg IFS="$lt_save_ifs" 8330414bd68fSmrg if test "X$lt_pkg" = "X$lt_p"; then 8331414bd68fSmrg pic_mode=yes 8332414bd68fSmrg fi 8333414bd68fSmrg done 8334414bd68fSmrg IFS="$lt_save_ifs" 8335414bd68fSmrg ;; 8336414bd68fSmrg esac], 8337414bd68fSmrg [pic_mode=default]) 83383e72ca8cSmrg 8339414bd68fSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 83403e72ca8cSmrg 8341414bd68fSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8342414bd68fSmrg])# _LT_WITH_PIC 834334977a2fSmrg 8344414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8345414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8346ee3138f1Smrg 8347414bd68fSmrg# Old name: 8348414bd68fSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8349414bd68fSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8350414bd68fSmrgAC_DIAGNOSE([obsolete], 8351414bd68fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8352414bd68fSmrgput the `pic-only' option into LT_INIT's first parameter.]) 8353414bd68fSmrg]) 8354ee3138f1Smrg 8355414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 8356414bd68fSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8357ee3138f1Smrg 8358ee3138f1Smrg 8359414bd68fSmrgm4_define([_LTDL_MODE], []) 8360414bd68fSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8361414bd68fSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8362414bd68fSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8363414bd68fSmrg [m4_define([_LTDL_MODE], [recursive])]) 8364414bd68fSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8365414bd68fSmrg [m4_define([_LTDL_MODE], [subproject])]) 83663e72ca8cSmrg 8367414bd68fSmrgm4_define([_LTDL_TYPE], []) 8368414bd68fSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8369414bd68fSmrg [m4_define([_LTDL_TYPE], [installable])]) 8370414bd68fSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8371414bd68fSmrg [m4_define([_LTDL_TYPE], [convenience])]) 83723e72ca8cSmrg 8373414bd68fSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8374a1ed278cSmrg# 8375414bd68fSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 8376414bd68fSmrg# Written by Gary V. Vaughan, 2004 83773e72ca8cSmrg# 83783e72ca8cSmrg# This file is free software; the Free Software Foundation gives 83793e72ca8cSmrg# unlimited permission to copy and/or distribute it, with or without 83803e72ca8cSmrg# modifications, as long as this notice is preserved. 8381ee3138f1Smrg 8382414bd68fSmrg# serial 6 ltsugar.m4 8383ee3138f1Smrg 83843e72ca8cSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8385414bd68fSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 83863e72ca8cSmrg 8387ee3138f1Smrg 8388414bd68fSmrg# lt_join(SEP, ARG1, [ARG2...]) 8389414bd68fSmrg# ----------------------------- 8390414bd68fSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8391414bd68fSmrg# associated separator. 8392414bd68fSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8393414bd68fSmrg# versions in m4sugar had bugs. 8394414bd68fSmrgm4_define([lt_join], 8395414bd68fSmrg[m4_if([$#], [1], [], 8396414bd68fSmrg [$#], [2], [[$2]], 8397414bd68fSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8398414bd68fSmrgm4_define([_lt_join], 8399414bd68fSmrg[m4_if([$#$2], [2], [], 8400414bd68fSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8401ee3138f1Smrg 84023e72ca8cSmrg 8403414bd68fSmrg# lt_car(LIST) 8404414bd68fSmrg# lt_cdr(LIST) 8405414bd68fSmrg# ------------ 8406414bd68fSmrg# Manipulate m4 lists. 8407414bd68fSmrg# These macros are necessary as long as will still need to support 8408414bd68fSmrg# Autoconf-2.59 which quotes differently. 8409414bd68fSmrgm4_define([lt_car], [[$1]]) 8410414bd68fSmrgm4_define([lt_cdr], 8411414bd68fSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8412414bd68fSmrg [$#], 1, [], 8413414bd68fSmrg [m4_dquote(m4_shift($@))])]) 8414414bd68fSmrgm4_define([lt_unquote], $1) 8415ee3138f1Smrg 8416ee3138f1Smrg 8417414bd68fSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8418414bd68fSmrg# ------------------------------------------ 8419414bd68fSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 8420414bd68fSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8421414bd68fSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8422414bd68fSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8423414bd68fSmrg# than defined and empty). 8424414bd68fSmrg# 8425414bd68fSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8426414bd68fSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8427414bd68fSmrgm4_define([lt_append], 8428414bd68fSmrg[m4_define([$1], 8429414bd68fSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8430ee3138f1Smrg 8431b425557eSmrg 8432b425557eSmrg 8433414bd68fSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8434414bd68fSmrg# ---------------------------------------------------------- 8435414bd68fSmrg# Produce a SEP delimited list of all paired combinations of elements of 8436414bd68fSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8437414bd68fSmrg# has the form PREFIXmINFIXSUFFIXn. 8438414bd68fSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8439414bd68fSmrgm4_define([lt_combine], 8440414bd68fSmrg[m4_if(m4_eval([$# > 3]), [1], 8441414bd68fSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8442414bd68fSmrg[[m4_foreach([_Lt_prefix], [$2], 8443414bd68fSmrg [m4_foreach([_Lt_suffix], 8444414bd68fSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8445414bd68fSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8446ee3138f1Smrg 8447ee3138f1Smrg 8448414bd68fSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8449414bd68fSmrg# ----------------------------------------------------------------------- 8450414bd68fSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8451414bd68fSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8452414bd68fSmrgm4_define([lt_if_append_uniq], 8453414bd68fSmrg[m4_ifdef([$1], 8454414bd68fSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8455414bd68fSmrg [lt_append([$1], [$2], [$3])$4], 8456414bd68fSmrg [$5])], 8457414bd68fSmrg [lt_append([$1], [$2], [$3])$4])]) 8458ee3138f1Smrg 8459ee3138f1Smrg 8460414bd68fSmrg# lt_dict_add(DICT, KEY, VALUE) 8461414bd68fSmrg# ----------------------------- 8462414bd68fSmrgm4_define([lt_dict_add], 8463414bd68fSmrg[m4_define([$1($2)], [$3])]) 8464ee3138f1Smrg 8465ee3138f1Smrg 8466414bd68fSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8467414bd68fSmrg# -------------------------------------------- 8468414bd68fSmrgm4_define([lt_dict_add_subkey], 8469414bd68fSmrg[m4_define([$1($2:$3)], [$4])]) 8470ee3138f1Smrg 8471b425557eSmrg 8472414bd68fSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8473414bd68fSmrg# ---------------------------------- 8474414bd68fSmrgm4_define([lt_dict_fetch], 8475414bd68fSmrg[m4_ifval([$3], 8476414bd68fSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8477414bd68fSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8478ee3138f1Smrg 8479a1ed278cSmrg 8480414bd68fSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8481414bd68fSmrg# ----------------------------------------------------------------- 8482414bd68fSmrgm4_define([lt_if_dict_fetch], 8483414bd68fSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8484414bd68fSmrg [$5], 8485414bd68fSmrg [$6])]) 8486a1ed278cSmrg 8487a1ed278cSmrg 8488414bd68fSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8489414bd68fSmrg# -------------------------------------------------------------- 8490414bd68fSmrgm4_define([lt_dict_filter], 8491414bd68fSmrg[m4_if([$5], [], [], 8492414bd68fSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8493414bd68fSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8494414bd68fSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8495414bd68fSmrg]) 84963e72ca8cSmrg 8497414bd68fSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8498414bd68fSmrg# 8499414bd68fSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 8500414bd68fSmrg# Written by Scott James Remnant, 2004 8501414bd68fSmrg# 8502414bd68fSmrg# This file is free software; the Free Software Foundation gives 8503414bd68fSmrg# unlimited permission to copy and/or distribute it, with or without 8504414bd68fSmrg# modifications, as long as this notice is preserved. 85053e72ca8cSmrg 8506414bd68fSmrg# @configure_input@ 85073e72ca8cSmrg 8508414bd68fSmrg# serial 3337 ltversion.m4 8509414bd68fSmrg# This file is part of GNU Libtool 85103e72ca8cSmrg 8511414bd68fSmrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 8512414bd68fSmrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 85133e72ca8cSmrg 8514414bd68fSmrgAC_DEFUN([LTVERSION_VERSION], 8515414bd68fSmrg[macro_version='2.4.2' 8516414bd68fSmrgmacro_revision='1.3337' 8517414bd68fSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8518414bd68fSmrg_LT_DECL(, macro_revision, 0) 8519b425557eSmrg]) 85203e72ca8cSmrg 8521414bd68fSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8522414bd68fSmrg# 8523414bd68fSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 8524414bd68fSmrg# Written by Scott James Remnant, 2004. 8525414bd68fSmrg# 8526414bd68fSmrg# This file is free software; the Free Software Foundation gives 8527414bd68fSmrg# unlimited permission to copy and/or distribute it, with or without 8528414bd68fSmrg# modifications, as long as this notice is preserved. 8529ee3138f1Smrg 8530414bd68fSmrg# serial 5 lt~obsolete.m4 8531ee3138f1Smrg 8532414bd68fSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 8533414bd68fSmrg# 8534414bd68fSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 8535414bd68fSmrg# which have later been changed to m4_define as they aren't part of the 8536414bd68fSmrg# exported API, or moved to Autoconf or Automake where they belong. 8537414bd68fSmrg# 8538414bd68fSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8539414bd68fSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8540414bd68fSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 8541414bd68fSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8542414bd68fSmrg# and doesn't know about Autoconf macros at all.) 8543414bd68fSmrg# 8544414bd68fSmrg# So we provide this file, which has a silly filename so it's always 8545414bd68fSmrg# included after everything else. This provides aclocal with the 8546414bd68fSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8547414bd68fSmrg# because those macros already exist, or will be overwritten later. 8548414bd68fSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8549414bd68fSmrg# 8550414bd68fSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8551414bd68fSmrg# Yes, that means every name once taken will need to remain here until 8552414bd68fSmrg# we give up compatibility with versions before 1.7, at which point 8553414bd68fSmrg# we need to keep only those names which we still refer to. 8554414bd68fSmrg 8555414bd68fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8556414bd68fSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8557414bd68fSmrg 8558414bd68fSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8559414bd68fSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8560414bd68fSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8561414bd68fSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8562414bd68fSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8563414bd68fSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8564414bd68fSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8565414bd68fSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8566414bd68fSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8567414bd68fSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8568414bd68fSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8569414bd68fSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8570414bd68fSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8571414bd68fSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8572414bd68fSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8573414bd68fSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8574414bd68fSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8575414bd68fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8576414bd68fSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8577414bd68fSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8578414bd68fSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8579414bd68fSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8580414bd68fSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8581414bd68fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8582414bd68fSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8583414bd68fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8584414bd68fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8585414bd68fSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8586414bd68fSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8587414bd68fSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8588414bd68fSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8589414bd68fSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8590414bd68fSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8591414bd68fSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8592414bd68fSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8593414bd68fSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8594414bd68fSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8595414bd68fSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8596414bd68fSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8597414bd68fSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8598414bd68fSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8599414bd68fSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8600414bd68fSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8601414bd68fSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8602414bd68fSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8603414bd68fSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8604414bd68fSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8605414bd68fSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8606414bd68fSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8607414bd68fSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8608414bd68fSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8609414bd68fSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8610414bd68fSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8611414bd68fSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8612414bd68fSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8613414bd68fSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8614414bd68fSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8615414bd68fSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8616414bd68fSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8617414bd68fSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8618414bd68fSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 861934977a2fSmrg 8620414bd68fSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 8621414bd68fSmrg# serial 1 (pkg-config-0.24) 8622414bd68fSmrg# 8623414bd68fSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 8624414bd68fSmrg# 8625414bd68fSmrg# This program is free software; you can redistribute it and/or modify 8626414bd68fSmrg# it under the terms of the GNU General Public License as published by 8627414bd68fSmrg# the Free Software Foundation; either version 2 of the License, or 8628414bd68fSmrg# (at your option) any later version. 8629414bd68fSmrg# 8630414bd68fSmrg# This program is distributed in the hope that it will be useful, but 8631414bd68fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 8632414bd68fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8633414bd68fSmrg# General Public License for more details. 8634414bd68fSmrg# 8635414bd68fSmrg# You should have received a copy of the GNU General Public License 8636414bd68fSmrg# along with this program; if not, write to the Free Software 8637414bd68fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 8638414bd68fSmrg# 8639414bd68fSmrg# As a special exception to the GNU General Public License, if you 8640414bd68fSmrg# distribute this file as part of a program that contains a 8641414bd68fSmrg# configuration script generated by Autoconf, you may include it under 8642414bd68fSmrg# the same distribution terms that you use for the rest of that program. 864334977a2fSmrg 8644414bd68fSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 8645414bd68fSmrg# ---------------------------------- 8646414bd68fSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 8647414bd68fSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 8648414bd68fSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 8649414bd68fSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 8650414bd68fSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 8651414bd68fSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 8652414bd68fSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 8653ee3138f1Smrg 8654414bd68fSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8655414bd68fSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8656414bd68fSmrgfi 8657414bd68fSmrgif test -n "$PKG_CONFIG"; then 8658414bd68fSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 8659414bd68fSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8660414bd68fSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8661414bd68fSmrg AC_MSG_RESULT([yes]) 8662414bd68fSmrg else 8663414bd68fSmrg AC_MSG_RESULT([no]) 8664414bd68fSmrg PKG_CONFIG="" 86653e72ca8cSmrg fi 8666414bd68fSmrgfi[]dnl 8667414bd68fSmrg])# PKG_PROG_PKG_CONFIG 8668ee3138f1Smrg 8669414bd68fSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8670414bd68fSmrg# 8671414bd68fSmrg# Check to see whether a particular set of modules exists. Similar 8672414bd68fSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8673414bd68fSmrg# 8674414bd68fSmrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8675414bd68fSmrg# only at the first occurence in configure.ac, so if the first place 8676414bd68fSmrg# it's called might be skipped (such as if it is within an "if", you 8677414bd68fSmrg# have to call PKG_CHECK_EXISTS manually 8678414bd68fSmrg# -------------------------------------------------------------- 8679414bd68fSmrgAC_DEFUN([PKG_CHECK_EXISTS], 8680414bd68fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8681414bd68fSmrgif test -n "$PKG_CONFIG" && \ 8682414bd68fSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8683414bd68fSmrg m4_default([$2], [:]) 8684414bd68fSmrgm4_ifvaln([$3], [else 8685414bd68fSmrg $3])dnl 8686414bd68fSmrgfi]) 86873e72ca8cSmrg 8688414bd68fSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8689414bd68fSmrg# --------------------------------------------- 8690414bd68fSmrgm4_define([_PKG_CONFIG], 8691414bd68fSmrg[if test -n "$$1"; then 8692414bd68fSmrg pkg_cv_[]$1="$$1" 8693414bd68fSmrg elif test -n "$PKG_CONFIG"; then 8694414bd68fSmrg PKG_CHECK_EXISTS([$3], 8695414bd68fSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 8696414bd68fSmrg test "x$?" != "x0" && pkg_failed=yes ], 8697414bd68fSmrg [pkg_failed=yes]) 8698414bd68fSmrg else 8699414bd68fSmrg pkg_failed=untried 8700414bd68fSmrgfi[]dnl 8701414bd68fSmrg])# _PKG_CONFIG 8702ee3138f1Smrg 8703414bd68fSmrg# _PKG_SHORT_ERRORS_SUPPORTED 8704414bd68fSmrg# ----------------------------- 8705414bd68fSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8706414bd68fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8707414bd68fSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8708414bd68fSmrg _pkg_short_errors_supported=yes 8709414bd68fSmrgelse 8710414bd68fSmrg _pkg_short_errors_supported=no 8711414bd68fSmrgfi[]dnl 8712414bd68fSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 8713ee3138f1Smrg 8714ee3138f1Smrg 8715414bd68fSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8716414bd68fSmrg# [ACTION-IF-NOT-FOUND]) 8717414bd68fSmrg# 8718414bd68fSmrg# 8719414bd68fSmrg# Note that if there is a possibility the first call to 8720414bd68fSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8721414bd68fSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8722414bd68fSmrg# 8723414bd68fSmrg# 8724414bd68fSmrg# -------------------------------------------------------------- 8725414bd68fSmrgAC_DEFUN([PKG_CHECK_MODULES], 8726414bd68fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8727414bd68fSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8728414bd68fSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8729ee3138f1Smrg 8730414bd68fSmrgpkg_failed=no 8731414bd68fSmrgAC_MSG_CHECKING([for $1]) 873279a8a9c6Smrg 8733414bd68fSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8734414bd68fSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 873579a8a9c6Smrg 8736414bd68fSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8737414bd68fSmrgand $1[]_LIBS to avoid the need to call pkg-config. 8738414bd68fSmrgSee the pkg-config man page for more details.]) 873979a8a9c6Smrg 8740414bd68fSmrgif test $pkg_failed = yes; then 8741414bd68fSmrg AC_MSG_RESULT([no]) 8742414bd68fSmrg _PKG_SHORT_ERRORS_SUPPORTED 8743414bd68fSmrg if test $_pkg_short_errors_supported = yes; then 8744414bd68fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 8745414bd68fSmrg else 8746414bd68fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 8747414bd68fSmrg fi 8748414bd68fSmrg # Put the nasty error message in config.log where it belongs 8749414bd68fSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 875079a8a9c6Smrg 8751414bd68fSmrg m4_default([$4], [AC_MSG_ERROR( 8752414bd68fSmrg[Package requirements ($2) were not met: 87533e72ca8cSmrg 8754414bd68fSmrg$$1_PKG_ERRORS 87553e72ca8cSmrg 8756414bd68fSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8757414bd68fSmrginstalled software in a non-standard prefix. 87583e72ca8cSmrg 8759414bd68fSmrg_PKG_TEXT])[]dnl 8760414bd68fSmrg ]) 8761414bd68fSmrgelif test $pkg_failed = untried; then 8762414bd68fSmrg AC_MSG_RESULT([no]) 8763414bd68fSmrg m4_default([$4], [AC_MSG_FAILURE( 8764414bd68fSmrg[The pkg-config script could not be found or is too old. Make sure it 8765414bd68fSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 8766414bd68fSmrgpath to pkg-config. 87673e72ca8cSmrg 8768414bd68fSmrg_PKG_TEXT 87693e72ca8cSmrg 8770414bd68fSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 8771414bd68fSmrg ]) 8772414bd68fSmrgelse 8773414bd68fSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8774414bd68fSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8775414bd68fSmrg AC_MSG_RESULT([yes]) 8776414bd68fSmrg $3 8777414bd68fSmrgfi[]dnl 8778414bd68fSmrg])# PKG_CHECK_MODULES 87793e72ca8cSmrg 8780ee3138f1Smrg 8781414bd68fSmrg# PKG_INSTALLDIR(DIRECTORY) 8782414bd68fSmrg# ------------------------- 8783414bd68fSmrg# Substitutes the variable pkgconfigdir as the location where a module 8784414bd68fSmrg# should install pkg-config .pc files. By default the directory is 8785414bd68fSmrg# $libdir/pkgconfig, but the default can be changed by passing 8786414bd68fSmrg# DIRECTORY. The user can override through the --with-pkgconfigdir 8787414bd68fSmrg# parameter. 8788414bd68fSmrgAC_DEFUN([PKG_INSTALLDIR], 8789414bd68fSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 8790414bd68fSmrgm4_pushdef([pkg_description], 8791414bd68fSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 8792414bd68fSmrgAC_ARG_WITH([pkgconfigdir], 8793414bd68fSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 8794414bd68fSmrg [with_pkgconfigdir=]pkg_default) 8795414bd68fSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 8796414bd68fSmrgm4_popdef([pkg_default]) 8797414bd68fSmrgm4_popdef([pkg_description]) 8798414bd68fSmrg]) dnl PKG_INSTALLDIR 8799414bd68fSmrg 8800414bd68fSmrg 8801414bd68fSmrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 8802414bd68fSmrg# ------------------------- 8803414bd68fSmrg# Substitutes the variable noarch_pkgconfigdir as the location where a 8804414bd68fSmrg# module should install arch-independent pkg-config .pc files. By 8805414bd68fSmrg# default the directory is $datadir/pkgconfig, but the default can be 8806414bd68fSmrg# changed by passing DIRECTORY. The user can override through the 8807414bd68fSmrg# --with-noarch-pkgconfigdir parameter. 8808414bd68fSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 8809414bd68fSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 8810414bd68fSmrgm4_pushdef([pkg_description], 8811414bd68fSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 8812414bd68fSmrgAC_ARG_WITH([noarch-pkgconfigdir], 8813414bd68fSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 8814414bd68fSmrg [with_noarch_pkgconfigdir=]pkg_default) 8815414bd68fSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 8816414bd68fSmrgm4_popdef([pkg_default]) 8817414bd68fSmrgm4_popdef([pkg_description]) 8818414bd68fSmrg]) dnl PKG_NOARCH_INSTALLDIR 8819414bd68fSmrg 8820414bd68fSmrg 8821414bd68fSmrg# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 8822414bd68fSmrg# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8823414bd68fSmrg# ------------------------------------------- 8824414bd68fSmrg# Retrieves the value of the pkg-config variable for the given module. 8825414bd68fSmrgAC_DEFUN([PKG_CHECK_VAR], 8826414bd68fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8827414bd68fSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 88283e72ca8cSmrg 8829414bd68fSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 8830414bd68fSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 88313e72ca8cSmrg 8832414bd68fSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 8833414bd68fSmrg])# PKG_CHECK_VAR 8834ee3138f1Smrg 8835414bd68fSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 8836414bd68fSmrgdnl 8837414bd68fSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 8838414bd68fSmrgdnl 8839414bd68fSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 8840414bd68fSmrgdnl copy of this software and associated documentation files (the "Software"), 8841414bd68fSmrgdnl to deal in the Software without restriction, including without limitation 8842414bd68fSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 8843414bd68fSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 8844414bd68fSmrgdnl Software is furnished to do so, subject to the following conditions: 8845414bd68fSmrgdnl 8846414bd68fSmrgdnl The above copyright notice and this permission notice (including the next 8847414bd68fSmrgdnl paragraph) shall be included in all copies or substantial portions of the 8848414bd68fSmrgdnl Software. 8849414bd68fSmrgdnl 8850414bd68fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 8851414bd68fSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 8852414bd68fSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 8853414bd68fSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 8854414bd68fSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 8855414bd68fSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 8856414bd68fSmrgdnl DEALINGS IN THE SOFTWARE. 88573e72ca8cSmrg 8858414bd68fSmrg# XORG_MACROS_VERSION(required-version) 8859414bd68fSmrg# ------------------------------------- 8860414bd68fSmrg# Minimum version: 1.1.0 8861a1ed278cSmrg# 8862414bd68fSmrg# If you're using a macro added in Version 1.1 or newer, include this in 8863414bd68fSmrg# your configure.ac with the minimum required version, such as: 8864414bd68fSmrg# XORG_MACROS_VERSION(1.1) 88653e72ca8cSmrg# 8866414bd68fSmrg# To ensure that this macro is defined, also add: 8867414bd68fSmrg# m4_ifndef([XORG_MACROS_VERSION], 8868414bd68fSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 8869414bd68fSmrg# 8870414bd68fSmrg# 8871414bd68fSmrg# See the "minimum version" comment for each macro you use to see what 8872414bd68fSmrg# version you require. 8873414bd68fSmrgm4_defun([XORG_MACROS_VERSION],[ 8874414bd68fSmrgm4_define([vers_have], [1.19.0]) 8875414bd68fSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 8876414bd68fSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 8877414bd68fSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 8878414bd68fSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 8879414bd68fSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 8880414bd68fSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 8881414bd68fSmrgm4_undefine([vers_have]) 8882414bd68fSmrgm4_undefine([maj_have]) 8883414bd68fSmrgm4_undefine([maj_needed]) 8884414bd68fSmrg]) # XORG_MACROS_VERSION 8885ee3138f1Smrg 8886414bd68fSmrg# XORG_PROG_RAWCPP() 8887414bd68fSmrg# ------------------ 8888414bd68fSmrg# Minimum version: 1.0.0 8889414bd68fSmrg# 8890414bd68fSmrg# Find cpp program and necessary flags for use in pre-processing text files 8891414bd68fSmrg# such as man pages and config files 8892414bd68fSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 8893414bd68fSmrgAC_REQUIRE([AC_PROG_CPP]) 8894414bd68fSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 8895414bd68fSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 8896ee3138f1Smrg 8897414bd68fSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 8898414bd68fSmrg# which is not the best choice for supporting other OS'es, but covers most 8899414bd68fSmrg# of the ones we need for now. 8900414bd68fSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 8901414bd68fSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 8902414bd68fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8903414bd68fSmrg AC_MSG_RESULT([no]) 8904414bd68fSmrgelse 8905414bd68fSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8906414bd68fSmrg RAWCPPFLAGS=-undef 8907414bd68fSmrg AC_MSG_RESULT([yes]) 8908414bd68fSmrg # under Cygwin unix is still defined even with -undef 8909414bd68fSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8910414bd68fSmrg RAWCPPFLAGS="-undef -ansi" 8911414bd68fSmrg AC_MSG_RESULT([yes, with -ansi]) 8912414bd68fSmrg else 8913414bd68fSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 8914414bd68fSmrg fi 8915414bd68fSmrgfi 8916414bd68fSmrgrm -f conftest.$ac_ext 8917ee3138f1Smrg 8918414bd68fSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 8919414bd68fSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 8920414bd68fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8921414bd68fSmrg AC_MSG_RESULT([no]) 8922414bd68fSmrgelse 8923414bd68fSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8924414bd68fSmrg TRADITIONALCPPFLAGS="-traditional" 8925414bd68fSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 8926414bd68fSmrg AC_MSG_RESULT([yes]) 8927414bd68fSmrg else 8928414bd68fSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 8929414bd68fSmrg fi 8930414bd68fSmrgfi 8931414bd68fSmrgrm -f conftest.$ac_ext 8932414bd68fSmrgAC_SUBST(RAWCPPFLAGS) 8933414bd68fSmrgAC_SUBST(TRADITIONALCPPFLAGS) 8934414bd68fSmrg]) # XORG_PROG_RAWCPP 8935ee3138f1Smrg 8936414bd68fSmrg# XORG_MANPAGE_SECTIONS() 8937414bd68fSmrg# ----------------------- 8938414bd68fSmrg# Minimum version: 1.0.0 8939414bd68fSmrg# 8940414bd68fSmrg# Determine which sections man pages go in for the different man page types 8941414bd68fSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 8942414bd68fSmrg# Not sure if there's any better way than just hardcoding by OS name. 8943414bd68fSmrg# Override default settings by setting environment variables 8944414bd68fSmrg# Added MAN_SUBSTS in version 1.8 8945414bd68fSmrg# Added AC_PROG_SED in version 1.8 8946b425557eSmrg 8947414bd68fSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 8948414bd68fSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 8949414bd68fSmrgAC_REQUIRE([AC_PROG_SED]) 895034977a2fSmrg 8951414bd68fSmrgif test x$APP_MAN_SUFFIX = x ; then 8952414bd68fSmrg APP_MAN_SUFFIX=1 8953414bd68fSmrgfi 8954414bd68fSmrgif test x$APP_MAN_DIR = x ; then 8955414bd68fSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 8956414bd68fSmrgfi 895734977a2fSmrg 8958414bd68fSmrgif test x$LIB_MAN_SUFFIX = x ; then 8959414bd68fSmrg LIB_MAN_SUFFIX=3 8960414bd68fSmrgfi 8961414bd68fSmrgif test x$LIB_MAN_DIR = x ; then 8962414bd68fSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 8963414bd68fSmrgfi 896434977a2fSmrg 8965414bd68fSmrgif test x$FILE_MAN_SUFFIX = x ; then 8966414bd68fSmrg case $host_os in 8967414bd68fSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 8968414bd68fSmrg *) FILE_MAN_SUFFIX=5 ;; 8969414bd68fSmrg esac 8970414bd68fSmrgfi 8971414bd68fSmrgif test x$FILE_MAN_DIR = x ; then 8972414bd68fSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 8973414bd68fSmrgfi 897434977a2fSmrg 8975414bd68fSmrgif test x$MISC_MAN_SUFFIX = x ; then 8976414bd68fSmrg case $host_os in 8977414bd68fSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 8978414bd68fSmrg *) MISC_MAN_SUFFIX=7 ;; 8979414bd68fSmrg esac 8980414bd68fSmrgfi 8981414bd68fSmrgif test x$MISC_MAN_DIR = x ; then 8982414bd68fSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 8983414bd68fSmrgfi 898434977a2fSmrg 8985414bd68fSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 8986414bd68fSmrg case $host_os in 8987414bd68fSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 8988414bd68fSmrg *) DRIVER_MAN_SUFFIX=4 ;; 8989414bd68fSmrg esac 8990414bd68fSmrgfi 8991414bd68fSmrgif test x$DRIVER_MAN_DIR = x ; then 8992414bd68fSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 8993414bd68fSmrgfi 899434977a2fSmrg 8995414bd68fSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 8996414bd68fSmrg case $host_os in 8997414bd68fSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 8998414bd68fSmrg *) ADMIN_MAN_SUFFIX=8 ;; 8999414bd68fSmrg esac 9000414bd68fSmrgfi 9001414bd68fSmrgif test x$ADMIN_MAN_DIR = x ; then 9002414bd68fSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9003414bd68fSmrgfi 9004b425557eSmrg 9005b425557eSmrg 9006414bd68fSmrgAC_SUBST([APP_MAN_SUFFIX]) 9007414bd68fSmrgAC_SUBST([LIB_MAN_SUFFIX]) 9008414bd68fSmrgAC_SUBST([FILE_MAN_SUFFIX]) 9009414bd68fSmrgAC_SUBST([MISC_MAN_SUFFIX]) 9010414bd68fSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 9011414bd68fSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 9012414bd68fSmrgAC_SUBST([APP_MAN_DIR]) 9013414bd68fSmrgAC_SUBST([LIB_MAN_DIR]) 9014414bd68fSmrgAC_SUBST([FILE_MAN_DIR]) 9015414bd68fSmrgAC_SUBST([MISC_MAN_DIR]) 9016414bd68fSmrgAC_SUBST([DRIVER_MAN_DIR]) 9017414bd68fSmrgAC_SUBST([ADMIN_MAN_DIR]) 9018b425557eSmrg 9019414bd68fSmrgXORG_MAN_PAGE="X Version 11" 9020414bd68fSmrgAC_SUBST([XORG_MAN_PAGE]) 9021414bd68fSmrgMAN_SUBSTS="\ 9022414bd68fSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9023414bd68fSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9024414bd68fSmrg -e 's|__xservername__|Xorg|g' \ 9025414bd68fSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 9026414bd68fSmrg -e 's|__projectroot__|\$(prefix)|g' \ 9027414bd68fSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9028414bd68fSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9029414bd68fSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9030414bd68fSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9031414bd68fSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9032414bd68fSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9033414bd68fSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9034414bd68fSmrgAC_SUBST([MAN_SUBSTS]) 903534977a2fSmrg 9036414bd68fSmrg]) # XORG_MANPAGE_SECTIONS 903734977a2fSmrg 9038414bd68fSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9039414bd68fSmrg# ------------------------ 9040414bd68fSmrg# Minimum version: 1.7.0 9041414bd68fSmrg# 9042414bd68fSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9043414bd68fSmrg# provided by xorg-sgml-doctools, if installed. 9044414bd68fSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9045414bd68fSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9046414bd68fSmrgXORG_SGML_PATH= 9047414bd68fSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9048414bd68fSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9049414bd68fSmrg [m4_ifval([$1],[:], 9050414bd68fSmrg [if test x"$cross_compiling" != x"yes" ; then 9051414bd68fSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9052414bd68fSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 9053414bd68fSmrg fi]) 9054414bd68fSmrg ]) 905534977a2fSmrg 9056414bd68fSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9057414bd68fSmrg# the path and the name of the doc stylesheet 9058414bd68fSmrgif test "x$XORG_SGML_PATH" != "x" ; then 9059414bd68fSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 9060414bd68fSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9061414bd68fSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9062414bd68fSmrgelse 9063414bd68fSmrg AC_MSG_RESULT([no]) 9064414bd68fSmrgfi 9065a1ed278cSmrg 9066414bd68fSmrgAC_SUBST(XORG_SGML_PATH) 9067414bd68fSmrgAC_SUBST(STYLESHEET_SRCDIR) 9068414bd68fSmrgAC_SUBST(XSL_STYLESHEET) 9069414bd68fSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9070414bd68fSmrg]) # XORG_CHECK_SGML_DOCTOOLS 907134977a2fSmrg 9072414bd68fSmrg# XORG_CHECK_LINUXDOC 9073414bd68fSmrg# ------------------- 9074414bd68fSmrg# Minimum version: 1.0.0 9075414bd68fSmrg# 9076414bd68fSmrg# Defines the variable MAKE_TEXT if the necessary tools and 9077414bd68fSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9078414bd68fSmrg# Whether or not the necessary tools and files are found can be checked 9079414bd68fSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9080414bd68fSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9081414bd68fSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9082414bd68fSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 908334977a2fSmrg 9084414bd68fSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 908534977a2fSmrg 9086414bd68fSmrgAC_MSG_CHECKING([whether to build documentation]) 9087a1ed278cSmrg 9088414bd68fSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9089414bd68fSmrg BUILDDOC=yes 9090414bd68fSmrgelse 9091414bd68fSmrg BUILDDOC=no 9092414bd68fSmrgfi 90933e72ca8cSmrg 9094414bd68fSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 909534977a2fSmrg 9096414bd68fSmrgAC_MSG_RESULT([$BUILDDOC]) 90973e72ca8cSmrg 9098414bd68fSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 90993e72ca8cSmrg 9100414bd68fSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9101414bd68fSmrg BUILDPDFDOC=yes 9102414bd68fSmrgelse 9103414bd68fSmrg BUILDPDFDOC=no 9104414bd68fSmrgfi 91053e72ca8cSmrg 9106414bd68fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 91073e72ca8cSmrg 9108414bd68fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9109ee3138f1Smrg 9110414bd68fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9111414bd68fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9112414bd68fSmrgMAKE_PDF="$PS2PDF" 9113414bd68fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9114ee3138f1Smrg 9115414bd68fSmrgAC_SUBST(MAKE_TEXT) 9116414bd68fSmrgAC_SUBST(MAKE_PS) 9117414bd68fSmrgAC_SUBST(MAKE_PDF) 9118414bd68fSmrgAC_SUBST(MAKE_HTML) 9119414bd68fSmrg]) # XORG_CHECK_LINUXDOC 9120ee3138f1Smrg 9121414bd68fSmrg# XORG_CHECK_DOCBOOK 9122414bd68fSmrg# ------------------- 9123414bd68fSmrg# Minimum version: 1.0.0 91243e72ca8cSmrg# 9125414bd68fSmrg# Checks for the ability to build output formats from SGML DocBook source. 9126414bd68fSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9127414bd68fSmrg# indicates whether the necessary tools and files are found and, if set, 9128414bd68fSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9129414bd68fSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9130414bd68fSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9131a1ed278cSmrg 9132414bd68fSmrgBUILDTXTDOC=no 9133414bd68fSmrgBUILDPDFDOC=no 9134414bd68fSmrgBUILDPSDOC=no 9135414bd68fSmrgBUILDHTMLDOC=no 9136414bd68fSmrg 9137414bd68fSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9138414bd68fSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9139414bd68fSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9140414bd68fSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9141414bd68fSmrg 9142414bd68fSmrgAC_MSG_CHECKING([whether to build text documentation]) 9143414bd68fSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9144414bd68fSmrg test x$BUILD_TXTDOC != xno; then 9145414bd68fSmrg BUILDTXTDOC=yes 9146414bd68fSmrgfi 9147414bd68fSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9148414bd68fSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9149414bd68fSmrg 9150414bd68fSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9151414bd68fSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9152414bd68fSmrg test x$BUILD_PDFDOC != xno; then 9153414bd68fSmrg BUILDPDFDOC=yes 9154414bd68fSmrgfi 9155414bd68fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9156414bd68fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9157414bd68fSmrg 9158414bd68fSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9159414bd68fSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9160414bd68fSmrg test x$BUILD_PSDOC != xno; then 9161414bd68fSmrg BUILDPSDOC=yes 9162414bd68fSmrgfi 9163414bd68fSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9164414bd68fSmrgAC_MSG_RESULT([$BUILDPSDOC]) 9165414bd68fSmrg 9166414bd68fSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9167414bd68fSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9168414bd68fSmrg test x$BUILD_HTMLDOC != xno; then 9169414bd68fSmrg BUILDHTMLDOC=yes 9170414bd68fSmrgfi 9171414bd68fSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9172414bd68fSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9173414bd68fSmrg 9174414bd68fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9175414bd68fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9176414bd68fSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9177414bd68fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9178414bd68fSmrg 9179414bd68fSmrgAC_SUBST(MAKE_TEXT) 9180414bd68fSmrgAC_SUBST(MAKE_PS) 9181414bd68fSmrgAC_SUBST(MAKE_PDF) 9182414bd68fSmrgAC_SUBST(MAKE_HTML) 9183414bd68fSmrg]) # XORG_CHECK_DOCBOOK 9184414bd68fSmrg 9185414bd68fSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9186414bd68fSmrg# ---------------- 9187414bd68fSmrg# Minimum version: 1.5.0 9188414bd68fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9189a1ed278cSmrg# 9190414bd68fSmrg# Documentation tools are not always available on all platforms and sometimes 9191414bd68fSmrg# not at the appropriate level. This macro enables a module to test for the 9192414bd68fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9193414bd68fSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9194414bd68fSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9195414bd68fSmrg# --with-xmlto assumes 'auto'. 91963e72ca8cSmrg# 9197414bd68fSmrg# Interface to module: 9198414bd68fSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9199414bd68fSmrg# XMLTO: returns the path of the xmlto program found 9200414bd68fSmrg# returns the path set by the user in the environment 9201414bd68fSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9202414bd68fSmrg# 'no' user instructs the module not to use xmlto 92033e72ca8cSmrg# 9204414bd68fSmrg# Added in version 1.10.0 9205414bd68fSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9206414bd68fSmrg# xmlto for text output requires either lynx, links, or w3m browsers 92073e72ca8cSmrg# 9208414bd68fSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9209414bd68fSmrg# 9210414bd68fSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9211414bd68fSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9212414bd68fSmrgm4_define([_defopt], m4_default([$2], [auto])) 9213414bd68fSmrgAC_ARG_WITH(xmlto, 9214414bd68fSmrg AS_HELP_STRING([--with-xmlto], 9215414bd68fSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9216414bd68fSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9217414bd68fSmrgm4_undefine([_defopt]) 9218b425557eSmrg 9219414bd68fSmrgif test "x$use_xmlto" = x"auto"; then 9220414bd68fSmrg AC_PATH_PROG([XMLTO], [xmlto]) 9221414bd68fSmrg if test "x$XMLTO" = "x"; then 9222414bd68fSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9223414bd68fSmrg have_xmlto=no 9224414bd68fSmrg else 9225414bd68fSmrg have_xmlto=yes 9226414bd68fSmrg fi 9227414bd68fSmrgelif test "x$use_xmlto" = x"yes" ; then 9228414bd68fSmrg AC_PATH_PROG([XMLTO], [xmlto]) 9229414bd68fSmrg if test "x$XMLTO" = "x"; then 9230414bd68fSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9231414bd68fSmrg fi 9232414bd68fSmrg have_xmlto=yes 9233414bd68fSmrgelif test "x$use_xmlto" = x"no" ; then 9234414bd68fSmrg if test "x$XMLTO" != "x"; then 9235414bd68fSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9236414bd68fSmrg fi 9237414bd68fSmrg have_xmlto=no 9238414bd68fSmrgelse 9239414bd68fSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 92403e72ca8cSmrgfi 92413e72ca8cSmrg 9242414bd68fSmrg# Test for a minimum version of xmlto, if provided. 9243414bd68fSmrgm4_ifval([$1], 9244414bd68fSmrg[if test "$have_xmlto" = yes; then 9245414bd68fSmrg # scrape the xmlto version 9246414bd68fSmrg AC_MSG_CHECKING([the xmlto version]) 9247414bd68fSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9248414bd68fSmrg AC_MSG_RESULT([$xmlto_version]) 9249414bd68fSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9250414bd68fSmrg [if test "x$use_xmlto" = xauto; then 9251414bd68fSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9252414bd68fSmrg have_xmlto=no 9253414bd68fSmrg else 9254414bd68fSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9255414bd68fSmrg fi]) 92563e72ca8cSmrgfi]) 92573e72ca8cSmrg 9258414bd68fSmrg# Test for the ability of xmlto to generate a text target 9259414bd68fSmrghave_xmlto_text=no 9260414bd68fSmrgcat > conftest.xml << "EOF" 9261414bd68fSmrgEOF 9262414bd68fSmrgAS_IF([test "$have_xmlto" = yes], 9263414bd68fSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9264414bd68fSmrg [have_xmlto_text=yes], 9265414bd68fSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9266414bd68fSmrgrm -f conftest.xml 9267414bd68fSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9268414bd68fSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9269414bd68fSmrg]) # XORG_WITH_XMLTO 92703e72ca8cSmrg 9271414bd68fSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9272414bd68fSmrg# -------------------------------------------- 9273414bd68fSmrg# Minimum version: 1.12.0 9274414bd68fSmrg# Minimum version for optional DEFAULT argument: 1.12.0 9275414bd68fSmrg# 9276414bd68fSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9277414bd68fSmrg# XML-based language used for the transformation of XML documents. 9278414bd68fSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9279414bd68fSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9280414bd68fSmrg# The XSLT processor is often used as a standalone tool for transformations. 9281414bd68fSmrg# It should not be assumed that this tool is used only to work with documnetation. 9282414bd68fSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9283414bd68fSmrg# 9284414bd68fSmrg# Interface to module: 9285414bd68fSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9286414bd68fSmrg# XSLTPROC: returns the path of the xsltproc program found 9287414bd68fSmrg# returns the path set by the user in the environment 9288414bd68fSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9289414bd68fSmrg# 'no' user instructs the module not to use xsltproc 9290414bd68fSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9291414bd68fSmrg# 9292414bd68fSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9293414bd68fSmrg# 9294414bd68fSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9295414bd68fSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9296414bd68fSmrg# Preserves the interface, should it be implemented later 9297414bd68fSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9298414bd68fSmrgm4_define([_defopt], m4_default([$2], [auto])) 9299414bd68fSmrgAC_ARG_WITH(xsltproc, 9300414bd68fSmrg AS_HELP_STRING([--with-xsltproc], 9301414bd68fSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9302414bd68fSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9303414bd68fSmrgm4_undefine([_defopt]) 9304414bd68fSmrg 9305414bd68fSmrgif test "x$use_xsltproc" = x"auto"; then 9306414bd68fSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9307414bd68fSmrg if test "x$XSLTPROC" = "x"; then 9308414bd68fSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9309414bd68fSmrg have_xsltproc=no 9310414bd68fSmrg else 9311414bd68fSmrg have_xsltproc=yes 9312414bd68fSmrg fi 9313414bd68fSmrgelif test "x$use_xsltproc" = x"yes" ; then 9314414bd68fSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9315414bd68fSmrg if test "x$XSLTPROC" = "x"; then 9316414bd68fSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9317414bd68fSmrg fi 9318414bd68fSmrg have_xsltproc=yes 9319414bd68fSmrgelif test "x$use_xsltproc" = x"no" ; then 9320414bd68fSmrg if test "x$XSLTPROC" != "x"; then 9321414bd68fSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9322414bd68fSmrg fi 9323414bd68fSmrg have_xsltproc=no 93243e72ca8cSmrgelse 9325414bd68fSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9326414bd68fSmrgfi 9327b425557eSmrg 9328414bd68fSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9329414bd68fSmrg]) # XORG_WITH_XSLTPROC 9330b425557eSmrg 9331414bd68fSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9332414bd68fSmrg# ---------------------------------------- 9333414bd68fSmrg# Minimum version: 1.15.0 93343e72ca8cSmrg# 9335414bd68fSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 9336414bd68fSmrg# scanning arbitrary text files, extracting information from those text files, 9337414bd68fSmrg# and printing reports based on that information. 93383e72ca8cSmrg# 9339414bd68fSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 93403e72ca8cSmrg# 9341414bd68fSmrg# Interface to module: 9342414bd68fSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 9343414bd68fSmrg# PERL: returns the path of the perl program found 9344414bd68fSmrg# returns the path set by the user in the environment 9345414bd68fSmrg# --with-perl: 'yes' user instructs the module to use perl 9346414bd68fSmrg# 'no' user instructs the module not to use perl 9347414bd68fSmrg# have_perl: returns yes if perl found in PATH or no 93483e72ca8cSmrg# 9349414bd68fSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9350414bd68fSmrg# 9351414bd68fSmrgAC_DEFUN([XORG_WITH_PERL],[ 9352414bd68fSmrgAC_ARG_VAR([PERL], [Path to perl command]) 9353414bd68fSmrg# Preserves the interface, should it be implemented later 9354414bd68fSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9355414bd68fSmrgm4_define([_defopt], m4_default([$2], [auto])) 9356414bd68fSmrgAC_ARG_WITH(perl, 9357414bd68fSmrg AS_HELP_STRING([--with-perl], 9358414bd68fSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 9359414bd68fSmrg [use_perl=$withval], [use_perl=]_defopt) 9360414bd68fSmrgm4_undefine([_defopt]) 93613e72ca8cSmrg 9362414bd68fSmrgif test "x$use_perl" = x"auto"; then 9363414bd68fSmrg AC_PATH_PROG([PERL], [perl]) 9364414bd68fSmrg if test "x$PERL" = "x"; then 9365414bd68fSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9366414bd68fSmrg have_perl=no 9367414bd68fSmrg else 9368414bd68fSmrg have_perl=yes 9369414bd68fSmrg fi 9370414bd68fSmrgelif test "x$use_perl" = x"yes" ; then 9371414bd68fSmrg AC_PATH_PROG([PERL], [perl]) 9372414bd68fSmrg if test "x$PERL" = "x"; then 9373414bd68fSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9374414bd68fSmrg fi 9375414bd68fSmrg have_perl=yes 9376414bd68fSmrgelif test "x$use_perl" = x"no" ; then 9377414bd68fSmrg if test "x$PERL" != "x"; then 9378414bd68fSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9379414bd68fSmrg fi 9380414bd68fSmrg have_perl=no 93813e72ca8cSmrgelse 9382414bd68fSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9383414bd68fSmrgfi 9384b425557eSmrg 9385414bd68fSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9386414bd68fSmrg]) # XORG_WITH_PERL 938734977a2fSmrg 9388414bd68fSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9389414bd68fSmrg# ---------------- 9390414bd68fSmrg# Minimum version: 1.5.0 9391414bd68fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9392a1ed278cSmrg# 9393414bd68fSmrg# Documentation tools are not always available on all platforms and sometimes 9394414bd68fSmrg# not at the appropriate level. This macro enables a module to test for the 9395414bd68fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9396414bd68fSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9397414bd68fSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9398414bd68fSmrg# --with-asciidoc assumes 'auto'. 9399a1ed278cSmrg# 9400414bd68fSmrg# Interface to module: 9401414bd68fSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9402414bd68fSmrg# ASCIIDOC: returns the path of the asciidoc program found 9403414bd68fSmrg# returns the path set by the user in the environment 9404414bd68fSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9405414bd68fSmrg# 'no' user instructs the module not to use asciidoc 9406a1ed278cSmrg# 9407414bd68fSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9408a1ed278cSmrg# 9409414bd68fSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 9410414bd68fSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9411414bd68fSmrgm4_define([_defopt], m4_default([$2], [auto])) 9412414bd68fSmrgAC_ARG_WITH(asciidoc, 9413414bd68fSmrg AS_HELP_STRING([--with-asciidoc], 9414414bd68fSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9415414bd68fSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9416414bd68fSmrgm4_undefine([_defopt]) 9417ee3138f1Smrg 9418414bd68fSmrgif test "x$use_asciidoc" = x"auto"; then 9419414bd68fSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9420414bd68fSmrg if test "x$ASCIIDOC" = "x"; then 9421414bd68fSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9422414bd68fSmrg have_asciidoc=no 9423414bd68fSmrg else 9424414bd68fSmrg have_asciidoc=yes 9425414bd68fSmrg fi 9426414bd68fSmrgelif test "x$use_asciidoc" = x"yes" ; then 9427414bd68fSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9428414bd68fSmrg if test "x$ASCIIDOC" = "x"; then 9429414bd68fSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9430414bd68fSmrg fi 9431414bd68fSmrg have_asciidoc=yes 9432414bd68fSmrgelif test "x$use_asciidoc" = x"no" ; then 9433414bd68fSmrg if test "x$ASCIIDOC" != "x"; then 9434414bd68fSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9435414bd68fSmrg fi 9436414bd68fSmrg have_asciidoc=no 9437a1ed278cSmrgelse 9438414bd68fSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9439a1ed278cSmrgfi 9440414bd68fSmrgm4_ifval([$1], 9441414bd68fSmrg[if test "$have_asciidoc" = yes; then 9442414bd68fSmrg # scrape the asciidoc version 9443414bd68fSmrg AC_MSG_CHECKING([the asciidoc version]) 9444414bd68fSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9445414bd68fSmrg AC_MSG_RESULT([$asciidoc_version]) 9446414bd68fSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 9447414bd68fSmrg [if test "x$use_asciidoc" = xauto; then 9448414bd68fSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9449414bd68fSmrg have_asciidoc=no 9450414bd68fSmrg else 9451414bd68fSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9452414bd68fSmrg fi]) 9453414bd68fSmrgfi]) 9454414bd68fSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9455414bd68fSmrg]) # XORG_WITH_ASCIIDOC 9456ee3138f1Smrg 9457414bd68fSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 9458414bd68fSmrg# ------------------------------------------- 9459414bd68fSmrg# Minimum version: 1.5.0 9460414bd68fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9461414bd68fSmrg# Minimum version for optional DOT checking: 1.18.0 9462a1ed278cSmrg# 9463414bd68fSmrg# Documentation tools are not always available on all platforms and sometimes 9464414bd68fSmrg# not at the appropriate level. This macro enables a module to test for the 9465414bd68fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9466414bd68fSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 9467414bd68fSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 9468414bd68fSmrg# --with-doxygen assumes 'auto'. 9469414bd68fSmrg# 9470414bd68fSmrg# Interface to module: 9471414bd68fSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9472414bd68fSmrg# DOXYGEN: returns the path of the doxygen program found 9473414bd68fSmrg# returns the path set by the user in the environment 9474414bd68fSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 9475414bd68fSmrg# 'no' user instructs the module not to use doxygen 9476414bd68fSmrg# 9477414bd68fSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9478414bd68fSmrg# 9479414bd68fSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 9480414bd68fSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 9481414bd68fSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 9482414bd68fSmrgm4_define([_defopt], m4_default([$2], [auto])) 9483414bd68fSmrgAC_ARG_WITH(doxygen, 9484414bd68fSmrg AS_HELP_STRING([--with-doxygen], 9485414bd68fSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 9486414bd68fSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 9487414bd68fSmrgm4_undefine([_defopt]) 9488ee3138f1Smrg 9489414bd68fSmrgif test "x$use_doxygen" = x"auto"; then 9490414bd68fSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9491414bd68fSmrg if test "x$DOXYGEN" = "x"; then 9492414bd68fSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 9493414bd68fSmrg have_doxygen=no 9494414bd68fSmrg else 9495414bd68fSmrg have_doxygen=yes 9496414bd68fSmrg fi 9497414bd68fSmrgelif test "x$use_doxygen" = x"yes" ; then 9498414bd68fSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9499414bd68fSmrg if test "x$DOXYGEN" = "x"; then 9500414bd68fSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 9501414bd68fSmrg fi 9502414bd68fSmrg have_doxygen=yes 9503414bd68fSmrgelif test "x$use_doxygen" = x"no" ; then 9504414bd68fSmrg if test "x$DOXYGEN" != "x"; then 9505414bd68fSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 9506414bd68fSmrg fi 9507414bd68fSmrg have_doxygen=no 9508414bd68fSmrgelse 9509414bd68fSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 9510a1ed278cSmrgfi 9511414bd68fSmrgm4_ifval([$1], 9512414bd68fSmrg[if test "$have_doxygen" = yes; then 9513414bd68fSmrg # scrape the doxygen version 9514414bd68fSmrg AC_MSG_CHECKING([the doxygen version]) 9515414bd68fSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 9516414bd68fSmrg AC_MSG_RESULT([$doxygen_version]) 9517414bd68fSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 9518414bd68fSmrg [if test "x$use_doxygen" = xauto; then 9519414bd68fSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 9520414bd68fSmrg have_doxygen=no 9521414bd68fSmrg else 9522414bd68fSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 9523414bd68fSmrg fi]) 9524414bd68fSmrgfi]) 9525ee3138f1Smrg 9526414bd68fSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 9527414bd68fSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 9528414bd68fSmrgdnl HAVE_DOT = @HAVE_DOT@ 9529414bd68fSmrgHAVE_DOT=no 9530414bd68fSmrgif test "x$have_doxygen" = "xyes"; then 9531414bd68fSmrg AC_PATH_PROG([DOT], [dot]) 9532414bd68fSmrg if test "x$DOT" != "x"; then 9533414bd68fSmrg HAVE_DOT=yes 9534414bd68fSmrg fi 9535a1ed278cSmrgfi 9536ee3138f1Smrg 9537414bd68fSmrgAC_SUBST([HAVE_DOT]) 9538414bd68fSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 9539414bd68fSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 9540414bd68fSmrg]) # XORG_WITH_DOXYGEN 9541ee3138f1Smrg 9542414bd68fSmrg# XORG_WITH_GROFF([DEFAULT]) 9543414bd68fSmrg# ---------------- 9544414bd68fSmrg# Minimum version: 1.6.0 9545414bd68fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9546414bd68fSmrg# 9547414bd68fSmrg# Documentation tools are not always available on all platforms and sometimes 9548414bd68fSmrg# not at the appropriate level. This macro enables a module to test for the 9549414bd68fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9550414bd68fSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 9551414bd68fSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 9552414bd68fSmrg# --with-groff assumes 'auto'. 9553414bd68fSmrg# 9554414bd68fSmrg# Interface to module: 9555414bd68fSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 9556414bd68fSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 9557414bd68fSmrg# HAVE_GROFF_MS: the -ms macros package 9558414bd68fSmrg# GROFF: returns the path of the groff program found 9559414bd68fSmrg# returns the path set by the user in the environment 9560414bd68fSmrg# --with-groff: 'yes' user instructs the module to use groff 9561414bd68fSmrg# 'no' user instructs the module not to use groff 9562414bd68fSmrg# 9563414bd68fSmrg# Added in version 1.9.0: 9564414bd68fSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 9565414bd68fSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 9566414bd68fSmrg# psselect from the psutils package. 9567414bd68fSmrg# the ghostcript package. Refer to the grohtml man pages 9568414bd68fSmrg# 9569414bd68fSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 9570414bd68fSmrg# 9571414bd68fSmrg# OS and distros often splits groff in a basic and full package, the former 9572414bd68fSmrg# having the groff program and the later having devices, fonts and macros 9573414bd68fSmrg# Checking for the groff executable is not enough. 9574414bd68fSmrg# 9575414bd68fSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 9576414bd68fSmrg# unset HAVE_GROFF or GROFF env variables. 9577414bd68fSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 9578414bd68fSmrg# 9579414bd68fSmrgAC_DEFUN([XORG_WITH_GROFF],[ 9580414bd68fSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 9581414bd68fSmrgm4_define([_defopt], m4_default([$1], [auto])) 9582414bd68fSmrgAC_ARG_WITH(groff, 9583414bd68fSmrg AS_HELP_STRING([--with-groff], 9584414bd68fSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 9585414bd68fSmrg [use_groff=$withval], [use_groff=]_defopt) 9586414bd68fSmrgm4_undefine([_defopt]) 9587ee3138f1Smrg 9588414bd68fSmrgif test "x$use_groff" = x"auto"; then 9589414bd68fSmrg AC_PATH_PROG([GROFF], [groff]) 9590414bd68fSmrg if test "x$GROFF" = "x"; then 9591414bd68fSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 9592414bd68fSmrg have_groff=no 9593414bd68fSmrg else 9594414bd68fSmrg have_groff=yes 9595414bd68fSmrg fi 9596414bd68fSmrgelif test "x$use_groff" = x"yes" ; then 9597414bd68fSmrg AC_PATH_PROG([GROFF], [groff]) 9598414bd68fSmrg if test "x$GROFF" = "x"; then 9599414bd68fSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 9600414bd68fSmrg fi 9601414bd68fSmrg have_groff=yes 9602414bd68fSmrgelif test "x$use_groff" = x"no" ; then 9603414bd68fSmrg if test "x$GROFF" != "x"; then 9604414bd68fSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 9605414bd68fSmrg fi 9606414bd68fSmrg have_groff=no 9607414bd68fSmrgelse 9608414bd68fSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 9609a1ed278cSmrgfi 9610ee3138f1Smrg 9611414bd68fSmrg# We have groff, test for the presence of the macro packages 9612414bd68fSmrgif test "x$have_groff" = x"yes"; then 9613414bd68fSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 9614414bd68fSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 9615414bd68fSmrg groff_ms_works=yes 9616414bd68fSmrg else 9617414bd68fSmrg groff_ms_works=no 9618414bd68fSmrg fi 9619414bd68fSmrg AC_MSG_RESULT([$groff_ms_works]) 9620414bd68fSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 9621414bd68fSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 9622414bd68fSmrg groff_mm_works=yes 9623414bd68fSmrg else 9624414bd68fSmrg groff_mm_works=no 9625414bd68fSmrg fi 9626414bd68fSmrg AC_MSG_RESULT([$groff_mm_works]) 9627414bd68fSmrgfi 9628ee3138f1Smrg 9629414bd68fSmrg# We have groff, test for HTML dependencies, one command per package 9630414bd68fSmrgif test "x$have_groff" = x"yes"; then 9631414bd68fSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 9632414bd68fSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 9633414bd68fSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 9634414bd68fSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 9635414bd68fSmrg have_groff_html=yes 9636414bd68fSmrg else 9637414bd68fSmrg have_groff_html=no 9638414bd68fSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 9639414bd68fSmrg fi 9640a1ed278cSmrgfi 964134977a2fSmrg 9642414bd68fSmrg# Set Automake conditionals for Makefiles 9643414bd68fSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 9644414bd68fSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 9645414bd68fSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 9646414bd68fSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 9647414bd68fSmrg]) # XORG_WITH_GROFF 9648ee3138f1Smrg 9649414bd68fSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 9650414bd68fSmrg# --------------------------------------- 9651414bd68fSmrg# Minimum version: 1.6.0 9652414bd68fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9653414bd68fSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 9654a1ed278cSmrg# 9655414bd68fSmrg# Documentation tools are not always available on all platforms and sometimes 9656414bd68fSmrg# not at the appropriate level. This macro enables a module to test for the 9657414bd68fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9658414bd68fSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 9659414bd68fSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 9660414bd68fSmrg# --with-fop assumes 'auto'. 9661414bd68fSmrg# 9662414bd68fSmrg# Interface to module: 9663414bd68fSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 9664414bd68fSmrg# FOP: returns the path of the fop program found 9665414bd68fSmrg# returns the path set by the user in the environment 9666414bd68fSmrg# --with-fop: 'yes' user instructs the module to use fop 9667414bd68fSmrg# 'no' user instructs the module not to use fop 9668414bd68fSmrg# 9669414bd68fSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 9670414bd68fSmrg# 9671414bd68fSmrgAC_DEFUN([XORG_WITH_FOP],[ 9672414bd68fSmrgAC_ARG_VAR([FOP], [Path to fop command]) 9673414bd68fSmrgm4_define([_defopt], m4_default([$2], [auto])) 9674414bd68fSmrgAC_ARG_WITH(fop, 9675414bd68fSmrg AS_HELP_STRING([--with-fop], 9676414bd68fSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 9677414bd68fSmrg [use_fop=$withval], [use_fop=]_defopt) 9678414bd68fSmrgm4_undefine([_defopt]) 9679b425557eSmrg 9680414bd68fSmrgif test "x$use_fop" = x"auto"; then 9681414bd68fSmrg AC_PATH_PROG([FOP], [fop]) 9682414bd68fSmrg if test "x$FOP" = "x"; then 9683414bd68fSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 9684414bd68fSmrg have_fop=no 9685414bd68fSmrg else 9686414bd68fSmrg have_fop=yes 9687414bd68fSmrg fi 9688414bd68fSmrgelif test "x$use_fop" = x"yes" ; then 9689414bd68fSmrg AC_PATH_PROG([FOP], [fop]) 9690414bd68fSmrg if test "x$FOP" = "x"; then 9691414bd68fSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 9692414bd68fSmrg fi 9693414bd68fSmrg have_fop=yes 9694414bd68fSmrgelif test "x$use_fop" = x"no" ; then 9695414bd68fSmrg if test "x$FOP" != "x"; then 9696414bd68fSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 9697414bd68fSmrg fi 9698414bd68fSmrg have_fop=no 9699a1ed278cSmrgelse 9700414bd68fSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 9701a1ed278cSmrgfi 9702ee3138f1Smrg 9703414bd68fSmrg# Test for a minimum version of fop, if provided. 9704414bd68fSmrgm4_ifval([$1], 9705414bd68fSmrg[if test "$have_fop" = yes; then 9706414bd68fSmrg # scrape the fop version 9707414bd68fSmrg AC_MSG_CHECKING([for fop minimum version]) 9708414bd68fSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 9709414bd68fSmrg AC_MSG_RESULT([$fop_version]) 9710414bd68fSmrg AS_VERSION_COMPARE([$fop_version], [$1], 9711414bd68fSmrg [if test "x$use_fop" = xauto; then 9712414bd68fSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 9713414bd68fSmrg have_fop=no 9714414bd68fSmrg else 9715414bd68fSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 9716414bd68fSmrg fi]) 9717414bd68fSmrgfi]) 9718414bd68fSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 9719414bd68fSmrg]) # XORG_WITH_FOP 9720ee3138f1Smrg 9721414bd68fSmrg# XORG_WITH_M4([MIN-VERSION]) 9722414bd68fSmrg# --------------------------- 9723414bd68fSmrg# Minimum version: 1.19.0 9724414bd68fSmrg# 9725414bd68fSmrg# This macro attempts to locate an m4 macro processor which supports 9726414bd68fSmrg# -I option and is only useful for modules relying on M4 in order to 9727414bd68fSmrg# expand macros in source code files. 9728414bd68fSmrg# 9729414bd68fSmrg# Interface to module: 9730414bd68fSmrg# M4: returns the path of the m4 program found 9731414bd68fSmrg# returns the path set by the user in the environment 9732414bd68fSmrg# 9733414bd68fSmrgAC_DEFUN([XORG_WITH_M4], [ 9734414bd68fSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 9735414bd68fSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 9736414bd68fSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 9737414bd68fSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 9738414bd68fSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 9739414bd68fSmrg [$PATH:/usr/gnu/bin])]) 9740ee3138f1Smrg 9741414bd68fSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 9742414bd68fSmrg]) # XORG_WITH_M4 9743ee3138f1Smrg 9744414bd68fSmrg# XORG_WITH_PS2PDF([DEFAULT]) 9745414bd68fSmrg# ---------------- 9746414bd68fSmrg# Minimum version: 1.6.0 9747414bd68fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9748414bd68fSmrg# 9749414bd68fSmrg# Documentation tools are not always available on all platforms and sometimes 9750414bd68fSmrg# not at the appropriate level. This macro enables a module to test for the 9751414bd68fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9752414bd68fSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 9753414bd68fSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 9754414bd68fSmrg# --with-ps2pdf assumes 'auto'. 9755414bd68fSmrg# 9756414bd68fSmrg# Interface to module: 9757414bd68fSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 9758414bd68fSmrg# PS2PDF: returns the path of the ps2pdf program found 9759414bd68fSmrg# returns the path set by the user in the environment 9760414bd68fSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 9761414bd68fSmrg# 'no' user instructs the module not to use ps2pdf 9762414bd68fSmrg# 9763414bd68fSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 9764414bd68fSmrg# 9765414bd68fSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 9766414bd68fSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 9767414bd68fSmrgm4_define([_defopt], m4_default([$1], [auto])) 9768414bd68fSmrgAC_ARG_WITH(ps2pdf, 9769414bd68fSmrg AS_HELP_STRING([--with-ps2pdf], 9770414bd68fSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 9771414bd68fSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 9772414bd68fSmrgm4_undefine([_defopt]) 9773414bd68fSmrg 9774414bd68fSmrgif test "x$use_ps2pdf" = x"auto"; then 9775414bd68fSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 9776414bd68fSmrg if test "x$PS2PDF" = "x"; then 9777414bd68fSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 9778414bd68fSmrg have_ps2pdf=no 9779414bd68fSmrg else 9780414bd68fSmrg have_ps2pdf=yes 9781414bd68fSmrg fi 9782414bd68fSmrgelif test "x$use_ps2pdf" = x"yes" ; then 9783414bd68fSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 9784414bd68fSmrg if test "x$PS2PDF" = "x"; then 9785414bd68fSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 9786414bd68fSmrg fi 9787414bd68fSmrg have_ps2pdf=yes 9788414bd68fSmrgelif test "x$use_ps2pdf" = x"no" ; then 9789414bd68fSmrg if test "x$PS2PDF" != "x"; then 9790414bd68fSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 9791414bd68fSmrg fi 9792414bd68fSmrg have_ps2pdf=no 9793a1ed278cSmrgelse 9794414bd68fSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 9795a1ed278cSmrgfi 9796414bd68fSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 9797414bd68fSmrg]) # XORG_WITH_PS2PDF 9798ee3138f1Smrg 9799414bd68fSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 9800414bd68fSmrg# ---------------- 9801414bd68fSmrg# Minimum version: 1.6.0 9802414bd68fSmrg# 9803414bd68fSmrg# Documentation tools are not always available on all platforms and sometimes 9804414bd68fSmrg# not at the appropriate level. This macro enables a builder to skip all 9805414bd68fSmrg# documentation targets except traditional man pages. 9806414bd68fSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9807414bd68fSmrg# maximum flexibilty in controlling documentation building. 9808414bd68fSmrg# Refer to: 9809414bd68fSmrg# XORG_WITH_XMLTO --with-xmlto 9810414bd68fSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 9811414bd68fSmrg# XORG_WITH_DOXYGEN --with-doxygen 9812414bd68fSmrg# XORG_WITH_FOP --with-fop 9813414bd68fSmrg# XORG_WITH_GROFF --with-groff 9814414bd68fSmrg# XORG_WITH_PS2PDF --with-ps2pdf 9815414bd68fSmrg# 9816414bd68fSmrg# Interface to module: 9817414bd68fSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 9818414bd68fSmrg# --enable-docs: 'yes' user instructs the module to generate docs 9819414bd68fSmrg# 'no' user instructs the module not to generate docs 9820414bd68fSmrg# parm1: specify the default value, yes or no. 9821414bd68fSmrg# 9822414bd68fSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 9823414bd68fSmrgm4_define([docs_default], m4_default([$1], [yes])) 9824414bd68fSmrgAC_ARG_ENABLE(docs, 9825414bd68fSmrg AS_HELP_STRING([--enable-docs], 9826414bd68fSmrg [Enable building the documentation (default: ]docs_default[)]), 9827414bd68fSmrg [build_docs=$enableval], [build_docs=]docs_default) 9828414bd68fSmrgm4_undefine([docs_default]) 9829414bd68fSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 9830414bd68fSmrgAC_MSG_CHECKING([whether to build documentation]) 9831414bd68fSmrgAC_MSG_RESULT([$build_docs]) 9832414bd68fSmrg]) # XORG_ENABLE_DOCS 9833ee3138f1Smrg 9834414bd68fSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 9835414bd68fSmrg# ---------------- 9836414bd68fSmrg# Minimum version: 1.6.0 9837414bd68fSmrg# 9838414bd68fSmrg# This macro enables a builder to skip all developer documentation. 9839414bd68fSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9840414bd68fSmrg# maximum flexibilty in controlling documentation building. 9841414bd68fSmrg# Refer to: 9842414bd68fSmrg# XORG_WITH_XMLTO --with-xmlto 9843414bd68fSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 9844414bd68fSmrg# XORG_WITH_DOXYGEN --with-doxygen 9845414bd68fSmrg# XORG_WITH_FOP --with-fop 9846414bd68fSmrg# XORG_WITH_GROFF --with-groff 9847414bd68fSmrg# XORG_WITH_PS2PDF --with-ps2pdf 9848414bd68fSmrg# 9849414bd68fSmrg# Interface to module: 9850414bd68fSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 9851414bd68fSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 9852414bd68fSmrg# 'no' user instructs the module not to generate developer docs 9853414bd68fSmrg# parm1: specify the default value, yes or no. 9854414bd68fSmrg# 9855414bd68fSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 9856414bd68fSmrgm4_define([devel_default], m4_default([$1], [yes])) 9857414bd68fSmrgAC_ARG_ENABLE(devel-docs, 9858414bd68fSmrg AS_HELP_STRING([--enable-devel-docs], 9859414bd68fSmrg [Enable building the developer documentation (default: ]devel_default[)]), 9860414bd68fSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 9861414bd68fSmrgm4_undefine([devel_default]) 9862414bd68fSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 9863414bd68fSmrgAC_MSG_CHECKING([whether to build developer documentation]) 9864414bd68fSmrgAC_MSG_RESULT([$build_devel_docs]) 9865414bd68fSmrg]) # XORG_ENABLE_DEVEL_DOCS 9866ee3138f1Smrg 9867414bd68fSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 9868414bd68fSmrg# ---------------- 9869414bd68fSmrg# Minimum version: 1.6.0 9870414bd68fSmrg# 9871414bd68fSmrg# This macro enables a builder to skip all functional specification targets. 9872414bd68fSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9873414bd68fSmrg# maximum flexibilty in controlling documentation building. 9874414bd68fSmrg# Refer to: 9875414bd68fSmrg# XORG_WITH_XMLTO --with-xmlto 9876414bd68fSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 9877414bd68fSmrg# XORG_WITH_DOXYGEN --with-doxygen 9878414bd68fSmrg# XORG_WITH_FOP --with-fop 9879414bd68fSmrg# XORG_WITH_GROFF --with-groff 9880414bd68fSmrg# XORG_WITH_PS2PDF --with-ps2pdf 9881414bd68fSmrg# 9882414bd68fSmrg# Interface to module: 9883414bd68fSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 9884414bd68fSmrg# --enable-specs: 'yes' user instructs the module to generate specs 9885414bd68fSmrg# 'no' user instructs the module not to generate specs 9886414bd68fSmrg# parm1: specify the default value, yes or no. 9887414bd68fSmrg# 9888414bd68fSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 9889414bd68fSmrgm4_define([spec_default], m4_default([$1], [yes])) 9890414bd68fSmrgAC_ARG_ENABLE(specs, 9891414bd68fSmrg AS_HELP_STRING([--enable-specs], 9892414bd68fSmrg [Enable building the specs (default: ]spec_default[)]), 9893414bd68fSmrg [build_specs=$enableval], [build_specs=]spec_default) 9894414bd68fSmrgm4_undefine([spec_default]) 9895414bd68fSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 9896414bd68fSmrgAC_MSG_CHECKING([whether to build functional specifications]) 9897414bd68fSmrgAC_MSG_RESULT([$build_specs]) 9898414bd68fSmrg]) # XORG_ENABLE_SPECS 9899ee3138f1Smrg 9900414bd68fSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 9901414bd68fSmrg# ---------------------------------------------- 9902414bd68fSmrg# Minimum version: 1.13.0 9903a1ed278cSmrg# 9904414bd68fSmrg# This macro enables a builder to enable/disable unit testing 9905414bd68fSmrg# It makes no assumption about the test cases implementation 9906414bd68fSmrg# Test cases may or may not use Automake "Support for test suites" 9907414bd68fSmrg# They may or may not use the software utility library GLib 9908414bd68fSmrg# 9909414bd68fSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 9910414bd68fSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 9911414bd68fSmrg# The variable enable_unit_tests is used by other macros in this file. 9912414bd68fSmrg# 9913414bd68fSmrg# Interface to module: 9914414bd68fSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 9915414bd68fSmrg# enable_unit_tests: used in configure.ac for additional configuration 9916414bd68fSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 9917414bd68fSmrg# 'no' user instructs the module not to build tests 9918414bd68fSmrg# parm1: specify the default value, yes or no. 9919414bd68fSmrg# 9920414bd68fSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 9921414bd68fSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 9922414bd68fSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 9923414bd68fSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9924414bd68fSmrgm4_define([_defopt], m4_default([$1], [auto])) 9925414bd68fSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 9926414bd68fSmrg [Enable building unit test cases (default: ]_defopt[)]), 9927414bd68fSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 9928414bd68fSmrgm4_undefine([_defopt]) 9929414bd68fSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 9930414bd68fSmrgAC_MSG_CHECKING([whether to build unit test cases]) 9931414bd68fSmrgAC_MSG_RESULT([$enable_unit_tests]) 9932414bd68fSmrg]) # XORG_ENABLE_UNIT_TESTS 9933ee3138f1Smrg 9934414bd68fSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 9935414bd68fSmrg# ------------------------------------------------------ 9936414bd68fSmrg# Minimum version: 1.17.0 9937414bd68fSmrg# 9938414bd68fSmrg# This macro enables a builder to enable/disable integration testing 9939414bd68fSmrg# It makes no assumption about the test cases' implementation 9940414bd68fSmrg# Test cases may or may not use Automake "Support for test suites" 9941414bd68fSmrg# 9942414bd68fSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 9943414bd68fSmrg# usually requires less dependencies and may be built and run under less 9944414bd68fSmrg# stringent environments than integration tests. 9945414bd68fSmrg# 9946414bd68fSmrg# Interface to module: 9947414bd68fSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 9948414bd68fSmrg# enable_integration_tests: used in configure.ac for additional configuration 9949414bd68fSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 9950414bd68fSmrg# 'no' user instructs the module not to build tests 9951414bd68fSmrg# parm1: specify the default value, yes or no. 9952414bd68fSmrg# 9953414bd68fSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 9954414bd68fSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9955414bd68fSmrgm4_define([_defopt], m4_default([$1], [auto])) 9956414bd68fSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 9957414bd68fSmrg [Enable building integration test cases (default: ]_defopt[)]), 9958414bd68fSmrg [enable_integration_tests=$enableval], 9959414bd68fSmrg [enable_integration_tests=]_defopt) 9960414bd68fSmrgm4_undefine([_defopt]) 9961414bd68fSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 9962414bd68fSmrg [test "x$enable_integration_tests" != xno]) 9963414bd68fSmrgAC_MSG_CHECKING([whether to build unit test cases]) 9964414bd68fSmrgAC_MSG_RESULT([$enable_integration_tests]) 9965414bd68fSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 9966ee3138f1Smrg 9967414bd68fSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 9968414bd68fSmrg# ---------------------------------------- 9969414bd68fSmrg# Minimum version: 1.13.0 9970414bd68fSmrg# 9971414bd68fSmrg# GLib is a library which provides advanced data structures and functions. 9972414bd68fSmrg# This macro enables a module to test for the presence of Glib. 9973414bd68fSmrg# 9974414bd68fSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 9975414bd68fSmrg# Otherwise the value of $enable_unit_tests is blank. 9976414bd68fSmrg# 9977414bd68fSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 9978414bd68fSmrg# test support usually requires less dependencies and may be built and run under 9979414bd68fSmrg# less stringent environments than integration tests. 9980414bd68fSmrg# 9981414bd68fSmrg# Interface to module: 9982414bd68fSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 9983414bd68fSmrg# with_glib: used in configure.ac to know if GLib has been found 9984414bd68fSmrg# --with-glib: 'yes' user instructs the module to use glib 9985414bd68fSmrg# 'no' user instructs the module not to use glib 9986414bd68fSmrg# 9987414bd68fSmrgAC_DEFUN([XORG_WITH_GLIB],[ 9988414bd68fSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9989414bd68fSmrgm4_define([_defopt], m4_default([$2], [auto])) 9990414bd68fSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 9991414bd68fSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 9992414bd68fSmrg [with_glib=$withval], [with_glib=]_defopt) 9993414bd68fSmrgm4_undefine([_defopt]) 9994ee3138f1Smrg 9995414bd68fSmrghave_glib=no 9996414bd68fSmrg# Do not probe GLib if user explicitly disabled unit testing 9997414bd68fSmrgif test "x$enable_unit_tests" != x"no"; then 9998414bd68fSmrg # Do not probe GLib if user explicitly disabled it 9999414bd68fSmrg if test "x$with_glib" != x"no"; then 10000414bd68fSmrg m4_ifval( 10001414bd68fSmrg [$1], 10002414bd68fSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10003414bd68fSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10004414bd68fSmrg ) 10005414bd68fSmrg fi 10006a1ed278cSmrgfi 10007ee3138f1Smrg 10008414bd68fSmrg# Not having GLib when unit testing has been explicitly requested is an error 10009414bd68fSmrgif test "x$enable_unit_tests" = x"yes"; then 10010414bd68fSmrg if test "x$have_glib" = x"no"; then 10011414bd68fSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10012414bd68fSmrg fi 10013a1ed278cSmrgfi 10014ee3138f1Smrg 10015414bd68fSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 10016414bd68fSmrgif test "x$enable_unit_tests" = x"no"; then 10017414bd68fSmrg if test "x$with_glib" = x"yes"; then 10018414bd68fSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10019414bd68fSmrg fi 10020a1ed278cSmrgfi 10021ee3138f1Smrg 10022414bd68fSmrg# Not having GLib when it has been explicitly requested is an error 10023414bd68fSmrgif test "x$with_glib" = x"yes"; then 10024414bd68fSmrg if test "x$have_glib" = x"no"; then 10025414bd68fSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10026414bd68fSmrg fi 10027a1ed278cSmrgfi 10028ee3138f1Smrg 10029414bd68fSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10030414bd68fSmrg]) # XORG_WITH_GLIB 10031ee3138f1Smrg 10032414bd68fSmrg# XORG_LD_WRAP([required|optional]) 10033414bd68fSmrg# --------------------------------- 10034414bd68fSmrg# Minimum version: 1.13.0 10035414bd68fSmrg# 10036414bd68fSmrg# Check if linker supports -wrap, passed via compiler flags 10037414bd68fSmrg# 10038414bd68fSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10039414bd68fSmrg# Otherwise the value of $enable_unit_tests is blank. 10040414bd68fSmrg# 10041414bd68fSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 10042414bd68fSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10043414bd68fSmrg# available, an argument of "optional" allows use when some unit tests require 10044414bd68fSmrg# ld -wrap and others do not. 10045414bd68fSmrg# 10046414bd68fSmrgAC_DEFUN([XORG_LD_WRAP],[ 10047414bd68fSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10048414bd68fSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 10049414bd68fSmrg void __wrap_exit(int status) { return; }], 10050414bd68fSmrg [exit(0);])]) 10051414bd68fSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 10052414bd68fSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10053414bd68fSmrg if test "x$have_ld_wrap" = x"no"; then 10054414bd68fSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10055414bd68fSmrg fi 10056414bd68fSmrgfi 10057414bd68fSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10058414bd68fSmrg# 10059414bd68fSmrg]) # XORG_LD_WRAP 10060ee3138f1Smrg 10061414bd68fSmrg# XORG_CHECK_LINKER_FLAGS 10062414bd68fSmrg# ----------------------- 10063414bd68fSmrg# SYNOPSIS 10064414bd68fSmrg# 10065414bd68fSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10066414bd68fSmrg# 10067414bd68fSmrg# DESCRIPTION 10068414bd68fSmrg# 10069414bd68fSmrg# Check whether the given linker FLAGS work with the current language's 10070414bd68fSmrg# linker, or whether they give an error. 10071414bd68fSmrg# 10072414bd68fSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10073414bd68fSmrg# success/failure. 10074414bd68fSmrg# 10075414bd68fSmrg# PROGRAM-SOURCE is the program source to link with, if needed 10076414bd68fSmrg# 10077414bd68fSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10078a1ed278cSmrg# 10079414bd68fSmrg# LICENSE 10080a1ed278cSmrg# 10081414bd68fSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10082414bd68fSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10083414bd68fSmrg# Copyright (c) 2009 Matteo Frigo 10084a1ed278cSmrg# 10085414bd68fSmrg# This program is free software: you can redistribute it and/or modify it 10086414bd68fSmrg# under the terms of the GNU General Public License as published by the 10087414bd68fSmrg# Free Software Foundation, either version 3 of the License, or (at your 10088414bd68fSmrg# option) any later version. 10089a1ed278cSmrg# 10090414bd68fSmrg# This program is distributed in the hope that it will be useful, but 10091414bd68fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10092414bd68fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10093414bd68fSmrg# Public License for more details. 10094a1ed278cSmrg# 10095414bd68fSmrg# You should have received a copy of the GNU General Public License along 10096414bd68fSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 10097414bd68fSmrg# 10098414bd68fSmrg# As a special exception, the respective Autoconf Macro's copyright owner 10099414bd68fSmrg# gives unlimited permission to copy, distribute and modify the configure 10100414bd68fSmrg# scripts that are the output of Autoconf when processing the Macro. You 10101414bd68fSmrg# need not follow the terms of the GNU General Public License when using 10102414bd68fSmrg# or distributing such scripts, even though portions of the text of the 10103414bd68fSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 10104414bd68fSmrg# all other use of the material that constitutes the Autoconf Macro. 10105414bd68fSmrg# 10106414bd68fSmrg# This special exception to the GPL applies to versions of the Autoconf 10107414bd68fSmrg# Macro released by the Autoconf Archive. When you make and distribute a 10108414bd68fSmrg# modified version of the Autoconf Macro, you may extend this special 10109414bd68fSmrg# exception to the GPL to apply to your modified version as well.# 10110414bd68fSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10111414bd68fSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10112414bd68fSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10113414bd68fSmrgAS_LITERAL_IF([$1], 10114414bd68fSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10115414bd68fSmrg ax_save_FLAGS=$LDFLAGS 10116414bd68fSmrg LDFLAGS="$1" 10117414bd68fSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10118414bd68fSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10119414bd68fSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10120414bd68fSmrg LDFLAGS=$ax_save_FLAGS])], 10121414bd68fSmrg [ax_save_FLAGS=$LDFLAGS 10122414bd68fSmrg LDFLAGS="$1" 10123414bd68fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10124414bd68fSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10125414bd68fSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10126414bd68fSmrg LDFLAGS=$ax_save_FLAGS]) 10127414bd68fSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10128414bd68fSmrgAC_MSG_RESULT($xorg_check_linker_flags) 10129414bd68fSmrgif test "x$xorg_check_linker_flags" = xyes; then 10130414bd68fSmrg m4_default([$2], :) 10131a1ed278cSmrgelse 10132414bd68fSmrg m4_default([$3], :) 10133a1ed278cSmrgfi 10134414bd68fSmrg]) # XORG_CHECK_LINKER_FLAGS 10135ee3138f1Smrg 10136414bd68fSmrg# XORG_MEMORY_CHECK_FLAGS 10137414bd68fSmrg# ----------------------- 10138414bd68fSmrg# Minimum version: 1.16.0 101393e72ca8cSmrg# 10140414bd68fSmrg# This macro attempts to find appropriate memory checking functionality 10141414bd68fSmrg# for various platforms which unit testing code may use to catch various 10142414bd68fSmrg# forms of memory allocation and access errors in testing. 101433e72ca8cSmrg# 101443e72ca8cSmrg# Interface to module: 10145414bd68fSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10146414bd68fSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 101473e72ca8cSmrg# 10148414bd68fSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 101493e72ca8cSmrg# 10150414bd68fSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 101513e72ca8cSmrg 10152414bd68fSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10153414bd68fSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10154414bd68fSmrg [Environment variables to enable memory checking in tests]) 10155414bd68fSmrg 10156414bd68fSmrg# Check for different types of support on different platforms 10157414bd68fSmrgcase $host_os in 10158414bd68fSmrg solaris*) 10159414bd68fSmrg AC_CHECK_LIB([umem], [umem_alloc], 10160414bd68fSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10161414bd68fSmrg ;; 10162414bd68fSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10163414bd68fSmrg # both directly and inverted, so should not be 0 or 255. 10164414bd68fSmrg malloc_debug_env='MALLOC_PERTURB_=15' 10165414bd68fSmrg ;; 10166414bd68fSmrg darwin*) 10167414bd68fSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10168414bd68fSmrg ;; 10169414bd68fSmrg *bsd*) 10170414bd68fSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10171414bd68fSmrg ;; 10172414bd68fSmrgesac 10173414bd68fSmrg 10174414bd68fSmrg# User supplied flags override default flags 10175414bd68fSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10176414bd68fSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 101773e72ca8cSmrgfi 101783e72ca8cSmrg 10179414bd68fSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10180414bd68fSmrg]) # XORG_WITH_LINT 101813e72ca8cSmrg 10182414bd68fSmrg# XORG_CHECK_MALLOC_ZERO 10183414bd68fSmrg# ---------------------- 10184414bd68fSmrg# Minimum version: 1.0.0 101853e72ca8cSmrg# 10186414bd68fSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10187414bd68fSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 10188414bd68fSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10189414bd68fSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10190414bd68fSmrgAC_ARG_ENABLE(malloc0returnsnull, 10191414bd68fSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 10192414bd68fSmrg [malloc(0) returns NULL (default: auto)]), 10193414bd68fSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 10194414bd68fSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10195414bd68fSmrg 10196414bd68fSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 10197414bd68fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10198414bd68fSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 10199414bd68fSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10200414bd68fSmrg#include <stdlib.h> 10201414bd68fSmrg],[ 10202414bd68fSmrg char *m0, *r0, *c0, *p; 10203414bd68fSmrg m0 = malloc(0); 10204414bd68fSmrg p = malloc(10); 10205414bd68fSmrg r0 = realloc(p,0); 10206414bd68fSmrg c0 = calloc(0,10); 10207414bd68fSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10208414bd68fSmrg])], 10209414bd68fSmrg [xorg_cv_malloc0_returns_null=yes], 10210414bd68fSmrg [xorg_cv_malloc0_returns_null=no])]) 10211414bd68fSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 10212414bd68fSmrgfi 10213414bd68fSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 102143e72ca8cSmrg 10215414bd68fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10216414bd68fSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10217414bd68fSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10218414bd68fSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 102193e72ca8cSmrgelse 10220414bd68fSmrg MALLOC_ZERO_CFLAGS="" 10221414bd68fSmrg XMALLOC_ZERO_CFLAGS="" 10222414bd68fSmrg XTMALLOC_ZERO_CFLAGS="" 102233e72ca8cSmrgfi 102243e72ca8cSmrg 10225414bd68fSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 10226414bd68fSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 10227414bd68fSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10228414bd68fSmrg]) # XORG_CHECK_MALLOC_ZERO 102293e72ca8cSmrg 10230414bd68fSmrg# XORG_WITH_LINT() 10231a1ed278cSmrg# ---------------- 10232414bd68fSmrg# Minimum version: 1.1.0 10233a1ed278cSmrg# 10234414bd68fSmrg# This macro enables the use of a tool that flags some suspicious and 10235414bd68fSmrg# non-portable constructs (likely to be bugs) in C language source code. 10236414bd68fSmrg# It will attempt to locate the tool and use appropriate options. 10237414bd68fSmrg# There are various lint type tools on different platforms. 10238a1ed278cSmrg# 10239a1ed278cSmrg# Interface to module: 10240414bd68fSmrg# LINT: returns the path to the tool found on the platform 10241414bd68fSmrg# or the value set to LINT on the configure cmd line 10242414bd68fSmrg# also an Automake conditional 10243414bd68fSmrg# LINT_FLAGS: an Automake variable with appropriate flags 10244a1ed278cSmrg# 10245414bd68fSmrg# --with-lint: 'yes' user instructs the module to use lint 10246414bd68fSmrg# 'no' user instructs the module not to use lint (default) 10247a1ed278cSmrg# 10248414bd68fSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10249414bd68fSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 10250414bd68fSmrg# 10251414bd68fSmrgAC_DEFUN([XORG_WITH_LINT],[ 10252ee3138f1Smrg 10253414bd68fSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10254414bd68fSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10255414bd68fSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10256414bd68fSmrg [Use a lint-style source code checker (default: disabled)])], 10257414bd68fSmrg [use_lint=$withval], [use_lint=no]) 10258414bd68fSmrg 10259414bd68fSmrg# Obtain platform specific info like program name and options 10260414bd68fSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10261414bd68fSmrgcase $host_os in 10262414bd68fSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10263414bd68fSmrg lint_name=splint 10264414bd68fSmrg lint_options="-badflag" 10265414bd68fSmrg ;; 10266414bd68fSmrg *freebsd* | *netbsd*) 10267414bd68fSmrg lint_name=lint 10268414bd68fSmrg lint_options="-u -b" 10269414bd68fSmrg ;; 10270414bd68fSmrg *solaris*) 10271414bd68fSmrg lint_name=lint 10272414bd68fSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10273414bd68fSmrg ;; 10274414bd68fSmrgesac 10275414bd68fSmrg 10276414bd68fSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10277414bd68fSmrgif test "x$use_lint" = x"yes" ; then 10278414bd68fSmrg AC_PATH_PROG([LINT], [$lint_name]) 10279414bd68fSmrg if test "x$LINT" = "x"; then 10280414bd68fSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10281a1ed278cSmrg fi 10282414bd68fSmrgelif test "x$use_lint" = x"no" ; then 10283414bd68fSmrg if test "x$LINT" != "x"; then 10284414bd68fSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10285a1ed278cSmrg fi 10286a1ed278cSmrgelse 10287414bd68fSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10288a1ed278cSmrgfi 10289ee3138f1Smrg 10290414bd68fSmrg# User supplied flags override default flags 10291414bd68fSmrgif test "x$LINT_FLAGS" != "x"; then 10292414bd68fSmrg lint_options=$LINT_FLAGS 10293414bd68fSmrgfi 10294414bd68fSmrg 10295414bd68fSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10296414bd68fSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10297414bd68fSmrg 10298414bd68fSmrg]) # XORG_WITH_LINT 10299414bd68fSmrg 10300414bd68fSmrg# XORG_LINT_LIBRARY(LIBNAME) 10301414bd68fSmrg# -------------------------- 10302414bd68fSmrg# Minimum version: 1.1.0 10303a1ed278cSmrg# 10304414bd68fSmrg# Sets up flags for building lint libraries for checking programs that call 10305414bd68fSmrg# functions in the library. 10306a1ed278cSmrg# 10307a1ed278cSmrg# Interface to module: 10308414bd68fSmrg# LINTLIB - Automake variable with the name of lint library file to make 10309414bd68fSmrg# MAKE_LINT_LIB - Automake conditional 10310a1ed278cSmrg# 10311414bd68fSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10312414bd68fSmrg# - 'no' user instructs the module not to create a lint library (default) 10313a1ed278cSmrg 10314414bd68fSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 10315414bd68fSmrgAC_REQUIRE([XORG_WITH_LINT]) 10316414bd68fSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10317414bd68fSmrg [Create lint library (default: disabled)])], 10318414bd68fSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10319ee3138f1Smrg 10320414bd68fSmrgif test "x$make_lint_lib" = x"yes" ; then 10321414bd68fSmrg LINTLIB=llib-l$1.ln 10322414bd68fSmrg if test "x$LINT" = "x"; then 10323414bd68fSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10324414bd68fSmrg fi 10325414bd68fSmrgelif test "x$make_lint_lib" != x"no" ; then 10326414bd68fSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10327414bd68fSmrgfi 10328414bd68fSmrg 10329414bd68fSmrgAC_SUBST(LINTLIB) 10330414bd68fSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10331414bd68fSmrg 10332414bd68fSmrg]) # XORG_LINT_LIBRARY 10333414bd68fSmrg 10334414bd68fSmrg# XORG_COMPILER_BRAND 10335414bd68fSmrg# ------------------- 10336414bd68fSmrg# Minimum version: 1.14.0 10337a1ed278cSmrg# 10338414bd68fSmrg# Checks for various brands of compilers and sets flags as appropriate: 10339414bd68fSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10340414bd68fSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10341414bd68fSmrg# clang compiler - sets CLANGCC to "yes" 10342414bd68fSmrg# Intel compiler - sets INTELCC to "yes" 10343414bd68fSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10344a1ed278cSmrg# 10345414bd68fSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10346414bd68fSmrgAC_LANG_CASE( 10347414bd68fSmrg [C], [ 10348414bd68fSmrg AC_REQUIRE([AC_PROG_CC_C99]) 10349414bd68fSmrg ], 10350414bd68fSmrg [C++], [ 10351414bd68fSmrg AC_REQUIRE([AC_PROG_CXX]) 10352414bd68fSmrg ] 10353414bd68fSmrg) 10354414bd68fSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10355414bd68fSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10356414bd68fSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10357414bd68fSmrg]) # XORG_COMPILER_BRAND 10358414bd68fSmrg 10359414bd68fSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10360414bd68fSmrg# --------------- 10361414bd68fSmrg# Minimum version: 1.16.0 10362a1ed278cSmrg# 10363414bd68fSmrg# Test if the compiler works when passed the given flag as a command line argument. 10364414bd68fSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10365414bd68fSmrg# next flag in the list until there are no more options. 10366a1ed278cSmrg# 10367414bd68fSmrg# Note that this does not guarantee that the compiler supports the flag as some 10368414bd68fSmrg# compilers will simply ignore arguments that they do not understand, but we do 10369414bd68fSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10370414bd68fSmrg# -Werror=unused-command-line-argument 10371a1ed278cSmrg# 10372414bd68fSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10373414bd68fSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10374414bd68fSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10375ee3138f1Smrg 10376414bd68fSmrgAC_LANG_COMPILER_REQUIRE 10377ee3138f1Smrg 10378414bd68fSmrgAC_LANG_CASE( 10379414bd68fSmrg [C], [ 10380414bd68fSmrg AC_REQUIRE([AC_PROG_CC_C99]) 10381414bd68fSmrg define([PREFIX], [C]) 10382414bd68fSmrg define([CACHE_PREFIX], [cc]) 10383414bd68fSmrg define([COMPILER], [$CC]) 10384414bd68fSmrg ], 10385414bd68fSmrg [C++], [ 10386414bd68fSmrg define([PREFIX], [CXX]) 10387414bd68fSmrg define([CACHE_PREFIX], [cxx]) 10388414bd68fSmrg define([COMPILER], [$CXX]) 10389414bd68fSmrg ] 10390414bd68fSmrg) 10391414bd68fSmrg 10392414bd68fSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10393414bd68fSmrg 10394414bd68fSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10395414bd68fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10396414bd68fSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10397414bd68fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10398414bd68fSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10399414bd68fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10400414bd68fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10401414bd68fSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10402414bd68fSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10403a1ed278cSmrgfi 10404ee3138f1Smrg 10405414bd68fSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10406414bd68fSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10407414bd68fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10408414bd68fSmrg fi 10409414bd68fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10410414bd68fSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10411414bd68fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10412414bd68fSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10413414bd68fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10414414bd68fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10415414bd68fSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10416414bd68fSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10417a1ed278cSmrgfi 10418ee3138f1Smrg 10419414bd68fSmrgfound="no" 10420414bd68fSmrgm4_foreach([flag], m4_cdr($@), [ 10421414bd68fSmrg if test $found = "no" ; then 10422414bd68fSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 10423414bd68fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10424414bd68fSmrg fi 10425ee3138f1Smrg 10426414bd68fSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 10427414bd68fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10428414bd68fSmrg fi 10429414bd68fSmrg 10430414bd68fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10431414bd68fSmrg 10432414bd68fSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10433414bd68fSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10434414bd68fSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10435414bd68fSmrg AC_CACHE_VAL($cacheid, 10436414bd68fSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10437414bd68fSmrg [eval $cacheid=yes], 10438414bd68fSmrg [eval $cacheid=no])]) 10439414bd68fSmrg 10440414bd68fSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10441414bd68fSmrg 10442414bd68fSmrg eval supported=\$$cacheid 10443414bd68fSmrg AC_MSG_RESULT([$supported]) 10444414bd68fSmrg if test "$supported" = "yes" ; then 10445414bd68fSmrg $1="$$1 ]flag[" 10446414bd68fSmrg found="yes" 10447414bd68fSmrg fi 10448414bd68fSmrg fi 10449414bd68fSmrg]) 10450414bd68fSmrg]) # XORG_TESTSET_CFLAG 10451414bd68fSmrg 10452414bd68fSmrg# XORG_COMPILER_FLAGS 10453414bd68fSmrg# --------------- 10454414bd68fSmrg# Minimum version: 1.16.0 10455a1ed278cSmrg# 10456414bd68fSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10457414bd68fSmrg# arguments supported by the selected compiler which do NOT alter the generated 10458414bd68fSmrg# code. These arguments will cause the compiler to print various warnings 10459414bd68fSmrg# during compilation AND turn a conservative set of warnings into errors. 10460a1ed278cSmrg# 10461414bd68fSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10462414bd68fSmrg# future versions of util-macros as options are added to new compilers. 10463a1ed278cSmrg# 10464414bd68fSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10465414bd68fSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10466ee3138f1Smrg 10467414bd68fSmrgAC_ARG_ENABLE(selective-werror, 10468414bd68fSmrg AS_HELP_STRING([--disable-selective-werror], 10469414bd68fSmrg [Turn off selective compiler errors. (default: enabled)]), 10470414bd68fSmrg [SELECTIVE_WERROR=$enableval], 10471414bd68fSmrg [SELECTIVE_WERROR=yes]) 10472414bd68fSmrg 10473414bd68fSmrgAC_LANG_CASE( 10474414bd68fSmrg [C], [ 10475414bd68fSmrg define([PREFIX], [C]) 10476414bd68fSmrg ], 10477414bd68fSmrg [C++], [ 10478414bd68fSmrg define([PREFIX], [CXX]) 10479414bd68fSmrg ] 10480414bd68fSmrg) 10481414bd68fSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 10482414bd68fSmrgif test "x$SUNCC" = "xyes"; then 10483414bd68fSmrg [BASE_]PREFIX[FLAGS]="-v" 10484a1ed278cSmrgelse 10485414bd68fSmrg [BASE_]PREFIX[FLAGS]="" 10486a1ed278cSmrgfi 104873e72ca8cSmrg 10488414bd68fSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10489414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10490414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10491414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10492414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10493a1ed278cSmrg 10494414bd68fSmrgAC_LANG_CASE( 10495414bd68fSmrg [C], [ 10496414bd68fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10497414bd68fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10498414bd68fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10499414bd68fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 10500414bd68fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 10501414bd68fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10502414bd68fSmrg ] 10503414bd68fSmrg) 10504ee3138f1Smrg 10505414bd68fSmrg# This chunk adds additional warnings that could catch undesired effects. 10506414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10507414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10508414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10509414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10510414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10511414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 10512414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10513414bd68fSmrg 10514414bd68fSmrg# These are currently disabled because they are noisy. They will be enabled 10515414bd68fSmrg# in the future once the codebase is sufficiently modernized to silence 10516414bd68fSmrg# them. For now, I don't want them to drown out the other warnings. 10517414bd68fSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10518414bd68fSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 10519414bd68fSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10520414bd68fSmrg 10521414bd68fSmrg# Turn some warnings into errors, so we don't accidently get successful builds 10522414bd68fSmrg# when there are problems that should be fixed. 10523414bd68fSmrg 10524414bd68fSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 10525414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10526414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10527414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10528414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10529414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10530414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10531414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10532414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10533414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10534414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10535414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10536414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10537414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10538a1ed278cSmrgelse 10539414bd68fSmrgAC_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]) 10540414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10541414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10542414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10543414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10544414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10545414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10546414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10547414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10548414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10549414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10550414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10551414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10552414bd68fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10553a1ed278cSmrgfi 10554ee3138f1Smrg 10555414bd68fSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10556414bd68fSmrg]) # XORG_COMPILER_FLAGS 10557414bd68fSmrg 10558414bd68fSmrg# XORG_CWARNFLAGS 10559414bd68fSmrg# --------------- 10560414bd68fSmrg# Minimum version: 1.2.0 10561414bd68fSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 10562a1ed278cSmrg# 10563414bd68fSmrg# Defines CWARNFLAGS to enable C compiler warnings. 10564a1ed278cSmrg# 10565414bd68fSmrg# This function is deprecated because it defines -fno-strict-aliasing 10566414bd68fSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 10567414bd68fSmrg# is needed, then it should be added explicitly in the module when 10568414bd68fSmrg# it is updated to use BASE_CFLAGS. 10569b425557eSmrg# 10570414bd68fSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 10571414bd68fSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10572414bd68fSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10573414bd68fSmrgAC_LANG_CASE( 10574414bd68fSmrg [C], [ 10575414bd68fSmrg CWARNFLAGS="$BASE_CFLAGS" 10576414bd68fSmrg if test "x$GCC" = xyes ; then 10577414bd68fSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 10578414bd68fSmrg fi 10579414bd68fSmrg AC_SUBST(CWARNFLAGS) 10580414bd68fSmrg ] 10581414bd68fSmrg) 10582414bd68fSmrg]) # XORG_CWARNFLAGS 10583ee3138f1Smrg 10584414bd68fSmrg# XORG_STRICT_OPTION 10585414bd68fSmrg# ----------------------- 10586414bd68fSmrg# Minimum version: 1.3.0 10587a1ed278cSmrg# 10588414bd68fSmrg# Add configure option to enable strict compilation flags, such as treating 10589414bd68fSmrg# warnings as fatal errors. 10590414bd68fSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 10591414bd68fSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 10592414bd68fSmrg# 10593414bd68fSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 10594414bd68fSmrg# when strict compilation is unconditionally desired. 10595414bd68fSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 10596414bd68fSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 10597414bd68fSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10598414bd68fSmrg 10599414bd68fSmrgAC_ARG_ENABLE(strict-compilation, 10600414bd68fSmrg AS_HELP_STRING([--enable-strict-compilation], 10601414bd68fSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 10602414bd68fSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 10603414bd68fSmrg 10604414bd68fSmrgAC_LANG_CASE( 10605414bd68fSmrg [C], [ 10606414bd68fSmrg define([PREFIX], [C]) 10607414bd68fSmrg ], 10608414bd68fSmrg [C++], [ 10609414bd68fSmrg define([PREFIX], [CXX]) 10610414bd68fSmrg ] 10611414bd68fSmrg) 10612414bd68fSmrg 10613414bd68fSmrg[STRICT_]PREFIX[FLAGS]="" 10614414bd68fSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 10615414bd68fSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 10616414bd68fSmrg 10617414bd68fSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 10618414bd68fSmrg# activate it with -Werror, so we add it here explicitly. 10619414bd68fSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 10620414bd68fSmrg 10621414bd68fSmrgif test "x$STRICT_COMPILE" = "xyes"; then 10622414bd68fSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 10623414bd68fSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 10624414bd68fSmrgfi 10625414bd68fSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 10626414bd68fSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10627414bd68fSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 10628414bd68fSmrg]) # XORG_STRICT_OPTION 10629414bd68fSmrg 10630414bd68fSmrg# XORG_DEFAULT_OPTIONS 10631414bd68fSmrg# -------------------- 10632414bd68fSmrg# Minimum version: 1.3.0 10633a1ed278cSmrg# 10634414bd68fSmrg# Defines default options for X.Org modules. 10635a1ed278cSmrg# 10636414bd68fSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 10637414bd68fSmrgAC_REQUIRE([AC_PROG_INSTALL]) 10638414bd68fSmrgXORG_COMPILER_FLAGS 10639414bd68fSmrgXORG_CWARNFLAGS 10640414bd68fSmrgXORG_STRICT_OPTION 10641414bd68fSmrgXORG_RELEASE_VERSION 10642414bd68fSmrgXORG_CHANGELOG 10643414bd68fSmrgXORG_INSTALL 10644414bd68fSmrgXORG_MANPAGE_SECTIONS 10645414bd68fSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 10646414bd68fSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 10647414bd68fSmrg]) # XORG_DEFAULT_OPTIONS 10648ee3138f1Smrg 10649414bd68fSmrg# XORG_INSTALL() 10650a1ed278cSmrg# ---------------- 10651414bd68fSmrg# Minimum version: 1.4.0 10652a1ed278cSmrg# 10653414bd68fSmrg# Defines the variable INSTALL_CMD as the command to copy 10654414bd68fSmrg# INSTALL from $prefix/share/util-macros. 10655a1ed278cSmrg# 10656414bd68fSmrgAC_DEFUN([XORG_INSTALL], [ 10657414bd68fSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10658414bd68fSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 10659414bd68fSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 10660414bd68fSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 10661414bd68fSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 10662414bd68fSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 10663414bd68fSmrgAC_SUBST([INSTALL_CMD]) 10664414bd68fSmrg]) # XORG_INSTALL 10665414bd68fSmrgdnl Copyright 2005 Red Hat, Inc 10666414bd68fSmrgdnl 10667414bd68fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 10668414bd68fSmrgdnl documentation for any purpose is hereby granted without fee, provided that 10669414bd68fSmrgdnl the above copyright notice appear in all copies and that both that 10670414bd68fSmrgdnl copyright notice and this permission notice appear in supporting 10671414bd68fSmrgdnl documentation. 10672414bd68fSmrgdnl 10673414bd68fSmrgdnl The above copyright notice and this permission notice shall be included 10674414bd68fSmrgdnl in all copies or substantial portions of the Software. 10675414bd68fSmrgdnl 10676414bd68fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10677414bd68fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10678414bd68fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10679414bd68fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10680414bd68fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10681414bd68fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10682414bd68fSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 10683414bd68fSmrgdnl 10684414bd68fSmrgdnl Except as contained in this notice, the name of the copyright holders shall 10685414bd68fSmrgdnl not be used in advertising or otherwise to promote the sale, use or 10686414bd68fSmrgdnl other dealings in this Software without prior written authorization 10687414bd68fSmrgdnl from the copyright holders. 10688414bd68fSmrgdnl 10689ee3138f1Smrg 10690414bd68fSmrg# XORG_RELEASE_VERSION 10691414bd68fSmrg# -------------------- 10692414bd68fSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 10693414bd68fSmrg 10694414bd68fSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 10695414bd68fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 10696414bd68fSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 10697414bd68fSmrg [Major version of this package]) 10698414bd68fSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 10699414bd68fSmrg if test "x$PVM" = "x"; then 10700414bd68fSmrg PVM="0" 10701414bd68fSmrg fi 10702414bd68fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 10703414bd68fSmrg [$PVM], 10704414bd68fSmrg [Minor version of this package]) 10705414bd68fSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 10706414bd68fSmrg if test "x$PVP" = "x"; then 10707414bd68fSmrg PVP="0" 10708414bd68fSmrg fi 10709414bd68fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 10710414bd68fSmrg [$PVP], 10711414bd68fSmrg [Patch version of this package]) 10712414bd68fSmrg]) 10713414bd68fSmrg 10714414bd68fSmrg# XORG_CHANGELOG() 10715414bd68fSmrg# ---------------- 10716414bd68fSmrg# Minimum version: 1.2.0 107173e72ca8cSmrg# 10718414bd68fSmrg# Defines the variable CHANGELOG_CMD as the command to generate 10719414bd68fSmrg# ChangeLog from git. 107203e72ca8cSmrg# 107213e72ca8cSmrg# 10722414bd68fSmrgAC_DEFUN([XORG_CHANGELOG], [ 10723414bd68fSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 10724414bd68fSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 10725414bd68fSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 10726414bd68fSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 10727414bd68fSmrgAC_SUBST([CHANGELOG_CMD]) 10728414bd68fSmrg]) # XORG_CHANGELOG 10729414bd68fSmrg 10730414bd68fSmrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 107313e72ca8cSmrg# 10732414bd68fSmrg# This file is free software; the Free Software Foundation 10733414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 10734414bd68fSmrg# with or without modifications, as long as this notice is preserved. 107353e72ca8cSmrg 10736414bd68fSmrg# AM_AUTOMAKE_VERSION(VERSION) 10737414bd68fSmrg# ---------------------------- 10738414bd68fSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 10739414bd68fSmrg# generated from the m4 files accompanying Automake X.Y. 10740414bd68fSmrg# (This private macro should not be called outside this file.) 10741414bd68fSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 10742414bd68fSmrg[am__api_version='1.15' 10743414bd68fSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 10744414bd68fSmrgdnl require some minimum version. Point them to the right macro. 10745414bd68fSmrgm4_if([$1], [1.15], [], 10746414bd68fSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 10747414bd68fSmrg]) 10748414bd68fSmrg 10749414bd68fSmrg# _AM_AUTOCONF_VERSION(VERSION) 10750414bd68fSmrg# ----------------------------- 10751414bd68fSmrg# aclocal traces this macro to find the Autoconf version. 10752414bd68fSmrg# This is a private macro too. Using m4_define simplifies 10753414bd68fSmrg# the logic in aclocal, which can simply ignore this definition. 10754414bd68fSmrgm4_define([_AM_AUTOCONF_VERSION], []) 10755414bd68fSmrg 10756414bd68fSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 10757414bd68fSmrg# ------------------------------- 10758414bd68fSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 10759414bd68fSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 10760414bd68fSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 10761414bd68fSmrg[AM_AUTOMAKE_VERSION([1.15])dnl 10762414bd68fSmrgm4_ifndef([AC_AUTOCONF_VERSION], 10763414bd68fSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 10764414bd68fSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 10765414bd68fSmrg 10766414bd68fSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 10767414bd68fSmrg 10768414bd68fSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 107693e72ca8cSmrg# 10770414bd68fSmrg# This file is free software; the Free Software Foundation 10771414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 10772414bd68fSmrg# with or without modifications, as long as this notice is preserved. 10773414bd68fSmrg 10774414bd68fSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 10775414bd68fSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 10776414bd68fSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 107773e72ca8cSmrg# 10778414bd68fSmrg# Of course, Automake must honor this variable whenever it calls a 10779414bd68fSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 10780414bd68fSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 10781414bd68fSmrg# depending on how configure is run. This is pretty annoying, since 10782414bd68fSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 10783414bd68fSmrg# source directory, any form will work fine, but in subdirectories a 10784414bd68fSmrg# relative path needs to be adjusted first. 107853e72ca8cSmrg# 10786414bd68fSmrg# $ac_aux_dir/missing 10787414bd68fSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 10788414bd68fSmrg# $top_srcdir/$ac_aux_dir/missing 10789414bd68fSmrg# fails if $ac_aux_dir is absolute, 10790414bd68fSmrg# fails when called from a subdirectory in a VPATH build with 10791414bd68fSmrg# a relative $ac_aux_dir 107923e72ca8cSmrg# 10793414bd68fSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 10794414bd68fSmrg# are both prefixed by $srcdir. In an in-source build this is usually 10795414bd68fSmrg# harmless because $srcdir is '.', but things will broke when you 10796414bd68fSmrg# start a VPATH build or use an absolute $srcdir. 107973e72ca8cSmrg# 10798414bd68fSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 10799414bd68fSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 10800414bd68fSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 10801414bd68fSmrg# and then we would define $MISSING as 10802414bd68fSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 10803414bd68fSmrg# This will work as long as MISSING is not called from configure, because 10804414bd68fSmrg# unfortunately $(top_srcdir) has no meaning in configure. 10805414bd68fSmrg# However there are other variables, like CC, which are often used in 10806414bd68fSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 108073e72ca8cSmrg# 10808414bd68fSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 10809414bd68fSmrg# absolute PATH. The drawback is that using absolute paths prevent a 10810414bd68fSmrg# configured tree to be moved without reconfiguration. 10811414bd68fSmrg 10812414bd68fSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10813414bd68fSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 10814414bd68fSmrg# Expand $ac_aux_dir to an absolute path. 10815414bd68fSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 10816414bd68fSmrg]) 10817414bd68fSmrg 10818414bd68fSmrg# AM_CONDITIONAL -*- Autoconf -*- 10819414bd68fSmrg 10820414bd68fSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 108213e72ca8cSmrg# 10822414bd68fSmrg# This file is free software; the Free Software Foundation 10823414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 10824414bd68fSmrg# with or without modifications, as long as this notice is preserved. 10825414bd68fSmrg 10826414bd68fSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 10827414bd68fSmrg# ------------------------------------- 10828414bd68fSmrg# Define a conditional. 10829414bd68fSmrgAC_DEFUN([AM_CONDITIONAL], 10830414bd68fSmrg[AC_PREREQ([2.52])dnl 10831414bd68fSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 10832414bd68fSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 10833414bd68fSmrgAC_SUBST([$1_TRUE])dnl 10834414bd68fSmrgAC_SUBST([$1_FALSE])dnl 10835414bd68fSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 10836414bd68fSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 10837414bd68fSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 10838414bd68fSmrgif $2; then 10839414bd68fSmrg $1_TRUE= 10840414bd68fSmrg $1_FALSE='#' 10841414bd68fSmrgelse 10842414bd68fSmrg $1_TRUE='#' 10843414bd68fSmrg $1_FALSE= 10844414bd68fSmrgfi 10845414bd68fSmrgAC_CONFIG_COMMANDS_PRE( 10846414bd68fSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 10847414bd68fSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 10848414bd68fSmrgUsually this means the macro was only invoked conditionally.]]) 10849414bd68fSmrgfi])]) 10850414bd68fSmrg 10851414bd68fSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 108523e72ca8cSmrg# 10853414bd68fSmrg# This file is free software; the Free Software Foundation 10854414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 10855414bd68fSmrg# with or without modifications, as long as this notice is preserved. 10856414bd68fSmrg 10857414bd68fSmrg 10858414bd68fSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 10859414bd68fSmrg# written in clear, in which case automake, when reading aclocal.m4, 10860414bd68fSmrg# will think it sees a *use*, and therefore will trigger all it's 10861414bd68fSmrg# C support machinery. Also note that it means that autoscan, seeing 10862414bd68fSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 10863414bd68fSmrg 10864414bd68fSmrg 10865414bd68fSmrg# _AM_DEPENDENCIES(NAME) 10866414bd68fSmrg# ---------------------- 10867414bd68fSmrg# See how the compiler implements dependency checking. 10868414bd68fSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 10869414bd68fSmrg# We try a few techniques and use that to set a single cache variable. 108703e72ca8cSmrg# 10871414bd68fSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 10872414bd68fSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 10873414bd68fSmrg# dependency, and given that the user is not expected to run this macro, 10874414bd68fSmrg# just rely on AC_PROG_CC. 10875414bd68fSmrgAC_DEFUN([_AM_DEPENDENCIES], 10876414bd68fSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 10877414bd68fSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 10878414bd68fSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 10879414bd68fSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 108803e72ca8cSmrg 10881414bd68fSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 10882414bd68fSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 10883414bd68fSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 10884414bd68fSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 10885414bd68fSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 10886414bd68fSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 10887414bd68fSmrg [depcc="$$1" am_compiler_list=]) 108883e72ca8cSmrg 10889414bd68fSmrgAC_CACHE_CHECK([dependency style of $depcc], 10890414bd68fSmrg [am_cv_$1_dependencies_compiler_type], 10891414bd68fSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 10892414bd68fSmrg # We make a subdir and do the tests there. Otherwise we can end up 10893414bd68fSmrg # making bogus files that we don't know about and never remove. For 10894414bd68fSmrg # instance it was reported that on HP-UX the gcc test will end up 10895414bd68fSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 10896414bd68fSmrg # in D". 10897414bd68fSmrg rm -rf conftest.dir 10898414bd68fSmrg mkdir conftest.dir 10899414bd68fSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 10900414bd68fSmrg # using a relative directory. 10901414bd68fSmrg cp "$am_depcomp" conftest.dir 10902414bd68fSmrg cd conftest.dir 10903414bd68fSmrg # We will build objects and dependencies in a subdirectory because 10904414bd68fSmrg # it helps to detect inapplicable dependency modes. For instance 10905414bd68fSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 10906414bd68fSmrg # side effect of compilation, but ICC will put the dependencies in 10907414bd68fSmrg # the current directory while Tru64 will put them in the object 10908414bd68fSmrg # directory. 10909414bd68fSmrg mkdir sub 109103e72ca8cSmrg 10911414bd68fSmrg am_cv_$1_dependencies_compiler_type=none 10912414bd68fSmrg if test "$am_compiler_list" = ""; then 10913414bd68fSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 109143e72ca8cSmrg fi 10915414bd68fSmrg am__universal=false 10916414bd68fSmrg m4_case([$1], [CC], 10917414bd68fSmrg [case " $depcc " in #( 10918414bd68fSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 10919414bd68fSmrg esac], 10920414bd68fSmrg [CXX], 10921414bd68fSmrg [case " $depcc " in #( 10922414bd68fSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 10923414bd68fSmrg esac]) 10924414bd68fSmrg 10925414bd68fSmrg for depmode in $am_compiler_list; do 10926414bd68fSmrg # Setup a source with many dependencies, because some compilers 10927414bd68fSmrg # like to wrap large dependency lists on column 80 (with \), and 10928414bd68fSmrg # we should not choose a depcomp mode which is confused by this. 10929414bd68fSmrg # 10930414bd68fSmrg # We need to recreate these files for each test, as the compiler may 10931414bd68fSmrg # overwrite some of them when testing with obscure command lines. 10932414bd68fSmrg # This happens at least with the AIX C compiler. 10933414bd68fSmrg : > sub/conftest.c 10934414bd68fSmrg for i in 1 2 3 4 5 6; do 10935414bd68fSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 10936414bd68fSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 10937414bd68fSmrg # Solaris 10 /bin/sh. 10938414bd68fSmrg echo '/* dummy */' > sub/conftst$i.h 10939414bd68fSmrg done 10940414bd68fSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 10941414bd68fSmrg 10942414bd68fSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 10943414bd68fSmrg # mode. It turns out that the SunPro C++ compiler does not properly 10944414bd68fSmrg # handle '-M -o', and we need to detect this. Also, some Intel 10945414bd68fSmrg # versions had trouble with output in subdirs. 10946414bd68fSmrg am__obj=sub/conftest.${OBJEXT-o} 10947414bd68fSmrg am__minus_obj="-o $am__obj" 10948414bd68fSmrg case $depmode in 10949414bd68fSmrg gcc) 10950414bd68fSmrg # This depmode causes a compiler race in universal mode. 10951414bd68fSmrg test "$am__universal" = false || continue 10952414bd68fSmrg ;; 10953414bd68fSmrg nosideeffect) 10954414bd68fSmrg # After this tag, mechanisms are not by side-effect, so they'll 10955414bd68fSmrg # only be used when explicitly requested. 10956414bd68fSmrg if test "x$enable_dependency_tracking" = xyes; then 10957414bd68fSmrg continue 10958414bd68fSmrg else 10959414bd68fSmrg break 10960414bd68fSmrg fi 10961414bd68fSmrg ;; 10962414bd68fSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 10963414bd68fSmrg # This compiler won't grok '-c -o', but also, the minuso test has 10964414bd68fSmrg # not run yet. These depmodes are late enough in the game, and 10965414bd68fSmrg # so weak that their functioning should not be impacted. 10966414bd68fSmrg am__obj=conftest.${OBJEXT-o} 10967414bd68fSmrg am__minus_obj= 10968414bd68fSmrg ;; 10969414bd68fSmrg none) break ;; 10970414bd68fSmrg esac 10971414bd68fSmrg if depmode=$depmode \ 10972414bd68fSmrg source=sub/conftest.c object=$am__obj \ 10973414bd68fSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 10974414bd68fSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 10975414bd68fSmrg >/dev/null 2>conftest.err && 10976414bd68fSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 10977414bd68fSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 10978414bd68fSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 10979414bd68fSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 10980414bd68fSmrg # icc doesn't choke on unknown options, it will just issue warnings 10981414bd68fSmrg # or remarks (even with -Werror). So we grep stderr for any message 10982414bd68fSmrg # that says an option was ignored or not supported. 10983414bd68fSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 10984414bd68fSmrg # icc: Command line warning: ignoring option '-M'; no argument required 10985414bd68fSmrg # The diagnosis changed in icc 8.0: 10986414bd68fSmrg # icc: Command line remark: option '-MP' not supported 10987414bd68fSmrg if (grep 'ignoring option' conftest.err || 10988414bd68fSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 10989414bd68fSmrg am_cv_$1_dependencies_compiler_type=$depmode 10990414bd68fSmrg break 10991414bd68fSmrg fi 10992414bd68fSmrg fi 10993414bd68fSmrg done 10994414bd68fSmrg 10995414bd68fSmrg cd .. 10996414bd68fSmrg rm -rf conftest.dir 10997414bd68fSmrgelse 10998414bd68fSmrg am_cv_$1_dependencies_compiler_type=none 109993e72ca8cSmrgfi 11000414bd68fSmrg]) 11001414bd68fSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 11002414bd68fSmrgAM_CONDITIONAL([am__fastdep$1], [ 11003414bd68fSmrg test "x$enable_dependency_tracking" != xno \ 11004414bd68fSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 11005414bd68fSmrg]) 110063e72ca8cSmrg 11007414bd68fSmrg 11008414bd68fSmrg# AM_SET_DEPDIR 11009414bd68fSmrg# ------------- 11010414bd68fSmrg# Choose a directory name for dependency files. 11011414bd68fSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 11012414bd68fSmrgAC_DEFUN([AM_SET_DEPDIR], 11013414bd68fSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11014414bd68fSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 11015414bd68fSmrg]) 11016414bd68fSmrg 11017414bd68fSmrg 11018414bd68fSmrg# AM_DEP_TRACK 11019414bd68fSmrg# ------------ 11020414bd68fSmrgAC_DEFUN([AM_DEP_TRACK], 11021414bd68fSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 11022414bd68fSmrgAS_HELP_STRING( 11023414bd68fSmrg [--enable-dependency-tracking], 11024414bd68fSmrg [do not reject slow dependency extractors]) 11025414bd68fSmrgAS_HELP_STRING( 11026414bd68fSmrg [--disable-dependency-tracking], 11027414bd68fSmrg [speeds up one-time build])]) 11028414bd68fSmrgif test "x$enable_dependency_tracking" != xno; then 11029414bd68fSmrg am_depcomp="$ac_aux_dir/depcomp" 11030414bd68fSmrg AMDEPBACKSLASH='\' 11031414bd68fSmrg am__nodep='_no' 110323e72ca8cSmrgfi 11033414bd68fSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 11034414bd68fSmrgAC_SUBST([AMDEPBACKSLASH])dnl 11035414bd68fSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11036414bd68fSmrgAC_SUBST([am__nodep])dnl 11037414bd68fSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 11038414bd68fSmrg]) 110393e72ca8cSmrg 11040414bd68fSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 110413e72ca8cSmrg 11042414bd68fSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 110433e72ca8cSmrg# 11044414bd68fSmrg# This file is free software; the Free Software Foundation 11045414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 11046414bd68fSmrg# with or without modifications, as long as this notice is preserved. 110473e72ca8cSmrg 110483e72ca8cSmrg 11049414bd68fSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 11050414bd68fSmrg# ------------------------------ 11051414bd68fSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11052414bd68fSmrg[{ 11053414bd68fSmrg # Older Autoconf quotes --file arguments for eval, but not when files 11054414bd68fSmrg # are listed without --file. Let's play safe and only enable the eval 11055414bd68fSmrg # if we detect the quoting. 11056414bd68fSmrg case $CONFIG_FILES in 11057414bd68fSmrg *\'*) eval set x "$CONFIG_FILES" ;; 11058414bd68fSmrg *) set x $CONFIG_FILES ;; 11059414bd68fSmrg esac 11060414bd68fSmrg shift 11061414bd68fSmrg for mf 11062414bd68fSmrg do 11063414bd68fSmrg # Strip MF so we end up with the name of the file. 11064414bd68fSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11065414bd68fSmrg # Check whether this is an Automake generated Makefile or not. 11066414bd68fSmrg # We used to match only the files named 'Makefile.in', but 11067414bd68fSmrg # some people rename them; so instead we look at the file content. 11068414bd68fSmrg # Grep'ing the first line is not enough: some people post-process 11069414bd68fSmrg # each Makefile.in and add a new line on top of each file to say so. 11070414bd68fSmrg # Grep'ing the whole file is not good either: AIX grep has a line 11071414bd68fSmrg # limit of 2048, but all sed's we know have understand at least 4000. 11072414bd68fSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11073414bd68fSmrg dirpart=`AS_DIRNAME("$mf")` 11074414bd68fSmrg else 11075414bd68fSmrg continue 11076414bd68fSmrg fi 11077414bd68fSmrg # Extract the definition of DEPDIR, am__include, and am__quote 11078414bd68fSmrg # from the Makefile without running 'make'. 11079414bd68fSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11080414bd68fSmrg test -z "$DEPDIR" && continue 11081414bd68fSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 11082414bd68fSmrg test -z "$am__include" && continue 11083414bd68fSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11084414bd68fSmrg # Find all dependency output files, they are included files with 11085414bd68fSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11086414bd68fSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 11087414bd68fSmrg # expansion. 11088414bd68fSmrg for file in `sed -n " 11089414bd68fSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11090414bd68fSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 11091414bd68fSmrg # Make sure the directory exists. 11092414bd68fSmrg test -f "$dirpart/$file" && continue 11093414bd68fSmrg fdir=`AS_DIRNAME(["$file"])` 11094414bd68fSmrg AS_MKDIR_P([$dirpart/$fdir]) 11095414bd68fSmrg # echo "creating $dirpart/$file" 11096414bd68fSmrg echo '# dummy' > "$dirpart/$file" 11097414bd68fSmrg done 11098414bd68fSmrg done 11099414bd68fSmrg} 11100414bd68fSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11101414bd68fSmrg 11102414bd68fSmrg 11103414bd68fSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 11104414bd68fSmrg# ----------------------------- 11105414bd68fSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 111063e72ca8cSmrg# 11107414bd68fSmrg# This code is only required when automatic dependency tracking 11108414bd68fSmrg# is enabled. FIXME. This creates each '.P' file that we will 11109414bd68fSmrg# need in order to bootstrap the dependency handling code. 11110414bd68fSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11111414bd68fSmrg[AC_CONFIG_COMMANDS([depfiles], 11112414bd68fSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11113414bd68fSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 11114414bd68fSmrg]) 11115414bd68fSmrg 11116414bd68fSmrg# Do all the work for Automake. -*- Autoconf -*- 11117414bd68fSmrg 11118414bd68fSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 111193e72ca8cSmrg# 11120414bd68fSmrg# This file is free software; the Free Software Foundation 11121414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 11122414bd68fSmrg# with or without modifications, as long as this notice is preserved. 111233e72ca8cSmrg 11124414bd68fSmrg# This macro actually does too much. Some checks are only needed if 11125414bd68fSmrg# your package does certain things. But this isn't really a big deal. 111263e72ca8cSmrg 11127414bd68fSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 11128414bd68fSmrgm4_define([AC_PROG_CC], 11129414bd68fSmrgm4_defn([AC_PROG_CC]) 11130414bd68fSmrg[_AM_PROG_CC_C_O 11131414bd68fSmrg]) 111323e72ca8cSmrg 11133414bd68fSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11134414bd68fSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 11135414bd68fSmrg# ----------------------------------------------- 11136414bd68fSmrg# The call with PACKAGE and VERSION arguments is the old style 11137414bd68fSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 11138414bd68fSmrg# and VERSION should now be passed to AC_INIT and removed from 11139414bd68fSmrg# the call to AM_INIT_AUTOMAKE. 11140414bd68fSmrg# We support both call styles for the transition. After 11141414bd68fSmrg# the next Automake release, Autoconf can make the AC_INIT 11142414bd68fSmrg# arguments mandatory, and then we can depend on a new Autoconf 11143414bd68fSmrg# release and drop the old call support. 11144414bd68fSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 11145414bd68fSmrg[AC_PREREQ([2.65])dnl 11146414bd68fSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 11147414bd68fSmrgdnl the ones we care about. 11148414bd68fSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11149414bd68fSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11150414bd68fSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 11151414bd68fSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 11152414bd68fSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11153414bd68fSmrg # is not polluted with repeated "-I." 11154414bd68fSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11155414bd68fSmrg # test to see if srcdir already configured 11156414bd68fSmrg if test -f $srcdir/config.status; then 11157414bd68fSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11158414bd68fSmrg fi 11159414bd68fSmrgfi 11160414bd68fSmrg 11161414bd68fSmrg# test whether we have cygpath 11162414bd68fSmrgif test -z "$CYGPATH_W"; then 11163414bd68fSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 11164414bd68fSmrg CYGPATH_W='cygpath -w' 11165414bd68fSmrg else 11166414bd68fSmrg CYGPATH_W=echo 11167414bd68fSmrg fi 111683e72ca8cSmrgfi 11169414bd68fSmrgAC_SUBST([CYGPATH_W]) 111703e72ca8cSmrg 11171414bd68fSmrg# Define the identity of the package. 11172414bd68fSmrgdnl Distinguish between old-style and new-style calls. 11173414bd68fSmrgm4_ifval([$2], 11174414bd68fSmrg[AC_DIAGNOSE([obsolete], 11175414bd68fSmrg [$0: two- and three-arguments forms are deprecated.]) 11176414bd68fSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11177414bd68fSmrg AC_SUBST([PACKAGE], [$1])dnl 11178414bd68fSmrg AC_SUBST([VERSION], [$2])], 11179414bd68fSmrg[_AM_SET_OPTIONS([$1])dnl 11180414bd68fSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11181414bd68fSmrgm4_if( 11182414bd68fSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 11183414bd68fSmrg [ok:ok],, 11184414bd68fSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11185414bd68fSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11186414bd68fSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11187ee3138f1Smrg 11188414bd68fSmrg_AM_IF_OPTION([no-define],, 11189414bd68fSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 11190414bd68fSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 11191ee3138f1Smrg 11192414bd68fSmrg# Some tools Automake needs. 11193414bd68fSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 11194414bd68fSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 11195414bd68fSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 11196414bd68fSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 11197414bd68fSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 11198414bd68fSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 11199414bd68fSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 11200414bd68fSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11201414bd68fSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11202414bd68fSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 11203414bd68fSmrg# For better backward compatibility. To be removed once Automake 1.9.x 11204414bd68fSmrg# dies out for good. For more background, see: 11205414bd68fSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11206414bd68fSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11207414bd68fSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 11208414bd68fSmrg# We need awk for the "check" target (and possibly the TAP driver). The 11209414bd68fSmrg# system "awk" is bad on some platforms. 11210414bd68fSmrgAC_REQUIRE([AC_PROG_AWK])dnl 11211414bd68fSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 11212414bd68fSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 11213414bd68fSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11214414bd68fSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11215414bd68fSmrg [_AM_PROG_TAR([v7])])]) 11216414bd68fSmrg_AM_IF_OPTION([no-dependencies],, 11217414bd68fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 11218414bd68fSmrg [_AM_DEPENDENCIES([CC])], 11219414bd68fSmrg [m4_define([AC_PROG_CC], 11220414bd68fSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 11221414bd68fSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 11222414bd68fSmrg [_AM_DEPENDENCIES([CXX])], 11223414bd68fSmrg [m4_define([AC_PROG_CXX], 11224414bd68fSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 11225414bd68fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 11226414bd68fSmrg [_AM_DEPENDENCIES([OBJC])], 11227414bd68fSmrg [m4_define([AC_PROG_OBJC], 11228414bd68fSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11229414bd68fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11230414bd68fSmrg [_AM_DEPENDENCIES([OBJCXX])], 11231414bd68fSmrg [m4_define([AC_PROG_OBJCXX], 11232414bd68fSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 11233414bd68fSmrg]) 11234414bd68fSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 11235414bd68fSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 11236414bd68fSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 11237414bd68fSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11238414bd68fSmrgAC_CONFIG_COMMANDS_PRE(dnl 11239414bd68fSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 11240414bd68fSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11241ee3138f1Smrg 11242414bd68fSmrg# POSIX will say in a future version that running "rm -f" with no argument 11243414bd68fSmrg# is OK; and we want to be able to make that assumption in our Makefile 11244414bd68fSmrg# recipes. So use an aggressive probe to check that the usage we want is 11245414bd68fSmrg# actually supported "in the wild" to an acceptable degree. 11246414bd68fSmrg# See automake bug#10828. 11247414bd68fSmrg# To make any issue more visible, cause the running configure to be aborted 11248414bd68fSmrg# by default if the 'rm' program in use doesn't match our expectations; the 11249414bd68fSmrg# user can still override this though. 11250414bd68fSmrgif rm -f && rm -fr && rm -rf; then : OK; else 11251414bd68fSmrg cat >&2 <<'END' 11252414bd68fSmrgOops! 11253414bd68fSmrg 11254414bd68fSmrgYour 'rm' program seems unable to run without file operands specified 11255414bd68fSmrgon the command line, even when the '-f' option is present. This is contrary 11256414bd68fSmrgto the behaviour of most rm programs out there, and not conforming with 11257414bd68fSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 11258414bd68fSmrg 11259414bd68fSmrgPlease tell bug-automake@gnu.org about your system, including the value 11260414bd68fSmrgof your $PATH and any error possibly output before this message. This 11261414bd68fSmrgcan help us improve future automake versions. 11262ee3138f1Smrg 11263414bd68fSmrgEND 11264414bd68fSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 11265414bd68fSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 11266414bd68fSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 11267414bd68fSmrg echo >&2 11268414bd68fSmrg else 11269414bd68fSmrg cat >&2 <<'END' 11270414bd68fSmrgAborting the configuration process, to ensure you take notice of the issue. 11271ee3138f1Smrg 11272414bd68fSmrgYou can download and install GNU coreutils to get an 'rm' implementation 11273414bd68fSmrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 11274ee3138f1Smrg 11275414bd68fSmrgIf you want to complete the configuration process using your problematic 11276414bd68fSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 11277414bd68fSmrgto "yes", and re-run configure. 11278ee3138f1Smrg 11279414bd68fSmrgEND 11280414bd68fSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 11281414bd68fSmrg fi 11282a1ed278cSmrgfi 11283414bd68fSmrgdnl The trailing newline in this macro's definition is deliberate, for 11284414bd68fSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 11285414bd68fSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 11286414bd68fSmrg]) 11287ee3138f1Smrg 11288414bd68fSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11289414bd68fSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11290414bd68fSmrgdnl mangled by Autoconf and run in a shell conditional statement. 11291414bd68fSmrgm4_define([_AC_COMPILER_EXEEXT], 11292414bd68fSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11293ee3138f1Smrg 11294414bd68fSmrg# When config.status generates a header, we must update the stamp-h file. 11295414bd68fSmrg# This file resides in the same directory as the config header 11296414bd68fSmrg# that is generated. The stamp files are numbered to have different names. 11297ee3138f1Smrg 11298414bd68fSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11299414bd68fSmrg# loop where config.status creates the headers, so we can generate 11300414bd68fSmrg# our stamp files there. 11301414bd68fSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11302414bd68fSmrg[# Compute $1's index in $config_headers. 11303414bd68fSmrg_am_arg=$1 11304414bd68fSmrg_am_stamp_count=1 11305414bd68fSmrgfor _am_header in $config_headers :; do 11306414bd68fSmrg case $_am_header in 11307414bd68fSmrg $_am_arg | $_am_arg:* ) 11308414bd68fSmrg break ;; 11309414bd68fSmrg * ) 11310414bd68fSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11311414bd68fSmrg esac 11312414bd68fSmrgdone 11313414bd68fSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11314ee3138f1Smrg 11315414bd68fSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 1131634977a2fSmrg# 11317414bd68fSmrg# This file is free software; the Free Software Foundation 11318414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 11319414bd68fSmrg# with or without modifications, as long as this notice is preserved. 11320ee3138f1Smrg 11321414bd68fSmrg# AM_PROG_INSTALL_SH 11322414bd68fSmrg# ------------------ 11323414bd68fSmrg# Define $install_sh. 11324414bd68fSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 11325414bd68fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11326414bd68fSmrgif test x"${install_sh+set}" != xset; then 11327414bd68fSmrg case $am_aux_dir in 11328414bd68fSmrg *\ * | *\ *) 11329414bd68fSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11330414bd68fSmrg *) 11331414bd68fSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 11332414bd68fSmrg esac 11333414bd68fSmrgfi 11334414bd68fSmrgAC_SUBST([install_sh])]) 1133534977a2fSmrg 11336414bd68fSmrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 11337414bd68fSmrg# 11338414bd68fSmrg# This file is free software; the Free Software Foundation 11339414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 11340414bd68fSmrg# with or without modifications, as long as this notice is preserved. 11341414bd68fSmrg 11342414bd68fSmrg# Check whether the underlying file-system supports filenames 11343414bd68fSmrg# with a leading dot. For instance MS-DOS doesn't. 11344414bd68fSmrgAC_DEFUN([AM_SET_LEADING_DOT], 11345414bd68fSmrg[rm -rf .tst 2>/dev/null 11346414bd68fSmrgmkdir .tst 2>/dev/null 11347414bd68fSmrgif test -d .tst; then 11348414bd68fSmrg am__leading_dot=. 11349414bd68fSmrgelse 11350414bd68fSmrg am__leading_dot=_ 11351a1ed278cSmrgfi 11352414bd68fSmrgrmdir .tst 2>/dev/null 11353414bd68fSmrgAC_SUBST([am__leading_dot])]) 11354ee3138f1Smrg 11355414bd68fSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 11356b425557eSmrg 11357414bd68fSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 113583e72ca8cSmrg# 11359414bd68fSmrg# This file is free software; the Free Software Foundation 11360414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 11361414bd68fSmrg# with or without modifications, as long as this notice is preserved. 113623e72ca8cSmrg 11363414bd68fSmrg# AM_MAKE_INCLUDE() 11364414bd68fSmrg# ----------------- 11365414bd68fSmrg# Check to see how make treats includes. 11366414bd68fSmrgAC_DEFUN([AM_MAKE_INCLUDE], 11367414bd68fSmrg[am_make=${MAKE-make} 11368414bd68fSmrgcat > confinc << 'END' 11369414bd68fSmrgam__doit: 11370414bd68fSmrg @echo this is the am__doit target 11371414bd68fSmrg.PHONY: am__doit 11372414bd68fSmrgEND 11373414bd68fSmrg# If we don't find an include directive, just comment out the code. 11374414bd68fSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 11375414bd68fSmrgam__include="#" 11376414bd68fSmrgam__quote= 11377414bd68fSmrg_am_result=none 11378414bd68fSmrg# First try GNU make style include. 11379414bd68fSmrgecho "include confinc" > confmf 11380414bd68fSmrg# Ignore all kinds of additional output from 'make'. 11381414bd68fSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 11382414bd68fSmrg*the\ am__doit\ target*) 11383414bd68fSmrg am__include=include 11384414bd68fSmrg am__quote= 11385414bd68fSmrg _am_result=GNU 11386414bd68fSmrg ;; 11387414bd68fSmrgesac 11388414bd68fSmrg# Now try BSD make style include. 11389414bd68fSmrgif test "$am__include" = "#"; then 11390414bd68fSmrg echo '.include "confinc"' > confmf 11391414bd68fSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 11392414bd68fSmrg *the\ am__doit\ target*) 11393414bd68fSmrg am__include=.include 11394414bd68fSmrg am__quote="\"" 11395414bd68fSmrg _am_result=BSD 11396414bd68fSmrg ;; 11397414bd68fSmrg esac 11398414bd68fSmrgfi 11399414bd68fSmrgAC_SUBST([am__include]) 11400414bd68fSmrgAC_SUBST([am__quote]) 11401414bd68fSmrgAC_MSG_RESULT([$_am_result]) 11402414bd68fSmrgrm -f confinc confmf 11403414bd68fSmrg]) 114043e72ca8cSmrg 11405414bd68fSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 114063e72ca8cSmrg 11407414bd68fSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 11408414bd68fSmrg# 11409414bd68fSmrg# This file is free software; the Free Software Foundation 11410414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 11411414bd68fSmrg# with or without modifications, as long as this notice is preserved. 114123e72ca8cSmrg 11413414bd68fSmrg# AM_MISSING_PROG(NAME, PROGRAM) 11414414bd68fSmrg# ------------------------------ 11415414bd68fSmrgAC_DEFUN([AM_MISSING_PROG], 11416414bd68fSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 11417414bd68fSmrg$1=${$1-"${am_missing_run}$2"} 11418414bd68fSmrgAC_SUBST($1)]) 114193e72ca8cSmrg 11420414bd68fSmrg# AM_MISSING_HAS_RUN 11421414bd68fSmrg# ------------------ 11422414bd68fSmrg# Define MISSING if not defined so far and test if it is modern enough. 11423414bd68fSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 11424414bd68fSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 11425414bd68fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11426414bd68fSmrgAC_REQUIRE_AUX_FILE([missing])dnl 11427414bd68fSmrgif test x"${MISSING+set}" != xset; then 11428414bd68fSmrg case $am_aux_dir in 11429414bd68fSmrg *\ * | *\ *) 11430414bd68fSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 11431414bd68fSmrg *) 11432414bd68fSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 11433414bd68fSmrg esac 114343e72ca8cSmrgfi 11435414bd68fSmrg# Use eval to expand $SHELL 11436414bd68fSmrgif eval "$MISSING --is-lightweight"; then 11437414bd68fSmrg am_missing_run="$MISSING " 11438414bd68fSmrgelse 11439414bd68fSmrg am_missing_run= 11440414bd68fSmrg AC_MSG_WARN(['missing' script is too old or missing]) 114413e72ca8cSmrgfi 11442414bd68fSmrg]) 114433e72ca8cSmrg 11444414bd68fSmrg# Helper functions for option handling. -*- Autoconf -*- 114453e72ca8cSmrg 11446414bd68fSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11447414bd68fSmrg# 11448414bd68fSmrg# This file is free software; the Free Software Foundation 11449414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 11450414bd68fSmrg# with or without modifications, as long as this notice is preserved. 114513e72ca8cSmrg 11452414bd68fSmrg# _AM_MANGLE_OPTION(NAME) 11453414bd68fSmrg# ----------------------- 11454414bd68fSmrgAC_DEFUN([_AM_MANGLE_OPTION], 11455414bd68fSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 114563e72ca8cSmrg 11457414bd68fSmrg# _AM_SET_OPTION(NAME) 11458414bd68fSmrg# -------------------- 11459414bd68fSmrg# Set option NAME. Presently that only means defining a flag for this option. 11460414bd68fSmrgAC_DEFUN([_AM_SET_OPTION], 11461414bd68fSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 114623e72ca8cSmrg 11463414bd68fSmrg# _AM_SET_OPTIONS(OPTIONS) 11464414bd68fSmrg# ------------------------ 11465414bd68fSmrg# OPTIONS is a space-separated list of Automake options. 11466414bd68fSmrgAC_DEFUN([_AM_SET_OPTIONS], 11467414bd68fSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 114683e72ca8cSmrg 11469414bd68fSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 11470414bd68fSmrg# ------------------------------------------- 11471414bd68fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11472414bd68fSmrgAC_DEFUN([_AM_IF_OPTION], 11473414bd68fSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 114743e72ca8cSmrg 11475414bd68fSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 114763e72ca8cSmrg# 11477414bd68fSmrg# This file is free software; the Free Software Foundation 11478414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 11479414bd68fSmrg# with or without modifications, as long as this notice is preserved. 114803e72ca8cSmrg 11481414bd68fSmrg# _AM_PROG_CC_C_O 11482414bd68fSmrg# --------------- 11483414bd68fSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 11484414bd68fSmrg# to automatically call this. 11485414bd68fSmrgAC_DEFUN([_AM_PROG_CC_C_O], 11486414bd68fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11487414bd68fSmrgAC_REQUIRE_AUX_FILE([compile])dnl 11488414bd68fSmrgAC_LANG_PUSH([C])dnl 11489414bd68fSmrgAC_CACHE_CHECK( 11490414bd68fSmrg [whether $CC understands -c and -o together], 11491414bd68fSmrg [am_cv_prog_cc_c_o], 11492414bd68fSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 11493414bd68fSmrg # Make sure it works both with $CC and with simple cc. 11494414bd68fSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 11495414bd68fSmrg # compilers refuse to overwrite an existing .o file with -o, 11496414bd68fSmrg # though they will create one. 11497414bd68fSmrg am_cv_prog_cc_c_o=yes 11498414bd68fSmrg for am_i in 1 2; do 11499414bd68fSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 11500414bd68fSmrg && test -f conftest2.$ac_objext; then 11501414bd68fSmrg : OK 11502414bd68fSmrg else 11503414bd68fSmrg am_cv_prog_cc_c_o=no 11504414bd68fSmrg break 11505414bd68fSmrg fi 11506414bd68fSmrg done 11507414bd68fSmrg rm -f core conftest* 11508414bd68fSmrg unset am_i]) 11509414bd68fSmrgif test "$am_cv_prog_cc_c_o" != yes; then 11510414bd68fSmrg # Losing compiler, so override with the script. 11511414bd68fSmrg # FIXME: It is wrong to rewrite CC. 11512414bd68fSmrg # But if we don't then we get into trouble of one sort or another. 11513414bd68fSmrg # A longer-term fix would be to have automake use am__CC in this case, 11514414bd68fSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 11515414bd68fSmrg CC="$am_aux_dir/compile $CC" 115163e72ca8cSmrgfi 11517414bd68fSmrgAC_LANG_POP([C])]) 11518414bd68fSmrg 11519414bd68fSmrg# For backward compatibility. 11520414bd68fSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 11521414bd68fSmrg 11522414bd68fSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11523414bd68fSmrg# 11524414bd68fSmrg# This file is free software; the Free Software Foundation 11525414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 11526414bd68fSmrg# with or without modifications, as long as this notice is preserved. 115273e72ca8cSmrg 11528414bd68fSmrg# AM_RUN_LOG(COMMAND) 11529414bd68fSmrg# ------------------- 11530414bd68fSmrg# Run COMMAND, save the exit status in ac_status, and log it. 11531414bd68fSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 11532414bd68fSmrgAC_DEFUN([AM_RUN_LOG], 11533414bd68fSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 11534414bd68fSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 11535414bd68fSmrg ac_status=$? 11536414bd68fSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 11537414bd68fSmrg (exit $ac_status); }]) 115383e72ca8cSmrg 11539414bd68fSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 115403e72ca8cSmrg 11541414bd68fSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 11542414bd68fSmrg# 11543414bd68fSmrg# This file is free software; the Free Software Foundation 11544414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 11545414bd68fSmrg# with or without modifications, as long as this notice is preserved. 115463e72ca8cSmrg 11547414bd68fSmrg# AM_SANITY_CHECK 11548414bd68fSmrg# --------------- 11549414bd68fSmrgAC_DEFUN([AM_SANITY_CHECK], 11550414bd68fSmrg[AC_MSG_CHECKING([whether build environment is sane]) 11551414bd68fSmrg# Reject unsafe characters in $srcdir or the absolute working directory 11552414bd68fSmrg# name. Accept space and tab only in the latter. 11553414bd68fSmrgam_lf=' 11554414bd68fSmrg' 11555414bd68fSmrgcase `pwd` in 11556414bd68fSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 11557414bd68fSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 11558414bd68fSmrgesac 11559414bd68fSmrgcase $srcdir in 11560414bd68fSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 11561414bd68fSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 11562414bd68fSmrgesac 115633e72ca8cSmrg 11564414bd68fSmrg# Do 'set' in a subshell so we don't clobber the current shell's 11565414bd68fSmrg# arguments. Must try -L first in case configure is actually a 11566414bd68fSmrg# symlink; some systems play weird games with the mod time of symlinks 11567414bd68fSmrg# (eg FreeBSD returns the mod time of the symlink's containing 11568414bd68fSmrg# directory). 11569414bd68fSmrgif ( 11570414bd68fSmrg am_has_slept=no 11571414bd68fSmrg for am_try in 1 2; do 11572414bd68fSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 11573414bd68fSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 11574414bd68fSmrg if test "$[*]" = "X"; then 11575414bd68fSmrg # -L didn't work. 11576414bd68fSmrg set X `ls -t "$srcdir/configure" conftest.file` 11577414bd68fSmrg fi 11578414bd68fSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 11579414bd68fSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 115803e72ca8cSmrg 11581414bd68fSmrg # If neither matched, then we have a broken ls. This can happen 11582414bd68fSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 11583414bd68fSmrg # broken ls alias from the environment. This has actually 11584414bd68fSmrg # happened. Such a system could not be considered "sane". 11585414bd68fSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 11586414bd68fSmrg alias in your environment]) 11587414bd68fSmrg fi 11588414bd68fSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 11589414bd68fSmrg break 11590414bd68fSmrg fi 11591414bd68fSmrg # Just in case. 11592414bd68fSmrg sleep 1 11593414bd68fSmrg am_has_slept=yes 11594414bd68fSmrg done 11595414bd68fSmrg test "$[2]" = conftest.file 11596414bd68fSmrg ) 11597414bd68fSmrgthen 11598414bd68fSmrg # Ok. 11599414bd68fSmrg : 116003e72ca8cSmrgelse 11601414bd68fSmrg AC_MSG_ERROR([newly created file is older than distributed files! 11602414bd68fSmrgCheck your system clock]) 116033e72ca8cSmrgfi 11604414bd68fSmrgAC_MSG_RESULT([yes]) 11605414bd68fSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 11606414bd68fSmrg# generated files are strictly newer. 11607414bd68fSmrgam_sleep_pid= 11608414bd68fSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 11609414bd68fSmrg ( sleep 1 ) & 11610414bd68fSmrg am_sleep_pid=$! 11611414bd68fSmrgfi 11612414bd68fSmrgAC_CONFIG_COMMANDS_PRE( 11613414bd68fSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 11614414bd68fSmrg if test -n "$am_sleep_pid"; then 11615414bd68fSmrg # Hide warnings about reused PIDs. 11616414bd68fSmrg wait $am_sleep_pid 2>/dev/null 11617414bd68fSmrg fi 11618414bd68fSmrg AC_MSG_RESULT([done])]) 11619414bd68fSmrgrm -f conftest.file 11620414bd68fSmrg]) 116213e72ca8cSmrg 11622414bd68fSmrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 116233e72ca8cSmrg# 11624414bd68fSmrg# This file is free software; the Free Software Foundation 11625414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 11626414bd68fSmrg# with or without modifications, as long as this notice is preserved. 11627ee3138f1Smrg 11628414bd68fSmrg# AM_SILENT_RULES([DEFAULT]) 11629414bd68fSmrg# -------------------------- 11630414bd68fSmrg# Enable less verbose build rules; with the default set to DEFAULT 11631414bd68fSmrg# ("yes" being less verbose, "no" or empty being verbose). 11632414bd68fSmrgAC_DEFUN([AM_SILENT_RULES], 11633414bd68fSmrg[AC_ARG_ENABLE([silent-rules], [dnl 11634414bd68fSmrgAS_HELP_STRING( 11635414bd68fSmrg [--enable-silent-rules], 11636414bd68fSmrg [less verbose build output (undo: "make V=1")]) 11637414bd68fSmrgAS_HELP_STRING( 11638414bd68fSmrg [--disable-silent-rules], 11639414bd68fSmrg [verbose build output (undo: "make V=0")])dnl 11640414bd68fSmrg]) 11641414bd68fSmrgcase $enable_silent_rules in @%:@ ((( 11642414bd68fSmrg yes) AM_DEFAULT_VERBOSITY=0;; 11643414bd68fSmrg no) AM_DEFAULT_VERBOSITY=1;; 11644414bd68fSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 11645414bd68fSmrgesac 11646414bd68fSmrgdnl 11647414bd68fSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 11648414bd68fSmrgdnl do not support nested variable expansions. 11649414bd68fSmrgdnl See automake bug#9928 and bug#10237. 11650414bd68fSmrgam_make=${MAKE-make} 11651414bd68fSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 11652414bd68fSmrg [am_cv_make_support_nested_variables], 11653414bd68fSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 11654414bd68fSmrgBAR0=false 11655414bd68fSmrgBAR1=true 11656414bd68fSmrgV=1 11657414bd68fSmrgam__doit: 11658414bd68fSmrg @$(TRUE) 11659414bd68fSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 11660414bd68fSmrg am_cv_make_support_nested_variables=yes 11661414bd68fSmrgelse 11662414bd68fSmrg am_cv_make_support_nested_variables=no 11663414bd68fSmrgfi]) 11664414bd68fSmrgif test $am_cv_make_support_nested_variables = yes; then 11665414bd68fSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 11666414bd68fSmrg AM_V='$(V)' 11667414bd68fSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 11668414bd68fSmrgelse 11669414bd68fSmrg AM_V=$AM_DEFAULT_VERBOSITY 11670414bd68fSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 11671414bd68fSmrgfi 11672414bd68fSmrgAC_SUBST([AM_V])dnl 11673414bd68fSmrgAM_SUBST_NOTMAKE([AM_V])dnl 11674414bd68fSmrgAC_SUBST([AM_DEFAULT_V])dnl 11675414bd68fSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 11676414bd68fSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 11677414bd68fSmrgAM_BACKSLASH='\' 11678414bd68fSmrgAC_SUBST([AM_BACKSLASH])dnl 11679414bd68fSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 11680414bd68fSmrg]) 11681414bd68fSmrg 11682414bd68fSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 116833e72ca8cSmrg# 11684414bd68fSmrg# This file is free software; the Free Software Foundation 11685414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 11686414bd68fSmrg# with or without modifications, as long as this notice is preserved. 11687414bd68fSmrg 11688414bd68fSmrg# AM_PROG_INSTALL_STRIP 11689414bd68fSmrg# --------------------- 11690414bd68fSmrg# One issue with vendor 'install' (even GNU) is that you can't 11691414bd68fSmrg# specify the program used to strip binaries. This is especially 11692414bd68fSmrg# annoying in cross-compiling environments, where the build's strip 11693414bd68fSmrg# is unlikely to handle the host's binaries. 11694414bd68fSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 11695414bd68fSmrg# always use install-sh in "make install-strip", and initialize 11696414bd68fSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 11697414bd68fSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 11698414bd68fSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11699414bd68fSmrg# Installed binaries are usually stripped using 'strip' when the user 11700414bd68fSmrg# run "make install-strip". However 'strip' might not be the right 11701414bd68fSmrg# tool to use in cross-compilation environments, therefore Automake 11702414bd68fSmrg# will honor the 'STRIP' environment variable to overrule this program. 11703414bd68fSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 11704414bd68fSmrgif test "$cross_compiling" != no; then 11705414bd68fSmrg AC_CHECK_TOOL([STRIP], [strip], :) 11706414bd68fSmrgfi 11707414bd68fSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 11708414bd68fSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1170934977a2fSmrg 11710414bd68fSmrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 11711414bd68fSmrg# 11712414bd68fSmrg# This file is free software; the Free Software Foundation 11713414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 11714414bd68fSmrg# with or without modifications, as long as this notice is preserved. 117153e72ca8cSmrg 11716414bd68fSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 11717414bd68fSmrg# --------------------------- 11718414bd68fSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 11719414bd68fSmrg# This macro is traced by Automake. 11720414bd68fSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 117213e72ca8cSmrg 11722414bd68fSmrg# AM_SUBST_NOTMAKE(VARIABLE) 11723414bd68fSmrg# -------------------------- 11724414bd68fSmrg# Public sister of _AM_SUBST_NOTMAKE. 11725414bd68fSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 117263e72ca8cSmrg 11727414bd68fSmrg# Check how to create a tarball. -*- Autoconf -*- 117283e72ca8cSmrg 11729414bd68fSmrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 11730414bd68fSmrg# 11731414bd68fSmrg# This file is free software; the Free Software Foundation 11732414bd68fSmrg# gives unlimited permission to copy and/or distribute it, 11733414bd68fSmrg# with or without modifications, as long as this notice is preserved. 11734a1ed278cSmrg 11735414bd68fSmrg# _AM_PROG_TAR(FORMAT) 11736a1ed278cSmrg# -------------------- 11737414bd68fSmrg# Check how to create a tarball in format FORMAT. 11738414bd68fSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 11739ee3138f1Smrg# 11740414bd68fSmrg# Substitute a variable $(am__tar) that is a command 11741414bd68fSmrg# writing to stdout a FORMAT-tarball containing the directory 11742414bd68fSmrg# $tardir. 11743414bd68fSmrg# tardir=directory && $(am__tar) > result.tar 1174434977a2fSmrg# 11745414bd68fSmrg# Substitute a variable $(am__untar) that extract such 11746414bd68fSmrg# a tarball read from stdin. 11747414bd68fSmrg# $(am__untar) < result.tar 11748b425557eSmrg# 11749414bd68fSmrgAC_DEFUN([_AM_PROG_TAR], 11750414bd68fSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 11751414bd68fSmrg# in the wild :-( We should find a proper way to deprecate it ... 11752414bd68fSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 11753ee3138f1Smrg 11754414bd68fSmrg# We'll loop over all known methods to create a tar archive until one works. 11755414bd68fSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 11756ee3138f1Smrg 11757414bd68fSmrgm4_if([$1], [v7], 11758414bd68fSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 11759414bd68fSmrg 11760414bd68fSmrg [m4_case([$1], 11761414bd68fSmrg [ustar], 11762414bd68fSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 11763414bd68fSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 11764414bd68fSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 11765414bd68fSmrg # and bug#13588). 11766414bd68fSmrg am_max_uid=2097151 # 2^21 - 1 11767414bd68fSmrg am_max_gid=$am_max_uid 11768414bd68fSmrg # The $UID and $GID variables are not portable, so we need to resort 11769414bd68fSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 11770414bd68fSmrg # below are definitely unexpected, so allow the users to see them 11771414bd68fSmrg # (that is, avoid stderr redirection). 11772414bd68fSmrg am_uid=`id -u || echo unknown` 11773414bd68fSmrg am_gid=`id -g || echo unknown` 11774414bd68fSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 11775414bd68fSmrg if test $am_uid -le $am_max_uid; then 11776414bd68fSmrg AC_MSG_RESULT([yes]) 11777414bd68fSmrg else 11778414bd68fSmrg AC_MSG_RESULT([no]) 11779414bd68fSmrg _am_tools=none 11780414bd68fSmrg fi 11781414bd68fSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 11782414bd68fSmrg if test $am_gid -le $am_max_gid; then 11783414bd68fSmrg AC_MSG_RESULT([yes]) 11784414bd68fSmrg else 11785414bd68fSmrg AC_MSG_RESULT([no]) 11786414bd68fSmrg _am_tools=none 11787414bd68fSmrg fi], 11788414bd68fSmrg 11789414bd68fSmrg [pax], 11790414bd68fSmrg [], 11791414bd68fSmrg 11792414bd68fSmrg [m4_fatal([Unknown tar format])]) 11793414bd68fSmrg 11794414bd68fSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 11795414bd68fSmrg 11796414bd68fSmrg # Go ahead even if we have the value already cached. We do so because we 11797414bd68fSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 11798414bd68fSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 11799414bd68fSmrg 11800414bd68fSmrg for _am_tool in $_am_tools; do 11801414bd68fSmrg case $_am_tool in 11802414bd68fSmrg gnutar) 11803414bd68fSmrg for _am_tar in tar gnutar gtar; do 11804414bd68fSmrg AM_RUN_LOG([$_am_tar --version]) && break 11805414bd68fSmrg done 11806414bd68fSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 11807414bd68fSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 11808414bd68fSmrg am__untar="$_am_tar -xf -" 11809414bd68fSmrg ;; 11810414bd68fSmrg plaintar) 11811414bd68fSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 11812414bd68fSmrg # ustar tarball either. 11813414bd68fSmrg (tar --version) >/dev/null 2>&1 && continue 11814414bd68fSmrg am__tar='tar chf - "$$tardir"' 11815414bd68fSmrg am__tar_='tar chf - "$tardir"' 11816414bd68fSmrg am__untar='tar xf -' 11817414bd68fSmrg ;; 11818414bd68fSmrg pax) 11819414bd68fSmrg am__tar='pax -L -x $1 -w "$$tardir"' 11820414bd68fSmrg am__tar_='pax -L -x $1 -w "$tardir"' 11821414bd68fSmrg am__untar='pax -r' 11822414bd68fSmrg ;; 11823414bd68fSmrg cpio) 11824414bd68fSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11825414bd68fSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11826414bd68fSmrg am__untar='cpio -i -H $1 -d' 11827414bd68fSmrg ;; 11828414bd68fSmrg none) 11829414bd68fSmrg am__tar=false 11830414bd68fSmrg am__tar_=false 11831414bd68fSmrg am__untar=false 11832414bd68fSmrg ;; 11833414bd68fSmrg esac 11834414bd68fSmrg 11835414bd68fSmrg # If the value was cached, stop now. We just wanted to have am__tar 11836414bd68fSmrg # and am__untar set. 11837414bd68fSmrg test -n "${am_cv_prog_tar_$1}" && break 11838414bd68fSmrg 11839414bd68fSmrg # tar/untar a dummy directory, and stop if the command works. 11840414bd68fSmrg rm -rf conftest.dir 11841414bd68fSmrg mkdir conftest.dir 11842414bd68fSmrg echo GrepMe > conftest.dir/file 11843414bd68fSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11844414bd68fSmrg rm -rf conftest.dir 11845414bd68fSmrg if test -s conftest.tar; then 11846414bd68fSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 11847414bd68fSmrg AM_RUN_LOG([cat conftest.dir/file]) 11848414bd68fSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11849414bd68fSmrg fi 11850414bd68fSmrg done 11851414bd68fSmrg rm -rf conftest.dir 11852414bd68fSmrg 11853414bd68fSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11854414bd68fSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11855414bd68fSmrg 11856414bd68fSmrgAC_SUBST([am__tar]) 11857414bd68fSmrgAC_SUBST([am__untar]) 11858414bd68fSmrg]) # _AM_PROG_TAR 11859ee3138f1Smrg 11860