aclocal.m4 revision 43df4709
143df4709Smrg# generated automatically by aclocal 1.11.3 -*- Autoconf -*- 2209ff23fSmrg 343df4709Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 443df4709Smrg# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 543df4709Smrg# Inc. 6209ff23fSmrg# This file is free software; the Free Software Foundation 7209ff23fSmrg# gives unlimited permission to copy and/or distribute it, 8209ff23fSmrg# with or without modifications, as long as this notice is preserved. 9209ff23fSmrg 10209ff23fSmrg# This program is distributed in the hope that it will be useful, 11209ff23fSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12209ff23fSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13209ff23fSmrg# PARTICULAR PURPOSE. 14209ff23fSmrg 15209ff23fSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16209ff23fSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1743df4709Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 1843df4709Smrg[m4_warning([this file was generated for autoconf 2.68. 19209ff23fSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20209ff23fSmrgIf you have problems, you may need to regenerate the build system entirely. 2143df4709SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 22209ff23fSmrg 23209ff23fSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24ad43ddacSmrg# 2543df4709Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2643df4709Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 2743df4709Smrg# Foundation, Inc. 28ad43ddacSmrg# Written by Gordon Matzigkeit, 1996 29ad43ddacSmrg# 30ad43ddacSmrg# This file is free software; the Free Software Foundation gives 31ad43ddacSmrg# unlimited permission to copy and/or distribute it, with or without 32ad43ddacSmrg# modifications, as long as this notice is preserved. 33ad43ddacSmrg 34ad43ddacSmrgm4_define([_LT_COPYING], [dnl 3543df4709Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 3643df4709Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 3743df4709Smrg# Foundation, Inc. 3843df4709Smrg# Written by Gordon Matzigkeit, 1996 39ad43ddacSmrg# 4043df4709Smrg# This file is part of GNU Libtool. 41ad43ddacSmrg# 4243df4709Smrg# GNU Libtool is free software; you can redistribute it and/or 4343df4709Smrg# modify it under the terms of the GNU General Public License as 4443df4709Smrg# published by the Free Software Foundation; either version 2 of 4543df4709Smrg# the License, or (at your option) any later version. 4643df4709Smrg# 4743df4709Smrg# As a special exception to the GNU General Public License, 4843df4709Smrg# if you distribute this file as part of a program or library that 4943df4709Smrg# is built using GNU Libtool, you may include this file under the 5043df4709Smrg# same distribution terms that you use for the rest of that program. 5143df4709Smrg# 5243df4709Smrg# GNU Libtool is distributed in the hope that it will be useful, 5343df4709Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 54ad43ddacSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 55ad43ddacSmrg# GNU General Public License for more details. 56ad43ddacSmrg# 57ad43ddacSmrg# You should have received a copy of the GNU General Public License 5843df4709Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 5943df4709Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 6043df4709Smrg# obtained by writing to the Free Software Foundation, Inc., 6143df4709Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 62ad43ddacSmrg]) 63209ff23fSmrg 6443df4709Smrg# serial 57 LT_INIT 65209ff23fSmrg 66209ff23fSmrg 67ad43ddacSmrg# LT_PREREQ(VERSION) 68ad43ddacSmrg# ------------------ 69ad43ddacSmrg# Complain and exit if this libtool version is less that VERSION. 70ad43ddacSmrgm4_defun([LT_PREREQ], 71ad43ddacSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 72ad43ddacSmrg [m4_default([$3], 73ad43ddacSmrg [m4_fatal([Libtool version $1 or higher is required], 74ad43ddacSmrg 63)])], 75ad43ddacSmrg [$2])]) 76209ff23fSmrg 77209ff23fSmrg 78ad43ddacSmrg# _LT_CHECK_BUILDDIR 79ad43ddacSmrg# ------------------ 80ad43ddacSmrg# Complain if the absolute build directory name contains unusual characters 81ad43ddacSmrgm4_defun([_LT_CHECK_BUILDDIR], 82ad43ddacSmrg[case `pwd` in 83ad43ddacSmrg *\ * | *\ *) 84ad43ddacSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 85ad43ddacSmrgesac 86ad43ddacSmrg]) 87ad43ddacSmrg 88ad43ddacSmrg 89ad43ddacSmrg# LT_INIT([OPTIONS]) 90ad43ddacSmrg# ------------------ 91ad43ddacSmrgAC_DEFUN([LT_INIT], 9243df4709Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 9368105dcbSveegoAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 94ad43ddacSmrgAC_BEFORE([$0], [LT_LANG])dnl 95ad43ddacSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 96ad43ddacSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 97ad43ddacSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 98ad43ddacSmrg 99ad43ddacSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 100ad43ddacSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 101ad43ddacSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 102ad43ddacSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 103ad43ddacSmrgdnl unless we require an AC_DEFUNed macro: 104ad43ddacSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 105ad43ddacSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 106ad43ddacSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 107ad43ddacSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 108ad43ddacSmrgm4_require([_LT_PROG_LTMAIN])dnl 109ad43ddacSmrg 11068105dcbSveego_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 11168105dcbSveego 112ad43ddacSmrgdnl Parse OPTIONS 113ad43ddacSmrg_LT_SET_OPTIONS([$0], [$1]) 114209ff23fSmrg 115209ff23fSmrg# This can be used to rebuild libtool when needed 11643df4709SmrgLIBTOOL_DEPS="$ltmain" 117209ff23fSmrg 118209ff23fSmrg# Always use our own libtool. 119209ff23fSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 120209ff23fSmrgAC_SUBST(LIBTOOL)dnl 121209ff23fSmrg 122ad43ddacSmrg_LT_SETUP 123209ff23fSmrg 124ad43ddacSmrg# Only expand once: 125ad43ddacSmrgm4_define([LT_INIT]) 126ad43ddacSmrg])# LT_INIT 127209ff23fSmrg 128ad43ddacSmrg# Old names: 129ad43ddacSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 130ad43ddacSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 131ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 132ad43ddacSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 133ad43ddacSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 134ad43ddacSmrg 135ad43ddacSmrg 136ad43ddacSmrg# _LT_CC_BASENAME(CC) 137ad43ddacSmrg# ------------------- 13843df4709Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 139ad43ddacSmrgm4_defun([_LT_CC_BASENAME], 14043df4709Smrg[for cc_temp in $1""; do 14143df4709Smrg case $cc_temp in 14243df4709Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 14343df4709Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 14443df4709Smrg \-*) ;; 14543df4709Smrg *) break;; 14643df4709Smrg esac 14743df4709Smrgdone 14843df4709Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 149ad43ddacSmrg]) 150ad43ddacSmrg 151ad43ddacSmrg 152ad43ddacSmrg# _LT_FILEUTILS_DEFAULTS 153ad43ddacSmrg# ---------------------- 154ad43ddacSmrg# It is okay to use these file commands and assume they have been set 15543df4709Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 156ad43ddacSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 157ad43ddacSmrg[: ${CP="cp -f"} 158ad43ddacSmrg: ${MV="mv -f"} 159ad43ddacSmrg: ${RM="rm -f"} 160ad43ddacSmrg])# _LT_FILEUTILS_DEFAULTS 161ad43ddacSmrg 162ad43ddacSmrg 163ad43ddacSmrg# _LT_SETUP 164ad43ddacSmrg# --------- 165ad43ddacSmrgm4_defun([_LT_SETUP], 166ad43ddacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 167209ff23fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 16868105dcbSveegoAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 16968105dcbSveegoAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 17068105dcbSveego 17168105dcbSveego_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 17268105dcbSveegodnl 173ad43ddacSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 174ad43ddacSmrg_LT_DECL([], [host], [0])dnl 175ad43ddacSmrg_LT_DECL([], [host_os], [0])dnl 176ad43ddacSmrgdnl 177ad43ddacSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 178ad43ddacSmrg_LT_DECL([], [build], [0])dnl 179ad43ddacSmrg_LT_DECL([], [build_os], [0])dnl 180ad43ddacSmrgdnl 181209ff23fSmrgAC_REQUIRE([AC_PROG_CC])dnl 182ad43ddacSmrgAC_REQUIRE([LT_PATH_LD])dnl 183ad43ddacSmrgAC_REQUIRE([LT_PATH_NM])dnl 184ad43ddacSmrgdnl 185209ff23fSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 186ad43ddacSmrgtest -z "$LN_S" && LN_S="ln -s" 187ad43ddacSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 188209ff23fSmrgdnl 189ad43ddacSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 190ad43ddacSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 191ad43ddacSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 192ad43ddacSmrgdnl 193ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 194ad43ddacSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 19568105dcbSveegom4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 196ad43ddacSmrgm4_require([_LT_CMD_RELOAD])dnl 197ad43ddacSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 19868105dcbSveegom4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 199ad43ddacSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 200ad43ddacSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 20168105dcbSveegom4_require([_LT_WITH_SYSROOT])dnl 202ad43ddacSmrg 203ad43ddacSmrg_LT_CONFIG_LIBTOOL_INIT([ 20443df4709Smrg# See if we are running on zsh, and set the options which allow our 205ad43ddacSmrg# commands through without removal of \ escapes INIT. 20643df4709Smrgif test -n "\${ZSH_VERSION+set}" ; then 207ad43ddacSmrg setopt NO_GLOB_SUBST 208ad43ddacSmrgfi 209ad43ddacSmrg]) 21043df4709Smrgif test -n "${ZSH_VERSION+set}" ; then 211ad43ddacSmrg setopt NO_GLOB_SUBST 212ad43ddacSmrgfi 213209ff23fSmrg 214ad43ddacSmrg_LT_CHECK_OBJDIR 215ad43ddacSmrg 216ad43ddacSmrgm4_require([_LT_TAG_COMPILER])dnl 217209ff23fSmrg 218209ff23fSmrgcase $host_os in 219209ff23fSmrgaix3*) 220209ff23fSmrg # AIX sometimes has problems with the GCC collect2 program. For some 221209ff23fSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 222209ff23fSmrg # vanish in a puff of smoke. 22343df4709Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 224209ff23fSmrg COLLECT_NAMES= 225209ff23fSmrg export COLLECT_NAMES 226209ff23fSmrg fi 227209ff23fSmrg ;; 228209ff23fSmrgesac 229209ff23fSmrg 230209ff23fSmrg# Global variables: 231ad43ddacSmrgofile=libtool 232209ff23fSmrgcan_build_shared=yes 233209ff23fSmrg 23443df4709Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 235209ff23fSmrg# which needs '.lib'). 236209ff23fSmrglibext=a 237209ff23fSmrg 23843df4709Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 239209ff23fSmrg 24043df4709Smrgold_CC="$CC" 24143df4709Smrgold_CFLAGS="$CFLAGS" 242209ff23fSmrg 243209ff23fSmrg# Set sane defaults for various variables 244209ff23fSmrgtest -z "$CC" && CC=cc 245209ff23fSmrgtest -z "$LTCC" && LTCC=$CC 246209ff23fSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 247209ff23fSmrgtest -z "$LD" && LD=ld 248209ff23fSmrgtest -z "$ac_objext" && ac_objext=o 249209ff23fSmrg 250209ff23fSmrg_LT_CC_BASENAME([$compiler]) 251209ff23fSmrg 252209ff23fSmrg# Only perform the check for file, if the check method requires it 253ad43ddacSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 254209ff23fSmrgcase $deplibs_check_method in 255209ff23fSmrgfile_magic*) 256209ff23fSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 257ad43ddacSmrg _LT_PATH_MAGIC 258209ff23fSmrg fi 259209ff23fSmrg ;; 260209ff23fSmrgesac 261209ff23fSmrg 262ad43ddacSmrg# Use C for the default configuration in the libtool script 263ad43ddacSmrgLT_SUPPORTED_TAG([CC]) 264ad43ddacSmrg_LT_LANG_C_CONFIG 265ad43ddacSmrg_LT_LANG_DEFAULT_CONFIG 266ad43ddacSmrg_LT_CONFIG_COMMANDS 267ad43ddacSmrg])# _LT_SETUP 268209ff23fSmrg 269209ff23fSmrg 27068105dcbSveego# _LT_PREPARE_SED_QUOTE_VARS 27168105dcbSveego# -------------------------- 27268105dcbSveego# Define a few sed substitution that help us do robust quoting. 27368105dcbSveegom4_defun([_LT_PREPARE_SED_QUOTE_VARS], 27468105dcbSveego[# Backslashify metacharacters that are still active within 27568105dcbSveego# double-quoted strings. 27668105dcbSveegosed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 27768105dcbSveego 27868105dcbSveego# Same as above, but do not quote variable references. 27968105dcbSveegodouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 28068105dcbSveego 28168105dcbSveego# Sed substitution to delay expansion of an escaped shell variable in a 28268105dcbSveego# double_quote_subst'ed string. 28368105dcbSveegodelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 28468105dcbSveego 28568105dcbSveego# Sed substitution to delay expansion of an escaped single quote. 28668105dcbSveegodelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 28768105dcbSveego 28868105dcbSveego# Sed substitution to avoid accidental globbing in evaled expressions 28968105dcbSveegono_glob_subst='s/\*/\\\*/g' 29068105dcbSveego]) 29168105dcbSveego 292ad43ddacSmrg# _LT_PROG_LTMAIN 293ad43ddacSmrg# --------------- 29443df4709Smrg# Note that this code is called both from `configure', and `config.status' 295ad43ddacSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 29643df4709Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 297ad43ddacSmrg# so we pass a copy along to make sure it has a sensible value anyway. 298ad43ddacSmrgm4_defun([_LT_PROG_LTMAIN], 299ad43ddacSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 300ad43ddacSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 30143df4709Smrgltmain="$ac_aux_dir/ltmain.sh" 302ad43ddacSmrg])# _LT_PROG_LTMAIN 303209ff23fSmrg 304209ff23fSmrg 305ad43ddacSmrg 306ad43ddacSmrg# So that we can recreate a full libtool script including additional 307ad43ddacSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 30843df4709Smrg# in macros and then make a single call at the end using the `libtool' 309ad43ddacSmrg# label. 310ad43ddacSmrg 311ad43ddacSmrg 312ad43ddacSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 313ad43ddacSmrg# ---------------------------------------- 314ad43ddacSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 315ad43ddacSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 316ad43ddacSmrg[m4_ifval([$1], 317ad43ddacSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 318ad43ddacSmrg [$1 319ad43ddacSmrg])])]) 320ad43ddacSmrg 321ad43ddacSmrg# Initialize. 322ad43ddacSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 323ad43ddacSmrg 324ad43ddacSmrg 325ad43ddacSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 326ad43ddacSmrg# ------------------------------ 327ad43ddacSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 328ad43ddacSmrgm4_define([_LT_CONFIG_LIBTOOL], 329ad43ddacSmrg[m4_ifval([$1], 330ad43ddacSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 331ad43ddacSmrg [$1 332ad43ddacSmrg])])]) 333ad43ddacSmrg 334ad43ddacSmrg# Initialize. 335ad43ddacSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 336ad43ddacSmrg 337ad43ddacSmrg 338ad43ddacSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 339ad43ddacSmrg# ----------------------------------------------------- 340ad43ddacSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 341ad43ddacSmrg[_LT_CONFIG_LIBTOOL([$1]) 342ad43ddacSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 343ad43ddacSmrg]) 344ad43ddacSmrg 345ad43ddacSmrg 346ad43ddacSmrg# _LT_FORMAT_COMMENT([COMMENT]) 347ad43ddacSmrg# ----------------------------- 348ad43ddacSmrg# Add leading comment marks to the start of each line, and a trailing 349ad43ddacSmrg# full-stop to the whole comment if one is not present already. 350ad43ddacSmrgm4_define([_LT_FORMAT_COMMENT], 351ad43ddacSmrg[m4_ifval([$1], [ 352ad43ddacSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 353ad43ddacSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 354ad43ddacSmrg)]) 355ad43ddacSmrg 356ad43ddacSmrg 357ad43ddacSmrg 358ad43ddacSmrg 359ad43ddacSmrg 360ad43ddacSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 361ad43ddacSmrg# ------------------------------------------------------------------- 362ad43ddacSmrg# CONFIGNAME is the name given to the value in the libtool script. 363ad43ddacSmrg# VARNAME is the (base) name used in the configure script. 364ad43ddacSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 365ad43ddacSmrg# VARNAME. Any other value will be used directly. 366ad43ddacSmrgm4_define([_LT_DECL], 367ad43ddacSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 368ad43ddacSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 369ad43ddacSmrg [m4_ifval([$1], [$1], [$2])]) 370ad43ddacSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 371ad43ddacSmrg m4_ifval([$4], 372ad43ddacSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 373ad43ddacSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 374ad43ddacSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 375ad43ddacSmrg]) 376ad43ddacSmrg 377ad43ddacSmrg 378ad43ddacSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 379ad43ddacSmrg# -------------------------------------------------------- 380ad43ddacSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 381ad43ddacSmrg 382ad43ddacSmrg 383ad43ddacSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 384ad43ddacSmrg# ------------------------------------------------ 385ad43ddacSmrgm4_define([lt_decl_tag_varnames], 386ad43ddacSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 387ad43ddacSmrg 388ad43ddacSmrg 389ad43ddacSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 390ad43ddacSmrg# --------------------------------------------------------- 391ad43ddacSmrgm4_define([_lt_decl_filter], 392ad43ddacSmrg[m4_case([$#], 393ad43ddacSmrg [0], [m4_fatal([$0: too few arguments: $#])], 394ad43ddacSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 395ad43ddacSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 396ad43ddacSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 397ad43ddacSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 398ad43ddacSmrg]) 399ad43ddacSmrg 400ad43ddacSmrg 401ad43ddacSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 402ad43ddacSmrg# -------------------------------------------------- 403ad43ddacSmrgm4_define([lt_decl_quote_varnames], 404ad43ddacSmrg[_lt_decl_filter([value], [1], $@)]) 405ad43ddacSmrg 406ad43ddacSmrg 407ad43ddacSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 408ad43ddacSmrg# --------------------------------------------------- 409ad43ddacSmrgm4_define([lt_decl_dquote_varnames], 410ad43ddacSmrg[_lt_decl_filter([value], [2], $@)]) 411ad43ddacSmrg 412ad43ddacSmrg 413ad43ddacSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 414ad43ddacSmrg# --------------------------------------------------- 415ad43ddacSmrgm4_define([lt_decl_varnames_tagged], 4162f39173dSmrg[m4_assert([$# <= 2])dnl 4172f39173dSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 4182f39173dSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4192f39173dSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4202f39173dSmrgm4_define([_lt_decl_varnames_tagged], 4212f39173dSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 422ad43ddacSmrg 423ad43ddacSmrg 424ad43ddacSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 425ad43ddacSmrg# ------------------------------------------------ 426ad43ddacSmrgm4_define([lt_decl_all_varnames], 427ad43ddacSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 428ad43ddacSmrg m4_if([$2], [], 429ad43ddacSmrg m4_quote(lt_decl_varnames), 430ad43ddacSmrg m4_quote(m4_shift($@))))[]dnl 431ad43ddacSmrg]) 432ad43ddacSmrgm4_define([_lt_decl_all_varnames], 433ad43ddacSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 434ad43ddacSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 435ad43ddacSmrg]) 436ad43ddacSmrg 437ad43ddacSmrg 438ad43ddacSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 439ad43ddacSmrg# ------------------------------------ 44043df4709Smrg# Quote a variable value, and forward it to `config.status' so that its 44143df4709Smrg# declaration there will have the same value as in `configure'. VARNAME 442ad43ddacSmrg# must have a single quote delimited value for this to work. 443ad43ddacSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 44468105dcbSveego[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 445ad43ddacSmrg 446ad43ddacSmrg 447ad43ddacSmrg# _LT_CONFIG_STATUS_DECLARATIONS 448ad43ddacSmrg# ------------------------------ 449ad43ddacSmrg# We delimit libtool config variables with single quotes, so when 450ad43ddacSmrg# we write them to config.status, we have to be sure to quote all 451ad43ddacSmrg# embedded single quotes properly. In configure, this macro expands 452ad43ddacSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 453ad43ddacSmrg# 45468105dcbSveego# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 455ad43ddacSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 456ad43ddacSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 457ad43ddacSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 458ad43ddacSmrg 459ad43ddacSmrg 460ad43ddacSmrg# _LT_LIBTOOL_TAGS 461ad43ddacSmrg# ---------------- 462ad43ddacSmrg# Output comment and list of tags supported by the script 463ad43ddacSmrgm4_defun([_LT_LIBTOOL_TAGS], 464ad43ddacSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 46543df4709Smrgavailable_tags="_LT_TAGS"dnl 466ad43ddacSmrg]) 467ad43ddacSmrg 468ad43ddacSmrg 469ad43ddacSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 470ad43ddacSmrg# ----------------------------------- 471ad43ddacSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 472ad43ddacSmrg# expand to a commented shell variable setting: 473ad43ddacSmrg# 474ad43ddacSmrg# # Some comment about what VAR is for. 475ad43ddacSmrg# visible_name=$lt_internal_name 476ad43ddacSmrgm4_define([_LT_LIBTOOL_DECLARE], 477ad43ddacSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 478ad43ddacSmrg [description])))[]dnl 479ad43ddacSmrgm4_pushdef([_libtool_name], 480ad43ddacSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 481ad43ddacSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 482ad43ddacSmrg [0], [_libtool_name=[$]$1], 483ad43ddacSmrg [1], [_libtool_name=$lt_[]$1], 484ad43ddacSmrg [2], [_libtool_name=$lt_[]$1], 485ad43ddacSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 486ad43ddacSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 487ad43ddacSmrg]) 488ad43ddacSmrg 489ad43ddacSmrg 490ad43ddacSmrg# _LT_LIBTOOL_CONFIG_VARS 491ad43ddacSmrg# ----------------------- 492ad43ddacSmrg# Produce commented declarations of non-tagged libtool config variables 49343df4709Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 494ad43ddacSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 495ad43ddacSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 496ad43ddacSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 497ad43ddacSmrg[m4_foreach([_lt_var], 498ad43ddacSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 499ad43ddacSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 500ad43ddacSmrg 501ad43ddacSmrg 502ad43ddacSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 503ad43ddacSmrg# ------------------------- 504ad43ddacSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 505ad43ddacSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 506ad43ddacSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 507209ff23fSmrg 508209ff23fSmrg 509ad43ddacSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 510ad43ddacSmrg# ------------------------------ 511ad43ddacSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 512ad43ddacSmrg 513ad43ddacSmrg 514ad43ddacSmrg# _LT_CONFIG_COMMANDS 515209ff23fSmrg# ------------------- 516ad43ddacSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 517ad43ddacSmrg# variables for single and double quote escaping we saved from calls 518ad43ddacSmrg# to _LT_DECL, we can put quote escaped variables declarations 51943df4709Smrg# into `config.status', and then the shell code to quote escape them in 52043df4709Smrg# for loops in `config.status'. Finally, any additional code accumulated 521ad43ddacSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 522ad43ddacSmrgm4_defun([_LT_CONFIG_COMMANDS], 523ad43ddacSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 524ad43ddacSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 525ad43ddacSmrg dnl instead of duplicating it all over again into config.status, 526ad43ddacSmrg dnl then we will have config.status run $CONFIG_LT later, so it 527ad43ddacSmrg dnl needs to know what name is stored there: 528ad43ddacSmrg [AC_CONFIG_COMMANDS([libtool], 529ad43ddacSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 530ad43ddacSmrg dnl If the libtool generation code is destined for config.status, 531ad43ddacSmrg dnl expand the accumulated commands and init code now: 532ad43ddacSmrg [AC_CONFIG_COMMANDS([libtool], 533ad43ddacSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 534ad43ddacSmrg])#_LT_CONFIG_COMMANDS 535ad43ddacSmrg 536ad43ddacSmrg 537ad43ddacSmrg# Initialize. 538ad43ddacSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 539ad43ddacSmrg[ 540ad43ddacSmrg 541ad43ddacSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 542ad43ddacSmrg# if CDPATH is set. 543ad43ddacSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 544ad43ddacSmrg 545ad43ddacSmrgsed_quote_subst='$sed_quote_subst' 546ad43ddacSmrgdouble_quote_subst='$double_quote_subst' 547ad43ddacSmrgdelay_variable_subst='$delay_variable_subst' 548ad43ddacSmrg_LT_CONFIG_STATUS_DECLARATIONS 549ad43ddacSmrgLTCC='$LTCC' 550ad43ddacSmrgLTCFLAGS='$LTCFLAGS' 551ad43ddacSmrgcompiler='$compiler_DEFAULT' 552ad43ddacSmrg 55368105dcbSveego# A function that is used when there is no print builtin or printf. 55468105dcbSveegofunc_fallback_echo () 55568105dcbSveego{ 55668105dcbSveego eval 'cat <<_LTECHO_EOF 55768105dcbSveego\$[]1 55868105dcbSveego_LTECHO_EOF' 55968105dcbSveego} 56068105dcbSveego 561ad43ddacSmrg# Quote evaled strings. 562ad43ddacSmrgfor var in lt_decl_all_varnames([[ \ 563ad43ddacSmrg]], lt_decl_quote_varnames); do 56468105dcbSveego case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 565ad43ddacSmrg *[[\\\\\\\`\\"\\\$]]*) 56643df4709Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 567ad43ddacSmrg ;; 568ad43ddacSmrg *) 569ad43ddacSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 570ad43ddacSmrg ;; 571ad43ddacSmrg esac 572ad43ddacSmrgdone 573ad43ddacSmrg 574ad43ddacSmrg# Double-quote double-evaled strings. 575ad43ddacSmrgfor var in lt_decl_all_varnames([[ \ 576ad43ddacSmrg]], lt_decl_dquote_varnames); do 57768105dcbSveego case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 578ad43ddacSmrg *[[\\\\\\\`\\"\\\$]]*) 57943df4709Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 580ad43ddacSmrg ;; 581ad43ddacSmrg *) 582ad43ddacSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 583ad43ddacSmrg ;; 584ad43ddacSmrg esac 585ad43ddacSmrgdone 586ad43ddacSmrg 587ad43ddacSmrg_LT_OUTPUT_LIBTOOL_INIT 588ad43ddacSmrg]) 589ad43ddacSmrg 59068105dcbSveego# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 59168105dcbSveego# ------------------------------------ 59268105dcbSveego# Generate a child script FILE with all initialization necessary to 59368105dcbSveego# reuse the environment learned by the parent script, and make the 59468105dcbSveego# file executable. If COMMENT is supplied, it is inserted after the 59543df4709Smrg# `#!' sequence but before initialization text begins. After this 59668105dcbSveego# macro, additional text can be appended to FILE to form the body of 59768105dcbSveego# the child script. The macro ends with non-zero status if the 59868105dcbSveego# file could not be fully written (such as if the disk is full). 59968105dcbSveegom4_ifdef([AS_INIT_GENERATED], 60068105dcbSveego[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 60168105dcbSveego[m4_defun([_LT_GENERATED_FILE_INIT], 60268105dcbSveego[m4_require([AS_PREPARE])]dnl 60368105dcbSveego[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 60468105dcbSveego[lt_write_fail=0 60568105dcbSveegocat >$1 <<_ASEOF || lt_write_fail=1 60668105dcbSveego#! $SHELL 60768105dcbSveego# Generated by $as_me. 60868105dcbSveego$2 60968105dcbSveegoSHELL=\${CONFIG_SHELL-$SHELL} 61068105dcbSveegoexport SHELL 61168105dcbSveego_ASEOF 61268105dcbSveegocat >>$1 <<\_ASEOF || lt_write_fail=1 61368105dcbSveegoAS_SHELL_SANITIZE 61468105dcbSveego_AS_PREPARE 61568105dcbSveegoexec AS_MESSAGE_FD>&1 61668105dcbSveego_ASEOF 61743df4709Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 61868105dcbSveegom4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 619ad43ddacSmrg 620ad43ddacSmrg# LT_OUTPUT 621ad43ddacSmrg# --------- 622ad43ddacSmrg# This macro allows early generation of the libtool script (before 623ad43ddacSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 624ad43ddacSmrg# tests. 625ad43ddacSmrgAC_DEFUN([LT_OUTPUT], 626ad43ddacSmrg[: ${CONFIG_LT=./config.lt} 627ad43ddacSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 62868105dcbSveego_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 62968105dcbSveego[# Run this file to recreate a libtool stub with the current configuration.]) 630ad43ddacSmrg 631ad43ddacSmrgcat >>"$CONFIG_LT" <<\_LTEOF 63268105dcbSveegolt_cl_silent=false 633ad43ddacSmrgexec AS_MESSAGE_LOG_FD>>config.log 634ad43ddacSmrg{ 635ad43ddacSmrg echo 636ad43ddacSmrg AS_BOX([Running $as_me.]) 637ad43ddacSmrg} >&AS_MESSAGE_LOG_FD 638ad43ddacSmrg 639ad43ddacSmrglt_cl_help="\ 64043df4709Smrg\`$as_me' creates a local libtool stub from the current configuration, 641ad43ddacSmrgfor use in further configure time tests before the real libtool is 642ad43ddacSmrggenerated. 643ad43ddacSmrg 644ad43ddacSmrgUsage: $[0] [[OPTIONS]] 645ad43ddacSmrg 646ad43ddacSmrg -h, --help print this help, then exit 647ad43ddacSmrg -V, --version print version number, then exit 648ad43ddacSmrg -q, --quiet do not print progress messages 649ad43ddacSmrg -d, --debug don't remove temporary files 650ad43ddacSmrg 651ad43ddacSmrgReport bugs to <bug-libtool@gnu.org>." 652ad43ddacSmrg 653ad43ddacSmrglt_cl_version="\ 654ad43ddacSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 655ad43ddacSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 656ad43ddacSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 657ad43ddacSmrg 65868105dcbSveegoCopyright (C) 2011 Free Software Foundation, Inc. 659ad43ddacSmrgThis config.lt script is free software; the Free Software Foundation 660ad43ddacSmrggives unlimited permision to copy, distribute and modify it." 661ad43ddacSmrg 66243df4709Smrgwhile test $[#] != 0 663ad43ddacSmrgdo 664ad43ddacSmrg case $[1] in 665ad43ddacSmrg --version | --v* | -V ) 666ad43ddacSmrg echo "$lt_cl_version"; exit 0 ;; 667ad43ddacSmrg --help | --h* | -h ) 668ad43ddacSmrg echo "$lt_cl_help"; exit 0 ;; 669ad43ddacSmrg --debug | --d* | -d ) 670ad43ddacSmrg debug=: ;; 671ad43ddacSmrg --quiet | --q* | --silent | --s* | -q ) 672ad43ddacSmrg lt_cl_silent=: ;; 673ad43ddacSmrg 674ad43ddacSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 67543df4709SmrgTry \`$[0] --help' for more information.]) ;; 676ad43ddacSmrg 677ad43ddacSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 67843df4709SmrgTry \`$[0] --help' for more information.]) ;; 679ad43ddacSmrg esac 680ad43ddacSmrg shift 681ad43ddacSmrgdone 682ad43ddacSmrg 683ad43ddacSmrgif $lt_cl_silent; then 684ad43ddacSmrg exec AS_MESSAGE_FD>/dev/null 685ad43ddacSmrgfi 686ad43ddacSmrg_LTEOF 687ad43ddacSmrg 688ad43ddacSmrgcat >>"$CONFIG_LT" <<_LTEOF 689ad43ddacSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 690ad43ddacSmrg_LTEOF 691ad43ddacSmrg 692ad43ddacSmrgcat >>"$CONFIG_LT" <<\_LTEOF 693ad43ddacSmrgAC_MSG_NOTICE([creating $ofile]) 694ad43ddacSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 695ad43ddacSmrgAS_EXIT(0) 696ad43ddacSmrg_LTEOF 697ad43ddacSmrgchmod +x "$CONFIG_LT" 698ad43ddacSmrg 699ad43ddacSmrg# configure is writing to config.log, but config.lt does its own redirection, 700ad43ddacSmrg# appending to config.log, which fails on DOS, as config.log is still kept 701ad43ddacSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 702ad43ddacSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 70368105dcbSveegolt_cl_success=: 70443df4709Smrgtest "$silent" = yes && 70568105dcbSveego lt_config_lt_args="$lt_config_lt_args --quiet" 70668105dcbSveegoexec AS_MESSAGE_LOG_FD>/dev/null 70768105dcbSveego$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 70868105dcbSveegoexec AS_MESSAGE_LOG_FD>>config.log 70968105dcbSveego$lt_cl_success || AS_EXIT(1) 710ad43ddacSmrg])# LT_OUTPUT 711ad43ddacSmrg 712ad43ddacSmrg 713ad43ddacSmrg# _LT_CONFIG(TAG) 714ad43ddacSmrg# --------------- 715ad43ddacSmrg# If TAG is the built-in tag, create an initial libtool script with a 716ad43ddacSmrg# default configuration from the untagged config vars. Otherwise add code 717ad43ddacSmrg# to config.status for appending the configuration named by TAG from the 718ad43ddacSmrg# matching tagged config vars. 719ad43ddacSmrgm4_defun([_LT_CONFIG], 720ad43ddacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 721ad43ddacSmrg_LT_CONFIG_SAVE_COMMANDS([ 722ad43ddacSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 723ad43ddacSmrg m4_if(_LT_TAG, [C], [ 72443df4709Smrg # See if we are running on zsh, and set the options which allow our 725ad43ddacSmrg # commands through without removal of \ escapes. 72643df4709Smrg if test -n "${ZSH_VERSION+set}" ; then 727ad43ddacSmrg setopt NO_GLOB_SUBST 728ad43ddacSmrg fi 729ad43ddacSmrg 73043df4709Smrg cfgfile="${ofile}T" 731ad43ddacSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 732ad43ddacSmrg $RM "$cfgfile" 733ad43ddacSmrg 734ad43ddacSmrg cat <<_LT_EOF >> "$cfgfile" 735ad43ddacSmrg#! $SHELL 73643df4709Smrg 73743df4709Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 73843df4709Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 739ad43ddacSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 740ad43ddacSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 74143df4709Smrg# 742ad43ddacSmrg_LT_COPYING 743ad43ddacSmrg_LT_LIBTOOL_TAGS 744ad43ddacSmrg 745ad43ddacSmrg# ### BEGIN LIBTOOL CONFIG 746ad43ddacSmrg_LT_LIBTOOL_CONFIG_VARS 747ad43ddacSmrg_LT_LIBTOOL_TAG_VARS 748ad43ddacSmrg# ### END LIBTOOL CONFIG 749ad43ddacSmrg 750ad43ddacSmrg_LT_EOF 751ad43ddacSmrg 752ad43ddacSmrg case $host_os in 753ad43ddacSmrg aix3*) 754ad43ddacSmrg cat <<\_LT_EOF >> "$cfgfile" 755ad43ddacSmrg# AIX sometimes has problems with the GCC collect2 program. For some 756ad43ddacSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 757ad43ddacSmrg# vanish in a puff of smoke. 75843df4709Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 759ad43ddacSmrg COLLECT_NAMES= 760ad43ddacSmrg export COLLECT_NAMES 761ad43ddacSmrgfi 762ad43ddacSmrg_LT_EOF 763ad43ddacSmrg ;; 764ad43ddacSmrg esac 765ad43ddacSmrg 766ad43ddacSmrg _LT_PROG_LTMAIN 767ad43ddacSmrg 768ad43ddacSmrg # We use sed instead of cat because bash on DJGPP gets confused if 769ad43ddacSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 770ad43ddacSmrg # text mode, it properly converts lines to CR/LF. This bash problem 771ad43ddacSmrg # is reportedly fixed, but why not run on old versions too? 77268105dcbSveego sed '$q' "$ltmain" >> "$cfgfile" \ 77368105dcbSveego || (rm -f "$cfgfile"; exit 1) 774ad43ddacSmrg 77543df4709Smrg _LT_PROG_REPLACE_SHELLFNS 77643df4709Smrg 77768105dcbSveego mv -f "$cfgfile" "$ofile" || 778ad43ddacSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 779ad43ddacSmrg chmod +x "$ofile" 780ad43ddacSmrg], 781ad43ddacSmrg[cat <<_LT_EOF >> "$ofile" 782ad43ddacSmrg 783ad43ddacSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 784ad43ddacSmrgdnl in a comment (ie after a #). 785ad43ddacSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 786ad43ddacSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 787ad43ddacSmrg# ### END LIBTOOL TAG CONFIG: $1 788ad43ddacSmrg_LT_EOF 789ad43ddacSmrg])dnl /m4_if 790ad43ddacSmrg], 791ad43ddacSmrg[m4_if([$1], [], [ 792ad43ddacSmrg PACKAGE='$PACKAGE' 793ad43ddacSmrg VERSION='$VERSION' 79443df4709Smrg TIMESTAMP='$TIMESTAMP' 795ad43ddacSmrg RM='$RM' 796ad43ddacSmrg ofile='$ofile'], []) 797ad43ddacSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 798ad43ddacSmrg])# _LT_CONFIG 799ad43ddacSmrg 800ad43ddacSmrg 801ad43ddacSmrg# LT_SUPPORTED_TAG(TAG) 802ad43ddacSmrg# --------------------- 803ad43ddacSmrg# Trace this macro to discover what tags are supported by the libtool 804ad43ddacSmrg# --tag option, using: 805ad43ddacSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 806ad43ddacSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 807ad43ddacSmrg 808ad43ddacSmrg 809ad43ddacSmrg# C support is built-in for now 810ad43ddacSmrgm4_define([_LT_LANG_C_enabled], []) 811ad43ddacSmrgm4_define([_LT_TAGS], []) 812ad43ddacSmrg 813ad43ddacSmrg 814ad43ddacSmrg# LT_LANG(LANG) 815ad43ddacSmrg# ------------- 816ad43ddacSmrg# Enable libtool support for the given language if not already enabled. 817ad43ddacSmrgAC_DEFUN([LT_LANG], 818ad43ddacSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 819ad43ddacSmrgm4_case([$1], 820ad43ddacSmrg [C], [_LT_LANG(C)], 821ad43ddacSmrg [C++], [_LT_LANG(CXX)], 82268105dcbSveego [Go], [_LT_LANG(GO)], 823ad43ddacSmrg [Java], [_LT_LANG(GCJ)], 824ad43ddacSmrg [Fortran 77], [_LT_LANG(F77)], 825ad43ddacSmrg [Fortran], [_LT_LANG(FC)], 826ad43ddacSmrg [Windows Resource], [_LT_LANG(RC)], 827ad43ddacSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 828ad43ddacSmrg [_LT_LANG($1)], 829ad43ddacSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 830ad43ddacSmrg])# LT_LANG 831ad43ddacSmrg 832ad43ddacSmrg 833ad43ddacSmrg# _LT_LANG(LANGNAME) 834ad43ddacSmrg# ------------------ 835ad43ddacSmrgm4_defun([_LT_LANG], 836ad43ddacSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 837ad43ddacSmrg [LT_SUPPORTED_TAG([$1])dnl 838ad43ddacSmrg m4_append([_LT_TAGS], [$1 ])dnl 839ad43ddacSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 840ad43ddacSmrg _LT_LANG_$1_CONFIG($1)])dnl 841ad43ddacSmrg])# _LT_LANG 842ad43ddacSmrg 843ad43ddacSmrg 84468105dcbSveegom4_ifndef([AC_PROG_GO], [ 84568105dcbSveego# NOTE: This macro has been submitted for inclusion into # 84668105dcbSveego# GNU Autoconf as AC_PROG_GO. When it is available in # 84768105dcbSveego# a released version of Autoconf we should remove this # 84868105dcbSveego# macro and use it instead. # 84968105dcbSveegom4_defun([AC_PROG_GO], 85068105dcbSveego[AC_LANG_PUSH(Go)dnl 85168105dcbSveegoAC_ARG_VAR([GOC], [Go compiler command])dnl 85268105dcbSveegoAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 85368105dcbSveego_AC_ARG_VAR_LDFLAGS()dnl 85468105dcbSveegoAC_CHECK_TOOL(GOC, gccgo) 85568105dcbSveegoif test -z "$GOC"; then 85668105dcbSveego if test -n "$ac_tool_prefix"; then 85768105dcbSveego AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 85868105dcbSveego fi 85968105dcbSveegofi 86068105dcbSveegoif test -z "$GOC"; then 86168105dcbSveego AC_CHECK_PROG(GOC, gccgo, gccgo, false) 86268105dcbSveegofi 86368105dcbSveego])#m4_defun 86468105dcbSveego])#m4_ifndef 86568105dcbSveego 86668105dcbSveego 867ad43ddacSmrg# _LT_LANG_DEFAULT_CONFIG 868ad43ddacSmrg# ----------------------- 869ad43ddacSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 870ad43ddacSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 871ad43ddacSmrg [LT_LANG(CXX)], 872ad43ddacSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 873ad43ddacSmrg 874ad43ddacSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 875ad43ddacSmrg [LT_LANG(F77)], 876ad43ddacSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 877ad43ddacSmrg 878ad43ddacSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 879ad43ddacSmrg [LT_LANG(FC)], 880ad43ddacSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 881ad43ddacSmrg 882ad43ddacSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 883ad43ddacSmrgdnl pulling things in needlessly. 884ad43ddacSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 885ad43ddacSmrg [LT_LANG(GCJ)], 886ad43ddacSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 887ad43ddacSmrg [LT_LANG(GCJ)], 888ad43ddacSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 889ad43ddacSmrg [LT_LANG(GCJ)], 890ad43ddacSmrg [m4_ifdef([AC_PROG_GCJ], 891ad43ddacSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 892ad43ddacSmrg m4_ifdef([A][M_PROG_GCJ], 893ad43ddacSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 894ad43ddacSmrg m4_ifdef([LT_PROG_GCJ], 895ad43ddacSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 896ad43ddacSmrg 89768105dcbSveegoAC_PROVIDE_IFELSE([AC_PROG_GO], 89868105dcbSveego [LT_LANG(GO)], 89968105dcbSveego [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 90068105dcbSveego 901ad43ddacSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 902ad43ddacSmrg [LT_LANG(RC)], 903ad43ddacSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 904ad43ddacSmrg])# _LT_LANG_DEFAULT_CONFIG 905ad43ddacSmrg 906ad43ddacSmrg# Obsolete macros: 907ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 908ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 909ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 910ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 91168105dcbSveegoAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 912ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 913ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 914ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 915ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 916ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 91768105dcbSveegodnl AC_DEFUN([AC_LIBTOOL_RC], []) 918ad43ddacSmrg 919ad43ddacSmrg 920ad43ddacSmrg# _LT_TAG_COMPILER 921ad43ddacSmrg# ---------------- 922ad43ddacSmrgm4_defun([_LT_TAG_COMPILER], 923209ff23fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 924209ff23fSmrg 925ad43ddacSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 926ad43ddacSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 927ad43ddacSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 928ad43ddacSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 929ad43ddacSmrg 930209ff23fSmrg# If no C compiler was specified, use CC. 931209ff23fSmrgLTCC=${LTCC-"$CC"} 932209ff23fSmrg 933209ff23fSmrg# If no C compiler flags were specified, use CFLAGS. 934209ff23fSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 935209ff23fSmrg 936209ff23fSmrg# Allow CC to be a program name with arguments. 937209ff23fSmrgcompiler=$CC 938ad43ddacSmrg])# _LT_TAG_COMPILER 939209ff23fSmrg 940209ff23fSmrg 941209ff23fSmrg# _LT_COMPILER_BOILERPLATE 942209ff23fSmrg# ------------------------ 943209ff23fSmrg# Check for compiler boilerplate output or warnings with 944209ff23fSmrg# the simple compiler test code. 945ad43ddacSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 946ad43ddacSmrg[m4_require([_LT_DECL_SED])dnl 947209ff23fSmrgac_outfile=conftest.$ac_objext 948209ff23fSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 949209ff23fSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 950209ff23fSmrg_lt_compiler_boilerplate=`cat conftest.err` 951ad43ddacSmrg$RM conftest* 952209ff23fSmrg])# _LT_COMPILER_BOILERPLATE 953209ff23fSmrg 954209ff23fSmrg 955209ff23fSmrg# _LT_LINKER_BOILERPLATE 956209ff23fSmrg# ---------------------- 957209ff23fSmrg# Check for linker boilerplate output or warnings with 958209ff23fSmrg# the simple link test code. 959ad43ddacSmrgm4_defun([_LT_LINKER_BOILERPLATE], 960ad43ddacSmrg[m4_require([_LT_DECL_SED])dnl 961209ff23fSmrgac_outfile=conftest.$ac_objext 962209ff23fSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 963209ff23fSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 964209ff23fSmrg_lt_linker_boilerplate=`cat conftest.err` 965ad43ddacSmrg$RM -r conftest* 966209ff23fSmrg])# _LT_LINKER_BOILERPLATE 967209ff23fSmrg 968209ff23fSmrg# _LT_REQUIRED_DARWIN_CHECKS 969ad43ddacSmrg# ------------------------- 970ad43ddacSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 971209ff23fSmrg case $host_os in 972209ff23fSmrg rhapsody* | darwin*) 973209ff23fSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 974209ff23fSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 975ad43ddacSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 976ad43ddacSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 977ad43ddacSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 978ad43ddacSmrg _LT_DECL([], [DSYMUTIL], [1], 979ad43ddacSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 980ad43ddacSmrg _LT_DECL([], [NMEDIT], [1], 981ad43ddacSmrg [Tool to change global to local symbols on Mac OS X]) 982ad43ddacSmrg _LT_DECL([], [LIPO], [1], 983ad43ddacSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 984ad43ddacSmrg _LT_DECL([], [OTOOL], [1], 985ad43ddacSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 986ad43ddacSmrg _LT_DECL([], [OTOOL64], [1], 987ad43ddacSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 988209ff23fSmrg 989209ff23fSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 990209ff23fSmrg [lt_cv_apple_cc_single_mod=no 99143df4709Smrg if test -z "${LT_MULTI_MODULE}"; then 992ad43ddacSmrg # By default we will add the -single_module flag. You can override 993ad43ddacSmrg # by either setting the environment variable LT_MULTI_MODULE 994ad43ddacSmrg # non-empty at configure time, or by adding -multi_module to the 995ad43ddacSmrg # link flags. 996ad43ddacSmrg rm -rf libconftest.dylib* 997ad43ddacSmrg echo "int foo(void){return 1;}" > conftest.c 998ad43ddacSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 999ad43ddacSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1000ad43ddacSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1001ad43ddacSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1002ad43ddacSmrg _lt_result=$? 100368105dcbSveego # If there is a non-empty error log, and "single_module" 100468105dcbSveego # appears in it, assume the flag caused a linker warning 100568105dcbSveego if test -s conftest.err && $GREP single_module conftest.err; then 100668105dcbSveego cat conftest.err >&AS_MESSAGE_LOG_FD 100768105dcbSveego # Otherwise, if the output was created with a 0 exit code from 100868105dcbSveego # the compiler, it worked. 100943df4709Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 1010ad43ddacSmrg lt_cv_apple_cc_single_mod=yes 1011ad43ddacSmrg else 1012ad43ddacSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1013ad43ddacSmrg fi 1014ad43ddacSmrg rm -rf libconftest.dylib* 1015ad43ddacSmrg rm -f conftest.* 1016209ff23fSmrg fi]) 101768105dcbSveego 1018209ff23fSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1019209ff23fSmrg [lt_cv_ld_exported_symbols_list], 1020209ff23fSmrg [lt_cv_ld_exported_symbols_list=no 1021209ff23fSmrg save_LDFLAGS=$LDFLAGS 1022209ff23fSmrg echo "_main" > conftest.sym 1023209ff23fSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1024209ff23fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1025ad43ddacSmrg [lt_cv_ld_exported_symbols_list=yes], 1026ad43ddacSmrg [lt_cv_ld_exported_symbols_list=no]) 102743df4709Smrg LDFLAGS="$save_LDFLAGS" 1028209ff23fSmrg ]) 102968105dcbSveego 103068105dcbSveego AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 103168105dcbSveego [lt_cv_ld_force_load=no 103268105dcbSveego cat > conftest.c << _LT_EOF 103368105dcbSveegoint forced_loaded() { return 2;} 103468105dcbSveego_LT_EOF 103568105dcbSveego echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 103668105dcbSveego $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 103768105dcbSveego echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 103868105dcbSveego $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 103968105dcbSveego echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 104068105dcbSveego $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 104168105dcbSveego cat > conftest.c << _LT_EOF 104268105dcbSveegoint main() { return 0;} 104368105dcbSveego_LT_EOF 104468105dcbSveego echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 104568105dcbSveego $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 104668105dcbSveego _lt_result=$? 104768105dcbSveego if test -s conftest.err && $GREP force_load conftest.err; then 104868105dcbSveego cat conftest.err >&AS_MESSAGE_LOG_FD 104943df4709Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 105068105dcbSveego lt_cv_ld_force_load=yes 105168105dcbSveego else 105268105dcbSveego cat conftest.err >&AS_MESSAGE_LOG_FD 105368105dcbSveego fi 105468105dcbSveego rm -f conftest.err libconftest.a conftest conftest.c 105568105dcbSveego rm -rf conftest.dSYM 105668105dcbSveego ]) 1057209ff23fSmrg case $host_os in 1058ad43ddacSmrg rhapsody* | darwin1.[[012]]) 105943df4709Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 1060209ff23fSmrg darwin1.*) 106143df4709Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10622f39173dSmrg darwin*) # darwin 5.x on 1063209ff23fSmrg # if running on 10.5 or later, the deployment target defaults 1064209ff23fSmrg # to the OS version, if on x86, and 10.4, the deployment 10652f39173dSmrg # target defaults to 10.4. Don't you love it? 1066209ff23fSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1067ad43ddacSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 106843df4709Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 106943df4709Smrg 10.[[012]]*) 107043df4709Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1071ad43ddacSmrg 10.*) 107243df4709Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1073209ff23fSmrg esac 1074209ff23fSmrg ;; 1075209ff23fSmrg esac 107643df4709Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 1077209ff23fSmrg _lt_dar_single_mod='$single_module' 1078209ff23fSmrg fi 107943df4709Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 108043df4709Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 1081209ff23fSmrg else 108243df4709Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 1083209ff23fSmrg fi 108443df4709Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1085ad43ddacSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1086209ff23fSmrg else 1087209ff23fSmrg _lt_dsymutil= 1088209ff23fSmrg fi 1089209ff23fSmrg ;; 1090209ff23fSmrg esac 1091209ff23fSmrg]) 1092209ff23fSmrg 1093ad43ddacSmrg 109468105dcbSveego# _LT_DARWIN_LINKER_FEATURES([TAG]) 109568105dcbSveego# --------------------------------- 1096ad43ddacSmrg# Checks for linker and compiler features on darwin 1097ad43ddacSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1098ad43ddacSmrg[ 1099ad43ddacSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1100ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1101ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=no 1102ad43ddacSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1103ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 110443df4709Smrg if test "$lt_cv_ld_force_load" = "yes"; then 110543df4709Smrg _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\"`' 110668105dcbSveego m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 110768105dcbSveego [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 110868105dcbSveego else 110968105dcbSveego _LT_TAGVAR(whole_archive_flag_spec, $1)='' 111068105dcbSveego fi 1111ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 111243df4709Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 11132f39173dSmrg case $cc_basename in 111443df4709Smrg ifort*) _lt_dar_can_shared=yes ;; 11152f39173dSmrg *) _lt_dar_can_shared=$GCC ;; 11162f39173dSmrg esac 111743df4709Smrg if test "$_lt_dar_can_shared" = "yes"; then 111868105dcbSveego output_verbose_link_cmd=func_echo_all 111943df4709Smrg _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}" 112043df4709Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 112143df4709Smrg _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}" 112243df4709Smrg _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}" 1123ad43ddacSmrg m4_if([$1], [CXX], 112443df4709Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 112543df4709Smrg _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}" 112643df4709Smrg _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}" 1127ad43ddacSmrg fi 1128ad43ddacSmrg],[]) 1129ad43ddacSmrg else 1130ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 1131ad43ddacSmrg fi 1132ad43ddacSmrg]) 1133ad43ddacSmrg 113468105dcbSveego# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 113568105dcbSveego# ---------------------------------- 1136209ff23fSmrg# Links a minimal program and checks the executable 1137209ff23fSmrg# for the system default hardcoded library path. In most cases, 1138209ff23fSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1139209ff23fSmrg# the location of the communication and MPI libs are included too. 1140209ff23fSmrg# If we don't find anything, use the default library path according 1141209ff23fSmrg# to the aix ld manual. 114268105dcbSveego# Store the results from the different compilers for each TAGNAME. 114368105dcbSveego# Allow to override them for all tags through lt_cv_aix_libpath. 1144ad43ddacSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1145ad43ddacSmrg[m4_require([_LT_DECL_SED])dnl 114643df4709Smrgif test "${lt_cv_aix_libpath+set}" = set; then 114768105dcbSveego aix_libpath=$lt_cv_aix_libpath 114868105dcbSveegoelse 114968105dcbSveego AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 115068105dcbSveego [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 115168105dcbSveego lt_aix_libpath_sed='[ 115268105dcbSveego /Import File Strings/,/^$/ { 115368105dcbSveego /^0/ { 115468105dcbSveego s/^0 *\([^ ]*\) *$/\1/ 115568105dcbSveego p 115668105dcbSveego } 115768105dcbSveego }]' 115868105dcbSveego _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 115968105dcbSveego # Check for a 64-bit object if we didn't find anything. 116068105dcbSveego if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 116168105dcbSveego _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 116268105dcbSveego fi],[]) 116368105dcbSveego if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 116443df4709Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 116568105dcbSveego fi 116668105dcbSveego ]) 116768105dcbSveego aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 116868105dcbSveegofi 1169ad43ddacSmrg])# _LT_SYS_MODULE_PATH_AIX 1170209ff23fSmrg 1171209ff23fSmrg 1172ad43ddacSmrg# _LT_SHELL_INIT(ARG) 1173ad43ddacSmrg# ------------------- 1174ad43ddacSmrgm4_define([_LT_SHELL_INIT], 117568105dcbSveego[m4_divert_text([M4SH-INIT], [$1 117668105dcbSveego])])# _LT_SHELL_INIT 117768105dcbSveego 1178209ff23fSmrg 1179209ff23fSmrg 1180ad43ddacSmrg# _LT_PROG_ECHO_BACKSLASH 1181ad43ddacSmrg# ----------------------- 118268105dcbSveego# Find how we can fake an echo command that does not interpret backslash. 118368105dcbSveego# In particular, with Autoconf 2.60 or later we add some code to the start 118443df4709Smrg# of the generated configure script which will find a shell with a builtin 118543df4709Smrg# printf (which we can use as an echo command). 1186ad43ddacSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 118768105dcbSveego[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 118868105dcbSveegoECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 118968105dcbSveegoECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 119068105dcbSveego 119168105dcbSveegoAC_MSG_CHECKING([how to print strings]) 119268105dcbSveego# Test print first, because it will be a builtin if present. 119368105dcbSveegoif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 119468105dcbSveego test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 119568105dcbSveego ECHO='print -r --' 119668105dcbSveegoelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 119768105dcbSveego ECHO='printf %s\n' 1198209ff23fSmrgelse 119968105dcbSveego # Use this function as a fallback that always works. 120068105dcbSveego func_fallback_echo () 120168105dcbSveego { 120268105dcbSveego eval 'cat <<_LTECHO_EOF 120368105dcbSveego$[]1 120468105dcbSveego_LTECHO_EOF' 120568105dcbSveego } 120668105dcbSveego ECHO='func_fallback_echo' 1207209ff23fSmrgfi 1208209ff23fSmrg 120968105dcbSveego# func_echo_all arg... 121068105dcbSveego# Invoke $ECHO with all args, space-separated. 121168105dcbSveegofunc_echo_all () 121268105dcbSveego{ 121343df4709Smrg $ECHO "$*" 121468105dcbSveego} 1215209ff23fSmrg 121643df4709Smrgcase "$ECHO" in 121768105dcbSveego printf*) AC_MSG_RESULT([printf]) ;; 121868105dcbSveego print*) AC_MSG_RESULT([print -r]) ;; 121968105dcbSveego *) AC_MSG_RESULT([cat]) ;; 122068105dcbSveegoesac 1221209ff23fSmrg 122268105dcbSveegom4_ifdef([_AS_DETECT_SUGGESTED], 122368105dcbSveego[_AS_DETECT_SUGGESTED([ 122468105dcbSveego test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 122568105dcbSveego ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 122668105dcbSveego ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 122768105dcbSveego ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 122868105dcbSveego PATH=/empty FPATH=/empty; export PATH FPATH 122968105dcbSveego test "X`printf %s $ECHO`" = "X$ECHO" \ 123068105dcbSveego || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1231209ff23fSmrg 1232ad43ddacSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 123368105dcbSveego_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1234ad43ddacSmrg])# _LT_PROG_ECHO_BACKSLASH 1235209ff23fSmrg 1236209ff23fSmrg 123768105dcbSveego# _LT_WITH_SYSROOT 123868105dcbSveego# ---------------- 123968105dcbSveegoAC_DEFUN([_LT_WITH_SYSROOT], 124068105dcbSveego[AC_MSG_CHECKING([for sysroot]) 124168105dcbSveegoAC_ARG_WITH([sysroot], 124243df4709Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 124343df4709Smrg (or the compiler's sysroot if not specified).], 124468105dcbSveego[], [with_sysroot=no]) 124568105dcbSveego 124668105dcbSveegodnl lt_sysroot will always be passed unquoted. We quote it here 124768105dcbSveegodnl in case the user passed a directory name. 124868105dcbSveegolt_sysroot= 124943df4709Smrgcase ${with_sysroot} in #( 125068105dcbSveego yes) 125143df4709Smrg if test "$GCC" = yes; then 125268105dcbSveego lt_sysroot=`$CC --print-sysroot 2>/dev/null` 125368105dcbSveego fi 125468105dcbSveego ;; #( 125568105dcbSveego /*) 125668105dcbSveego lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 125768105dcbSveego ;; #( 125868105dcbSveego no|'') 125968105dcbSveego ;; #( 126068105dcbSveego *) 126143df4709Smrg AC_MSG_RESULT([${with_sysroot}]) 126268105dcbSveego AC_MSG_ERROR([The sysroot must be an absolute path.]) 126368105dcbSveego ;; 126468105dcbSveegoesac 126568105dcbSveego 126668105dcbSveego AC_MSG_RESULT([${lt_sysroot:-no}]) 126768105dcbSveego_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 126843df4709Smrg[dependent libraries, and in which our libraries should be installed.])]) 126968105dcbSveego 1270ad43ddacSmrg# _LT_ENABLE_LOCK 1271ad43ddacSmrg# --------------- 1272ad43ddacSmrgm4_defun([_LT_ENABLE_LOCK], 1273209ff23fSmrg[AC_ARG_ENABLE([libtool-lock], 1274ad43ddacSmrg [AS_HELP_STRING([--disable-libtool-lock], 1275ad43ddacSmrg [avoid locking (might break parallel builds)])]) 127643df4709Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1277209ff23fSmrg 1278209ff23fSmrg# Some flags need to be propagated to the compiler or linker for good 1279209ff23fSmrg# libtool support. 1280209ff23fSmrgcase $host in 1281209ff23fSmrgia64-*-hpux*) 128243df4709Smrg # Find out which ABI we are using. 1283209ff23fSmrg echo 'int i;' > conftest.$ac_ext 1284209ff23fSmrg if AC_TRY_EVAL(ac_compile); then 1285209ff23fSmrg case `/usr/bin/file conftest.$ac_objext` in 1286ad43ddacSmrg *ELF-32*) 128743df4709Smrg HPUX_IA64_MODE="32" 1288ad43ddacSmrg ;; 1289ad43ddacSmrg *ELF-64*) 129043df4709Smrg HPUX_IA64_MODE="64" 1291ad43ddacSmrg ;; 1292209ff23fSmrg esac 1293209ff23fSmrg fi 1294209ff23fSmrg rm -rf conftest* 1295209ff23fSmrg ;; 1296209ff23fSmrg*-*-irix6*) 129743df4709Smrg # Find out which ABI we are using. 129868105dcbSveego echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1299209ff23fSmrg if AC_TRY_EVAL(ac_compile); then 130043df4709Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 1301ad43ddacSmrg case `/usr/bin/file conftest.$ac_objext` in 1302ad43ddacSmrg *32-bit*) 1303ad43ddacSmrg LD="${LD-ld} -melf32bsmip" 1304ad43ddacSmrg ;; 1305ad43ddacSmrg *N32*) 1306ad43ddacSmrg LD="${LD-ld} -melf32bmipn32" 1307ad43ddacSmrg ;; 1308ad43ddacSmrg *64-bit*) 1309ad43ddacSmrg LD="${LD-ld} -melf64bmip" 1310ad43ddacSmrg ;; 1311ad43ddacSmrg esac 1312ad43ddacSmrg else 1313ad43ddacSmrg case `/usr/bin/file conftest.$ac_objext` in 1314ad43ddacSmrg *32-bit*) 1315ad43ddacSmrg LD="${LD-ld} -32" 1316ad43ddacSmrg ;; 1317ad43ddacSmrg *N32*) 1318ad43ddacSmrg LD="${LD-ld} -n32" 1319ad43ddacSmrg ;; 1320ad43ddacSmrg *64-bit*) 1321ad43ddacSmrg LD="${LD-ld} -64" 1322ad43ddacSmrg ;; 1323ad43ddacSmrg esac 1324ad43ddacSmrg fi 1325209ff23fSmrg fi 1326209ff23fSmrg rm -rf conftest* 1327209ff23fSmrg ;; 1328209ff23fSmrg 132943df4709Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1330ad43ddacSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 133143df4709Smrg # Find out which ABI we are using. 1332209ff23fSmrg echo 'int i;' > conftest.$ac_ext 1333209ff23fSmrg if AC_TRY_EVAL(ac_compile); then 1334209ff23fSmrg case `/usr/bin/file conftest.o` in 1335ad43ddacSmrg *32-bit*) 1336ad43ddacSmrg case $host in 1337ad43ddacSmrg x86_64-*kfreebsd*-gnu) 1338ad43ddacSmrg LD="${LD-ld} -m elf_i386_fbsd" 1339ad43ddacSmrg ;; 1340ad43ddacSmrg x86_64-*linux*) 134143df4709Smrg LD="${LD-ld} -m elf_i386" 1342ad43ddacSmrg ;; 134343df4709Smrg ppc64-*linux*|powerpc64-*linux*) 1344ad43ddacSmrg LD="${LD-ld} -m elf32ppclinux" 1345ad43ddacSmrg ;; 1346ad43ddacSmrg s390x-*linux*) 1347ad43ddacSmrg LD="${LD-ld} -m elf_s390" 1348ad43ddacSmrg ;; 1349ad43ddacSmrg sparc64-*linux*) 1350ad43ddacSmrg LD="${LD-ld} -m elf32_sparc" 1351ad43ddacSmrg ;; 1352ad43ddacSmrg esac 1353ad43ddacSmrg ;; 1354ad43ddacSmrg *64-bit*) 1355ad43ddacSmrg case $host in 1356ad43ddacSmrg x86_64-*kfreebsd*-gnu) 1357ad43ddacSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 1358ad43ddacSmrg ;; 1359ad43ddacSmrg x86_64-*linux*) 1360ad43ddacSmrg LD="${LD-ld} -m elf_x86_64" 1361ad43ddacSmrg ;; 136243df4709Smrg ppc*-*linux*|powerpc*-*linux*) 1363ad43ddacSmrg LD="${LD-ld} -m elf64ppc" 1364ad43ddacSmrg ;; 1365ad43ddacSmrg s390*-*linux*|s390*-*tpf*) 1366ad43ddacSmrg LD="${LD-ld} -m elf64_s390" 1367ad43ddacSmrg ;; 1368ad43ddacSmrg sparc*-*linux*) 1369ad43ddacSmrg LD="${LD-ld} -m elf64_sparc" 1370ad43ddacSmrg ;; 1371ad43ddacSmrg esac 1372ad43ddacSmrg ;; 1373209ff23fSmrg esac 1374209ff23fSmrg fi 1375209ff23fSmrg rm -rf conftest* 1376209ff23fSmrg ;; 1377209ff23fSmrg 1378209ff23fSmrg*-*-sco3.2v5*) 1379209ff23fSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 138043df4709Smrg SAVE_CFLAGS="$CFLAGS" 1381209ff23fSmrg CFLAGS="$CFLAGS -belf" 1382209ff23fSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1383209ff23fSmrg [AC_LANG_PUSH(C) 1384ad43ddacSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1385209ff23fSmrg AC_LANG_POP]) 138643df4709Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1387209ff23fSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 138843df4709Smrg CFLAGS="$SAVE_CFLAGS" 1389209ff23fSmrg fi 1390209ff23fSmrg ;; 139168105dcbSveego*-*solaris*) 139243df4709Smrg # Find out which ABI we are using. 1393209ff23fSmrg echo 'int i;' > conftest.$ac_ext 1394209ff23fSmrg if AC_TRY_EVAL(ac_compile); then 1395209ff23fSmrg case `/usr/bin/file conftest.o` in 1396209ff23fSmrg *64-bit*) 1397209ff23fSmrg case $lt_cv_prog_gnu_ld in 139868105dcbSveego yes*) 139968105dcbSveego case $host in 140043df4709Smrg i?86-*-solaris*) 140168105dcbSveego LD="${LD-ld} -m elf_x86_64" 140268105dcbSveego ;; 140368105dcbSveego sparc*-*-solaris*) 140468105dcbSveego LD="${LD-ld} -m elf64_sparc" 140568105dcbSveego ;; 140668105dcbSveego esac 140768105dcbSveego # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 140868105dcbSveego if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 140943df4709Smrg LD="${LD-ld}_sol2" 141068105dcbSveego fi 141168105dcbSveego ;; 1412209ff23fSmrg *) 1413ad43ddacSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1414209ff23fSmrg LD="${LD-ld} -64" 1415209ff23fSmrg fi 1416209ff23fSmrg ;; 1417209ff23fSmrg esac 1418209ff23fSmrg ;; 1419209ff23fSmrg esac 1420209ff23fSmrg fi 1421209ff23fSmrg rm -rf conftest* 1422209ff23fSmrg ;; 1423209ff23fSmrgesac 1424209ff23fSmrg 142543df4709Smrgneed_locks="$enable_libtool_lock" 1426ad43ddacSmrg])# _LT_ENABLE_LOCK 1427ad43ddacSmrg 1428ad43ddacSmrg 142968105dcbSveego# _LT_PROG_AR 143068105dcbSveego# ----------- 143168105dcbSveegom4_defun([_LT_PROG_AR], 143268105dcbSveego[AC_CHECK_TOOLS(AR, [ar], false) 143368105dcbSveego: ${AR=ar} 143468105dcbSveego: ${AR_FLAGS=cru} 143568105dcbSveego_LT_DECL([], [AR], [1], [The archiver]) 143668105dcbSveego_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 143768105dcbSveego 143868105dcbSveegoAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 143968105dcbSveego [lt_cv_ar_at_file=no 144068105dcbSveego AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 144168105dcbSveego [echo conftest.$ac_objext > conftest.lst 144268105dcbSveego lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 144368105dcbSveego AC_TRY_EVAL([lt_ar_try]) 144443df4709Smrg if test "$ac_status" -eq 0; then 144568105dcbSveego # Ensure the archiver fails upon bogus file names. 144668105dcbSveego rm -f conftest.$ac_objext libconftest.a 144768105dcbSveego AC_TRY_EVAL([lt_ar_try]) 144843df4709Smrg if test "$ac_status" -ne 0; then 144968105dcbSveego lt_cv_ar_at_file=@ 145068105dcbSveego fi 145168105dcbSveego fi 145268105dcbSveego rm -f conftest.* libconftest.a 145368105dcbSveego ]) 145468105dcbSveego ]) 145568105dcbSveego 145643df4709Smrgif test "x$lt_cv_ar_at_file" = xno; then 145768105dcbSveego archiver_list_spec= 145868105dcbSveegoelse 145968105dcbSveego archiver_list_spec=$lt_cv_ar_at_file 146068105dcbSveegofi 146168105dcbSveego_LT_DECL([], [archiver_list_spec], [1], 146268105dcbSveego [How to feed a file listing to the archiver]) 146368105dcbSveego])# _LT_PROG_AR 146468105dcbSveego 146568105dcbSveego 1466ad43ddacSmrg# _LT_CMD_OLD_ARCHIVE 1467ad43ddacSmrg# ------------------- 1468ad43ddacSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 146968105dcbSveego[_LT_PROG_AR 1470ad43ddacSmrg 1471ad43ddacSmrgAC_CHECK_TOOL(STRIP, strip, :) 1472ad43ddacSmrgtest -z "$STRIP" && STRIP=: 1473ad43ddacSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1474ad43ddacSmrg 1475ad43ddacSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1476ad43ddacSmrgtest -z "$RANLIB" && RANLIB=: 1477ad43ddacSmrg_LT_DECL([], [RANLIB], [1], 1478ad43ddacSmrg [Commands used to install an old-style archive]) 1479ad43ddacSmrg 1480ad43ddacSmrg# Determine commands to create old-style static archives. 1481ad43ddacSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1482ad43ddacSmrgold_postinstall_cmds='chmod 644 $oldlib' 1483ad43ddacSmrgold_postuninstall_cmds= 1484209ff23fSmrg 1485ad43ddacSmrgif test -n "$RANLIB"; then 1486ad43ddacSmrg case $host_os in 148743df4709Smrg openbsd*) 148868105dcbSveego old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1489ad43ddacSmrg ;; 1490ad43ddacSmrg *) 149168105dcbSveego old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1492ad43ddacSmrg ;; 1493ad43ddacSmrg esac 149468105dcbSveego old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1495ad43ddacSmrgfi 149668105dcbSveego 149768105dcbSveegocase $host_os in 149868105dcbSveego darwin*) 149968105dcbSveego lock_old_archive_extraction=yes ;; 150068105dcbSveego *) 150168105dcbSveego lock_old_archive_extraction=no ;; 150268105dcbSveegoesac 1503ad43ddacSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 1504ad43ddacSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1505ad43ddacSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 1506ad43ddacSmrg [Commands used to build an old-style archive]) 150768105dcbSveego_LT_DECL([], [lock_old_archive_extraction], [0], 150868105dcbSveego [Whether to use a lock for old archive extraction]) 1509ad43ddacSmrg])# _LT_CMD_OLD_ARCHIVE 1510209ff23fSmrg 1511209ff23fSmrg 1512ad43ddacSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1513209ff23fSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1514209ff23fSmrg# ---------------------------------------------------------------- 1515209ff23fSmrg# Check whether the given compiler option works 1516ad43ddacSmrgAC_DEFUN([_LT_COMPILER_OPTION], 1517ad43ddacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1518ad43ddacSmrgm4_require([_LT_DECL_SED])dnl 1519209ff23fSmrgAC_CACHE_CHECK([$1], [$2], 1520209ff23fSmrg [$2=no 1521ad43ddacSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1522209ff23fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 152343df4709Smrg lt_compiler_flag="$3" 1524209ff23fSmrg # Insert the option either (1) after the last *FLAGS variable, or 1525209ff23fSmrg # (2) before a word containing "conftest.", or (3) at the end. 1526209ff23fSmrg # Note that $ac_compile itself does not contain backslashes and begins 1527209ff23fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1528209ff23fSmrg # The option is referenced via a variable to avoid confusing sed. 1529209ff23fSmrg lt_compile=`echo "$ac_compile" | $SED \ 1530209ff23fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1531209ff23fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1532209ff23fSmrg -e 's:$: $lt_compiler_flag:'` 153368105dcbSveego (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1534209ff23fSmrg (eval "$lt_compile" 2>conftest.err) 1535209ff23fSmrg ac_status=$? 1536209ff23fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 153768105dcbSveego echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1538209ff23fSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 1539209ff23fSmrg # The compiler can only warn and ignore the option if not recognized 1540209ff23fSmrg # So say no if there are warnings other than the usual output. 154168105dcbSveego $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1542209ff23fSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1543209ff23fSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1544209ff23fSmrg $2=yes 1545209ff23fSmrg fi 1546209ff23fSmrg fi 1547ad43ddacSmrg $RM conftest* 1548209ff23fSmrg]) 1549209ff23fSmrg 155043df4709Smrgif test x"[$]$2" = xyes; then 1551ad43ddacSmrg m4_if([$5], , :, [$5]) 1552209ff23fSmrgelse 1553ad43ddacSmrg m4_if([$6], , :, [$6]) 1554209ff23fSmrgfi 1555ad43ddacSmrg])# _LT_COMPILER_OPTION 1556209ff23fSmrg 1557ad43ddacSmrg# Old name: 1558ad43ddacSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1559ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 1560ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1561209ff23fSmrg 1562ad43ddacSmrg 1563ad43ddacSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1564ad43ddacSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1565ad43ddacSmrg# ---------------------------------------------------- 1566ad43ddacSmrg# Check whether the given linker option works 1567ad43ddacSmrgAC_DEFUN([_LT_LINKER_OPTION], 1568ad43ddacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1569ad43ddacSmrgm4_require([_LT_DECL_SED])dnl 1570209ff23fSmrgAC_CACHE_CHECK([$1], [$2], 1571209ff23fSmrg [$2=no 157243df4709Smrg save_LDFLAGS="$LDFLAGS" 1573209ff23fSmrg LDFLAGS="$LDFLAGS $3" 1574209ff23fSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1575209ff23fSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1576209ff23fSmrg # The linker can only warn and ignore the option if not recognized 1577209ff23fSmrg # So say no if there are warnings 1578209ff23fSmrg if test -s conftest.err; then 1579209ff23fSmrg # Append any errors to the config.log. 1580209ff23fSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 158168105dcbSveego $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1582209ff23fSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1583209ff23fSmrg if diff conftest.exp conftest.er2 >/dev/null; then 1584209ff23fSmrg $2=yes 1585209ff23fSmrg fi 1586209ff23fSmrg else 1587209ff23fSmrg $2=yes 1588209ff23fSmrg fi 1589209ff23fSmrg fi 1590ad43ddacSmrg $RM -r conftest* 159143df4709Smrg LDFLAGS="$save_LDFLAGS" 1592209ff23fSmrg]) 1593209ff23fSmrg 159443df4709Smrgif test x"[$]$2" = xyes; then 1595ad43ddacSmrg m4_if([$4], , :, [$4]) 1596209ff23fSmrgelse 1597ad43ddacSmrg m4_if([$5], , :, [$5]) 1598209ff23fSmrgfi 1599ad43ddacSmrg])# _LT_LINKER_OPTION 1600209ff23fSmrg 1601ad43ddacSmrg# Old name: 1602ad43ddacSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1603ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 1604ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1605209ff23fSmrg 1606ad43ddacSmrg 1607ad43ddacSmrg# LT_CMD_MAX_LEN 1608ad43ddacSmrg#--------------- 1609ad43ddacSmrgAC_DEFUN([LT_CMD_MAX_LEN], 1610ad43ddacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1611ad43ddacSmrg# find the maximum length of command line arguments 1612209ff23fSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1613209ff23fSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1614209ff23fSmrg i=0 161543df4709Smrg teststring="ABCD" 1616209ff23fSmrg 1617209ff23fSmrg case $build_os in 1618209ff23fSmrg msdosdjgpp*) 1619209ff23fSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1620209ff23fSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1621209ff23fSmrg # during glob expansion). Even if it were fixed, the result of this 1622209ff23fSmrg # check would be larger than it should be. 1623209ff23fSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1624209ff23fSmrg ;; 1625209ff23fSmrg 1626209ff23fSmrg gnu*) 1627209ff23fSmrg # Under GNU Hurd, this test is not required because there is 1628209ff23fSmrg # no limit to the length of command line arguments. 1629209ff23fSmrg # Libtool will interpret -1 as no limit whatsoever 1630209ff23fSmrg lt_cv_sys_max_cmd_len=-1; 1631209ff23fSmrg ;; 1632209ff23fSmrg 16332f39173dSmrg cygwin* | mingw* | cegcc*) 1634209ff23fSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1635209ff23fSmrg # about 5 minutes as the teststring grows exponentially. 1636209ff23fSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 1637209ff23fSmrg # you end up with a "frozen" computer, even though with patience 1638209ff23fSmrg # the test eventually succeeds (with a max line length of 256k). 1639209ff23fSmrg # Instead, let's just punt: use the minimum linelength reported by 1640209ff23fSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 1641209ff23fSmrg lt_cv_sys_max_cmd_len=8192; 1642209ff23fSmrg ;; 1643209ff23fSmrg 164468105dcbSveego mint*) 164568105dcbSveego # On MiNT this can take a long time and run out of memory. 164668105dcbSveego lt_cv_sys_max_cmd_len=8192; 164768105dcbSveego ;; 164868105dcbSveego 1649209ff23fSmrg amigaos*) 1650209ff23fSmrg # On AmigaOS with pdksh, this test takes hours, literally. 1651209ff23fSmrg # So we just punt and use a minimum line length of 8192. 1652209ff23fSmrg lt_cv_sys_max_cmd_len=8192; 1653209ff23fSmrg ;; 1654209ff23fSmrg 165543df4709Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1656209ff23fSmrg # This has been around since 386BSD, at least. Likely further. 1657209ff23fSmrg if test -x /sbin/sysctl; then 1658209ff23fSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1659209ff23fSmrg elif test -x /usr/sbin/sysctl; then 1660209ff23fSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1661209ff23fSmrg else 1662209ff23fSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1663209ff23fSmrg fi 1664209ff23fSmrg # And add a safety zone 1665209ff23fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1666209ff23fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1667209ff23fSmrg ;; 1668209ff23fSmrg 1669209ff23fSmrg interix*) 1670209ff23fSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1671209ff23fSmrg lt_cv_sys_max_cmd_len=196608 1672209ff23fSmrg ;; 1673209ff23fSmrg 167468105dcbSveego os2*) 167568105dcbSveego # The test takes a long time on OS/2. 167668105dcbSveego lt_cv_sys_max_cmd_len=8192 167768105dcbSveego ;; 167868105dcbSveego 1679209ff23fSmrg osf*) 1680209ff23fSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1681209ff23fSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1682209ff23fSmrg # nice to cause kernel panics so lets avoid the loop below. 1683209ff23fSmrg # First set a reasonable default. 1684209ff23fSmrg lt_cv_sys_max_cmd_len=16384 1685209ff23fSmrg # 1686209ff23fSmrg if test -x /sbin/sysconfig; then 1687209ff23fSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1688209ff23fSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1689209ff23fSmrg esac 1690209ff23fSmrg fi 1691209ff23fSmrg ;; 1692209ff23fSmrg sco3.2v5*) 1693209ff23fSmrg lt_cv_sys_max_cmd_len=102400 1694209ff23fSmrg ;; 1695209ff23fSmrg sysv5* | sco5v6* | sysv4.2uw2*) 1696209ff23fSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1697209ff23fSmrg if test -n "$kargmax"; then 1698ad43ddacSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1699209ff23fSmrg else 1700209ff23fSmrg lt_cv_sys_max_cmd_len=32768 1701209ff23fSmrg fi 1702209ff23fSmrg ;; 1703209ff23fSmrg *) 1704209ff23fSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 170543df4709Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 1706209ff23fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1707209ff23fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1708209ff23fSmrg else 1709ad43ddacSmrg # Make teststring a little bigger before we do anything with it. 1710ad43ddacSmrg # a 1K string should be a reasonable start. 171143df4709Smrg for i in 1 2 3 4 5 6 7 8 ; do 1712ad43ddacSmrg teststring=$teststring$teststring 1713ad43ddacSmrg done 1714209ff23fSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1715ad43ddacSmrg # If test is not a shell built-in, we'll probably end up computing a 1716ad43ddacSmrg # maximum length that is only half of the actual maximum length, but 1717ad43ddacSmrg # we can't tell. 171843df4709Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 171968105dcbSveego = "X$teststring$teststring"; } >/dev/null 2>&1 && 172043df4709Smrg test $i != 17 # 1/2 MB should be enough 1721209ff23fSmrg do 1722209ff23fSmrg i=`expr $i + 1` 1723209ff23fSmrg teststring=$teststring$teststring 1724209ff23fSmrg done 1725ad43ddacSmrg # Only check the string length outside the loop. 1726ad43ddacSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1727209ff23fSmrg teststring= 1728ad43ddacSmrg # Add a significant safety factor because C++ compilers can tack on 1729ad43ddacSmrg # massive amounts of additional arguments before passing them to the 1730ad43ddacSmrg # linker. It appears as though 1/2 is a usable value. 1731209ff23fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1732209ff23fSmrg fi 1733209ff23fSmrg ;; 1734209ff23fSmrg esac 1735209ff23fSmrg]) 173643df4709Smrgif test -n $lt_cv_sys_max_cmd_len ; then 1737209ff23fSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1738209ff23fSmrgelse 1739209ff23fSmrg AC_MSG_RESULT(none) 1740209ff23fSmrgfi 1741ad43ddacSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1742ad43ddacSmrg_LT_DECL([], [max_cmd_len], [0], 1743ad43ddacSmrg [What is the maximum length of a command?]) 1744ad43ddacSmrg])# LT_CMD_MAX_LEN 1745209ff23fSmrg 1746ad43ddacSmrg# Old name: 1747ad43ddacSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1748ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 1749ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1750209ff23fSmrg 1751ad43ddacSmrg 1752ad43ddacSmrg# _LT_HEADER_DLFCN 1753ad43ddacSmrg# ---------------- 1754ad43ddacSmrgm4_defun([_LT_HEADER_DLFCN], 1755ad43ddacSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1756ad43ddacSmrg])# _LT_HEADER_DLFCN 1757209ff23fSmrg 1758209ff23fSmrg 1759ad43ddacSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1760ad43ddacSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1761ad43ddacSmrg# ---------------------------------------------------------------- 1762ad43ddacSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 1763ad43ddacSmrg[m4_require([_LT_HEADER_DLFCN])dnl 176443df4709Smrgif test "$cross_compiling" = yes; then : 1765209ff23fSmrg [$4] 1766209ff23fSmrgelse 1767209ff23fSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1768209ff23fSmrg lt_status=$lt_dlunknown 1769ad43ddacSmrg cat > conftest.$ac_ext <<_LT_EOF 177068105dcbSveego[#line $LINENO "configure" 1771209ff23fSmrg#include "confdefs.h" 1772209ff23fSmrg 1773209ff23fSmrg#if HAVE_DLFCN_H 1774209ff23fSmrg#include <dlfcn.h> 1775209ff23fSmrg#endif 1776209ff23fSmrg 1777209ff23fSmrg#include <stdio.h> 1778209ff23fSmrg 1779209ff23fSmrg#ifdef RTLD_GLOBAL 1780209ff23fSmrg# define LT_DLGLOBAL RTLD_GLOBAL 1781209ff23fSmrg#else 1782209ff23fSmrg# ifdef DL_GLOBAL 1783209ff23fSmrg# define LT_DLGLOBAL DL_GLOBAL 1784209ff23fSmrg# else 1785209ff23fSmrg# define LT_DLGLOBAL 0 1786209ff23fSmrg# endif 1787209ff23fSmrg#endif 1788209ff23fSmrg 1789209ff23fSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1790209ff23fSmrg find out it does not work in some platform. */ 1791209ff23fSmrg#ifndef LT_DLLAZY_OR_NOW 1792209ff23fSmrg# ifdef RTLD_LAZY 1793209ff23fSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1794209ff23fSmrg# else 1795209ff23fSmrg# ifdef DL_LAZY 1796209ff23fSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 1797209ff23fSmrg# else 1798209ff23fSmrg# ifdef RTLD_NOW 1799209ff23fSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1800209ff23fSmrg# else 1801209ff23fSmrg# ifdef DL_NOW 1802209ff23fSmrg# define LT_DLLAZY_OR_NOW DL_NOW 1803209ff23fSmrg# else 1804209ff23fSmrg# define LT_DLLAZY_OR_NOW 0 1805209ff23fSmrg# endif 1806209ff23fSmrg# endif 1807209ff23fSmrg# endif 1808209ff23fSmrg# endif 1809209ff23fSmrg#endif 1810209ff23fSmrg 181143df4709Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 181268105dcbSveego correspondingly for the symbols needed. */ 181343df4709Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 181468105dcbSveegoint fnord () __attribute__((visibility("default"))); 181568105dcbSveego#endif 181668105dcbSveego 181768105dcbSveegoint fnord () { return 42; } 1818209ff23fSmrgint main () 1819209ff23fSmrg{ 1820209ff23fSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1821209ff23fSmrg int status = $lt_dlunknown; 1822209ff23fSmrg 1823209ff23fSmrg if (self) 1824209ff23fSmrg { 1825209ff23fSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 182668105dcbSveego else 182768105dcbSveego { 182868105dcbSveego if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 182968105dcbSveego else puts (dlerror ()); 183068105dcbSveego } 1831209ff23fSmrg /* dlclose (self); */ 1832209ff23fSmrg } 1833209ff23fSmrg else 1834209ff23fSmrg puts (dlerror ()); 1835209ff23fSmrg 18362f39173dSmrg return status; 1837209ff23fSmrg}] 1838ad43ddacSmrg_LT_EOF 183943df4709Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1840209ff23fSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1841209ff23fSmrg lt_status=$? 1842209ff23fSmrg case x$lt_status in 1843209ff23fSmrg x$lt_dlno_uscore) $1 ;; 1844209ff23fSmrg x$lt_dlneed_uscore) $2 ;; 1845209ff23fSmrg x$lt_dlunknown|x*) $3 ;; 1846209ff23fSmrg esac 1847209ff23fSmrg else : 1848209ff23fSmrg # compilation failed 1849209ff23fSmrg $3 1850209ff23fSmrg fi 1851209ff23fSmrgfi 1852209ff23fSmrgrm -fr conftest* 1853ad43ddacSmrg])# _LT_TRY_DLOPEN_SELF 1854209ff23fSmrg 1855209ff23fSmrg 1856ad43ddacSmrg# LT_SYS_DLOPEN_SELF 1857ad43ddacSmrg# ------------------ 1858ad43ddacSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1859ad43ddacSmrg[m4_require([_LT_HEADER_DLFCN])dnl 186043df4709Smrgif test "x$enable_dlopen" != xyes; then 1861209ff23fSmrg enable_dlopen=unknown 1862209ff23fSmrg enable_dlopen_self=unknown 1863209ff23fSmrg enable_dlopen_self_static=unknown 1864209ff23fSmrgelse 1865209ff23fSmrg lt_cv_dlopen=no 1866209ff23fSmrg lt_cv_dlopen_libs= 1867209ff23fSmrg 1868209ff23fSmrg case $host_os in 1869209ff23fSmrg beos*) 187043df4709Smrg lt_cv_dlopen="load_add_on" 1871209ff23fSmrg lt_cv_dlopen_libs= 1872209ff23fSmrg lt_cv_dlopen_self=yes 1873209ff23fSmrg ;; 1874209ff23fSmrg 18752f39173dSmrg mingw* | pw32* | cegcc*) 187643df4709Smrg lt_cv_dlopen="LoadLibrary" 1877209ff23fSmrg lt_cv_dlopen_libs= 1878ad43ddacSmrg ;; 1879209ff23fSmrg 1880209ff23fSmrg cygwin*) 188143df4709Smrg lt_cv_dlopen="dlopen" 1882209ff23fSmrg lt_cv_dlopen_libs= 1883ad43ddacSmrg ;; 1884209ff23fSmrg 1885209ff23fSmrg darwin*) 188643df4709Smrg # if libdl is installed we need to link against it 1887209ff23fSmrg AC_CHECK_LIB([dl], [dlopen], 188843df4709Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 188943df4709Smrg lt_cv_dlopen="dyld" 1890209ff23fSmrg lt_cv_dlopen_libs= 1891209ff23fSmrg lt_cv_dlopen_self=yes 1892209ff23fSmrg ]) 1893ad43ddacSmrg ;; 1894209ff23fSmrg 1895209ff23fSmrg *) 1896209ff23fSmrg AC_CHECK_FUNC([shl_load], 189743df4709Smrg [lt_cv_dlopen="shl_load"], 1898209ff23fSmrg [AC_CHECK_LIB([dld], [shl_load], 189943df4709Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1900209ff23fSmrg [AC_CHECK_FUNC([dlopen], 190143df4709Smrg [lt_cv_dlopen="dlopen"], 1902209ff23fSmrg [AC_CHECK_LIB([dl], [dlopen], 190343df4709Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1904209ff23fSmrg [AC_CHECK_LIB([svld], [dlopen], 190543df4709Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1906209ff23fSmrg [AC_CHECK_LIB([dld], [dld_link], 190743df4709Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1908209ff23fSmrg ]) 1909209ff23fSmrg ]) 1910209ff23fSmrg ]) 1911209ff23fSmrg ]) 1912209ff23fSmrg ]) 1913209ff23fSmrg ;; 1914209ff23fSmrg esac 1915209ff23fSmrg 191643df4709Smrg if test "x$lt_cv_dlopen" != xno; then 19176322c902Smrg enable_dlopen=yes 191843df4709Smrg else 191943df4709Smrg enable_dlopen=no 1920209ff23fSmrg fi 1921209ff23fSmrg 1922209ff23fSmrg case $lt_cv_dlopen in 1923209ff23fSmrg dlopen) 192443df4709Smrg save_CPPFLAGS="$CPPFLAGS" 192543df4709Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1926209ff23fSmrg 192743df4709Smrg save_LDFLAGS="$LDFLAGS" 1928209ff23fSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1929209ff23fSmrg 193043df4709Smrg save_LIBS="$LIBS" 1931209ff23fSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 1932209ff23fSmrg 1933209ff23fSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 1934209ff23fSmrg lt_cv_dlopen_self, [dnl 1935ad43ddacSmrg _LT_TRY_DLOPEN_SELF( 1936209ff23fSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1937209ff23fSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1938209ff23fSmrg ]) 1939209ff23fSmrg 194043df4709Smrg if test "x$lt_cv_dlopen_self" = xyes; then 1941209ff23fSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1942209ff23fSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1943ad43ddacSmrg lt_cv_dlopen_self_static, [dnl 1944ad43ddacSmrg _LT_TRY_DLOPEN_SELF( 1945209ff23fSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1946209ff23fSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1947209ff23fSmrg ]) 1948209ff23fSmrg fi 1949209ff23fSmrg 195043df4709Smrg CPPFLAGS="$save_CPPFLAGS" 195143df4709Smrg LDFLAGS="$save_LDFLAGS" 195243df4709Smrg LIBS="$save_LIBS" 1953209ff23fSmrg ;; 1954209ff23fSmrg esac 1955209ff23fSmrg 1956209ff23fSmrg case $lt_cv_dlopen_self in 1957209ff23fSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1958209ff23fSmrg *) enable_dlopen_self=unknown ;; 1959209ff23fSmrg esac 1960209ff23fSmrg 1961209ff23fSmrg case $lt_cv_dlopen_self_static in 1962209ff23fSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1963209ff23fSmrg *) enable_dlopen_self_static=unknown ;; 1964209ff23fSmrg esac 1965209ff23fSmrgfi 1966ad43ddacSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1967ad43ddacSmrg [Whether dlopen is supported]) 1968ad43ddacSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1969ad43ddacSmrg [Whether dlopen of programs is supported]) 1970ad43ddacSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1971ad43ddacSmrg [Whether dlopen of statically linked programs is supported]) 1972ad43ddacSmrg])# LT_SYS_DLOPEN_SELF 1973209ff23fSmrg 1974ad43ddacSmrg# Old name: 1975ad43ddacSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1976ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 1977ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1978209ff23fSmrg 1979ad43ddacSmrg 1980ad43ddacSmrg# _LT_COMPILER_C_O([TAGNAME]) 1981ad43ddacSmrg# --------------------------- 1982ad43ddacSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 1983ad43ddacSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1984ad43ddacSmrgm4_defun([_LT_COMPILER_C_O], 1985ad43ddacSmrg[m4_require([_LT_DECL_SED])dnl 1986ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1987ad43ddacSmrgm4_require([_LT_TAG_COMPILER])dnl 1988209ff23fSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1989ad43ddacSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1990ad43ddacSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1991ad43ddacSmrg $RM -r conftest 2>/dev/null 1992209ff23fSmrg mkdir conftest 1993209ff23fSmrg cd conftest 1994209ff23fSmrg mkdir out 1995209ff23fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1996209ff23fSmrg 1997209ff23fSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1998209ff23fSmrg # Insert the option either (1) after the last *FLAGS variable, or 1999209ff23fSmrg # (2) before a word containing "conftest.", or (3) at the end. 2000209ff23fSmrg # Note that $ac_compile itself does not contain backslashes and begins 2001209ff23fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2002209ff23fSmrg lt_compile=`echo "$ac_compile" | $SED \ 2003209ff23fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2004209ff23fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2005209ff23fSmrg -e 's:$: $lt_compiler_flag:'` 200668105dcbSveego (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2007209ff23fSmrg (eval "$lt_compile" 2>out/conftest.err) 2008209ff23fSmrg ac_status=$? 2009209ff23fSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 201068105dcbSveego echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2011209ff23fSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2012209ff23fSmrg then 2013209ff23fSmrg # The compiler can only warn and ignore the option if not recognized 2014209ff23fSmrg # So say no if there are warnings 201568105dcbSveego $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2016209ff23fSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2017209ff23fSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2018ad43ddacSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2019209ff23fSmrg fi 2020209ff23fSmrg fi 2021209ff23fSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2022ad43ddacSmrg $RM conftest* 2023209ff23fSmrg # SGI C++ compiler will create directory out/ii_files/ for 2024209ff23fSmrg # template instantiation 2025ad43ddacSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2026ad43ddacSmrg $RM out/* && rmdir out 2027209ff23fSmrg cd .. 2028ad43ddacSmrg $RM -r conftest 2029ad43ddacSmrg $RM conftest* 2030209ff23fSmrg]) 2031ad43ddacSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2032ad43ddacSmrg [Does compiler simultaneously support -c and -o options?]) 2033ad43ddacSmrg])# _LT_COMPILER_C_O 2034209ff23fSmrg 2035209ff23fSmrg 2036ad43ddacSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2037ad43ddacSmrg# ---------------------------------- 2038209ff23fSmrg# Check to see if we can do hard links to lock some files if needed 2039ad43ddacSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2040ad43ddacSmrg[m4_require([_LT_ENABLE_LOCK])dnl 2041ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2042ad43ddacSmrg_LT_COMPILER_C_O([$1]) 2043209ff23fSmrg 204443df4709Smrghard_links="nottested" 204543df4709Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 2046209ff23fSmrg # do not overwrite the value of need_locks provided by the user 2047209ff23fSmrg AC_MSG_CHECKING([if we can lock with hard links]) 2048209ff23fSmrg hard_links=yes 2049ad43ddacSmrg $RM conftest* 2050209ff23fSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2051209ff23fSmrg touch conftest.a 2052209ff23fSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 2053209ff23fSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2054209ff23fSmrg AC_MSG_RESULT([$hard_links]) 205543df4709Smrg if test "$hard_links" = no; then 205643df4709Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 2057209ff23fSmrg need_locks=warn 2058209ff23fSmrg fi 2059209ff23fSmrgelse 2060209ff23fSmrg need_locks=no 2061209ff23fSmrgfi 2062ad43ddacSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2063ad43ddacSmrg])# _LT_COMPILER_FILE_LOCKS 2064209ff23fSmrg 2065209ff23fSmrg 2066ad43ddacSmrg# _LT_CHECK_OBJDIR 2067ad43ddacSmrg# ---------------- 2068ad43ddacSmrgm4_defun([_LT_CHECK_OBJDIR], 2069209ff23fSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2070209ff23fSmrg[rm -f .libs 2>/dev/null 2071209ff23fSmrgmkdir .libs 2>/dev/null 2072209ff23fSmrgif test -d .libs; then 2073209ff23fSmrg lt_cv_objdir=.libs 2074209ff23fSmrgelse 2075209ff23fSmrg # MS-DOS does not allow filenames that begin with a dot. 2076209ff23fSmrg lt_cv_objdir=_libs 2077209ff23fSmrgfi 2078209ff23fSmrgrmdir .libs 2>/dev/null]) 2079209ff23fSmrgobjdir=$lt_cv_objdir 2080ad43ddacSmrg_LT_DECL([], [objdir], [0], 2081ad43ddacSmrg [The name of the directory that contains temporary libtool files])dnl 2082ad43ddacSmrgm4_pattern_allow([LT_OBJDIR])dnl 208343df4709SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 208443df4709Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2085ad43ddacSmrg])# _LT_CHECK_OBJDIR 2086209ff23fSmrg 2087209ff23fSmrg 2088ad43ddacSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2089ad43ddacSmrg# -------------------------------------- 2090209ff23fSmrg# Check hardcoding attributes. 2091ad43ddacSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2092209ff23fSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2093ad43ddacSmrg_LT_TAGVAR(hardcode_action, $1)= 2094ad43ddacSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2095ad43ddacSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 209643df4709Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2097209ff23fSmrg 2098ad43ddacSmrg # We can hardcode non-existent directories. 209943df4709Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 2100209ff23fSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2101209ff23fSmrg # have to relink, otherwise we might link with an installed library 2102209ff23fSmrg # when we should be linking with a yet-to-be-installed one 210343df4709Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 210443df4709Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 2105209ff23fSmrg # Linking always hardcodes the temporary library directory. 2106ad43ddacSmrg _LT_TAGVAR(hardcode_action, $1)=relink 2107209ff23fSmrg else 2108209ff23fSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2109ad43ddacSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 2110209ff23fSmrg fi 2111209ff23fSmrgelse 2112209ff23fSmrg # We cannot hardcode anything, or else we can only hardcode existing 2113209ff23fSmrg # directories. 2114ad43ddacSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2115209ff23fSmrgfi 2116ad43ddacSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2117209ff23fSmrg 211843df4709Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 211943df4709Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2120209ff23fSmrg # Fast installation is not supported 2121209ff23fSmrg enable_fast_install=no 212243df4709Smrgelif test "$shlibpath_overrides_runpath" = yes || 212343df4709Smrg test "$enable_shared" = no; then 2124209ff23fSmrg # Fast installation is not necessary 2125209ff23fSmrg enable_fast_install=needless 2126209ff23fSmrgfi 2127ad43ddacSmrg_LT_TAGDECL([], [hardcode_action], [0], 2128ad43ddacSmrg [How to hardcode a shared library path into an executable]) 2129ad43ddacSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2130209ff23fSmrg 2131209ff23fSmrg 2132ad43ddacSmrg# _LT_CMD_STRIPLIB 2133ad43ddacSmrg# ---------------- 2134ad43ddacSmrgm4_defun([_LT_CMD_STRIPLIB], 2135ad43ddacSmrg[m4_require([_LT_DECL_EGREP]) 2136ad43ddacSmrgstriplib= 2137209ff23fSmrgold_striplib= 2138209ff23fSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2139ad43ddacSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2140209ff23fSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2141209ff23fSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2142209ff23fSmrg AC_MSG_RESULT([yes]) 2143209ff23fSmrgelse 2144209ff23fSmrg# FIXME - insert some real tests, host_os isn't really good enough 2145209ff23fSmrg case $host_os in 2146ad43ddacSmrg darwin*) 214743df4709Smrg if test -n "$STRIP" ; then 2148ad43ddacSmrg striplib="$STRIP -x" 2149ad43ddacSmrg old_striplib="$STRIP -S" 2150ad43ddacSmrg AC_MSG_RESULT([yes]) 2151ad43ddacSmrg else 2152ad43ddacSmrg AC_MSG_RESULT([no]) 2153ad43ddacSmrg fi 2154ad43ddacSmrg ;; 2155ad43ddacSmrg *) 2156ad43ddacSmrg AC_MSG_RESULT([no]) 2157209ff23fSmrg ;; 2158209ff23fSmrg esac 2159209ff23fSmrgfi 2160ad43ddacSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2161ad43ddacSmrg_LT_DECL([], [striplib], [1]) 2162ad43ddacSmrg])# _LT_CMD_STRIPLIB 2163209ff23fSmrg 2164209ff23fSmrg 2165ad43ddacSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2166209ff23fSmrg# ----------------------------- 2167209ff23fSmrg# PORTME Fill in your ld.so characteristics 2168ad43ddacSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2169ad43ddacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2170ad43ddacSmrgm4_require([_LT_DECL_EGREP])dnl 2171ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21722f39173dSmrgm4_require([_LT_DECL_OBJDUMP])dnl 2173ad43ddacSmrgm4_require([_LT_DECL_SED])dnl 217468105dcbSveegom4_require([_LT_CHECK_SHELL_FEATURES])dnl 2175209ff23fSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2176ad43ddacSmrgm4_if([$1], 2177ad43ddacSmrg [], [ 217843df4709Smrgif test "$GCC" = yes; then 2179209ff23fSmrg case $host_os in 218043df4709Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 218143df4709Smrg *) lt_awk_arg="/^libraries:/" ;; 2182209ff23fSmrg esac 218368105dcbSveego case $host_os in 218443df4709Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 218543df4709Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 218668105dcbSveego esac 218768105dcbSveego lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 218868105dcbSveego case $lt_search_path_spec in 218968105dcbSveego *\;*) 2190209ff23fSmrg # if the path contains ";" then we assume it to be the separator 2191209ff23fSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2192209ff23fSmrg # assumed that no part of a normal pathname contains ";" but that should 2193209ff23fSmrg # okay in the real world where ";" in dirpaths is itself problematic. 219468105dcbSveego lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 219568105dcbSveego ;; 219668105dcbSveego *) 219768105dcbSveego lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 219868105dcbSveego ;; 219968105dcbSveego esac 2200209ff23fSmrg # Ok, now we have the path, separated by spaces, we can step through it 220143df4709Smrg # and add multilib dir if necessary. 2202209ff23fSmrg lt_tmp_lt_search_path_spec= 220343df4709Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2204209ff23fSmrg for lt_sys_path in $lt_search_path_spec; do 220543df4709Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 220643df4709Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 220743df4709Smrg else 2208209ff23fSmrg test -d "$lt_sys_path" && \ 2209209ff23fSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2210209ff23fSmrg fi 2211209ff23fSmrg done 221268105dcbSveego lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 221343df4709SmrgBEGIN {RS=" "; FS="/|\n";} { 221443df4709Smrg lt_foo=""; 221543df4709Smrg lt_count=0; 2216209ff23fSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 2217209ff23fSmrg if ($lt_i != "" && $lt_i != ".") { 2218209ff23fSmrg if ($lt_i == "..") { 2219209ff23fSmrg lt_count++; 2220209ff23fSmrg } else { 2221209ff23fSmrg if (lt_count == 0) { 222243df4709Smrg lt_foo="/" $lt_i lt_foo; 2223209ff23fSmrg } else { 2224209ff23fSmrg lt_count--; 2225209ff23fSmrg } 2226209ff23fSmrg } 2227209ff23fSmrg } 2228209ff23fSmrg } 2229209ff23fSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2230209ff23fSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2231209ff23fSmrg}'` 223268105dcbSveego # AWK program above erroneously prepends '/' to C:/dos/paths 223368105dcbSveego # for these hosts. 223468105dcbSveego case $host_os in 223568105dcbSveego mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 223643df4709Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 223768105dcbSveego esac 223868105dcbSveego sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2239209ff23fSmrgelse 2240209ff23fSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2241209ff23fSmrgfi]) 2242ad43ddacSmrglibrary_names_spec= 2243ad43ddacSmrglibname_spec='lib$name' 2244ad43ddacSmrgsoname_spec= 224543df4709Smrgshrext_cmds=".so" 2246ad43ddacSmrgpostinstall_cmds= 2247ad43ddacSmrgpostuninstall_cmds= 2248ad43ddacSmrgfinish_cmds= 2249ad43ddacSmrgfinish_eval= 2250ad43ddacSmrgshlibpath_var= 2251ad43ddacSmrgshlibpath_overrides_runpath=unknown 2252ad43ddacSmrgversion_type=none 2253ad43ddacSmrgdynamic_linker="$host_os ld.so" 2254ad43ddacSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2255209ff23fSmrgneed_lib_prefix=unknown 2256209ff23fSmrghardcode_into_libs=no 2257209ff23fSmrg 2258209ff23fSmrg# when you set need_version to no, make sure it does not cause -set_version 2259209ff23fSmrg# flags to be left without arguments 2260209ff23fSmrgneed_version=unknown 2261209ff23fSmrg 2262209ff23fSmrgcase $host_os in 2263209ff23fSmrgaix3*) 226468105dcbSveego version_type=linux # correct to gnu/linux during the next big refactor 226543df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2266209ff23fSmrg shlibpath_var=LIBPATH 2267209ff23fSmrg 2268209ff23fSmrg # AIX 3 has no versioning support, so we append a major version to the name. 226943df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 2270209ff23fSmrg ;; 2271209ff23fSmrg 2272209ff23fSmrgaix[[4-9]]*) 227368105dcbSveego version_type=linux # correct to gnu/linux during the next big refactor 2274209ff23fSmrg need_lib_prefix=no 2275209ff23fSmrg need_version=no 2276209ff23fSmrg hardcode_into_libs=yes 227743df4709Smrg if test "$host_cpu" = ia64; then 2278209ff23fSmrg # AIX 5 supports IA64 227943df4709Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2280209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2281209ff23fSmrg else 2282209ff23fSmrg # With GCC up to 2.95.x, collect2 would create an import file 2283209ff23fSmrg # for dependence libraries. The import file would start with 228443df4709Smrg # the line `#! .'. This would cause the generated library to 228543df4709Smrg # depend on `.', always an invalid library. This was fixed in 2286209ff23fSmrg # development snapshots of GCC prior to 3.0. 2287209ff23fSmrg case $host_os in 2288209ff23fSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2289209ff23fSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2290209ff23fSmrg echo ' yes ' 229143df4709Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2292209ff23fSmrg : 2293209ff23fSmrg else 2294209ff23fSmrg can_build_shared=no 2295209ff23fSmrg fi 2296209ff23fSmrg ;; 2297209ff23fSmrg esac 229843df4709Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2299209ff23fSmrg # soname into executable. Probably we can add versioning support to 2300209ff23fSmrg # collect2, so additional links can be useful in future. 230143df4709Smrg if test "$aix_use_runtimelinking" = yes; then 2302209ff23fSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2303209ff23fSmrg # instead of lib<name>.a to let people know that these are not 2304209ff23fSmrg # typical AIX shared libraries. 230543df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 230643df4709Smrg else 2307209ff23fSmrg # We preserve .a as extension for shared libraries through AIX4.2 2308209ff23fSmrg # and later when we are not doing run time linking. 230943df4709Smrg library_names_spec='${libname}${release}.a $libname.a' 231043df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 231143df4709Smrg fi 2312209ff23fSmrg shlibpath_var=LIBPATH 2313209ff23fSmrg fi 2314209ff23fSmrg ;; 2315209ff23fSmrg 2316209ff23fSmrgamigaos*) 2317ad43ddacSmrg case $host_cpu in 2318ad43ddacSmrg powerpc) 2319ad43ddacSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2320ad43ddacSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 232143df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2322ad43ddacSmrg ;; 2323ad43ddacSmrg m68k) 2324ad43ddacSmrg library_names_spec='$libname.ixlibrary $libname.a' 2325ad43ddacSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 232643df4709Smrg 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' 2327ad43ddacSmrg ;; 2328ad43ddacSmrg esac 2329209ff23fSmrg ;; 2330209ff23fSmrg 2331209ff23fSmrgbeos*) 233243df4709Smrg library_names_spec='${libname}${shared_ext}' 2333209ff23fSmrg dynamic_linker="$host_os ld.so" 2334209ff23fSmrg shlibpath_var=LIBRARY_PATH 2335209ff23fSmrg ;; 2336209ff23fSmrg 2337209ff23fSmrgbsdi[[45]]*) 233868105dcbSveego version_type=linux # correct to gnu/linux during the next big refactor 2339209ff23fSmrg need_version=no 234043df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 234143df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 2342209ff23fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2343209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2344209ff23fSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2345209ff23fSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2346209ff23fSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2347209ff23fSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2348209ff23fSmrg # libtool to hard-code these into programs 2349209ff23fSmrg ;; 2350209ff23fSmrg 23512f39173dSmrgcygwin* | mingw* | pw32* | cegcc*) 2352209ff23fSmrg version_type=windows 235343df4709Smrg shrext_cmds=".dll" 2354209ff23fSmrg need_version=no 2355209ff23fSmrg need_lib_prefix=no 2356209ff23fSmrg 235768105dcbSveego case $GCC,$cc_basename in 235868105dcbSveego yes,*) 235968105dcbSveego # gcc 2360209ff23fSmrg library_names_spec='$libname.dll.a' 2361209ff23fSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 236243df4709Smrg postinstall_cmds='base_file=`basename \${file}`~ 236343df4709Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2364209ff23fSmrg dldir=$destdir/`dirname \$dlpath`~ 2365209ff23fSmrg test -d \$dldir || mkdir -p \$dldir~ 2366209ff23fSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2367ad43ddacSmrg chmod a+x \$dldir/$dlname~ 2368ad43ddacSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2369ad43ddacSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2370ad43ddacSmrg fi' 2371209ff23fSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2372209ff23fSmrg dlpath=$dir/\$dldll~ 2373ad43ddacSmrg $RM \$dlpath' 2374209ff23fSmrg shlibpath_overrides_runpath=yes 2375209ff23fSmrg 2376209ff23fSmrg case $host_os in 2377209ff23fSmrg cygwin*) 2378209ff23fSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 237943df4709Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 238068105dcbSveegom4_if([$1], [],[ 238168105dcbSveego sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2382209ff23fSmrg ;; 23832f39173dSmrg mingw* | cegcc*) 2384209ff23fSmrg # MinGW DLLs use traditional 'lib' prefix 238543df4709Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2386209ff23fSmrg ;; 2387209ff23fSmrg pw32*) 2388209ff23fSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 238943df4709Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2390209ff23fSmrg ;; 2391209ff23fSmrg esac 239268105dcbSveego dynamic_linker='Win32 ld.exe' 239368105dcbSveego ;; 239468105dcbSveego 239568105dcbSveego *,cl*) 239668105dcbSveego # Native MSVC 239768105dcbSveego libname_spec='$name' 239843df4709Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 239943df4709Smrg library_names_spec='${libname}.dll.lib' 240068105dcbSveego 240168105dcbSveego case $build_os in 240268105dcbSveego mingw*) 240368105dcbSveego sys_lib_search_path_spec= 240468105dcbSveego lt_save_ifs=$IFS 240568105dcbSveego IFS=';' 240668105dcbSveego for lt_path in $LIB 240768105dcbSveego do 240868105dcbSveego IFS=$lt_save_ifs 240968105dcbSveego # Let DOS variable expansion print the short 8.3 style file name. 241068105dcbSveego lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 241168105dcbSveego sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 241268105dcbSveego done 241368105dcbSveego IFS=$lt_save_ifs 241468105dcbSveego # Convert to MSYS style. 241568105dcbSveego sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 241668105dcbSveego ;; 241768105dcbSveego cygwin*) 241868105dcbSveego # Convert to unix form, then to dos form, then back to unix form 241968105dcbSveego # but this time dos style (no spaces!) so that the unix form looks 242068105dcbSveego # like /cygdrive/c/PROGRA~1:/cygdr... 242168105dcbSveego sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 242268105dcbSveego sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 242368105dcbSveego sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 242468105dcbSveego ;; 242568105dcbSveego *) 242643df4709Smrg sys_lib_search_path_spec="$LIB" 242768105dcbSveego if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 242868105dcbSveego # It is most probably a Windows format PATH. 242968105dcbSveego sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 243068105dcbSveego else 243168105dcbSveego sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 243268105dcbSveego fi 243368105dcbSveego # FIXME: find the short name or the path components, as spaces are 243468105dcbSveego # common. (e.g. "Program Files" -> "PROGRA~1") 243568105dcbSveego ;; 243668105dcbSveego esac 243768105dcbSveego 243868105dcbSveego # DLL is installed to $(libdir)/../bin by postinstall_cmds 243943df4709Smrg postinstall_cmds='base_file=`basename \${file}`~ 244043df4709Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 244168105dcbSveego dldir=$destdir/`dirname \$dlpath`~ 244268105dcbSveego test -d \$dldir || mkdir -p \$dldir~ 244368105dcbSveego $install_prog $dir/$dlname \$dldir/$dlname' 244468105dcbSveego postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 244568105dcbSveego dlpath=$dir/\$dldll~ 244668105dcbSveego $RM \$dlpath' 244768105dcbSveego shlibpath_overrides_runpath=yes 244868105dcbSveego dynamic_linker='Win32 link.exe' 2449209ff23fSmrg ;; 2450209ff23fSmrg 2451209ff23fSmrg *) 245268105dcbSveego # Assume MSVC wrapper 245343df4709Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 245468105dcbSveego dynamic_linker='Win32 ld.exe' 2455209ff23fSmrg ;; 2456209ff23fSmrg esac 2457209ff23fSmrg # FIXME: first we should search . and the directory the executable is in 2458209ff23fSmrg shlibpath_var=PATH 2459209ff23fSmrg ;; 2460209ff23fSmrg 2461209ff23fSmrgdarwin* | rhapsody*) 2462209ff23fSmrg dynamic_linker="$host_os dyld" 2463209ff23fSmrg version_type=darwin 2464209ff23fSmrg need_lib_prefix=no 2465209ff23fSmrg need_version=no 246643df4709Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 246743df4709Smrg soname_spec='${libname}${release}${major}$shared_ext' 2468209ff23fSmrg shlibpath_overrides_runpath=yes 2469209ff23fSmrg shlibpath_var=DYLD_LIBRARY_PATH 2470209ff23fSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2471ad43ddacSmrgm4_if([$1], [],[ 2472ad43ddacSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2473209ff23fSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2474209ff23fSmrg ;; 2475209ff23fSmrg 2476209ff23fSmrgdgux*) 247768105dcbSveego version_type=linux # correct to gnu/linux during the next big refactor 2478209ff23fSmrg need_lib_prefix=no 2479209ff23fSmrg need_version=no 248043df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 248143df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 2482209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2483209ff23fSmrg ;; 2484209ff23fSmrg 2485209ff23fSmrgfreebsd* | dragonfly*) 2486209ff23fSmrg # DragonFly does not have aout. When/if they implement a new 2487209ff23fSmrg # versioning mechanism, adjust this. 2488209ff23fSmrg if test -x /usr/bin/objformat; then 2489209ff23fSmrg objformat=`/usr/bin/objformat` 2490209ff23fSmrg else 2491209ff23fSmrg case $host_os in 249268105dcbSveego freebsd[[23]].*) objformat=aout ;; 2493209ff23fSmrg *) objformat=elf ;; 2494209ff23fSmrg esac 2495209ff23fSmrg fi 2496209ff23fSmrg version_type=freebsd-$objformat 2497209ff23fSmrg case $version_type in 2498209ff23fSmrg freebsd-elf*) 249943df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2500209ff23fSmrg need_version=no 2501209ff23fSmrg need_lib_prefix=no 2502209ff23fSmrg ;; 2503209ff23fSmrg freebsd-*) 250443df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2505209ff23fSmrg need_version=yes 2506209ff23fSmrg ;; 2507209ff23fSmrg esac 2508209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2509209ff23fSmrg case $host_os in 251068105dcbSveego freebsd2.*) 2511209ff23fSmrg shlibpath_overrides_runpath=yes 2512209ff23fSmrg ;; 2513209ff23fSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2514209ff23fSmrg shlibpath_overrides_runpath=yes 2515209ff23fSmrg hardcode_into_libs=yes 2516209ff23fSmrg ;; 2517209ff23fSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2518209ff23fSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2519209ff23fSmrg shlibpath_overrides_runpath=no 2520209ff23fSmrg hardcode_into_libs=yes 2521209ff23fSmrg ;; 2522209ff23fSmrg *) # from 4.6 on, and DragonFly 2523209ff23fSmrg shlibpath_overrides_runpath=yes 2524209ff23fSmrg hardcode_into_libs=yes 2525209ff23fSmrg ;; 2526209ff23fSmrg esac 2527209ff23fSmrg ;; 2528209ff23fSmrg 252943df4709Smrggnu*) 253043df4709Smrg version_type=linux # correct to gnu/linux during the next big refactor 253143df4709Smrg need_lib_prefix=no 253243df4709Smrg need_version=no 253343df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 253443df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 253543df4709Smrg shlibpath_var=LD_LIBRARY_PATH 253643df4709Smrg shlibpath_overrides_runpath=no 253743df4709Smrg hardcode_into_libs=yes 253843df4709Smrg ;; 253943df4709Smrg 254068105dcbSveegohaiku*) 254168105dcbSveego version_type=linux # correct to gnu/linux during the next big refactor 254268105dcbSveego need_lib_prefix=no 254368105dcbSveego need_version=no 254468105dcbSveego dynamic_linker="$host_os runtime_loader" 254543df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 254643df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 254768105dcbSveego shlibpath_var=LIBRARY_PATH 254843df4709Smrg shlibpath_overrides_runpath=yes 254968105dcbSveego sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2550209ff23fSmrg hardcode_into_libs=yes 2551209ff23fSmrg ;; 2552209ff23fSmrg 2553209ff23fSmrghpux9* | hpux10* | hpux11*) 2554209ff23fSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2555209ff23fSmrg # link against other versions. 2556209ff23fSmrg version_type=sunos 2557209ff23fSmrg need_lib_prefix=no 2558209ff23fSmrg need_version=no 2559209ff23fSmrg case $host_cpu in 2560209ff23fSmrg ia64*) 2561209ff23fSmrg shrext_cmds='.so' 2562209ff23fSmrg hardcode_into_libs=yes 2563209ff23fSmrg dynamic_linker="$host_os dld.so" 2564209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2565209ff23fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 256643df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 256743df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 256843df4709Smrg if test "X$HPUX_IA64_MODE" = X32; then 2569209ff23fSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2570209ff23fSmrg else 2571209ff23fSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2572209ff23fSmrg fi 257343df4709Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2574209ff23fSmrg ;; 2575ad43ddacSmrg hppa*64*) 2576ad43ddacSmrg shrext_cmds='.sl' 2577ad43ddacSmrg hardcode_into_libs=yes 2578ad43ddacSmrg dynamic_linker="$host_os dld.sl" 2579ad43ddacSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2580ad43ddacSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 258143df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 258243df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 2583ad43ddacSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2584ad43ddacSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2585ad43ddacSmrg ;; 2586ad43ddacSmrg *) 2587209ff23fSmrg shrext_cmds='.sl' 2588209ff23fSmrg dynamic_linker="$host_os dld.sl" 2589209ff23fSmrg shlibpath_var=SHLIB_PATH 2590209ff23fSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 259143df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 259243df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 2593209ff23fSmrg ;; 2594209ff23fSmrg esac 259568105dcbSveego # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2596209ff23fSmrg postinstall_cmds='chmod 555 $lib' 259768105dcbSveego # or fails outright, so override atomically: 259868105dcbSveego install_override_mode=555 2599209ff23fSmrg ;; 2600209ff23fSmrg 2601209ff23fSmrginterix[[3-9]]*) 260268105dcbSveego version_type=linux # correct to gnu/linux during the next big refactor 2603209ff23fSmrg need_lib_prefix=no 2604209ff23fSmrg need_version=no 260543df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 260643df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 2607209ff23fSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2608209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2609209ff23fSmrg shlibpath_overrides_runpath=no 2610209ff23fSmrg hardcode_into_libs=yes 2611209ff23fSmrg ;; 2612209ff23fSmrg 2613209ff23fSmrgirix5* | irix6* | nonstopux*) 2614209ff23fSmrg case $host_os in 2615209ff23fSmrg nonstopux*) version_type=nonstopux ;; 2616209ff23fSmrg *) 261743df4709Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 261868105dcbSveego version_type=linux # correct to gnu/linux during the next big refactor 2619209ff23fSmrg else 2620209ff23fSmrg version_type=irix 2621209ff23fSmrg fi ;; 2622209ff23fSmrg esac 2623209ff23fSmrg need_lib_prefix=no 2624209ff23fSmrg need_version=no 262543df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 262643df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2627209ff23fSmrg case $host_os in 2628209ff23fSmrg irix5* | nonstopux*) 2629209ff23fSmrg libsuff= shlibsuff= 2630209ff23fSmrg ;; 2631209ff23fSmrg *) 2632209ff23fSmrg case $LD in # libtool.m4 will add one of these switches to LD 2633209ff23fSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2634209ff23fSmrg libsuff= shlibsuff= libmagic=32-bit;; 2635209ff23fSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2636209ff23fSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2637209ff23fSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2638209ff23fSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2639209ff23fSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2640209ff23fSmrg esac 2641209ff23fSmrg ;; 2642209ff23fSmrg esac 2643209ff23fSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2644209ff23fSmrg shlibpath_overrides_runpath=no 264543df4709Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 264643df4709Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2647209ff23fSmrg hardcode_into_libs=yes 2648209ff23fSmrg ;; 2649209ff23fSmrg 2650209ff23fSmrg# No shared lib support for Linux oldld, aout, or coff. 2651209ff23fSmrglinux*oldld* | linux*aout* | linux*coff*) 2652209ff23fSmrg dynamic_linker=no 2653209ff23fSmrg ;; 2654209ff23fSmrg 265568105dcbSveego# This must be glibc/ELF. 265643df4709Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 265768105dcbSveego version_type=linux # correct to gnu/linux during the next big refactor 2658209ff23fSmrg need_lib_prefix=no 2659209ff23fSmrg need_version=no 266043df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 266143df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 2662209ff23fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2663209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2664209ff23fSmrg shlibpath_overrides_runpath=no 266568105dcbSveego 2666ad43ddacSmrg # Some binutils ld are patched to set DT_RUNPATH 266768105dcbSveego AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 266868105dcbSveego [lt_cv_shlibpath_overrides_runpath=no 266968105dcbSveego save_LDFLAGS=$LDFLAGS 267068105dcbSveego save_libdir=$libdir 267168105dcbSveego eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 267268105dcbSveego LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 267368105dcbSveego AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 267468105dcbSveego [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 267568105dcbSveego [lt_cv_shlibpath_overrides_runpath=yes])]) 267668105dcbSveego LDFLAGS=$save_LDFLAGS 267768105dcbSveego libdir=$save_libdir 267868105dcbSveego ]) 267968105dcbSveego shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2680ad43ddacSmrg 2681209ff23fSmrg # This implies no fast_install, which is unacceptable. 2682209ff23fSmrg # Some rework will be needed to allow for fast_install 2683209ff23fSmrg # before this can be enabled. 2684209ff23fSmrg hardcode_into_libs=yes 2685209ff23fSmrg 268643df4709Smrg # Add ABI-specific directories to the system library path. 268743df4709Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 268843df4709Smrg 268943df4709Smrg # Append ld.so.conf contents to the search path 2690209ff23fSmrg if test -f /etc/ld.so.conf; then 269168105dcbSveego 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' ' '` 269243df4709Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 269343df4709Smrg 2694209ff23fSmrg fi 2695209ff23fSmrg 2696209ff23fSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2697209ff23fSmrg # powerpc, because MkLinux only supported shared libraries with the 2698209ff23fSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2699209ff23fSmrg # most powerpc-linux boxes support dynamic linking these days and 2700209ff23fSmrg # people can always --disable-shared, the test was removed, and we 2701209ff23fSmrg # assume the GNU/Linux dynamic linker is in use. 2702209ff23fSmrg dynamic_linker='GNU/Linux ld.so' 2703209ff23fSmrg ;; 2704209ff23fSmrg 2705209ff23fSmrgnetbsd*) 2706209ff23fSmrg version_type=sunos 2707209ff23fSmrg need_lib_prefix=no 2708209ff23fSmrg need_version=no 2709ad43ddacSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 271043df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2711209ff23fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2712209ff23fSmrg dynamic_linker='NetBSD (a.out) ld.so' 2713209ff23fSmrg else 271443df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 271543df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 2716209ff23fSmrg dynamic_linker='NetBSD ld.elf_so' 2717209ff23fSmrg fi 2718209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2719209ff23fSmrg shlibpath_overrides_runpath=yes 2720209ff23fSmrg hardcode_into_libs=yes 2721209ff23fSmrg ;; 2722209ff23fSmrg 2723209ff23fSmrgnewsos6) 272468105dcbSveego version_type=linux # correct to gnu/linux during the next big refactor 272543df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2726209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2727209ff23fSmrg shlibpath_overrides_runpath=yes 2728209ff23fSmrg ;; 2729209ff23fSmrg 2730ad43ddacSmrg*nto* | *qnx*) 2731ad43ddacSmrg version_type=qnx 2732209ff23fSmrg need_lib_prefix=no 2733209ff23fSmrg need_version=no 273443df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 273543df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 2736209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2737ad43ddacSmrg shlibpath_overrides_runpath=no 2738ad43ddacSmrg hardcode_into_libs=yes 2739ad43ddacSmrg dynamic_linker='ldqnx.so' 2740209ff23fSmrg ;; 2741209ff23fSmrg 274243df4709Smrgopenbsd*) 2743209ff23fSmrg version_type=sunos 274443df4709Smrg sys_lib_dlsearch_path_spec="/usr/lib" 2745209ff23fSmrg need_lib_prefix=no 274643df4709Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 274743df4709Smrg case $host_os in 274843df4709Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 274943df4709Smrg *) need_version=no ;; 275043df4709Smrg esac 275143df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 27526322c902Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 27536322c902Smrg shlibpath_var=LD_LIBRARY_PATH 275443df4709Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 275543df4709Smrg case $host_os in 275643df4709Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 275743df4709Smrg shlibpath_overrides_runpath=no 275843df4709Smrg ;; 275943df4709Smrg *) 276043df4709Smrg shlibpath_overrides_runpath=yes 276143df4709Smrg ;; 276243df4709Smrg esac 276343df4709Smrg else 276443df4709Smrg shlibpath_overrides_runpath=yes 276543df4709Smrg fi 2766209ff23fSmrg ;; 2767209ff23fSmrg 2768209ff23fSmrgos2*) 2769209ff23fSmrg libname_spec='$name' 277043df4709Smrg shrext_cmds=".dll" 2771209ff23fSmrg need_lib_prefix=no 277243df4709Smrg library_names_spec='$libname${shared_ext} $libname.a' 2773209ff23fSmrg dynamic_linker='OS/2 ld.exe' 277443df4709Smrg shlibpath_var=LIBPATH 2775209ff23fSmrg ;; 2776209ff23fSmrg 2777209ff23fSmrgosf3* | osf4* | osf5*) 2778209ff23fSmrg version_type=osf 2779209ff23fSmrg need_lib_prefix=no 2780209ff23fSmrg need_version=no 278143df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 278243df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2783209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2784209ff23fSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 278543df4709Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2786209ff23fSmrg ;; 2787209ff23fSmrg 2788209ff23fSmrgrdos*) 2789209ff23fSmrg dynamic_linker=no 2790209ff23fSmrg ;; 2791209ff23fSmrg 2792209ff23fSmrgsolaris*) 279368105dcbSveego version_type=linux # correct to gnu/linux during the next big refactor 2794209ff23fSmrg need_lib_prefix=no 2795209ff23fSmrg need_version=no 279643df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 279743df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 2798209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2799209ff23fSmrg shlibpath_overrides_runpath=yes 2800209ff23fSmrg hardcode_into_libs=yes 2801209ff23fSmrg # ldd complains unless libraries are executable 2802209ff23fSmrg postinstall_cmds='chmod +x $lib' 2803209ff23fSmrg ;; 2804209ff23fSmrg 2805209ff23fSmrgsunos4*) 2806209ff23fSmrg version_type=sunos 280743df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2808209ff23fSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2809209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2810209ff23fSmrg shlibpath_overrides_runpath=yes 281143df4709Smrg if test "$with_gnu_ld" = yes; then 2812209ff23fSmrg need_lib_prefix=no 2813209ff23fSmrg fi 2814209ff23fSmrg need_version=yes 2815209ff23fSmrg ;; 2816209ff23fSmrg 2817209ff23fSmrgsysv4 | sysv4.3*) 281868105dcbSveego version_type=linux # correct to gnu/linux during the next big refactor 281943df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 282043df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 2821209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2822209ff23fSmrg case $host_vendor in 2823209ff23fSmrg sni) 2824209ff23fSmrg shlibpath_overrides_runpath=no 2825209ff23fSmrg need_lib_prefix=no 2826209ff23fSmrg runpath_var=LD_RUN_PATH 2827209ff23fSmrg ;; 2828209ff23fSmrg siemens) 2829209ff23fSmrg need_lib_prefix=no 2830209ff23fSmrg ;; 2831209ff23fSmrg motorola) 2832209ff23fSmrg need_lib_prefix=no 2833209ff23fSmrg need_version=no 2834209ff23fSmrg shlibpath_overrides_runpath=no 2835209ff23fSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2836209ff23fSmrg ;; 2837209ff23fSmrg esac 2838209ff23fSmrg ;; 2839209ff23fSmrg 2840209ff23fSmrgsysv4*MP*) 284143df4709Smrg if test -d /usr/nec ;then 284268105dcbSveego version_type=linux # correct to gnu/linux during the next big refactor 284343df4709Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 284443df4709Smrg soname_spec='$libname${shared_ext}.$major' 2845209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2846209ff23fSmrg fi 2847209ff23fSmrg ;; 2848209ff23fSmrg 2849209ff23fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 285043df4709Smrg version_type=freebsd-elf 2851209ff23fSmrg need_lib_prefix=no 2852209ff23fSmrg need_version=no 285343df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 285443df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 2855209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2856ad43ddacSmrg shlibpath_overrides_runpath=yes 2857209ff23fSmrg hardcode_into_libs=yes 285843df4709Smrg if test "$with_gnu_ld" = yes; then 2859209ff23fSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2860209ff23fSmrg else 2861209ff23fSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2862209ff23fSmrg case $host_os in 2863209ff23fSmrg sco3.2v5*) 2864209ff23fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2865209ff23fSmrg ;; 2866209ff23fSmrg esac 2867209ff23fSmrg fi 2868209ff23fSmrg sys_lib_dlsearch_path_spec='/usr/lib' 2869209ff23fSmrg ;; 2870209ff23fSmrg 2871ad43ddacSmrgtpf*) 2872ad43ddacSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 287368105dcbSveego version_type=linux # correct to gnu/linux during the next big refactor 2874ad43ddacSmrg need_lib_prefix=no 2875ad43ddacSmrg need_version=no 287643df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2877ad43ddacSmrg shlibpath_var=LD_LIBRARY_PATH 2878ad43ddacSmrg shlibpath_overrides_runpath=no 2879ad43ddacSmrg hardcode_into_libs=yes 2880ad43ddacSmrg ;; 2881ad43ddacSmrg 2882209ff23fSmrguts4*) 288368105dcbSveego version_type=linux # correct to gnu/linux during the next big refactor 288443df4709Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 288543df4709Smrg soname_spec='${libname}${release}${shared_ext}$major' 2886209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2887209ff23fSmrg ;; 2888209ff23fSmrg 2889209ff23fSmrg*) 2890209ff23fSmrg dynamic_linker=no 2891209ff23fSmrg ;; 2892209ff23fSmrgesac 2893209ff23fSmrgAC_MSG_RESULT([$dynamic_linker]) 289443df4709Smrgtest "$dynamic_linker" = no && can_build_shared=no 2895209ff23fSmrg 2896209ff23fSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 289743df4709Smrgif test "$GCC" = yes; then 2898209ff23fSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2899209ff23fSmrgfi 29002f39173dSmrg 290143df4709Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 290243df4709Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2903ad43ddacSmrgfi 290443df4709Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 290543df4709Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2906ad43ddacSmrgfi 2907209ff23fSmrg 2908ad43ddacSmrg_LT_DECL([], [variables_saved_for_relink], [1], 2909ad43ddacSmrg [Variables whose values should be saved in libtool wrapper scripts and 2910ad43ddacSmrg restored at link time]) 2911ad43ddacSmrg_LT_DECL([], [need_lib_prefix], [0], 2912ad43ddacSmrg [Do we need the "lib" prefix for modules?]) 2913ad43ddacSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2914ad43ddacSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2915ad43ddacSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2916ad43ddacSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2917ad43ddacSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2918ad43ddacSmrg [Is shlibpath searched before the hard-coded library search path?]) 2919ad43ddacSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2920ad43ddacSmrg_LT_DECL([], [library_names_spec], [1], 2921ad43ddacSmrg [[List of archive names. First name is the real one, the rest are links. 2922ad43ddacSmrg The last name is the one that the linker finds with -lNAME]]) 2923ad43ddacSmrg_LT_DECL([], [soname_spec], [1], 2924ad43ddacSmrg [[The coded name of the library, if different from the real name]]) 292568105dcbSveego_LT_DECL([], [install_override_mode], [1], 292668105dcbSveego [Permission mode override for installation of shared libraries]) 2927ad43ddacSmrg_LT_DECL([], [postinstall_cmds], [2], 2928ad43ddacSmrg [Command to use after installation of a shared archive]) 2929ad43ddacSmrg_LT_DECL([], [postuninstall_cmds], [2], 2930ad43ddacSmrg [Command to use after uninstallation of a shared archive]) 2931ad43ddacSmrg_LT_DECL([], [finish_cmds], [2], 2932ad43ddacSmrg [Commands used to finish a libtool library installation in a directory]) 2933ad43ddacSmrg_LT_DECL([], [finish_eval], [1], 2934ad43ddacSmrg [[As "finish_cmds", except a single script fragment to be evaled but 2935ad43ddacSmrg not shown]]) 2936ad43ddacSmrg_LT_DECL([], [hardcode_into_libs], [0], 2937ad43ddacSmrg [Whether we should hardcode library paths into libraries]) 2938ad43ddacSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2939ad43ddacSmrg [Compile-time system search path for libraries]) 294043df4709Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 294143df4709Smrg [Run-time system search path for libraries]) 2942ad43ddacSmrg])# _LT_SYS_DYNAMIC_LINKER 2943ad43ddacSmrg 2944ad43ddacSmrg 2945ad43ddacSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 2946209ff23fSmrg# -------------------------- 294743df4709Smrg# find a file program which can recognize shared library 2948ad43ddacSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2949ad43ddacSmrg[m4_require([_LT_DECL_EGREP])dnl 2950209ff23fSmrgAC_MSG_CHECKING([for $1]) 2951209ff23fSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2952209ff23fSmrg[case $MAGIC_CMD in 2953209ff23fSmrg[[\\/*] | ?:[\\/]*]) 295443df4709Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2955209ff23fSmrg ;; 2956209ff23fSmrg*) 295743df4709Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 295843df4709Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2959209ff23fSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2960209ff23fSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2961209ff23fSmrgdnl not every word. This closes a longstanding sh security hole. 2962ad43ddacSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 2963209ff23fSmrg for ac_dir in $ac_dummy; do 296443df4709Smrg IFS="$lt_save_ifs" 2965209ff23fSmrg test -z "$ac_dir" && ac_dir=. 296643df4709Smrg if test -f $ac_dir/$1; then 296743df4709Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2968209ff23fSmrg if test -n "$file_magic_test_file"; then 2969209ff23fSmrg case $deplibs_check_method in 2970209ff23fSmrg "file_magic "*) 2971209ff23fSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 297243df4709Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2973209ff23fSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2974209ff23fSmrg $EGREP "$file_magic_regex" > /dev/null; then 2975209ff23fSmrg : 2976209ff23fSmrg else 2977ad43ddacSmrg cat <<_LT_EOF 1>&2 2978209ff23fSmrg 2979209ff23fSmrg*** Warning: the command libtool uses to detect shared libraries, 2980209ff23fSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2981209ff23fSmrg*** The result is that libtool may fail to recognize shared libraries 2982209ff23fSmrg*** as such. This will affect the creation of libtool libraries that 2983209ff23fSmrg*** depend on shared libraries, but programs linked with such libtool 2984209ff23fSmrg*** libraries will work regardless of this problem. Nevertheless, you 2985209ff23fSmrg*** may want to report the problem to your system manager and/or to 2986209ff23fSmrg*** bug-libtool@gnu.org 2987209ff23fSmrg 2988ad43ddacSmrg_LT_EOF 2989209ff23fSmrg fi ;; 2990209ff23fSmrg esac 2991209ff23fSmrg fi 2992209ff23fSmrg break 2993209ff23fSmrg fi 2994209ff23fSmrg done 299543df4709Smrg IFS="$lt_save_ifs" 299643df4709Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 2997209ff23fSmrg ;; 2998209ff23fSmrgesac]) 299943df4709SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 3000209ff23fSmrgif test -n "$MAGIC_CMD"; then 3001209ff23fSmrg AC_MSG_RESULT($MAGIC_CMD) 3002209ff23fSmrgelse 3003209ff23fSmrg AC_MSG_RESULT(no) 3004209ff23fSmrgfi 3005ad43ddacSmrg_LT_DECL([], [MAGIC_CMD], [0], 3006ad43ddacSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3007ad43ddacSmrg])# _LT_PATH_TOOL_PREFIX 3008209ff23fSmrg 3009ad43ddacSmrg# Old name: 3010ad43ddacSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3011ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 3012ad43ddacSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3013209ff23fSmrg 3014ad43ddacSmrg 3015ad43ddacSmrg# _LT_PATH_MAGIC 3016ad43ddacSmrg# -------------- 301743df4709Smrg# find a file program which can recognize a shared library 3018ad43ddacSmrgm4_defun([_LT_PATH_MAGIC], 3019ad43ddacSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3020209ff23fSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3021209ff23fSmrg if test -n "$ac_tool_prefix"; then 3022ad43ddacSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3023209ff23fSmrg else 3024209ff23fSmrg MAGIC_CMD=: 3025209ff23fSmrg fi 3026209ff23fSmrgfi 3027ad43ddacSmrg])# _LT_PATH_MAGIC 3028209ff23fSmrg 3029209ff23fSmrg 3030ad43ddacSmrg# LT_PATH_LD 3031209ff23fSmrg# ---------- 3032209ff23fSmrg# find the pathname to the GNU or non-GNU linker 3033ad43ddacSmrgAC_DEFUN([LT_PATH_LD], 3034ad43ddacSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3035209ff23fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3036209ff23fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3037ad43ddacSmrgm4_require([_LT_DECL_SED])dnl 3038ad43ddacSmrgm4_require([_LT_DECL_EGREP])dnl 303968105dcbSveegom4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3040ad43ddacSmrg 3041ad43ddacSmrgAC_ARG_WITH([gnu-ld], 3042ad43ddacSmrg [AS_HELP_STRING([--with-gnu-ld], 3043ad43ddacSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 304443df4709Smrg [test "$withval" = no || with_gnu_ld=yes], 3045ad43ddacSmrg [with_gnu_ld=no])dnl 3046ad43ddacSmrg 3047209ff23fSmrgac_prog=ld 304843df4709Smrgif test "$GCC" = yes; then 3049209ff23fSmrg # Check if gcc -print-prog-name=ld gives a path. 3050209ff23fSmrg AC_MSG_CHECKING([for ld used by $CC]) 3051209ff23fSmrg case $host in 3052209ff23fSmrg *-*-mingw*) 305343df4709Smrg # gcc leaves a trailing carriage return which upsets mingw 3054209ff23fSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3055209ff23fSmrg *) 3056209ff23fSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3057209ff23fSmrg esac 3058209ff23fSmrg case $ac_prog in 3059209ff23fSmrg # Accept absolute paths. 3060209ff23fSmrg [[\\/]]* | ?:[[\\/]]*) 3061209ff23fSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3062209ff23fSmrg # Canonicalize the pathname of ld 3063ad43ddacSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3064ad43ddacSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3065ad43ddacSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3066209ff23fSmrg done 306743df4709Smrg test -z "$LD" && LD="$ac_prog" 3068209ff23fSmrg ;; 3069209ff23fSmrg "") 3070209ff23fSmrg # If it fails, then pretend we aren't using GCC. 3071209ff23fSmrg ac_prog=ld 3072209ff23fSmrg ;; 3073209ff23fSmrg *) 3074209ff23fSmrg # If it is relative, then search for the first ld in PATH. 3075209ff23fSmrg with_gnu_ld=unknown 3076209ff23fSmrg ;; 3077209ff23fSmrg esac 307843df4709Smrgelif test "$with_gnu_ld" = yes; then 3079209ff23fSmrg AC_MSG_CHECKING([for GNU ld]) 3080209ff23fSmrgelse 3081209ff23fSmrg AC_MSG_CHECKING([for non-GNU ld]) 3082209ff23fSmrgfi 3083209ff23fSmrgAC_CACHE_VAL(lt_cv_path_LD, 3084209ff23fSmrg[if test -z "$LD"; then 308543df4709Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3086209ff23fSmrg for ac_dir in $PATH; do 308743df4709Smrg IFS="$lt_save_ifs" 3088209ff23fSmrg test -z "$ac_dir" && ac_dir=. 3089209ff23fSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 309043df4709Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 3091209ff23fSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3092209ff23fSmrg # but apparently some variants of GNU ld only accept -v. 3093209ff23fSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3094209ff23fSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3095209ff23fSmrg *GNU* | *'with BFD'*) 309643df4709Smrg test "$with_gnu_ld" != no && break 3097209ff23fSmrg ;; 3098209ff23fSmrg *) 309943df4709Smrg test "$with_gnu_ld" != yes && break 3100209ff23fSmrg ;; 3101209ff23fSmrg esac 3102209ff23fSmrg fi 3103209ff23fSmrg done 310443df4709Smrg IFS="$lt_save_ifs" 3105209ff23fSmrgelse 310643df4709Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 3107209ff23fSmrgfi]) 310843df4709SmrgLD="$lt_cv_path_LD" 3109209ff23fSmrgif test -n "$LD"; then 3110209ff23fSmrg AC_MSG_RESULT($LD) 3111209ff23fSmrgelse 3112209ff23fSmrg AC_MSG_RESULT(no) 3113209ff23fSmrgfi 3114209ff23fSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3115ad43ddacSmrg_LT_PATH_LD_GNU 3116ad43ddacSmrgAC_SUBST([LD]) 3117209ff23fSmrg 3118ad43ddacSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3119ad43ddacSmrg])# LT_PATH_LD 3120209ff23fSmrg 3121ad43ddacSmrg# Old names: 3122ad43ddacSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3123ad43ddacSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3124ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 3125ad43ddacSmrgdnl AC_DEFUN([AM_PROG_LD], []) 3126ad43ddacSmrgdnl AC_DEFUN([AC_PROG_LD], []) 3127ad43ddacSmrg 3128ad43ddacSmrg 3129ad43ddacSmrg# _LT_PATH_LD_GNU 3130ad43ddacSmrg#- -------------- 3131ad43ddacSmrgm4_defun([_LT_PATH_LD_GNU], 3132ad43ddacSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3133209ff23fSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3134209ff23fSmrgcase `$LD -v 2>&1 </dev/null` in 3135209ff23fSmrg*GNU* | *'with BFD'*) 3136209ff23fSmrg lt_cv_prog_gnu_ld=yes 3137209ff23fSmrg ;; 3138209ff23fSmrg*) 3139209ff23fSmrg lt_cv_prog_gnu_ld=no 3140209ff23fSmrg ;; 3141209ff23fSmrgesac]) 3142209ff23fSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3143ad43ddacSmrg])# _LT_PATH_LD_GNU 3144209ff23fSmrg 3145209ff23fSmrg 3146ad43ddacSmrg# _LT_CMD_RELOAD 3147ad43ddacSmrg# -------------- 3148209ff23fSmrg# find reload flag for linker 3149209ff23fSmrg# -- PORTME Some linkers may need a different reload flag. 3150ad43ddacSmrgm4_defun([_LT_CMD_RELOAD], 3151209ff23fSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3152209ff23fSmrg lt_cv_ld_reload_flag, 3153209ff23fSmrg [lt_cv_ld_reload_flag='-r']) 3154209ff23fSmrgreload_flag=$lt_cv_ld_reload_flag 3155209ff23fSmrgcase $reload_flag in 3156209ff23fSmrg"" | " "*) ;; 3157209ff23fSmrg*) reload_flag=" $reload_flag" ;; 3158209ff23fSmrgesac 3159209ff23fSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3160209ff23fSmrgcase $host_os in 316168105dcbSveego cygwin* | mingw* | pw32* | cegcc*) 316243df4709Smrg if test "$GCC" != yes; then 316368105dcbSveego reload_cmds=false 316468105dcbSveego fi 316568105dcbSveego ;; 3166209ff23fSmrg darwin*) 316743df4709Smrg if test "$GCC" = yes; then 316843df4709Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3169209ff23fSmrg else 3170209ff23fSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3171209ff23fSmrg fi 3172209ff23fSmrg ;; 3173209ff23fSmrgesac 317468105dcbSveego_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 317568105dcbSveego_LT_TAGDECL([], [reload_cmds], [2])dnl 3176ad43ddacSmrg])# _LT_CMD_RELOAD 3177209ff23fSmrg 3178209ff23fSmrg 3179ad43ddacSmrg# _LT_CHECK_MAGIC_METHOD 3180ad43ddacSmrg# ---------------------- 3181209ff23fSmrg# how to check for library dependencies 3182209ff23fSmrg# -- PORTME fill in with the dynamic library characteristics 3183ad43ddacSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3184ad43ddacSmrg[m4_require([_LT_DECL_EGREP]) 31852f39173dSmrgm4_require([_LT_DECL_OBJDUMP]) 3186ad43ddacSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3187209ff23fSmrglt_cv_deplibs_check_method, 3188209ff23fSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3189209ff23fSmrglt_cv_file_magic_test_file= 3190209ff23fSmrglt_cv_deplibs_check_method='unknown' 3191209ff23fSmrg# Need to set the preceding variable on all platforms that support 3192209ff23fSmrg# interlibrary dependencies. 3193209ff23fSmrg# 'none' -- dependencies not supported. 319443df4709Smrg# `unknown' -- same as none, but documents that we really don't know. 3195209ff23fSmrg# 'pass_all' -- all dependencies passed with no checks. 3196209ff23fSmrg# 'test_compile' -- check by making test program. 3197209ff23fSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 319843df4709Smrg# which responds to the $file_magic_cmd with a given extended regex. 319943df4709Smrg# If you have `file' or equivalent on your system and you're not sure 320043df4709Smrg# whether `pass_all' will *always* work, you probably want this one. 3201209ff23fSmrg 3202209ff23fSmrgcase $host_os in 3203209ff23fSmrgaix[[4-9]]*) 3204209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3205209ff23fSmrg ;; 3206209ff23fSmrg 3207209ff23fSmrgbeos*) 3208209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3209209ff23fSmrg ;; 3210209ff23fSmrg 3211209ff23fSmrgbsdi[[45]]*) 3212209ff23fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3213209ff23fSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3214209ff23fSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3215209ff23fSmrg ;; 3216209ff23fSmrg 3217209ff23fSmrgcygwin*) 3218209ff23fSmrg # func_win32_libid is a shell function defined in ltmain.sh 3219209ff23fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3220209ff23fSmrg lt_cv_file_magic_cmd='func_win32_libid' 3221209ff23fSmrg ;; 3222209ff23fSmrg 3223209ff23fSmrgmingw* | pw32*) 3224209ff23fSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3225209ff23fSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3226209ff23fSmrg # unless we find 'file', for example because we are cross-compiling. 322743df4709Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 322843df4709Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3229209ff23fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3230209ff23fSmrg lt_cv_file_magic_cmd='func_win32_libid' 3231209ff23fSmrg else 323268105dcbSveego # Keep this pattern in sync with the one in func_win32_libid. 323368105dcbSveego lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3234209ff23fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3235209ff23fSmrg fi 3236209ff23fSmrg ;; 3237209ff23fSmrg 323868105dcbSveegocegcc*) 32392f39173dSmrg # use the weaker test based on 'objdump'. See mingw*. 32402f39173dSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 32412f39173dSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32422f39173dSmrg ;; 32432f39173dSmrg 3244209ff23fSmrgdarwin* | rhapsody*) 3245209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3246209ff23fSmrg ;; 3247209ff23fSmrg 3248209ff23fSmrgfreebsd* | dragonfly*) 3249ad43ddacSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3250209ff23fSmrg case $host_cpu in 3251209ff23fSmrg i*86 ) 3252209ff23fSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3253209ff23fSmrg # Let's accept both of them until this is cleared up. 3254209ff23fSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3255209ff23fSmrg lt_cv_file_magic_cmd=/usr/bin/file 3256209ff23fSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3257209ff23fSmrg ;; 3258209ff23fSmrg esac 3259209ff23fSmrg else 3260209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3261209ff23fSmrg fi 3262209ff23fSmrg ;; 3263209ff23fSmrg 326443df4709Smrggnu*) 326543df4709Smrg lt_cv_deplibs_check_method=pass_all 326643df4709Smrg ;; 326743df4709Smrg 326868105dcbSveegohaiku*) 326968105dcbSveego lt_cv_deplibs_check_method=pass_all 327068105dcbSveego ;; 327168105dcbSveego 3272209ff23fSmrghpux10.20* | hpux11*) 3273209ff23fSmrg lt_cv_file_magic_cmd=/usr/bin/file 3274209ff23fSmrg case $host_cpu in 3275209ff23fSmrg ia64*) 3276209ff23fSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3277209ff23fSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3278209ff23fSmrg ;; 3279209ff23fSmrg hppa*64*) 328068105dcbSveego [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]'] 3281209ff23fSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3282209ff23fSmrg ;; 3283209ff23fSmrg *) 328468105dcbSveego lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3285209ff23fSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3286209ff23fSmrg ;; 3287209ff23fSmrg esac 3288209ff23fSmrg ;; 3289209ff23fSmrg 3290209ff23fSmrginterix[[3-9]]*) 3291209ff23fSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3292209ff23fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3293209ff23fSmrg ;; 3294209ff23fSmrg 3295209ff23fSmrgirix5* | irix6* | nonstopux*) 3296209ff23fSmrg case $LD in 3297209ff23fSmrg *-32|*"-32 ") libmagic=32-bit;; 3298209ff23fSmrg *-n32|*"-n32 ") libmagic=N32;; 3299209ff23fSmrg *-64|*"-64 ") libmagic=64-bit;; 3300209ff23fSmrg *) libmagic=never-match;; 3301209ff23fSmrg esac 3302209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3303209ff23fSmrg ;; 3304209ff23fSmrg 330568105dcbSveego# This must be glibc/ELF. 330643df4709Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 3307209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3308209ff23fSmrg ;; 3309209ff23fSmrg 331043df4709Smrgnetbsd*) 3311ad43ddacSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3312209ff23fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3313209ff23fSmrg else 3314209ff23fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3315209ff23fSmrg fi 3316209ff23fSmrg ;; 3317209ff23fSmrg 3318209ff23fSmrgnewos6*) 3319209ff23fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3320209ff23fSmrg lt_cv_file_magic_cmd=/usr/bin/file 3321209ff23fSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3322209ff23fSmrg ;; 3323209ff23fSmrg 3324ad43ddacSmrg*nto* | *qnx*) 3325ad43ddacSmrg lt_cv_deplibs_check_method=pass_all 3326209ff23fSmrg ;; 3327209ff23fSmrg 332843df4709Smrgopenbsd*) 332943df4709Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3330209ff23fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3331209ff23fSmrg else 3332209ff23fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3333209ff23fSmrg fi 3334209ff23fSmrg ;; 3335209ff23fSmrg 3336209ff23fSmrgosf3* | osf4* | osf5*) 3337209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3338209ff23fSmrg ;; 3339209ff23fSmrg 3340209ff23fSmrgrdos*) 3341209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3342209ff23fSmrg ;; 3343209ff23fSmrg 3344209ff23fSmrgsolaris*) 3345209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3346209ff23fSmrg ;; 3347209ff23fSmrg 3348ad43ddacSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3349ad43ddacSmrg lt_cv_deplibs_check_method=pass_all 3350ad43ddacSmrg ;; 3351ad43ddacSmrg 3352209ff23fSmrgsysv4 | sysv4.3*) 3353209ff23fSmrg case $host_vendor in 3354209ff23fSmrg motorola) 3355209ff23fSmrg 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]]' 3356209ff23fSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3357209ff23fSmrg ;; 3358209ff23fSmrg ncr) 3359209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3360209ff23fSmrg ;; 3361209ff23fSmrg sequent) 3362209ff23fSmrg lt_cv_file_magic_cmd='/bin/file' 3363209ff23fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3364209ff23fSmrg ;; 3365209ff23fSmrg sni) 3366209ff23fSmrg lt_cv_file_magic_cmd='/bin/file' 3367209ff23fSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3368209ff23fSmrg lt_cv_file_magic_test_file=/lib/libc.so 3369209ff23fSmrg ;; 3370209ff23fSmrg siemens) 3371209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3372209ff23fSmrg ;; 3373209ff23fSmrg pc) 3374209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3375209ff23fSmrg ;; 3376209ff23fSmrg esac 3377209ff23fSmrg ;; 3378209ff23fSmrg 3379ad43ddacSmrgtpf*) 3380209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3381209ff23fSmrg ;; 3382209ff23fSmrgesac 3383209ff23fSmrg]) 338468105dcbSveego 338568105dcbSveegofile_magic_glob= 338668105dcbSveegowant_nocaseglob=no 338768105dcbSveegoif test "$build" = "$host"; then 338868105dcbSveego case $host_os in 338968105dcbSveego mingw* | pw32*) 339068105dcbSveego if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 339168105dcbSveego want_nocaseglob=yes 339268105dcbSveego else 339368105dcbSveego file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 339468105dcbSveego fi 339568105dcbSveego ;; 339668105dcbSveego esac 339768105dcbSveegofi 339868105dcbSveego 3399209ff23fSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3400209ff23fSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3401209ff23fSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3402209ff23fSmrg 3403ad43ddacSmrg_LT_DECL([], [deplibs_check_method], [1], 3404ad43ddacSmrg [Method to check whether dependent libraries are shared objects]) 3405ad43ddacSmrg_LT_DECL([], [file_magic_cmd], [1], 340668105dcbSveego [Command to use when deplibs_check_method = "file_magic"]) 340768105dcbSveego_LT_DECL([], [file_magic_glob], [1], 340868105dcbSveego [How to find potential files when deplibs_check_method = "file_magic"]) 340968105dcbSveego_LT_DECL([], [want_nocaseglob], [1], 341068105dcbSveego [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3411ad43ddacSmrg])# _LT_CHECK_MAGIC_METHOD 3412209ff23fSmrg 3413ad43ddacSmrg 3414ad43ddacSmrg# LT_PATH_NM 3415209ff23fSmrg# ---------- 3416ad43ddacSmrg# find the pathname to a BSD- or MS-compatible name lister 3417ad43ddacSmrgAC_DEFUN([LT_PATH_NM], 3418ad43ddacSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3419ad43ddacSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3420209ff23fSmrg[if test -n "$NM"; then 3421209ff23fSmrg # Let the user override the test. 342243df4709Smrg lt_cv_path_NM="$NM" 3423209ff23fSmrgelse 342443df4709Smrg lt_nm_to_check="${ac_tool_prefix}nm" 3425209ff23fSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3426209ff23fSmrg lt_nm_to_check="$lt_nm_to_check nm" 3427209ff23fSmrg fi 3428209ff23fSmrg for lt_tmp_nm in $lt_nm_to_check; do 342943df4709Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3430209ff23fSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 343143df4709Smrg IFS="$lt_save_ifs" 3432209ff23fSmrg test -z "$ac_dir" && ac_dir=. 343343df4709Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 343443df4709Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3435209ff23fSmrg # Check to see if the nm accepts a BSD-compat flag. 343643df4709Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3437209ff23fSmrg # nm: unknown option "B" ignored 3438209ff23fSmrg # Tru64's nm complains that /dev/null is an invalid object file 343943df4709Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 344043df4709Smrg */dev/null* | *'Invalid file or object type'*) 3441209ff23fSmrg lt_cv_path_NM="$tmp_nm -B" 344243df4709Smrg break 3443209ff23fSmrg ;; 3444209ff23fSmrg *) 3445209ff23fSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3446209ff23fSmrg */dev/null*) 3447209ff23fSmrg lt_cv_path_NM="$tmp_nm -p" 344843df4709Smrg break 3449209ff23fSmrg ;; 3450209ff23fSmrg *) 3451209ff23fSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3452209ff23fSmrg continue # so that we can try to find one that supports BSD flags 3453209ff23fSmrg ;; 3454209ff23fSmrg esac 3455209ff23fSmrg ;; 3456209ff23fSmrg esac 3457209ff23fSmrg fi 3458209ff23fSmrg done 345943df4709Smrg IFS="$lt_save_ifs" 3460209ff23fSmrg done 3461ad43ddacSmrg : ${lt_cv_path_NM=no} 3462209ff23fSmrgfi]) 346343df4709Smrgif test "$lt_cv_path_NM" != "no"; then 346443df4709Smrg NM="$lt_cv_path_NM" 3465ad43ddacSmrgelse 3466ad43ddacSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 346768105dcbSveego if test -n "$DUMPBIN"; then : 346868105dcbSveego # Let the user override the test. 346968105dcbSveego else 347068105dcbSveego AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 347143df4709Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 347268105dcbSveego *COFF*) 347343df4709Smrg DUMPBIN="$DUMPBIN -symbols" 347468105dcbSveego ;; 347568105dcbSveego *) 347668105dcbSveego DUMPBIN=: 347768105dcbSveego ;; 347868105dcbSveego esac 347968105dcbSveego fi 3480ad43ddacSmrg AC_SUBST([DUMPBIN]) 348143df4709Smrg if test "$DUMPBIN" != ":"; then 348243df4709Smrg NM="$DUMPBIN" 3483ad43ddacSmrg fi 3484ad43ddacSmrgfi 3485ad43ddacSmrgtest -z "$NM" && NM=nm 3486ad43ddacSmrgAC_SUBST([NM]) 3487ad43ddacSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3488ad43ddacSmrg 3489ad43ddacSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3490ad43ddacSmrg [lt_cv_nm_interface="BSD nm" 3491ad43ddacSmrg echo "int some_variable = 0;" > conftest.$ac_ext 349268105dcbSveego (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3493ad43ddacSmrg (eval "$ac_compile" 2>conftest.err) 3494ad43ddacSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 349568105dcbSveego (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3496ad43ddacSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3497ad43ddacSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 349868105dcbSveego (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3499ad43ddacSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 3500ad43ddacSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3501ad43ddacSmrg lt_cv_nm_interface="MS dumpbin" 3502ad43ddacSmrg fi 3503ad43ddacSmrg rm -f conftest*]) 3504ad43ddacSmrg])# LT_PATH_NM 3505209ff23fSmrg 3506ad43ddacSmrg# Old names: 3507ad43ddacSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3508ad43ddacSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3509ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 3510ad43ddacSmrgdnl AC_DEFUN([AM_PROG_NM], []) 3511ad43ddacSmrgdnl AC_DEFUN([AC_PROG_NM], []) 3512209ff23fSmrg 351368105dcbSveego# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 351468105dcbSveego# -------------------------------- 351568105dcbSveego# how to determine the name of the shared library 351668105dcbSveego# associated with a specific link library. 351768105dcbSveego# -- PORTME fill in with the dynamic library characteristics 351868105dcbSveegom4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 351968105dcbSveego[m4_require([_LT_DECL_EGREP]) 352068105dcbSveegom4_require([_LT_DECL_OBJDUMP]) 352168105dcbSveegom4_require([_LT_DECL_DLLTOOL]) 352268105dcbSveegoAC_CACHE_CHECK([how to associate runtime and link libraries], 352368105dcbSveegolt_cv_sharedlib_from_linklib_cmd, 352468105dcbSveego[lt_cv_sharedlib_from_linklib_cmd='unknown' 352568105dcbSveego 352668105dcbSveegocase $host_os in 352768105dcbSveegocygwin* | mingw* | pw32* | cegcc*) 352843df4709Smrg # two different shell functions defined in ltmain.sh 352943df4709Smrg # decide which to use based on capabilities of $DLLTOOL 353068105dcbSveego case `$DLLTOOL --help 2>&1` in 353168105dcbSveego *--identify-strict*) 353268105dcbSveego lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 353368105dcbSveego ;; 353468105dcbSveego *) 353568105dcbSveego lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 353668105dcbSveego ;; 353768105dcbSveego esac 353868105dcbSveego ;; 353968105dcbSveego*) 354068105dcbSveego # fallback: assume linklib IS sharedlib 354143df4709Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 354268105dcbSveego ;; 354368105dcbSveegoesac 354468105dcbSveego]) 354568105dcbSveegosharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 354668105dcbSveegotest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 354768105dcbSveego 354868105dcbSveego_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 354968105dcbSveego [Command to associate shared and link libraries]) 355068105dcbSveego])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 355168105dcbSveego 355268105dcbSveego 355368105dcbSveego# _LT_PATH_MANIFEST_TOOL 355468105dcbSveego# ---------------------- 355568105dcbSveego# locate the manifest tool 355668105dcbSveegom4_defun([_LT_PATH_MANIFEST_TOOL], 355768105dcbSveego[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 355868105dcbSveegotest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 355968105dcbSveegoAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 356068105dcbSveego [lt_cv_path_mainfest_tool=no 356168105dcbSveego echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 356268105dcbSveego $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 356368105dcbSveego cat conftest.err >&AS_MESSAGE_LOG_FD 356468105dcbSveego if $GREP 'Manifest Tool' conftest.out > /dev/null; then 356568105dcbSveego lt_cv_path_mainfest_tool=yes 356668105dcbSveego fi 356768105dcbSveego rm -f conftest*]) 356843df4709Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 356968105dcbSveego MANIFEST_TOOL=: 357068105dcbSveegofi 357168105dcbSveego_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 357268105dcbSveego])# _LT_PATH_MANIFEST_TOOL 357368105dcbSveego 3574ad43ddacSmrg 3575ad43ddacSmrg# LT_LIB_M 3576ad43ddacSmrg# -------- 3577209ff23fSmrg# check for math library 3578ad43ddacSmrgAC_DEFUN([LT_LIB_M], 3579209ff23fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3580209ff23fSmrgLIBM= 3581209ff23fSmrgcase $host in 358268105dcbSveego*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3583209ff23fSmrg # These system don't have libm, or don't need it 3584209ff23fSmrg ;; 3585209ff23fSmrg*-ncr-sysv4.3*) 358643df4709Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3587209ff23fSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3588209ff23fSmrg ;; 3589209ff23fSmrg*) 359043df4709Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3591209ff23fSmrg ;; 3592209ff23fSmrgesac 3593ad43ddacSmrgAC_SUBST([LIBM]) 3594ad43ddacSmrg])# LT_LIB_M 3595209ff23fSmrg 3596ad43ddacSmrg# Old name: 3597ad43ddacSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3598ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 3599ad43ddacSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3600209ff23fSmrg 3601209ff23fSmrg 3602ad43ddacSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3603ad43ddacSmrg# ------------------------------- 3604ad43ddacSmrgm4_defun([_LT_COMPILER_NO_RTTI], 3605ad43ddacSmrg[m4_require([_LT_TAG_COMPILER])dnl 3606209ff23fSmrg 3607ad43ddacSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3608209ff23fSmrg 360943df4709Smrgif test "$GCC" = yes; then 361068105dcbSveego case $cc_basename in 361168105dcbSveego nvcc*) 361268105dcbSveego _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 361368105dcbSveego *) 361468105dcbSveego _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 361568105dcbSveego esac 3616209ff23fSmrg 3617ad43ddacSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3618ad43ddacSmrg lt_cv_prog_compiler_rtti_exceptions, 3619ad43ddacSmrg [-fno-rtti -fno-exceptions], [], 3620ad43ddacSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3621ad43ddacSmrgfi 3622ad43ddacSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3623ad43ddacSmrg [Compiler flag to turn off builtin functions]) 3624ad43ddacSmrg])# _LT_COMPILER_NO_RTTI 3625209ff23fSmrg 3626209ff23fSmrg 3627ad43ddacSmrg# _LT_CMD_GLOBAL_SYMBOLS 3628ad43ddacSmrg# ---------------------- 3629ad43ddacSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3630ad43ddacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3631ad43ddacSmrgAC_REQUIRE([AC_PROG_CC])dnl 363268105dcbSveegoAC_REQUIRE([AC_PROG_AWK])dnl 3633ad43ddacSmrgAC_REQUIRE([LT_PATH_NM])dnl 3634ad43ddacSmrgAC_REQUIRE([LT_PATH_LD])dnl 3635ad43ddacSmrgm4_require([_LT_DECL_SED])dnl 3636ad43ddacSmrgm4_require([_LT_DECL_EGREP])dnl 3637ad43ddacSmrgm4_require([_LT_TAG_COMPILER])dnl 3638209ff23fSmrg 3639ad43ddacSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3640ad43ddacSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3641ad43ddacSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3642209ff23fSmrg[ 3643ad43ddacSmrg# These are sane defaults that work on at least a few old systems. 3644ad43ddacSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3645209ff23fSmrg 3646ad43ddacSmrg# Character class describing NM global symbol codes. 3647ad43ddacSmrgsymcode='[[BCDEGRST]]' 3648209ff23fSmrg 3649ad43ddacSmrg# Regexp to match symbols that can be accessed directly from C. 3650ad43ddacSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3651209ff23fSmrg 3652ad43ddacSmrg# Define system-specific variables. 3653ad43ddacSmrgcase $host_os in 3654ad43ddacSmrgaix*) 3655ad43ddacSmrg symcode='[[BCDT]]' 3656ad43ddacSmrg ;; 36572f39173dSmrgcygwin* | mingw* | pw32* | cegcc*) 3658ad43ddacSmrg symcode='[[ABCDGISTW]]' 3659ad43ddacSmrg ;; 3660ad43ddacSmrghpux*) 366143df4709Smrg if test "$host_cpu" = ia64; then 3662ad43ddacSmrg symcode='[[ABCDEGRST]]' 3663ad43ddacSmrg fi 3664ad43ddacSmrg ;; 3665ad43ddacSmrgirix* | nonstopux*) 3666ad43ddacSmrg symcode='[[BCDEGRST]]' 3667ad43ddacSmrg ;; 3668ad43ddacSmrgosf*) 3669ad43ddacSmrg symcode='[[BCDEGQRST]]' 3670ad43ddacSmrg ;; 3671ad43ddacSmrgsolaris*) 3672ad43ddacSmrg symcode='[[BDRT]]' 3673ad43ddacSmrg ;; 3674ad43ddacSmrgsco3.2v5*) 3675ad43ddacSmrg symcode='[[DT]]' 3676ad43ddacSmrg ;; 3677ad43ddacSmrgsysv4.2uw2*) 3678ad43ddacSmrg symcode='[[DT]]' 3679ad43ddacSmrg ;; 3680ad43ddacSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3681ad43ddacSmrg symcode='[[ABDT]]' 3682ad43ddacSmrg ;; 3683ad43ddacSmrgsysv4) 3684ad43ddacSmrg symcode='[[DFNSTU]]' 3685ad43ddacSmrg ;; 3686ad43ddacSmrgesac 3687209ff23fSmrg 3688ad43ddacSmrg# If we're using GNU nm, then use its standard symbol codes. 3689ad43ddacSmrgcase `$NM -V 2>&1` in 3690ad43ddacSmrg*GNU* | *'with BFD'*) 3691ad43ddacSmrg symcode='[[ABCDGIRSTW]]' ;; 3692ad43ddacSmrgesac 3693209ff23fSmrg 3694ad43ddacSmrg# Transform an extracted symbol line into a proper C declaration. 3695ad43ddacSmrg# Some systems (esp. on ia64) link data and code symbols differently, 3696ad43ddacSmrg# so use this general approach. 369743df4709Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3698209ff23fSmrg 3699ad43ddacSmrg# Transform an extracted symbol line into symbol name and symbol address 370043df4709Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 370143df4709Smrglt_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'" 3702209ff23fSmrg 3703ad43ddacSmrg# Handle CRLF in mingw tool chain 3704ad43ddacSmrgopt_cr= 3705ad43ddacSmrgcase $build_os in 3706ad43ddacSmrgmingw*) 3707ad43ddacSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3708ad43ddacSmrg ;; 3709ad43ddacSmrgesac 3710209ff23fSmrg 3711ad43ddacSmrg# Try without a prefix underscore, then with it. 3712ad43ddacSmrgfor ac_symprfx in "" "_"; do 3713209ff23fSmrg 3714ad43ddacSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3715ad43ddacSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3716209ff23fSmrg 3717ad43ddacSmrg # Write the raw and C identifiers. 3718ad43ddacSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 371943df4709Smrg # Fake it for dumpbin and say T for any non-static function 372043df4709Smrg # and D for any global variable. 3721ad43ddacSmrg # Also find C++ and __fastcall symbols from MSVC++, 3722ad43ddacSmrg # which start with @ or ?. 3723ad43ddacSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3724ad43ddacSmrg" {last_section=section; section=\$ 3};"\ 372568105dcbSveego" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 3726ad43ddacSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3727ad43ddacSmrg" \$ 0!~/External *\|/{next};"\ 3728ad43ddacSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3729ad43ddacSmrg" {if(hide[section]) next};"\ 373043df4709Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 373143df4709Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 373243df4709Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 373343df4709Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3734ad43ddacSmrg" ' prfx=^$ac_symprfx]" 3735ad43ddacSmrg else 3736ad43ddacSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3737209ff23fSmrg fi 373868105dcbSveego lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3739209ff23fSmrg 3740ad43ddacSmrg # Check to see that the pipe works correctly. 3741ad43ddacSmrg pipe_works=no 3742209ff23fSmrg 3743ad43ddacSmrg rm -f conftest* 3744ad43ddacSmrg cat > conftest.$ac_ext <<_LT_EOF 3745ad43ddacSmrg#ifdef __cplusplus 3746ad43ddacSmrgextern "C" { 3747ad43ddacSmrg#endif 3748ad43ddacSmrgchar nm_test_var; 3749ad43ddacSmrgvoid nm_test_func(void); 3750ad43ddacSmrgvoid nm_test_func(void){} 3751ad43ddacSmrg#ifdef __cplusplus 3752ad43ddacSmrg} 3753ad43ddacSmrg#endif 3754ad43ddacSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 3755ad43ddacSmrg_LT_EOF 3756209ff23fSmrg 3757ad43ddacSmrg if AC_TRY_EVAL(ac_compile); then 3758ad43ddacSmrg # Now try to grab the symbols. 3759ad43ddacSmrg nlist=conftest.nm 376068105dcbSveego if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3761ad43ddacSmrg # Try sorting and uniquifying the output. 3762ad43ddacSmrg if sort "$nlist" | uniq > "$nlist"T; then 3763ad43ddacSmrg mv -f "$nlist"T "$nlist" 3764ad43ddacSmrg else 3765ad43ddacSmrg rm -f "$nlist"T 3766ad43ddacSmrg fi 3767209ff23fSmrg 3768ad43ddacSmrg # Make sure that we snagged all the symbols we need. 3769ad43ddacSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3770ad43ddacSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3771ad43ddacSmrg cat <<_LT_EOF > conftest.$ac_ext 377268105dcbSveego/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 377343df4709Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 377443df4709Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 377568105dcbSveego relocations are performed -- see ld's documentation on pseudo-relocs. */ 377668105dcbSveego# define LT@&t@_DLSYM_CONST 377743df4709Smrg#elif defined(__osf__) 377868105dcbSveego/* This system does not cope well with relocations in const data. */ 377968105dcbSveego# define LT@&t@_DLSYM_CONST 378068105dcbSveego#else 378168105dcbSveego# define LT@&t@_DLSYM_CONST const 378268105dcbSveego#endif 378368105dcbSveego 3784ad43ddacSmrg#ifdef __cplusplus 3785ad43ddacSmrgextern "C" { 3786ad43ddacSmrg#endif 3787209ff23fSmrg 3788ad43ddacSmrg_LT_EOF 3789ad43ddacSmrg # Now generate the symbol file. 3790ad43ddacSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3791209ff23fSmrg 3792ad43ddacSmrg cat <<_LT_EOF >> conftest.$ac_ext 3793209ff23fSmrg 3794ad43ddacSmrg/* The mapping between symbol names and symbols. */ 379568105dcbSveegoLT@&t@_DLSYM_CONST struct { 3796ad43ddacSmrg const char *name; 3797ad43ddacSmrg void *address; 3798ad43ddacSmrg} 3799ad43ddacSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3800ad43ddacSmrg{ 3801ad43ddacSmrg { "@PROGRAM@", (void *) 0 }, 3802ad43ddacSmrg_LT_EOF 380343df4709Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3804ad43ddacSmrg cat <<\_LT_EOF >> conftest.$ac_ext 3805ad43ddacSmrg {0, (void *) 0} 3806ad43ddacSmrg}; 3807209ff23fSmrg 3808ad43ddacSmrg/* This works around a problem in FreeBSD linker */ 3809ad43ddacSmrg#ifdef FREEBSD_WORKAROUND 3810ad43ddacSmrgstatic const void *lt_preloaded_setup() { 3811ad43ddacSmrg return lt__PROGRAM__LTX_preloaded_symbols; 3812ad43ddacSmrg} 3813ad43ddacSmrg#endif 3814209ff23fSmrg 3815ad43ddacSmrg#ifdef __cplusplus 3816ad43ddacSmrg} 3817ad43ddacSmrg#endif 3818ad43ddacSmrg_LT_EOF 3819ad43ddacSmrg # Now try linking the two files. 3820ad43ddacSmrg mv conftest.$ac_objext conftstm.$ac_objext 382168105dcbSveego lt_globsym_save_LIBS=$LIBS 382268105dcbSveego lt_globsym_save_CFLAGS=$CFLAGS 382343df4709Smrg LIBS="conftstm.$ac_objext" 3824ad43ddacSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 382543df4709Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3826ad43ddacSmrg pipe_works=yes 3827ad43ddacSmrg fi 382868105dcbSveego LIBS=$lt_globsym_save_LIBS 382968105dcbSveego CFLAGS=$lt_globsym_save_CFLAGS 3830ad43ddacSmrg else 3831ad43ddacSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3832ad43ddacSmrg fi 3833ad43ddacSmrg else 3834ad43ddacSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3835ad43ddacSmrg fi 3836209ff23fSmrg else 3837ad43ddacSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3838209ff23fSmrg fi 3839209ff23fSmrg else 3840ad43ddacSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3841ad43ddacSmrg cat conftest.$ac_ext >&5 3842209ff23fSmrg fi 3843ad43ddacSmrg rm -rf conftest* conftst* 3844209ff23fSmrg 3845ad43ddacSmrg # Do not use the global_symbol_pipe unless it works. 384643df4709Smrg if test "$pipe_works" = yes; then 3847ad43ddacSmrg break 3848ad43ddacSmrg else 3849ad43ddacSmrg lt_cv_sys_global_symbol_pipe= 3850ad43ddacSmrg fi 3851ad43ddacSmrgdone 3852ad43ddacSmrg]) 3853ad43ddacSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3854ad43ddacSmrg lt_cv_sys_global_symbol_to_cdecl= 3855ad43ddacSmrgfi 3856ad43ddacSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3857ad43ddacSmrg AC_MSG_RESULT(failed) 3858209ff23fSmrgelse 3859ad43ddacSmrg AC_MSG_RESULT(ok) 3860209ff23fSmrgfi 3861209ff23fSmrg 386268105dcbSveego# Response file support. 386368105dcbSveegoif test "$lt_cv_nm_interface" = "MS dumpbin"; then 386468105dcbSveego nm_file_list_spec='@' 386568105dcbSveegoelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 386668105dcbSveego nm_file_list_spec='@' 386768105dcbSveegofi 386868105dcbSveego 3869ad43ddacSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3870ad43ddacSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 3871ad43ddacSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3872ad43ddacSmrg [Transform the output of nm in a proper C declaration]) 3873ad43ddacSmrg_LT_DECL([global_symbol_to_c_name_address], 3874ad43ddacSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3875ad43ddacSmrg [Transform the output of nm in a C name address pair]) 3876ad43ddacSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3877ad43ddacSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3878ad43ddacSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 387968105dcbSveego_LT_DECL([], [nm_file_list_spec], [1], 388068105dcbSveego [Specify filename containing input files for $NM]) 3881ad43ddacSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 3882209ff23fSmrg 3883209ff23fSmrg 3884ad43ddacSmrg# _LT_COMPILER_PIC([TAGNAME]) 3885ad43ddacSmrg# --------------------------- 3886ad43ddacSmrgm4_defun([_LT_COMPILER_PIC], 3887ad43ddacSmrg[m4_require([_LT_TAG_COMPILER])dnl 3888ad43ddacSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3889ad43ddacSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3890ad43ddacSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3891209ff23fSmrg 3892ad43ddacSmrgm4_if([$1], [CXX], [ 3893ad43ddacSmrg # C++ specific cases for pic, static, wl, etc. 389443df4709Smrg if test "$GXX" = yes; then 3895ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3896ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3897209ff23fSmrg 3898ad43ddacSmrg case $host_os in 3899ad43ddacSmrg aix*) 3900ad43ddacSmrg # All AIX code is PIC. 390143df4709Smrg if test "$host_cpu" = ia64; then 3902ad43ddacSmrg # AIX 5 now supports IA64 processor 3903ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3904209ff23fSmrg fi 3905209ff23fSmrg ;; 3906209ff23fSmrg 3907ad43ddacSmrg amigaos*) 3908209ff23fSmrg case $host_cpu in 3909ad43ddacSmrg powerpc) 3910ad43ddacSmrg # see comment about AmigaOS4 .so support 3911ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3912ad43ddacSmrg ;; 3913ad43ddacSmrg m68k) 3914ad43ddacSmrg # FIXME: we need at least 68020 code to build shared libraries, but 391543df4709Smrg # adding the `-m68020' flag to GCC prevents building anything better, 391643df4709Smrg # like `-m68040'. 3917ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3918209ff23fSmrg ;; 3919209ff23fSmrg esac 3920209ff23fSmrg ;; 3921209ff23fSmrg 3922ad43ddacSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3923ad43ddacSmrg # PIC is the default for these OSes. 3924ad43ddacSmrg ;; 39252f39173dSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3926ad43ddacSmrg # This hack is so that the source file can tell whether it is being 3927ad43ddacSmrg # built for inclusion in a dll (and should export symbols for example). 3928ad43ddacSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3929ad43ddacSmrg # (--disable-auto-import) libraries 3930ad43ddacSmrg m4_if([$1], [GCJ], [], 3931ad43ddacSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3932ad43ddacSmrg ;; 3933ad43ddacSmrg darwin* | rhapsody*) 3934ad43ddacSmrg # PIC is the default on this platform 3935ad43ddacSmrg # Common symbols not allowed in MH_DYLIB files 3936ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3937ad43ddacSmrg ;; 3938ad43ddacSmrg *djgpp*) 3939ad43ddacSmrg # DJGPP does not support shared libraries at all 3940ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3941ad43ddacSmrg ;; 394268105dcbSveego haiku*) 394368105dcbSveego # PIC is the default for Haiku. 394468105dcbSveego # The "-static" flag exists, but is broken. 394568105dcbSveego _LT_TAGVAR(lt_prog_compiler_static, $1)= 394668105dcbSveego ;; 3947ad43ddacSmrg interix[[3-9]]*) 3948ad43ddacSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3949ad43ddacSmrg # Instead, we relocate shared libraries at runtime. 3950ad43ddacSmrg ;; 3951ad43ddacSmrg sysv4*MP*) 3952ad43ddacSmrg if test -d /usr/nec; then 3953ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3954ad43ddacSmrg fi 3955ad43ddacSmrg ;; 3956ad43ddacSmrg hpux*) 39572f39173dSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 39582f39173dSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 39592f39173dSmrg # sets the default TLS model and affects inlining. 3960ad43ddacSmrg case $host_cpu in 39612f39173dSmrg hppa*64*) 3962209ff23fSmrg ;; 3963209ff23fSmrg *) 3964ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3965209ff23fSmrg ;; 3966ad43ddacSmrg esac 3967ad43ddacSmrg ;; 3968ad43ddacSmrg *qnx* | *nto*) 3969ad43ddacSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3970ad43ddacSmrg # it will coredump. 3971ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3972ad43ddacSmrg ;; 3973ad43ddacSmrg *) 3974ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3975ad43ddacSmrg ;; 3976209ff23fSmrg esac 3977ad43ddacSmrg else 3978ad43ddacSmrg case $host_os in 3979ad43ddacSmrg aix[[4-9]]*) 3980ad43ddacSmrg # All AIX code is PIC. 398143df4709Smrg if test "$host_cpu" = ia64; then 3982ad43ddacSmrg # AIX 5 now supports IA64 processor 3983ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3984ad43ddacSmrg else 3985ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3986209ff23fSmrg fi 3987209ff23fSmrg ;; 3988ad43ddacSmrg chorus*) 3989ad43ddacSmrg case $cc_basename in 3990ad43ddacSmrg cxch68*) 3991ad43ddacSmrg # Green Hills C++ Compiler 3992ad43ddacSmrg # _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" 3993209ff23fSmrg ;; 3994209ff23fSmrg esac 3995209ff23fSmrg ;; 399668105dcbSveego mingw* | cygwin* | os2* | pw32* | cegcc*) 399768105dcbSveego # This hack is so that the source file can tell whether it is being 399868105dcbSveego # built for inclusion in a dll (and should export symbols for example). 399968105dcbSveego m4_if([$1], [GCJ], [], 400068105dcbSveego [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 400168105dcbSveego ;; 4002ad43ddacSmrg dgux*) 4003ad43ddacSmrg case $cc_basename in 4004ad43ddacSmrg ec++*) 4005ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4006ad43ddacSmrg ;; 4007ad43ddacSmrg ghcx*) 4008ad43ddacSmrg # Green Hills C++ Compiler 4009ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4010ad43ddacSmrg ;; 4011ad43ddacSmrg *) 4012ad43ddacSmrg ;; 4013209ff23fSmrg esac 4014209ff23fSmrg ;; 4015ad43ddacSmrg freebsd* | dragonfly*) 4016ad43ddacSmrg # FreeBSD uses GNU C++ 4017209ff23fSmrg ;; 4018ad43ddacSmrg hpux9* | hpux10* | hpux11*) 4019ad43ddacSmrg case $cc_basename in 4020ad43ddacSmrg CC*) 4021ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 402243df4709Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 402343df4709Smrg if test "$host_cpu" != ia64; then 4024ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4025ad43ddacSmrg fi 4026ad43ddacSmrg ;; 4027ad43ddacSmrg aCC*) 4028ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 402943df4709Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4030ad43ddacSmrg case $host_cpu in 4031ad43ddacSmrg hppa*64*|ia64*) 4032ad43ddacSmrg # +Z the default 4033ad43ddacSmrg ;; 4034ad43ddacSmrg *) 4035ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4036ad43ddacSmrg ;; 4037ad43ddacSmrg esac 4038ad43ddacSmrg ;; 4039ad43ddacSmrg *) 4040ad43ddacSmrg ;; 4041ad43ddacSmrg esac 4042209ff23fSmrg ;; 4043ad43ddacSmrg interix*) 4044ad43ddacSmrg # This is c89, which is MS Visual C++ (no shared libs) 4045ad43ddacSmrg # Anyone wants to do a port? 4046209ff23fSmrg ;; 4047ad43ddacSmrg irix5* | irix6* | nonstopux*) 4048ad43ddacSmrg case $cc_basename in 4049ad43ddacSmrg CC*) 4050ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4051ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4052ad43ddacSmrg # CC pic flag -KPIC is the default. 4053ad43ddacSmrg ;; 4054ad43ddacSmrg *) 4055ad43ddacSmrg ;; 4056ad43ddacSmrg esac 4057209ff23fSmrg ;; 405843df4709Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4059ad43ddacSmrg case $cc_basename in 4060ad43ddacSmrg KCC*) 4061ad43ddacSmrg # KAI C++ Compiler 4062ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4063ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4064ad43ddacSmrg ;; 40652f39173dSmrg ecpc* ) 406643df4709Smrg # old Intel C++ for x86_64 which still supported -KPIC. 4067ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4068ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4069ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4070ad43ddacSmrg ;; 40712f39173dSmrg icpc* ) 40722f39173dSmrg # Intel C++, used to be incompatible with GCC. 40732f39173dSmrg # ICC 10 doesn't accept -KPIC any more. 40742f39173dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40752f39173dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40762f39173dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40772f39173dSmrg ;; 4078ad43ddacSmrg pgCC* | pgcpp*) 4079ad43ddacSmrg # Portland Group C++ compiler 4080ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4081ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4082ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4083ad43ddacSmrg ;; 4084ad43ddacSmrg cxx*) 4085ad43ddacSmrg # Compaq C++ 4086ad43ddacSmrg # Make sure the PIC flag is empty. It appears that all Alpha 4087ad43ddacSmrg # Linux and Compaq Tru64 Unix objects are PIC. 4088ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4089ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4090ad43ddacSmrg ;; 409168105dcbSveego xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 409268105dcbSveego # IBM XL 8.0, 9.0 on PPC and BlueGene 4093ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4094ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4095ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4096ad43ddacSmrg ;; 4097ad43ddacSmrg *) 4098ad43ddacSmrg case `$CC -V 2>&1 | sed 5q` in 4099ad43ddacSmrg *Sun\ C*) 4100ad43ddacSmrg # Sun C++ 5.9 4101ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4102ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4103ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4104ad43ddacSmrg ;; 4105ad43ddacSmrg esac 4106ad43ddacSmrg ;; 4107ad43ddacSmrg esac 4108209ff23fSmrg ;; 4109ad43ddacSmrg lynxos*) 4110209ff23fSmrg ;; 4111ad43ddacSmrg m88k*) 4112209ff23fSmrg ;; 4113ad43ddacSmrg mvs*) 4114ad43ddacSmrg case $cc_basename in 4115ad43ddacSmrg cxx*) 4116ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4117ad43ddacSmrg ;; 4118ad43ddacSmrg *) 4119ad43ddacSmrg ;; 4120ad43ddacSmrg esac 4121209ff23fSmrg ;; 412243df4709Smrg netbsd*) 4123209ff23fSmrg ;; 4124ad43ddacSmrg *qnx* | *nto*) 4125ad43ddacSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4126ad43ddacSmrg # it will coredump. 4127ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4128ad43ddacSmrg ;; 4129ad43ddacSmrg osf3* | osf4* | osf5*) 4130ad43ddacSmrg case $cc_basename in 4131ad43ddacSmrg KCC*) 4132ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4133ad43ddacSmrg ;; 4134ad43ddacSmrg RCC*) 4135ad43ddacSmrg # Rational C++ 2.4.1 4136ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4137ad43ddacSmrg ;; 4138ad43ddacSmrg cxx*) 4139ad43ddacSmrg # Digital/Compaq C++ 4140ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4141ad43ddacSmrg # Make sure the PIC flag is empty. It appears that all Alpha 4142ad43ddacSmrg # Linux and Compaq Tru64 Unix objects are PIC. 4143ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4144ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4145ad43ddacSmrg ;; 4146ad43ddacSmrg *) 4147ad43ddacSmrg ;; 4148ad43ddacSmrg esac 4149209ff23fSmrg ;; 4150ad43ddacSmrg psos*) 4151209ff23fSmrg ;; 4152ad43ddacSmrg solaris*) 4153ad43ddacSmrg case $cc_basename in 415468105dcbSveego CC* | sunCC*) 4155ad43ddacSmrg # Sun C++ 4.2, 5.x and Centerline C++ 4156ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4157ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4158ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4159ad43ddacSmrg ;; 4160ad43ddacSmrg gcx*) 4161ad43ddacSmrg # Green Hills C++ Compiler 4162ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4163ad43ddacSmrg ;; 4164ad43ddacSmrg *) 4165ad43ddacSmrg ;; 4166ad43ddacSmrg esac 4167209ff23fSmrg ;; 4168ad43ddacSmrg sunos4*) 4169ad43ddacSmrg case $cc_basename in 4170ad43ddacSmrg CC*) 4171ad43ddacSmrg # Sun C++ 4.x 4172ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4173ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4174ad43ddacSmrg ;; 4175ad43ddacSmrg lcc*) 4176ad43ddacSmrg # Lucid 4177ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4178ad43ddacSmrg ;; 4179ad43ddacSmrg *) 4180ad43ddacSmrg ;; 4181ad43ddacSmrg esac 4182209ff23fSmrg ;; 4183ad43ddacSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4184ad43ddacSmrg case $cc_basename in 4185ad43ddacSmrg CC*) 4186ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4187ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4188ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4189ad43ddacSmrg ;; 4190ad43ddacSmrg esac 4191ad43ddacSmrg ;; 4192ad43ddacSmrg tandem*) 4193ad43ddacSmrg case $cc_basename in 4194ad43ddacSmrg NCC*) 4195ad43ddacSmrg # NonStop-UX NCC 3.20 4196ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4197ad43ddacSmrg ;; 4198209ff23fSmrg *) 4199209ff23fSmrg ;; 4200209ff23fSmrg esac 4201209ff23fSmrg ;; 4202ad43ddacSmrg vxworks*) 4203209ff23fSmrg ;; 4204209ff23fSmrg *) 4205ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4206ad43ddacSmrg ;; 4207ad43ddacSmrg esac 4208ad43ddacSmrg fi 4209ad43ddacSmrg], 4210ad43ddacSmrg[ 421143df4709Smrg if test "$GCC" = yes; then 4212ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4213ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4214209ff23fSmrg 4215ad43ddacSmrg case $host_os in 4216ad43ddacSmrg aix*) 4217ad43ddacSmrg # All AIX code is PIC. 421843df4709Smrg if test "$host_cpu" = ia64; then 4219ad43ddacSmrg # AIX 5 now supports IA64 processor 4220ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4221ad43ddacSmrg fi 4222ad43ddacSmrg ;; 4223209ff23fSmrg 4224ad43ddacSmrg amigaos*) 4225ad43ddacSmrg case $host_cpu in 4226ad43ddacSmrg powerpc) 4227ad43ddacSmrg # see comment about AmigaOS4 .so support 4228ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4229ad43ddacSmrg ;; 4230ad43ddacSmrg m68k) 4231ad43ddacSmrg # FIXME: we need at least 68020 code to build shared libraries, but 423243df4709Smrg # adding the `-m68020' flag to GCC prevents building anything better, 423343df4709Smrg # like `-m68040'. 4234ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4235ad43ddacSmrg ;; 4236ad43ddacSmrg esac 4237ad43ddacSmrg ;; 4238209ff23fSmrg 4239ad43ddacSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4240ad43ddacSmrg # PIC is the default for these OSes. 4241ad43ddacSmrg ;; 4242ad43ddacSmrg 42432f39173dSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4244ad43ddacSmrg # This hack is so that the source file can tell whether it is being 4245ad43ddacSmrg # built for inclusion in a dll (and should export symbols for example). 4246ad43ddacSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4247ad43ddacSmrg # (--disable-auto-import) libraries 4248ad43ddacSmrg m4_if([$1], [GCJ], [], 4249ad43ddacSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4250ad43ddacSmrg ;; 4251ad43ddacSmrg 4252ad43ddacSmrg darwin* | rhapsody*) 4253ad43ddacSmrg # PIC is the default on this platform 4254ad43ddacSmrg # Common symbols not allowed in MH_DYLIB files 4255ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4256ad43ddacSmrg ;; 4257ad43ddacSmrg 425868105dcbSveego haiku*) 425968105dcbSveego # PIC is the default for Haiku. 426068105dcbSveego # The "-static" flag exists, but is broken. 426168105dcbSveego _LT_TAGVAR(lt_prog_compiler_static, $1)= 426268105dcbSveego ;; 426368105dcbSveego 4264ad43ddacSmrg hpux*) 42652f39173dSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42662f39173dSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42672f39173dSmrg # sets the default TLS model and affects inlining. 4268ad43ddacSmrg case $host_cpu in 42692f39173dSmrg hppa*64*) 4270ad43ddacSmrg # +Z the default 4271209ff23fSmrg ;; 4272209ff23fSmrg *) 4273ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4274209ff23fSmrg ;; 4275ad43ddacSmrg esac 4276ad43ddacSmrg ;; 4277ad43ddacSmrg 4278ad43ddacSmrg interix[[3-9]]*) 4279ad43ddacSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4280ad43ddacSmrg # Instead, we relocate shared libraries at runtime. 4281ad43ddacSmrg ;; 4282ad43ddacSmrg 4283ad43ddacSmrg msdosdjgpp*) 4284ad43ddacSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4285ad43ddacSmrg # on systems that don't support them. 4286ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4287ad43ddacSmrg enable_shared=no 4288ad43ddacSmrg ;; 4289ad43ddacSmrg 4290ad43ddacSmrg *nto* | *qnx*) 4291ad43ddacSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4292ad43ddacSmrg # it will coredump. 4293ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4294ad43ddacSmrg ;; 4295ad43ddacSmrg 4296ad43ddacSmrg sysv4*MP*) 4297ad43ddacSmrg if test -d /usr/nec; then 4298ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4299ad43ddacSmrg fi 4300ad43ddacSmrg ;; 4301ad43ddacSmrg 4302ad43ddacSmrg *) 4303ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4304ad43ddacSmrg ;; 4305209ff23fSmrg esac 430668105dcbSveego 430768105dcbSveego case $cc_basename in 430868105dcbSveego nvcc*) # Cuda Compiler Driver 2.2 430968105dcbSveego _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 431068105dcbSveego if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 431168105dcbSveego _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 431268105dcbSveego fi 431368105dcbSveego ;; 431468105dcbSveego esac 4315ad43ddacSmrg else 4316ad43ddacSmrg # PORTME Check for flag to pass linker flags through the system compiler. 4317ad43ddacSmrg case $host_os in 4318ad43ddacSmrg aix*) 4319ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 432043df4709Smrg if test "$host_cpu" = ia64; then 4321ad43ddacSmrg # AIX 5 now supports IA64 processor 4322ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4323ad43ddacSmrg else 4324ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4325ad43ddacSmrg fi 4326ad43ddacSmrg ;; 4327ad43ddacSmrg 43282f39173dSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4329ad43ddacSmrg # This hack is so that the source file can tell whether it is being 4330ad43ddacSmrg # built for inclusion in a dll (and should export symbols for example). 4331ad43ddacSmrg m4_if([$1], [GCJ], [], 4332ad43ddacSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4333ad43ddacSmrg ;; 4334ad43ddacSmrg 4335ad43ddacSmrg hpux9* | hpux10* | hpux11*) 4336ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4337ad43ddacSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4338ad43ddacSmrg # not for PA HP-UX. 4339ad43ddacSmrg case $host_cpu in 4340ad43ddacSmrg hppa*64*|ia64*) 4341ad43ddacSmrg # +Z the default 4342209ff23fSmrg ;; 4343209ff23fSmrg *) 4344ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4345209ff23fSmrg ;; 4346ad43ddacSmrg esac 4347ad43ddacSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 434843df4709Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4349ad43ddacSmrg ;; 4350ad43ddacSmrg 4351ad43ddacSmrg irix5* | irix6* | nonstopux*) 4352ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4353ad43ddacSmrg # PIC (with -KPIC) is the default. 4354ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4355ad43ddacSmrg ;; 4356ad43ddacSmrg 435743df4709Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4358ad43ddacSmrg case $cc_basename in 435943df4709Smrg # old Intel for x86_64 which still supported -KPIC. 43602f39173dSmrg ecc*) 4361ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4362ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4363ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4364ad43ddacSmrg ;; 43652f39173dSmrg # icc used to be incompatible with GCC. 43662f39173dSmrg # ICC 10 doesn't accept -KPIC any more. 43672f39173dSmrg icc* | ifort*) 43682f39173dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43692f39173dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43702f39173dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43712f39173dSmrg ;; 43722f39173dSmrg # Lahey Fortran 8.1. 43732f39173dSmrg lf95*) 43742f39173dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43752f39173dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 43762f39173dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 43772f39173dSmrg ;; 437868105dcbSveego nagfor*) 437968105dcbSveego # NAG Fortran compiler 438068105dcbSveego _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 438168105dcbSveego _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 438268105dcbSveego _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 438368105dcbSveego ;; 438468105dcbSveego pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4385ad43ddacSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 4386ad43ddacSmrg # which looks to be a dead project) 4387ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4388ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4389ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4390ad43ddacSmrg ;; 4391ad43ddacSmrg ccc*) 4392ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4393ad43ddacSmrg # All Alpha code is PIC. 4394ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4395ad43ddacSmrg ;; 439668105dcbSveego xl* | bgxl* | bgf* | mpixl*) 439768105dcbSveego # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4398ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4399ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4400ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4401209ff23fSmrg ;; 4402209ff23fSmrg *) 4403ad43ddacSmrg case `$CC -V 2>&1 | sed 5q` in 440468105dcbSveego *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 440568105dcbSveego # Sun Fortran 8.3 passes all unrecognized flags to the linker 440668105dcbSveego _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 440768105dcbSveego _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 440868105dcbSveego _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 440968105dcbSveego ;; 441068105dcbSveego *Sun\ F* | *Sun*Fortran*) 441168105dcbSveego _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 441268105dcbSveego _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 441368105dcbSveego _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 441468105dcbSveego ;; 4415ad43ddacSmrg *Sun\ C*) 4416ad43ddacSmrg # Sun C 5.9 4417ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4418ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4419ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4420ad43ddacSmrg ;; 442168105dcbSveego *Intel*\ [[CF]]*Compiler*) 442268105dcbSveego _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 442368105dcbSveego _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 442468105dcbSveego _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 442568105dcbSveego ;; 442668105dcbSveego *Portland\ Group*) 442768105dcbSveego _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 442868105dcbSveego _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4429ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4430ad43ddacSmrg ;; 4431ad43ddacSmrg esac 4432209ff23fSmrg ;; 4433ad43ddacSmrg esac 4434ad43ddacSmrg ;; 4435209ff23fSmrg 4436ad43ddacSmrg newsos6) 4437ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4438ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4439ad43ddacSmrg ;; 4440209ff23fSmrg 4441ad43ddacSmrg *nto* | *qnx*) 4442ad43ddacSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4443ad43ddacSmrg # it will coredump. 4444ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4445ad43ddacSmrg ;; 4446209ff23fSmrg 4447ad43ddacSmrg osf3* | osf4* | osf5*) 4448ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4449ad43ddacSmrg # All OSF/1 code is PIC. 4450ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4451ad43ddacSmrg ;; 4452209ff23fSmrg 4453ad43ddacSmrg rdos*) 4454ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4455ad43ddacSmrg ;; 4456209ff23fSmrg 4457ad43ddacSmrg solaris*) 4458ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4459ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4460ad43ddacSmrg case $cc_basename in 446168105dcbSveego f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4462ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4463ad43ddacSmrg *) 4464ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4465ad43ddacSmrg esac 4466ad43ddacSmrg ;; 4467209ff23fSmrg 4468ad43ddacSmrg sunos4*) 4469ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4470ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4471ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4472ad43ddacSmrg ;; 4473209ff23fSmrg 4474ad43ddacSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 4475ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4476ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4477ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4478ad43ddacSmrg ;; 4479209ff23fSmrg 4480ad43ddacSmrg sysv4*MP*) 448143df4709Smrg if test -d /usr/nec ;then 4482ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4483ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4484ad43ddacSmrg fi 4485ad43ddacSmrg ;; 4486209ff23fSmrg 4487ad43ddacSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4488ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4489ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4490ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4491ad43ddacSmrg ;; 4492209ff23fSmrg 4493ad43ddacSmrg unicos*) 4494ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4495ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4496ad43ddacSmrg ;; 4497209ff23fSmrg 4498ad43ddacSmrg uts4*) 4499ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4500ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4501ad43ddacSmrg ;; 4502209ff23fSmrg 4503ad43ddacSmrg *) 4504ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4505ad43ddacSmrg ;; 4506209ff23fSmrg esac 4507ad43ddacSmrg fi 4508ad43ddacSmrg]) 4509ad43ddacSmrgcase $host_os in 451043df4709Smrg # For platforms which do not support PIC, -DPIC is meaningless: 4511ad43ddacSmrg *djgpp*) 4512ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4513ad43ddacSmrg ;; 4514ad43ddacSmrg *) 4515ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4516ad43ddacSmrg ;; 4517ad43ddacSmrgesac 451868105dcbSveego 451968105dcbSveegoAC_CACHE_CHECK([for $compiler option to produce PIC], 452068105dcbSveego [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 452168105dcbSveego [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 452268105dcbSveego_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4523209ff23fSmrg 4524ad43ddacSmrg# 4525ad43ddacSmrg# Check to make sure the PIC flag actually works. 4526ad43ddacSmrg# 4527ad43ddacSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4528ad43ddacSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4529ad43ddacSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4530ad43ddacSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4531ad43ddacSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4532ad43ddacSmrg "" | " "*) ;; 4533ad43ddacSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4534ad43ddacSmrg esac], 4535ad43ddacSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4536ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4537209ff23fSmrgfi 4538ad43ddacSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4539ad43ddacSmrg [Additional compiler flags for building library objects]) 4540209ff23fSmrg 454168105dcbSveego_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 454268105dcbSveego [How to pass a linker flag through the compiler]) 4543ad43ddacSmrg# 4544ad43ddacSmrg# Check to make sure the static flag actually works. 4545ad43ddacSmrg# 4546ad43ddacSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4547ad43ddacSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4548ad43ddacSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4549ad43ddacSmrg $lt_tmp_static_flag, 4550ad43ddacSmrg [], 4551ad43ddacSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4552ad43ddacSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4553ad43ddacSmrg [Compiler flag to prevent dynamic linking]) 4554ad43ddacSmrg])# _LT_COMPILER_PIC 4555209ff23fSmrg 4556ad43ddacSmrg 4557ad43ddacSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 4558ad43ddacSmrg# ---------------------------- 4559ad43ddacSmrg# See if the linker supports building shared libraries. 4560ad43ddacSmrgm4_defun([_LT_LINKER_SHLIBS], 4561ad43ddacSmrg[AC_REQUIRE([LT_PATH_LD])dnl 4562ad43ddacSmrgAC_REQUIRE([LT_PATH_NM])dnl 456368105dcbSveegom4_require([_LT_PATH_MANIFEST_TOOL])dnl 4564ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4565ad43ddacSmrgm4_require([_LT_DECL_EGREP])dnl 4566ad43ddacSmrgm4_require([_LT_DECL_SED])dnl 4567ad43ddacSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4568ad43ddacSmrgm4_require([_LT_TAG_COMPILER])dnl 4569ad43ddacSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4570ad43ddacSmrgm4_if([$1], [CXX], [ 4571ad43ddacSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 457268105dcbSveego _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4573ad43ddacSmrg case $host_os in 4574ad43ddacSmrg aix[[4-9]]*) 4575ad43ddacSmrg # If we're using GNU nm, then we don't want the "-C" option. 457643df4709Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 457743df4709Smrg # Also, AIX nm treats weak defined symbols like other global defined 457843df4709Smrg # symbols, whereas GNU nm marks them as "W". 4579ad43ddacSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 458043df4709Smrg _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' 4581ad43ddacSmrg else 458243df4709Smrg _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' 4583209ff23fSmrg fi 4584209ff23fSmrg ;; 4585ad43ddacSmrg pw32*) 458643df4709Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 458768105dcbSveego ;; 45882f39173dSmrg cygwin* | mingw* | cegcc*) 458968105dcbSveego case $cc_basename in 459068105dcbSveego cl*) 459168105dcbSveego _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 459268105dcbSveego ;; 459368105dcbSveego *) 459468105dcbSveego _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' 459568105dcbSveego _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 459668105dcbSveego ;; 459768105dcbSveego esac 459868105dcbSveego ;; 4599ad43ddacSmrg *) 4600ad43ddacSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 460168105dcbSveego ;; 4602ad43ddacSmrg esac 4603ad43ddacSmrg], [ 4604ad43ddacSmrg runpath_var= 4605ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 4606ad43ddacSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4607ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)= 4608ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4609ad43ddacSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 4610ad43ddacSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4611ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4612ad43ddacSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4613ad43ddacSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 4614ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4615ad43ddacSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4616ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4617ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4618ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4619ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4620ad43ddacSmrg _LT_TAGVAR(inherit_rpath, $1)=no 4621ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4622ad43ddacSmrg _LT_TAGVAR(module_cmds, $1)= 4623ad43ddacSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 4624ad43ddacSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4625ad43ddacSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4626ad43ddacSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4627ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4628ad43ddacSmrg # include_expsyms should be a list of space-separated symbols to be *always* 4629ad43ddacSmrg # included in the symbol list 4630ad43ddacSmrg _LT_TAGVAR(include_expsyms, $1)= 4631ad43ddacSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 463243df4709Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 463343df4709Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 463443df4709Smrg # as well as any symbol that contains `d'. 4635ad43ddacSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4636ad43ddacSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4637ad43ddacSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 4638ad43ddacSmrg # the symbol is explicitly referenced. Since portable code cannot 4639ad43ddacSmrg # rely on this symbol name, it's probably fine to never include it in 4640ad43ddacSmrg # preloaded symbol tables. 4641ad43ddacSmrg # Exclude shared library initialization/finalization symbols. 4642ad43ddacSmrgdnl Note also adjust exclude_expsyms for C++ above. 4643ad43ddacSmrg extract_expsyms_cmds= 4644209ff23fSmrg 4645ad43ddacSmrg case $host_os in 46462f39173dSmrg cygwin* | mingw* | pw32* | cegcc*) 4647ad43ddacSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4648ad43ddacSmrg # When not using gcc, we currently assume that we are using 4649ad43ddacSmrg # Microsoft Visual C++. 465043df4709Smrg if test "$GCC" != yes; then 4651ad43ddacSmrg with_gnu_ld=no 4652209ff23fSmrg fi 4653209ff23fSmrg ;; 4654ad43ddacSmrg interix*) 4655ad43ddacSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4656ad43ddacSmrg with_gnu_ld=yes 4657ad43ddacSmrg ;; 465843df4709Smrg openbsd*) 4659ad43ddacSmrg with_gnu_ld=no 4660ad43ddacSmrg ;; 4661209ff23fSmrg esac 4662209ff23fSmrg 4663ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 466468105dcbSveego 466568105dcbSveego # On some targets, GNU ld is compatible enough with the native linker 466668105dcbSveego # that we're better off using the native interface for both. 466768105dcbSveego lt_use_gnu_ld_interface=no 466843df4709Smrg if test "$with_gnu_ld" = yes; then 466968105dcbSveego case $host_os in 467068105dcbSveego aix*) 467168105dcbSveego # The AIX port of GNU ld has always aspired to compatibility 467268105dcbSveego # with the native linker. However, as the warning in the GNU ld 467368105dcbSveego # block says, versions before 2.19.5* couldn't really create working 467468105dcbSveego # shared libraries, regardless of the interface used. 467568105dcbSveego case `$LD -v 2>&1` in 467668105dcbSveego *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 467768105dcbSveego *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 467868105dcbSveego *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 467968105dcbSveego *) 468068105dcbSveego lt_use_gnu_ld_interface=yes 468168105dcbSveego ;; 468268105dcbSveego esac 468368105dcbSveego ;; 468468105dcbSveego *) 468568105dcbSveego lt_use_gnu_ld_interface=yes 468668105dcbSveego ;; 468768105dcbSveego esac 468868105dcbSveego fi 468968105dcbSveego 469043df4709Smrg if test "$lt_use_gnu_ld_interface" = yes; then 4691ad43ddacSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 469243df4709Smrg wlarc='${wl}' 4693209ff23fSmrg 4694ad43ddacSmrg # Set some defaults for GNU ld with shared library support. These 4695ad43ddacSmrg # are reset later if shared libraries are not supported. Putting them 4696ad43ddacSmrg # here allows them to be overridden if necessary. 4697ad43ddacSmrg runpath_var=LD_RUN_PATH 469843df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 469943df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4700ad43ddacSmrg # ancient GNU ld didn't support --whole-archive et. al. 4701ad43ddacSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 470243df4709Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4703ad43ddacSmrg else 4704ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4705ad43ddacSmrg fi 4706ad43ddacSmrg supports_anon_versioning=no 470743df4709Smrg case `$LD -v 2>&1` in 470868105dcbSveego *GNU\ gold*) supports_anon_versioning=yes ;; 4709ad43ddacSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4710ad43ddacSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4711ad43ddacSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4712ad43ddacSmrg *\ 2.11.*) ;; # other 2.11 versions 4713ad43ddacSmrg *) supports_anon_versioning=yes ;; 4714ad43ddacSmrg esac 4715209ff23fSmrg 4716ad43ddacSmrg # See if GNU ld supports shared libraries. 4717ad43ddacSmrg case $host_os in 4718ad43ddacSmrg aix[[3-9]]*) 4719ad43ddacSmrg # On AIX/PPC, the GNU linker is very broken 472043df4709Smrg if test "$host_cpu" != ia64; then 4721ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4722ad43ddacSmrg cat <<_LT_EOF 1>&2 4723209ff23fSmrg 472468105dcbSveego*** Warning: the GNU linker, at least up to release 2.19, is reported 4725ad43ddacSmrg*** to be unable to reliably create shared libraries on AIX. 4726ad43ddacSmrg*** Therefore, libtool is disabling shared libraries support. If you 472768105dcbSveego*** really care for shared libraries, you may want to install binutils 472868105dcbSveego*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 472968105dcbSveego*** You will then need to restart the configuration process. 4730209ff23fSmrg 4731ad43ddacSmrg_LT_EOF 4732ad43ddacSmrg fi 4733ad43ddacSmrg ;; 4734209ff23fSmrg 4735ad43ddacSmrg amigaos*) 4736ad43ddacSmrg case $host_cpu in 4737ad43ddacSmrg powerpc) 4738ad43ddacSmrg # see comment about AmigaOS4 .so support 473943df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4740ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4741ad43ddacSmrg ;; 4742ad43ddacSmrg m68k) 4743ad43ddacSmrg _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)' 4744ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4745ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4746ad43ddacSmrg ;; 4747ad43ddacSmrg esac 4748ad43ddacSmrg ;; 4749209ff23fSmrg 4750ad43ddacSmrg beos*) 4751ad43ddacSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4752ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4753ad43ddacSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4754ad43ddacSmrg # support --undefined. This deserves some investigation. FIXME 475543df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4756ad43ddacSmrg else 4757ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4758ad43ddacSmrg fi 4759ad43ddacSmrg ;; 4760209ff23fSmrg 47612f39173dSmrg cygwin* | mingw* | pw32* | cegcc*) 4762ad43ddacSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4763ad43ddacSmrg # as there is no search path for DLLs. 4764ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 476543df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4766ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4767ad43ddacSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4768ad43ddacSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 476968105dcbSveego _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' 477068105dcbSveego _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4771ad43ddacSmrg 4772ad43ddacSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 477343df4709Smrg _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' 477443df4709Smrg # If the export-symbols file already is a .def file (1st line 477543df4709Smrg # is EXPORTS), use it as is; otherwise, prepend... 477643df4709Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 477743df4709Smrg cp $export_symbols $output_objdir/$soname.def; 477843df4709Smrg else 477943df4709Smrg echo EXPORTS > $output_objdir/$soname.def; 478043df4709Smrg cat $export_symbols >> $output_objdir/$soname.def; 478143df4709Smrg fi~ 478243df4709Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4783ad43ddacSmrg else 4784ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4785ad43ddacSmrg fi 4786ad43ddacSmrg ;; 4787209ff23fSmrg 478868105dcbSveego haiku*) 478943df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 479068105dcbSveego _LT_TAGVAR(link_all_deplibs, $1)=yes 479168105dcbSveego ;; 479268105dcbSveego 4793ad43ddacSmrg interix[[3-9]]*) 4794ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4795ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 479643df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 479743df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4798ad43ddacSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4799ad43ddacSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4800ad43ddacSmrg # default) and relocated if they conflict, which is a slow very memory 4801ad43ddacSmrg # consuming and fragmenting process. To avoid this, we pick a random, 4802ad43ddacSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4803ad43ddacSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 480443df4709Smrg _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' 480543df4709Smrg _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' 4806ad43ddacSmrg ;; 4807209ff23fSmrg 480868105dcbSveego gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4809ad43ddacSmrg tmp_diet=no 481043df4709Smrg if test "$host_os" = linux-dietlibc; then 4811ad43ddacSmrg case $cc_basename in 4812ad43ddacSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4813ad43ddacSmrg esac 4814ad43ddacSmrg fi 4815ad43ddacSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 481643df4709Smrg && test "$tmp_diet" = no 4817ad43ddacSmrg then 481868105dcbSveego tmp_addflag=' $pic_flag' 4819ad43ddacSmrg tmp_sharedflag='-shared' 4820ad43ddacSmrg case $cc_basename,$host_cpu in 4821ad43ddacSmrg pgcc*) # Portland Group C compiler 482243df4709Smrg _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' 4823ad43ddacSmrg tmp_addflag=' $pic_flag' 4824ad43ddacSmrg ;; 482568105dcbSveego pgf77* | pgf90* | pgf95* | pgfortran*) 482668105dcbSveego # Portland Group f77 and f90 compilers 482743df4709Smrg _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' 4828ad43ddacSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 4829ad43ddacSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4830ad43ddacSmrg tmp_addflag=' -i_dynamic' ;; 4831ad43ddacSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4832ad43ddacSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4833ad43ddacSmrg ifc* | ifort*) # Intel Fortran compiler 4834ad43ddacSmrg tmp_addflag=' -nofor_main' ;; 48352f39173dSmrg lf95*) # Lahey Fortran 8.1 48362f39173dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 48372f39173dSmrg tmp_sharedflag='--shared' ;; 483868105dcbSveego xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4839ad43ddacSmrg tmp_sharedflag='-qmkshrobj' 4840ad43ddacSmrg tmp_addflag= ;; 484168105dcbSveego nvcc*) # Cuda Compiler Driver 2.2 484243df4709Smrg _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' 484368105dcbSveego _LT_TAGVAR(compiler_needs_object, $1)=yes 484468105dcbSveego ;; 4845ad43ddacSmrg esac 4846ad43ddacSmrg case `$CC -V 2>&1 | sed 5q` in 4847ad43ddacSmrg *Sun\ C*) # Sun C 5.9 484843df4709Smrg _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' 4849ad43ddacSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4850ad43ddacSmrg tmp_sharedflag='-G' ;; 4851ad43ddacSmrg *Sun\ F*) # Sun Fortran 8.3 4852ad43ddacSmrg tmp_sharedflag='-G' ;; 4853ad43ddacSmrg esac 485443df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4855209ff23fSmrg 485643df4709Smrg if test "x$supports_anon_versioning" = xyes; then 4857ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 485843df4709Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 485943df4709Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 486043df4709Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4861ad43ddacSmrg fi 4862209ff23fSmrg 4863ad43ddacSmrg case $cc_basename in 486468105dcbSveego xlf* | bgf* | bgxlf* | mpixlf*) 4865ad43ddacSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4866ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 486743df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 486868105dcbSveego _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 486943df4709Smrg if test "x$supports_anon_versioning" = xyes; then 4870ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 487143df4709Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 487243df4709Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 487343df4709Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4874ad43ddacSmrg fi 4875ad43ddacSmrg ;; 4876ad43ddacSmrg esac 4877ad43ddacSmrg else 4878ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4879ad43ddacSmrg fi 4880ad43ddacSmrg ;; 4881209ff23fSmrg 488243df4709Smrg netbsd*) 4883ad43ddacSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4884ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4885ad43ddacSmrg wlarc= 4886ad43ddacSmrg else 488743df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 488843df4709Smrg _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' 4889ad43ddacSmrg fi 4890ad43ddacSmrg ;; 4891209ff23fSmrg 4892ad43ddacSmrg solaris*) 4893ad43ddacSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4894ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4895ad43ddacSmrg cat <<_LT_EOF 1>&2 4896209ff23fSmrg 4897ad43ddacSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4898ad43ddacSmrg*** create shared libraries on Solaris systems. Therefore, libtool 4899ad43ddacSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 4900ad43ddacSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 4901ad43ddacSmrg*** your PATH or compiler configuration so that the native linker is 4902ad43ddacSmrg*** used, and then restart. 4903209ff23fSmrg 4904ad43ddacSmrg_LT_EOF 4905ad43ddacSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 490643df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 490743df4709Smrg _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' 4908ad43ddacSmrg else 4909ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4910ad43ddacSmrg fi 4911ad43ddacSmrg ;; 4912209ff23fSmrg 4913ad43ddacSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4914ad43ddacSmrg case `$LD -v 2>&1` in 4915ad43ddacSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4916ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4917ad43ddacSmrg cat <<_LT_EOF 1>&2 4918209ff23fSmrg 491943df4709Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4920ad43ddacSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4921ad43ddacSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 4922ad43ddacSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4923ad43ddacSmrg*** your PATH or compiler configuration so that the native linker is 4924ad43ddacSmrg*** used, and then restart. 4925209ff23fSmrg 4926ad43ddacSmrg_LT_EOF 4927ad43ddacSmrg ;; 4928ad43ddacSmrg *) 4929ad43ddacSmrg # For security reasons, it is highly recommended that you always 4930ad43ddacSmrg # use absolute paths for naming shared libraries, and exclude the 4931ad43ddacSmrg # DT_RUNPATH tag from executables and libraries. But doing so 4932ad43ddacSmrg # requires that you compile everything twice, which is a pain. 4933ad43ddacSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 493443df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 493543df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 493643df4709Smrg _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' 4937ad43ddacSmrg else 4938ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4939ad43ddacSmrg fi 4940ad43ddacSmrg ;; 4941ad43ddacSmrg esac 4942ad43ddacSmrg ;; 4943209ff23fSmrg 4944ad43ddacSmrg sunos4*) 4945ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4946ad43ddacSmrg wlarc= 4947ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4948ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4949ad43ddacSmrg ;; 4950209ff23fSmrg 4951ad43ddacSmrg *) 4952ad43ddacSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 495343df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 495443df4709Smrg _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' 4955ad43ddacSmrg else 4956ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4957ad43ddacSmrg fi 4958ad43ddacSmrg ;; 4959ad43ddacSmrg esac 4960209ff23fSmrg 496143df4709Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4962ad43ddacSmrg runpath_var= 4963ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4964ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4965ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4966ad43ddacSmrg fi 4967ad43ddacSmrg else 4968ad43ddacSmrg # PORTME fill in a description of your system's linker (not GNU ld) 4969ad43ddacSmrg case $host_os in 4970ad43ddacSmrg aix3*) 4971ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4972ad43ddacSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 4973ad43ddacSmrg _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' 4974ad43ddacSmrg # Note: this linker hardcodes the directories in LIBPATH if there 4975ad43ddacSmrg # are no directories specified by -L. 4976ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 497743df4709Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4978ad43ddacSmrg # Neither direct hardcoding nor static linking is supported with a 4979ad43ddacSmrg # broken collect2. 4980ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4981ad43ddacSmrg fi 4982ad43ddacSmrg ;; 4983209ff23fSmrg 4984ad43ddacSmrg aix[[4-9]]*) 498543df4709Smrg if test "$host_cpu" = ia64; then 4986ad43ddacSmrg # On IA64, the linker does run time linking by default, so we don't 4987ad43ddacSmrg # have to do anything special. 4988ad43ddacSmrg aix_use_runtimelinking=no 4989ad43ddacSmrg exp_sym_flag='-Bexport' 499043df4709Smrg no_entry_flag="" 4991ad43ddacSmrg else 4992ad43ddacSmrg # If we're using GNU nm, then we don't want the "-C" option. 499343df4709Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 499443df4709Smrg # Also, AIX nm treats weak defined symbols like other global 499543df4709Smrg # defined symbols, whereas GNU nm marks them as "W". 4996ad43ddacSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 499743df4709Smrg _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' 4998ad43ddacSmrg else 499943df4709Smrg _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' 5000ad43ddacSmrg fi 5001ad43ddacSmrg aix_use_runtimelinking=no 5002209ff23fSmrg 5003ad43ddacSmrg # Test if we are trying to use run time linking or normal 5004ad43ddacSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 500543df4709Smrg # need to do runtime linking. 5006ad43ddacSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5007ad43ddacSmrg for ld_flag in $LDFLAGS; do 500843df4709Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5009ad43ddacSmrg aix_use_runtimelinking=yes 5010ad43ddacSmrg break 5011ad43ddacSmrg fi 5012ad43ddacSmrg done 5013ad43ddacSmrg ;; 5014ad43ddacSmrg esac 5015209ff23fSmrg 5016ad43ddacSmrg exp_sym_flag='-bexport' 5017ad43ddacSmrg no_entry_flag='-bnoentry' 5018ad43ddacSmrg fi 5019209ff23fSmrg 5020ad43ddacSmrg # When large executables or shared objects are built, AIX ld can 5021ad43ddacSmrg # have problems creating the table of contents. If linking a library 5022ad43ddacSmrg # or program results in "error TOC overflow" add -mminimal-toc to 5023ad43ddacSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5024ad43ddacSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5025209ff23fSmrg 5026ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='' 5027ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5028ad43ddacSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5029ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5030ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 503143df4709Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5032209ff23fSmrg 503343df4709Smrg if test "$GCC" = yes; then 5034ad43ddacSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5035ad43ddacSmrg # We only want to do this on AIX 4.2 and lower, the check 5036ad43ddacSmrg # below for broken collect2 doesn't work under 4.3+ 503743df4709Smrg collect2name=`${CC} -print-prog-name=collect2` 5038ad43ddacSmrg if test -f "$collect2name" && 5039ad43ddacSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5040ad43ddacSmrg then 5041ad43ddacSmrg # We have reworked collect2 5042ad43ddacSmrg : 5043ad43ddacSmrg else 5044ad43ddacSmrg # We have old collect2 5045ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5046ad43ddacSmrg # It fails to find uninstalled libraries when the uninstalled 5047ad43ddacSmrg # path is not listed in the libpath. Setting hardcode_minus_L 5048ad43ddacSmrg # to unsupported forces relinking 5049ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5050ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5051ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5052ad43ddacSmrg fi 5053ad43ddacSmrg ;; 5054ad43ddacSmrg esac 5055ad43ddacSmrg shared_flag='-shared' 505643df4709Smrg if test "$aix_use_runtimelinking" = yes; then 505743df4709Smrg shared_flag="$shared_flag "'${wl}-G' 5058ad43ddacSmrg fi 5059ad43ddacSmrg else 5060ad43ddacSmrg # not using gcc 506143df4709Smrg if test "$host_cpu" = ia64; then 5062ad43ddacSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5063ad43ddacSmrg # chokes on -Wl,-G. The following line is correct: 5064ad43ddacSmrg shared_flag='-G' 5065ad43ddacSmrg else 506643df4709Smrg if test "$aix_use_runtimelinking" = yes; then 506743df4709Smrg shared_flag='${wl}-G' 5068ad43ddacSmrg else 506943df4709Smrg shared_flag='${wl}-bM:SRE' 5070ad43ddacSmrg fi 5071ad43ddacSmrg fi 5072ad43ddacSmrg fi 5073209ff23fSmrg 507443df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5075ad43ddacSmrg # It seems that -bexpall does not export symbols beginning with 5076ad43ddacSmrg # underscore (_), so it is better to generate a list of symbols to export. 5077ad43ddacSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 507843df4709Smrg if test "$aix_use_runtimelinking" = yes; then 5079ad43ddacSmrg # Warning - without using the other runtime loading flags (-brtl), 5080ad43ddacSmrg # -berok will link without error, but may produce a broken library. 5081ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5082ad43ddacSmrg # Determine the default libpath from the value encoded in an 5083ad43ddacSmrg # empty executable. 508468105dcbSveego _LT_SYS_MODULE_PATH_AIX([$1]) 508543df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 508643df4709Smrg _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" 5087ad43ddacSmrg else 508843df4709Smrg if test "$host_cpu" = ia64; then 508943df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5090ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 509143df4709Smrg _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" 5092ad43ddacSmrg else 5093ad43ddacSmrg # Determine the default libpath from the value encoded in an 5094ad43ddacSmrg # empty executable. 509568105dcbSveego _LT_SYS_MODULE_PATH_AIX([$1]) 509643df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5097ad43ddacSmrg # Warning - without using the other run time loading flags, 5098ad43ddacSmrg # -berok will link without error, but may produce a broken library. 509943df4709Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 510043df4709Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 510143df4709Smrg if test "$with_gnu_ld" = yes; then 510268105dcbSveego # We only use this code for GNU lds that support --whole-archive. 510343df4709Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 510468105dcbSveego else 510568105dcbSveego # Exported symbols can be pulled into shared objects from archives 510668105dcbSveego _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 510768105dcbSveego fi 5108ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 510943df4709Smrg # This is similar to how AIX traditionally builds its shared libraries. 511043df4709Smrg _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' 5111ad43ddacSmrg fi 5112ad43ddacSmrg fi 5113ad43ddacSmrg ;; 5114209ff23fSmrg 5115ad43ddacSmrg amigaos*) 5116ad43ddacSmrg case $host_cpu in 5117ad43ddacSmrg powerpc) 5118ad43ddacSmrg # see comment about AmigaOS4 .so support 511943df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5120ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5121ad43ddacSmrg ;; 5122ad43ddacSmrg m68k) 5123ad43ddacSmrg _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)' 5124ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5125ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5126ad43ddacSmrg ;; 5127ad43ddacSmrg esac 5128ad43ddacSmrg ;; 5129209ff23fSmrg 5130ad43ddacSmrg bsdi[[45]]*) 5131ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5132ad43ddacSmrg ;; 5133209ff23fSmrg 51342f39173dSmrg cygwin* | mingw* | pw32* | cegcc*) 5135ad43ddacSmrg # When not using gcc, we currently assume that we are using 5136ad43ddacSmrg # Microsoft Visual C++. 5137ad43ddacSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5138ad43ddacSmrg # no search path for DLLs. 513968105dcbSveego case $cc_basename in 514068105dcbSveego cl*) 514168105dcbSveego # Native MSVC 514268105dcbSveego _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 514368105dcbSveego _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 514468105dcbSveego _LT_TAGVAR(always_export_symbols, $1)=yes 514568105dcbSveego _LT_TAGVAR(file_list_spec, $1)='@' 514668105dcbSveego # Tell ltmain to make .lib files, not .a files. 514768105dcbSveego libext=lib 514868105dcbSveego # Tell ltmain to make .dll files, not .so files. 514943df4709Smrg shrext_cmds=".dll" 515068105dcbSveego # FIXME: Setting linknames here is a bad hack. 515143df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 515243df4709Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 515343df4709Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 515443df4709Smrg else 515543df4709Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 515643df4709Smrg fi~ 515743df4709Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 515843df4709Smrg linknames=' 515968105dcbSveego # The linker will not automatically build a static lib if we build a DLL. 516068105dcbSveego # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 516168105dcbSveego _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 516268105dcbSveego _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 516368105dcbSveego _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' 516468105dcbSveego # Don't use ranlib 516568105dcbSveego _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 516668105dcbSveego _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 516743df4709Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 516843df4709Smrg case $lt_outputfile in 516943df4709Smrg *.exe|*.EXE) ;; 517043df4709Smrg *) 517143df4709Smrg lt_outputfile="$lt_outputfile.exe" 517243df4709Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 517343df4709Smrg ;; 517443df4709Smrg esac~ 517543df4709Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 517643df4709Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 517743df4709Smrg $RM "$lt_outputfile.manifest"; 517843df4709Smrg fi' 517968105dcbSveego ;; 518068105dcbSveego *) 518168105dcbSveego # Assume MSVC wrapper 518268105dcbSveego _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 518368105dcbSveego _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 518468105dcbSveego # Tell ltmain to make .lib files, not .a files. 518568105dcbSveego libext=lib 518668105dcbSveego # Tell ltmain to make .dll files, not .so files. 518743df4709Smrg shrext_cmds=".dll" 518868105dcbSveego # FIXME: Setting linknames here is a bad hack. 518968105dcbSveego _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 519068105dcbSveego # The linker will automatically build a .lib file if we build a DLL. 519168105dcbSveego _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 519268105dcbSveego # FIXME: Should let the user specify the lib program. 519368105dcbSveego _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 519468105dcbSveego _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 519568105dcbSveego ;; 519668105dcbSveego esac 5197ad43ddacSmrg ;; 5198209ff23fSmrg 5199ad43ddacSmrg darwin* | rhapsody*) 5200ad43ddacSmrg _LT_DARWIN_LINKER_FEATURES($1) 5201ad43ddacSmrg ;; 5202209ff23fSmrg 5203ad43ddacSmrg dgux*) 5204ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5205ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5206ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5207ad43ddacSmrg ;; 5208209ff23fSmrg 5209ad43ddacSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5210ad43ddacSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 5211ad43ddacSmrg # does not break anything, and helps significantly (at the cost of a little 5212ad43ddacSmrg # extra space). 5213ad43ddacSmrg freebsd2.2*) 5214ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5215ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5216ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5217ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5218ad43ddacSmrg ;; 5219209ff23fSmrg 5220ad43ddacSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 522168105dcbSveego freebsd2.*) 5222ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5223ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5224ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5225ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5226ad43ddacSmrg ;; 5227209ff23fSmrg 5228ad43ddacSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5229ad43ddacSmrg freebsd* | dragonfly*) 523068105dcbSveego _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5231ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5232ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5233ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5234ad43ddacSmrg ;; 5235209ff23fSmrg 5236ad43ddacSmrg hpux9*) 523743df4709Smrg if test "$GCC" = yes; then 523843df4709Smrg _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' 5239ad43ddacSmrg else 524043df4709Smrg _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' 5241ad43ddacSmrg fi 524243df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5243ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5244ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5245209ff23fSmrg 5246ad43ddacSmrg # hardcode_minus_L: Not really in the search PATH, 5247ad43ddacSmrg # but as the default location of the library. 5248ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 524943df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5250ad43ddacSmrg ;; 5251209ff23fSmrg 5252ad43ddacSmrg hpux10*) 525343df4709Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 525443df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5255ad43ddacSmrg else 5256ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5257ad43ddacSmrg fi 525843df4709Smrg if test "$with_gnu_ld" = no; then 525943df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5260ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5261ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5262ad43ddacSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 526343df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5264ad43ddacSmrg # hardcode_minus_L: Not really in the search PATH, 5265ad43ddacSmrg # but as the default location of the library. 5266ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5267ad43ddacSmrg fi 5268ad43ddacSmrg ;; 5269209ff23fSmrg 5270ad43ddacSmrg hpux11*) 527143df4709Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5272ad43ddacSmrg case $host_cpu in 5273ad43ddacSmrg hppa*64*) 527443df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5275ad43ddacSmrg ;; 5276ad43ddacSmrg ia64*) 527743df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5278ad43ddacSmrg ;; 5279ad43ddacSmrg *) 528043df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5281ad43ddacSmrg ;; 5282ad43ddacSmrg esac 5283ad43ddacSmrg else 5284ad43ddacSmrg case $host_cpu in 5285ad43ddacSmrg hppa*64*) 528643df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5287ad43ddacSmrg ;; 5288ad43ddacSmrg ia64*) 528943df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5290ad43ddacSmrg ;; 5291ad43ddacSmrg *) 529268105dcbSveego m4_if($1, [], [ 529368105dcbSveego # Older versions of the 11.00 compiler do not understand -b yet 529468105dcbSveego # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 529568105dcbSveego _LT_LINKER_OPTION([if $CC understands -b], 529668105dcbSveego _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 529743df4709Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 529868105dcbSveego [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 529943df4709Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5300ad43ddacSmrg ;; 5301ad43ddacSmrg esac 5302ad43ddacSmrg fi 530343df4709Smrg if test "$with_gnu_ld" = no; then 530443df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5305ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5306209ff23fSmrg 5307ad43ddacSmrg case $host_cpu in 5308ad43ddacSmrg hppa*64*|ia64*) 5309ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5310ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5311ad43ddacSmrg ;; 5312ad43ddacSmrg *) 5313ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5314ad43ddacSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 531543df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5316209ff23fSmrg 5317ad43ddacSmrg # hardcode_minus_L: Not really in the search PATH, 5318ad43ddacSmrg # but as the default location of the library. 5319ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5320ad43ddacSmrg ;; 5321ad43ddacSmrg esac 5322ad43ddacSmrg fi 5323209ff23fSmrg ;; 5324209ff23fSmrg 5325ad43ddacSmrg irix5* | irix6* | nonstopux*) 532643df4709Smrg if test "$GCC" = yes; then 532743df4709Smrg _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' 5328ad43ddacSmrg # Try to use the -exported_symbol ld option, if it does not 5329ad43ddacSmrg # work, assume that -exports_file does not work either and 5330ad43ddacSmrg # implicitly export all symbols. 533168105dcbSveego # This should be the same for all languages, so no per-tag cache variable. 533268105dcbSveego AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 533368105dcbSveego [lt_cv_irix_exported_symbol], 533443df4709Smrg [save_LDFLAGS="$LDFLAGS" 533543df4709Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 533668105dcbSveego AC_LINK_IFELSE( 533768105dcbSveego [AC_LANG_SOURCE( 533868105dcbSveego [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 533968105dcbSveego [C++], [[int foo (void) { return 0; }]], 534068105dcbSveego [Fortran 77], [[ 534168105dcbSveego subroutine foo 534268105dcbSveego end]], 534368105dcbSveego [Fortran], [[ 534468105dcbSveego subroutine foo 534568105dcbSveego end]])])], 534668105dcbSveego [lt_cv_irix_exported_symbol=yes], 534768105dcbSveego [lt_cv_irix_exported_symbol=no]) 534843df4709Smrg LDFLAGS="$save_LDFLAGS"]) 534943df4709Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 535043df4709Smrg _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' 535168105dcbSveego fi 5352ad43ddacSmrg else 535343df4709Smrg _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' 535443df4709Smrg _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' 5355ad43ddacSmrg fi 5356ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 535743df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5358ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5359ad43ddacSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 5360ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5361ad43ddacSmrg ;; 5362209ff23fSmrg 536343df4709Smrg netbsd*) 5364ad43ddacSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5365ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5366ad43ddacSmrg else 5367ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5368ad43ddacSmrg fi 5369ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5370ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5371ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5372ad43ddacSmrg ;; 5373209ff23fSmrg 5374ad43ddacSmrg newsos6) 5375ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5376ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 537743df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5378ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5379ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5380ad43ddacSmrg ;; 5381209ff23fSmrg 5382ad43ddacSmrg *nto* | *qnx*) 5383ad43ddacSmrg ;; 5384209ff23fSmrg 538543df4709Smrg openbsd*) 5386ad43ddacSmrg if test -f /usr/libexec/ld.so; then 5387ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5388ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5389ad43ddacSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 539043df4709Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5391ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 539243df4709Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 539343df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 539443df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5395ad43ddacSmrg else 539643df4709Smrg case $host_os in 539743df4709Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 539843df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 539943df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 540043df4709Smrg ;; 540143df4709Smrg *) 540243df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 540343df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 540443df4709Smrg ;; 540543df4709Smrg esac 5406ad43ddacSmrg fi 5407ad43ddacSmrg else 5408ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5409ad43ddacSmrg fi 5410ad43ddacSmrg ;; 5411209ff23fSmrg 5412ad43ddacSmrg os2*) 5413ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5414ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5415ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 541643df4709Smrg _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' 541743df4709Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5418ad43ddacSmrg ;; 5419209ff23fSmrg 5420ad43ddacSmrg osf3*) 542143df4709Smrg if test "$GCC" = yes; then 542243df4709Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 542343df4709Smrg _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' 5424ad43ddacSmrg else 5425ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 542643df4709Smrg _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' 5427ad43ddacSmrg fi 5428ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 542943df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5430ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5431ad43ddacSmrg ;; 5432209ff23fSmrg 5433ad43ddacSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 543443df4709Smrg if test "$GCC" = yes; then 543543df4709Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 543643df4709Smrg _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' 543743df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5438ad43ddacSmrg else 5439ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 544043df4709Smrg _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' 5441ad43ddacSmrg _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~ 544243df4709Smrg $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' 5443209ff23fSmrg 5444ad43ddacSmrg # Both c and cxx compiler support -rpath directly 5445ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5446ad43ddacSmrg fi 5447ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5448ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5449ad43ddacSmrg ;; 5450209ff23fSmrg 5451ad43ddacSmrg solaris*) 5452ad43ddacSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 545343df4709Smrg if test "$GCC" = yes; then 545443df4709Smrg wlarc='${wl}' 545543df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5456ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 545743df4709Smrg $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' 5458ad43ddacSmrg else 5459ad43ddacSmrg case `$CC -V 2>&1` in 5460ad43ddacSmrg *"Compilers 5.0"*) 5461ad43ddacSmrg wlarc='' 546243df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5463ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 546443df4709Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5465ad43ddacSmrg ;; 5466ad43ddacSmrg *) 546743df4709Smrg wlarc='${wl}' 546843df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5469ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 547043df4709Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5471ad43ddacSmrg ;; 5472ad43ddacSmrg esac 5473ad43ddacSmrg fi 5474ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5475ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5476ad43ddacSmrg case $host_os in 5477ad43ddacSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5478ad43ddacSmrg *) 5479ad43ddacSmrg # The compiler driver will combine and reorder linker options, 548043df4709Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 5481ad43ddacSmrg # but is careful enough not to reorder. 5482ad43ddacSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 548343df4709Smrg if test "$GCC" = yes; then 548443df4709Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5485ad43ddacSmrg else 5486ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5487ad43ddacSmrg fi 5488ad43ddacSmrg ;; 5489ad43ddacSmrg esac 5490ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5491ad43ddacSmrg ;; 5492209ff23fSmrg 5493ad43ddacSmrg sunos4*) 549443df4709Smrg if test "x$host_vendor" = xsequent; then 5495ad43ddacSmrg # Use $CC to link under sequent, because it throws in some extra .o 5496ad43ddacSmrg # files that make .init and .fini sections work. 549743df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5498ad43ddacSmrg else 5499ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5500ad43ddacSmrg fi 5501ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5502ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5503ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5504ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5505ad43ddacSmrg ;; 5506209ff23fSmrg 5507ad43ddacSmrg sysv4) 5508ad43ddacSmrg case $host_vendor in 5509ad43ddacSmrg sni) 5510ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5511ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5512ad43ddacSmrg ;; 5513ad43ddacSmrg siemens) 5514ad43ddacSmrg ## LD is ld it makes a PLAMLIB 5515ad43ddacSmrg ## CC just makes a GrossModule. 5516ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5517ad43ddacSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5518ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5519ad43ddacSmrg ;; 5520ad43ddacSmrg motorola) 5521ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5522ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5523ad43ddacSmrg ;; 5524ad43ddacSmrg esac 5525ad43ddacSmrg runpath_var='LD_RUN_PATH' 5526ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5527ad43ddacSmrg ;; 5528209ff23fSmrg 5529ad43ddacSmrg sysv4.3*) 5530ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5531ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5532ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5533ad43ddacSmrg ;; 5534209ff23fSmrg 5535ad43ddacSmrg sysv4*MP*) 5536ad43ddacSmrg if test -d /usr/nec; then 5537ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5538ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5539ad43ddacSmrg runpath_var=LD_RUN_PATH 5540ad43ddacSmrg hardcode_runpath_var=yes 5541ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5542ad43ddacSmrg fi 5543ad43ddacSmrg ;; 5544209ff23fSmrg 5545ad43ddacSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 554643df4709Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5547ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5548ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5549ad43ddacSmrg runpath_var='LD_RUN_PATH' 5550209ff23fSmrg 555143df4709Smrg if test "$GCC" = yes; then 555243df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 555343df4709Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5554ad43ddacSmrg else 555543df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 555643df4709Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5557ad43ddacSmrg fi 5558ad43ddacSmrg ;; 5559209ff23fSmrg 5560ad43ddacSmrg sysv5* | sco3.2v5* | sco5v6*) 556143df4709Smrg # Note: We can NOT use -z defs as we might desire, because we do not 5562ad43ddacSmrg # link with -lc, and that would cause any symbols used from libc to 5563ad43ddacSmrg # always be unresolved, which means just about no library would 5564ad43ddacSmrg # ever link correctly. If we're not using GNU ld we use -z text 5565ad43ddacSmrg # though, which does catch some bad symbols but isn't as heavy-handed 5566ad43ddacSmrg # as -z defs. 556743df4709Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 556843df4709Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5569ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5570ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 557143df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5572ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5573ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 557443df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5575ad43ddacSmrg runpath_var='LD_RUN_PATH' 5576209ff23fSmrg 557743df4709Smrg if test "$GCC" = yes; then 557843df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 557943df4709Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5580ad43ddacSmrg else 558143df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 558243df4709Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5583ad43ddacSmrg fi 5584ad43ddacSmrg ;; 5585209ff23fSmrg 5586ad43ddacSmrg uts4*) 5587ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5588ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5589ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5590ad43ddacSmrg ;; 5591209ff23fSmrg 5592ad43ddacSmrg *) 5593ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5594ad43ddacSmrg ;; 5595ad43ddacSmrg esac 5596209ff23fSmrg 559743df4709Smrg if test x$host_vendor = xsni; then 5598ad43ddacSmrg case $host in 5599ad43ddacSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 560043df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5601ad43ddacSmrg ;; 5602ad43ddacSmrg esac 5603ad43ddacSmrg fi 5604ad43ddacSmrg fi 5605ad43ddacSmrg]) 5606ad43ddacSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 560743df4709Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5608209ff23fSmrg 5609ad43ddacSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5610209ff23fSmrg 5611ad43ddacSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5612ad43ddacSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5613ad43ddacSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 5614ad43ddacSmrg [The commands to extract the exported symbol list from a shared archive]) 5615209ff23fSmrg 5616ad43ddacSmrg# 5617ad43ddacSmrg# Do we need to explicitly link libc? 5618ad43ddacSmrg# 5619ad43ddacSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5620ad43ddacSmrgx|xyes) 5621ad43ddacSmrg # Assume -lc should be added 5622ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5623209ff23fSmrg 562443df4709Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5625ad43ddacSmrg case $_LT_TAGVAR(archive_cmds, $1) in 5626ad43ddacSmrg *'~'*) 5627ad43ddacSmrg # FIXME: we may have to deal with multi-command sequences. 5628ad43ddacSmrg ;; 5629ad43ddacSmrg '$CC '*) 5630ad43ddacSmrg # Test whether the compiler implicitly links with -lc since on some 5631ad43ddacSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5632ad43ddacSmrg # to ld, don't add -lc before -lgcc. 563368105dcbSveego AC_CACHE_CHECK([whether -lc should be explicitly linked in], 563468105dcbSveego [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 563568105dcbSveego [$RM conftest* 563668105dcbSveego echo "$lt_simple_compile_test_code" > conftest.$ac_ext 563768105dcbSveego 563868105dcbSveego if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 563968105dcbSveego soname=conftest 564068105dcbSveego lib=conftest 564168105dcbSveego libobjs=conftest.$ac_objext 564268105dcbSveego deplibs= 564368105dcbSveego wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 564468105dcbSveego pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 564568105dcbSveego compiler_flags=-v 564668105dcbSveego linker_flags=-v 564768105dcbSveego verstring= 564868105dcbSveego output_objdir=. 564968105dcbSveego libname=conftest 565068105dcbSveego lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 565168105dcbSveego _LT_TAGVAR(allow_undefined_flag, $1)= 565268105dcbSveego if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 565368105dcbSveego then 565468105dcbSveego lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 565568105dcbSveego else 565668105dcbSveego lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 565768105dcbSveego fi 565868105dcbSveego _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 565968105dcbSveego else 566068105dcbSveego cat conftest.err 1>&5 566168105dcbSveego fi 566268105dcbSveego $RM conftest* 566368105dcbSveego ]) 566468105dcbSveego _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5665ad43ddacSmrg ;; 5666ad43ddacSmrg esac 5667ad43ddacSmrg fi 5668ad43ddacSmrg ;; 5669ad43ddacSmrgesac 5670209ff23fSmrg 5671ad43ddacSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5672ad43ddacSmrg [Whether or not to add -lc for building shared libraries]) 5673ad43ddacSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5674ad43ddacSmrg [enable_shared_with_static_runtimes], [0], 5675ad43ddacSmrg [Whether or not to disallow shared libs when runtime libs are static]) 5676ad43ddacSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5677ad43ddacSmrg [Compiler flag to allow reflexive dlopens]) 5678ad43ddacSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5679ad43ddacSmrg [Compiler flag to generate shared objects directly from archives]) 5680ad43ddacSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 5681ad43ddacSmrg [Whether the compiler copes with passing no objects directly]) 5682ad43ddacSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5683ad43ddacSmrg [Create an old-style archive from a shared archive]) 5684ad43ddacSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5685ad43ddacSmrg [Create a temporary old-style archive to link instead of a shared archive]) 5686ad43ddacSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5687ad43ddacSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5688ad43ddacSmrg_LT_TAGDECL([], [module_cmds], [2], 5689ad43ddacSmrg [Commands used to build a loadable module if different from building 5690ad43ddacSmrg a shared archive.]) 5691ad43ddacSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5692ad43ddacSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 5693ad43ddacSmrg [Whether we are building with GNU ld or not]) 5694ad43ddacSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5695ad43ddacSmrg [Flag that allows shared libraries with undefined symbols to be built]) 5696ad43ddacSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 5697ad43ddacSmrg [Flag that enforces no undefined symbols]) 5698ad43ddacSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5699ad43ddacSmrg [Flag to hardcode $libdir into a binary during linking. 5700ad43ddacSmrg This must work even if $libdir does not exist]) 5701ad43ddacSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5702ad43ddacSmrg [Whether we need a single "-rpath" flag with a separated argument]) 5703ad43ddacSmrg_LT_TAGDECL([], [hardcode_direct], [0], 570443df4709Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5705ad43ddacSmrg DIR into the resulting binary]) 5706ad43ddacSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 570743df4709Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5708ad43ddacSmrg DIR into the resulting binary and the resulting library dependency is 570943df4709Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5710ad43ddacSmrg library is relocated]) 5711ad43ddacSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5712ad43ddacSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5713ad43ddacSmrg into the resulting binary]) 5714ad43ddacSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5715ad43ddacSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5716ad43ddacSmrg into the resulting binary]) 5717ad43ddacSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 5718ad43ddacSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 5719ad43ddacSmrg into the library and all subsequent libraries and executables linked 5720ad43ddacSmrg against it]) 5721ad43ddacSmrg_LT_TAGDECL([], [inherit_rpath], [0], 5722ad43ddacSmrg [Set to yes if linker adds runtime paths of dependent libraries 5723ad43ddacSmrg to runtime path list]) 5724ad43ddacSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 5725ad43ddacSmrg [Whether libtool must link a program against all its dependency libraries]) 5726ad43ddacSmrg_LT_TAGDECL([], [always_export_symbols], [0], 5727ad43ddacSmrg [Set to "yes" if exported symbols are required]) 5728ad43ddacSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5729ad43ddacSmrg [The commands to list exported symbols]) 5730ad43ddacSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 5731ad43ddacSmrg [Symbols that should not be listed in the preloaded symbols]) 5732ad43ddacSmrg_LT_TAGDECL([], [include_expsyms], [1], 5733ad43ddacSmrg [Symbols that must always be exported]) 5734ad43ddacSmrg_LT_TAGDECL([], [prelink_cmds], [2], 5735ad43ddacSmrg [Commands necessary for linking programs (against libraries) with templates]) 573668105dcbSveego_LT_TAGDECL([], [postlink_cmds], [2], 573768105dcbSveego [Commands necessary for finishing linking programs]) 5738ad43ddacSmrg_LT_TAGDECL([], [file_list_spec], [1], 5739ad43ddacSmrg [Specify filename containing input files]) 5740ad43ddacSmrgdnl FIXME: Not yet implemented 5741ad43ddacSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5742ad43ddacSmrgdnl [Compiler flag to generate thread safe objects]) 5743ad43ddacSmrg])# _LT_LINKER_SHLIBS 5744ad43ddacSmrg 5745ad43ddacSmrg 5746ad43ddacSmrg# _LT_LANG_C_CONFIG([TAG]) 5747ad43ddacSmrg# ------------------------ 5748ad43ddacSmrg# Ensure that the configuration variables for a C compiler are suitably 5749ad43ddacSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 575043df4709Smrg# the compiler configuration to `libtool'. 5751ad43ddacSmrgm4_defun([_LT_LANG_C_CONFIG], 5752ad43ddacSmrg[m4_require([_LT_DECL_EGREP])dnl 575343df4709Smrglt_save_CC="$CC" 5754ad43ddacSmrgAC_LANG_PUSH(C) 5755209ff23fSmrg 5756ad43ddacSmrg# Source file extension for C test sources. 5757ad43ddacSmrgac_ext=c 5758209ff23fSmrg 5759ad43ddacSmrg# Object file extension for compiled C test sources. 5760ad43ddacSmrgobjext=o 5761ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext 5762209ff23fSmrg 5763ad43ddacSmrg# Code to be used in simple compile tests 5764ad43ddacSmrglt_simple_compile_test_code="int some_variable = 0;" 5765209ff23fSmrg 5766ad43ddacSmrg# Code to be used in simple link tests 5767ad43ddacSmrglt_simple_link_test_code='int main(){return(0);}' 5768209ff23fSmrg 5769ad43ddacSmrg_LT_TAG_COMPILER 5770ad43ddacSmrg# Save the default compiler, since it gets overwritten when the other 5771ad43ddacSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5772ad43ddacSmrgcompiler_DEFAULT=$CC 5773209ff23fSmrg 5774ad43ddacSmrg# save warnings/boilerplate of simple test code 5775ad43ddacSmrg_LT_COMPILER_BOILERPLATE 5776ad43ddacSmrg_LT_LINKER_BOILERPLATE 5777209ff23fSmrg 5778ad43ddacSmrgif test -n "$compiler"; then 5779ad43ddacSmrg _LT_COMPILER_NO_RTTI($1) 5780ad43ddacSmrg _LT_COMPILER_PIC($1) 5781ad43ddacSmrg _LT_COMPILER_C_O($1) 5782ad43ddacSmrg _LT_COMPILER_FILE_LOCKS($1) 5783ad43ddacSmrg _LT_LINKER_SHLIBS($1) 5784ad43ddacSmrg _LT_SYS_DYNAMIC_LINKER($1) 5785ad43ddacSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 5786ad43ddacSmrg LT_SYS_DLOPEN_SELF 5787ad43ddacSmrg _LT_CMD_STRIPLIB 5788ad43ddacSmrg 578943df4709Smrg # Report which library types will actually be built 5790ad43ddacSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5791ad43ddacSmrg AC_MSG_RESULT([$can_build_shared]) 5792ad43ddacSmrg 5793ad43ddacSmrg AC_MSG_CHECKING([whether to build shared libraries]) 579443df4709Smrg test "$can_build_shared" = "no" && enable_shared=no 5795ad43ddacSmrg 5796ad43ddacSmrg # On AIX, shared libraries and static libraries use the same namespace, and 5797ad43ddacSmrg # are all built from PIC. 5798ad43ddacSmrg case $host_os in 5799ad43ddacSmrg aix3*) 580043df4709Smrg test "$enable_shared" = yes && enable_static=no 5801ad43ddacSmrg if test -n "$RANLIB"; then 5802ad43ddacSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5803ad43ddacSmrg postinstall_cmds='$RANLIB $lib' 5804ad43ddacSmrg fi 5805ad43ddacSmrg ;; 5806209ff23fSmrg 5807ad43ddacSmrg aix[[4-9]]*) 580843df4709Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 580943df4709Smrg test "$enable_shared" = yes && enable_static=no 5810ad43ddacSmrg fi 5811ad43ddacSmrg ;; 5812ad43ddacSmrg esac 5813ad43ddacSmrg AC_MSG_RESULT([$enable_shared]) 5814209ff23fSmrg 5815ad43ddacSmrg AC_MSG_CHECKING([whether to build static libraries]) 5816ad43ddacSmrg # Make sure either enable_shared or enable_static is yes. 581743df4709Smrg test "$enable_shared" = yes || enable_static=yes 5818ad43ddacSmrg AC_MSG_RESULT([$enable_static]) 5819209ff23fSmrg 5820ad43ddacSmrg _LT_CONFIG($1) 5821ad43ddacSmrgfi 5822ad43ddacSmrgAC_LANG_POP 582343df4709SmrgCC="$lt_save_CC" 5824ad43ddacSmrg])# _LT_LANG_C_CONFIG 5825209ff23fSmrg 5826209ff23fSmrg 5827ad43ddacSmrg# _LT_LANG_CXX_CONFIG([TAG]) 5828ad43ddacSmrg# -------------------------- 5829ad43ddacSmrg# Ensure that the configuration variables for a C++ compiler are suitably 5830ad43ddacSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 583143df4709Smrg# the compiler configuration to `libtool'. 5832ad43ddacSmrgm4_defun([_LT_LANG_CXX_CONFIG], 583368105dcbSveego[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5834ad43ddacSmrgm4_require([_LT_DECL_EGREP])dnl 583568105dcbSveegom4_require([_LT_PATH_MANIFEST_TOOL])dnl 583643df4709Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 583743df4709Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 583843df4709Smrg (test "X$CXX" != "Xg++"))) ; then 583968105dcbSveego AC_PROG_CXXCPP 584068105dcbSveegoelse 584168105dcbSveego _lt_caught_CXX_error=yes 584268105dcbSveegofi 5843ad43ddacSmrg 5844ad43ddacSmrgAC_LANG_PUSH(C++) 5845ad43ddacSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5846ad43ddacSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 5847ad43ddacSmrg_LT_TAGVAR(always_export_symbols, $1)=no 5848ad43ddacSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5849ad43ddacSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 5850ad43ddacSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5851ad43ddacSmrg_LT_TAGVAR(hardcode_direct, $1)=no 5852ad43ddacSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5853ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5854ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5855ad43ddacSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5856ad43ddacSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5857ad43ddacSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 5858ad43ddacSmrg_LT_TAGVAR(inherit_rpath, $1)=no 5859ad43ddacSmrg_LT_TAGVAR(module_cmds, $1)= 5860ad43ddacSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 5861ad43ddacSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5862ad43ddacSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 586368105dcbSveego_LT_TAGVAR(reload_flag, $1)=$reload_flag 586468105dcbSveego_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5865ad43ddacSmrg_LT_TAGVAR(no_undefined_flag, $1)= 5866ad43ddacSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5867ad43ddacSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5868209ff23fSmrg 5869ad43ddacSmrg# Source file extension for C++ test sources. 5870ad43ddacSmrgac_ext=cpp 5871209ff23fSmrg 5872ad43ddacSmrg# Object file extension for compiled C++ test sources. 5873ad43ddacSmrgobjext=o 5874ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext 5875ad43ddacSmrg 5876ad43ddacSmrg# No sense in running all these tests if we already determined that 5877ad43ddacSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 5878ad43ddacSmrg# are currently assumed to apply to all compilers on this platform, 5879ad43ddacSmrg# and will be corrupted by setting them based on a non-working compiler. 588043df4709Smrgif test "$_lt_caught_CXX_error" != yes; then 5881ad43ddacSmrg # Code to be used in simple compile tests 5882ad43ddacSmrg lt_simple_compile_test_code="int some_variable = 0;" 5883ad43ddacSmrg 5884ad43ddacSmrg # Code to be used in simple link tests 5885ad43ddacSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5886ad43ddacSmrg 5887ad43ddacSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5888ad43ddacSmrg _LT_TAG_COMPILER 5889ad43ddacSmrg 5890ad43ddacSmrg # save warnings/boilerplate of simple test code 5891ad43ddacSmrg _LT_COMPILER_BOILERPLATE 5892ad43ddacSmrg _LT_LINKER_BOILERPLATE 5893ad43ddacSmrg 5894ad43ddacSmrg # Allow CC to be a program name with arguments. 5895ad43ddacSmrg lt_save_CC=$CC 589668105dcbSveego lt_save_CFLAGS=$CFLAGS 5897ad43ddacSmrg lt_save_LD=$LD 5898ad43ddacSmrg lt_save_GCC=$GCC 5899ad43ddacSmrg GCC=$GXX 5900ad43ddacSmrg lt_save_with_gnu_ld=$with_gnu_ld 5901ad43ddacSmrg lt_save_path_LD=$lt_cv_path_LD 5902ad43ddacSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5903ad43ddacSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5904ad43ddacSmrg else 5905ad43ddacSmrg $as_unset lt_cv_prog_gnu_ld 5906ad43ddacSmrg fi 5907ad43ddacSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 5908ad43ddacSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 5909ad43ddacSmrg else 5910ad43ddacSmrg $as_unset lt_cv_path_LD 5911ad43ddacSmrg fi 5912ad43ddacSmrg test -z "${LDCXX+set}" || LD=$LDCXX 5913ad43ddacSmrg CC=${CXX-"c++"} 591468105dcbSveego CFLAGS=$CXXFLAGS 5915ad43ddacSmrg compiler=$CC 5916ad43ddacSmrg _LT_TAGVAR(compiler, $1)=$CC 5917ad43ddacSmrg _LT_CC_BASENAME([$compiler]) 5918209ff23fSmrg 5919ad43ddacSmrg if test -n "$compiler"; then 5920ad43ddacSmrg # We don't want -fno-exception when compiling C++ code, so set the 5921ad43ddacSmrg # no_builtin_flag separately 592243df4709Smrg if test "$GXX" = yes; then 5923ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5924ad43ddacSmrg else 5925ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5926ad43ddacSmrg fi 5927209ff23fSmrg 592843df4709Smrg if test "$GXX" = yes; then 5929ad43ddacSmrg # Set up default GNU C++ configuration 5930209ff23fSmrg 5931ad43ddacSmrg LT_PATH_LD 5932209ff23fSmrg 5933ad43ddacSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5934ad43ddacSmrg # archiving commands below assume that GNU ld is being used. 593543df4709Smrg if test "$with_gnu_ld" = yes; then 593643df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 593743df4709Smrg _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' 5938209ff23fSmrg 593943df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 594043df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5941209ff23fSmrg 5942ad43ddacSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5943ad43ddacSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5944ad43ddacSmrg # investigate it a little bit more. (MM) 594543df4709Smrg wlarc='${wl}' 5946209ff23fSmrg 5947ad43ddacSmrg # ancient GNU ld didn't support --whole-archive et. al. 5948ad43ddacSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5949ad43ddacSmrg $GREP 'no-whole-archive' > /dev/null; then 595043df4709Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5951ad43ddacSmrg else 5952ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5953ad43ddacSmrg fi 5954ad43ddacSmrg else 5955ad43ddacSmrg with_gnu_ld=no 5956ad43ddacSmrg wlarc= 5957ad43ddacSmrg 5958ad43ddacSmrg # A generic and very simple default shared library creation 5959ad43ddacSmrg # command for GNU C++ for the case where it uses the native 5960ad43ddacSmrg # linker, instead of GNU ld. If possible, this setting should 5961ad43ddacSmrg # overridden to take advantage of the native linker features on 5962ad43ddacSmrg # the platform it is being used on. 5963ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5964ad43ddacSmrg fi 5965209ff23fSmrg 5966ad43ddacSmrg # Commands to make compiler produce verbose output that lists 5967ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 5968ad43ddacSmrg # linking a shared library. 596968105dcbSveego output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5970209ff23fSmrg 5971ad43ddacSmrg else 5972ad43ddacSmrg GXX=no 5973ad43ddacSmrg with_gnu_ld=no 5974ad43ddacSmrg wlarc= 5975ad43ddacSmrg fi 5976209ff23fSmrg 5977ad43ddacSmrg # PORTME: fill in a description of your system's C++ link characteristics 5978ad43ddacSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5979ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5980ad43ddacSmrg case $host_os in 5981ad43ddacSmrg aix3*) 5982ad43ddacSmrg # FIXME: insert proper C++ library support 5983ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5984ad43ddacSmrg ;; 5985ad43ddacSmrg aix[[4-9]]*) 598643df4709Smrg if test "$host_cpu" = ia64; then 5987ad43ddacSmrg # On IA64, the linker does run time linking by default, so we don't 5988ad43ddacSmrg # have to do anything special. 5989ad43ddacSmrg aix_use_runtimelinking=no 5990ad43ddacSmrg exp_sym_flag='-Bexport' 599143df4709Smrg no_entry_flag="" 5992ad43ddacSmrg else 5993ad43ddacSmrg aix_use_runtimelinking=no 5994ad43ddacSmrg 5995ad43ddacSmrg # Test if we are trying to use run time linking or normal 5996ad43ddacSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 599743df4709Smrg # need to do runtime linking. 5998ad43ddacSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5999ad43ddacSmrg for ld_flag in $LDFLAGS; do 6000ad43ddacSmrg case $ld_flag in 6001ad43ddacSmrg *-brtl*) 6002ad43ddacSmrg aix_use_runtimelinking=yes 6003ad43ddacSmrg break 6004ad43ddacSmrg ;; 6005ad43ddacSmrg esac 6006ad43ddacSmrg done 6007ad43ddacSmrg ;; 6008ad43ddacSmrg esac 6009209ff23fSmrg 6010ad43ddacSmrg exp_sym_flag='-bexport' 6011ad43ddacSmrg no_entry_flag='-bnoentry' 6012ad43ddacSmrg fi 6013209ff23fSmrg 6014ad43ddacSmrg # When large executables or shared objects are built, AIX ld can 6015ad43ddacSmrg # have problems creating the table of contents. If linking a library 6016ad43ddacSmrg # or program results in "error TOC overflow" add -mminimal-toc to 6017ad43ddacSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6018ad43ddacSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6019ad43ddacSmrg 6020ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='' 6021ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6022ad43ddacSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6023ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6024ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 602543df4709Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6026ad43ddacSmrg 602743df4709Smrg if test "$GXX" = yes; then 6028ad43ddacSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6029ad43ddacSmrg # We only want to do this on AIX 4.2 and lower, the check 6030ad43ddacSmrg # below for broken collect2 doesn't work under 4.3+ 603143df4709Smrg collect2name=`${CC} -print-prog-name=collect2` 6032ad43ddacSmrg if test -f "$collect2name" && 6033ad43ddacSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6034ad43ddacSmrg then 6035ad43ddacSmrg # We have reworked collect2 6036ad43ddacSmrg : 6037ad43ddacSmrg else 6038ad43ddacSmrg # We have old collect2 6039ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6040ad43ddacSmrg # It fails to find uninstalled libraries when the uninstalled 6041ad43ddacSmrg # path is not listed in the libpath. Setting hardcode_minus_L 6042ad43ddacSmrg # to unsupported forces relinking 6043ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6044ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6045ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6046ad43ddacSmrg fi 6047ad43ddacSmrg esac 6048ad43ddacSmrg shared_flag='-shared' 604943df4709Smrg if test "$aix_use_runtimelinking" = yes; then 605043df4709Smrg shared_flag="$shared_flag "'${wl}-G' 6051ad43ddacSmrg fi 6052ad43ddacSmrg else 6053ad43ddacSmrg # not using gcc 605443df4709Smrg if test "$host_cpu" = ia64; then 6055ad43ddacSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6056ad43ddacSmrg # chokes on -Wl,-G. The following line is correct: 6057ad43ddacSmrg shared_flag='-G' 6058ad43ddacSmrg else 605943df4709Smrg if test "$aix_use_runtimelinking" = yes; then 606043df4709Smrg shared_flag='${wl}-G' 6061ad43ddacSmrg else 606243df4709Smrg shared_flag='${wl}-bM:SRE' 6063ad43ddacSmrg fi 6064ad43ddacSmrg fi 6065ad43ddacSmrg fi 6066209ff23fSmrg 606743df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6068ad43ddacSmrg # It seems that -bexpall does not export symbols beginning with 6069ad43ddacSmrg # underscore (_), so it is better to generate a list of symbols to 6070ad43ddacSmrg # export. 6071ad43ddacSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 607243df4709Smrg if test "$aix_use_runtimelinking" = yes; then 6073ad43ddacSmrg # Warning - without using the other runtime loading flags (-brtl), 6074ad43ddacSmrg # -berok will link without error, but may produce a broken library. 607543df4709Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6076ad43ddacSmrg # Determine the default libpath from the value encoded in an empty 6077ad43ddacSmrg # executable. 607868105dcbSveego _LT_SYS_MODULE_PATH_AIX([$1]) 607943df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6080ad43ddacSmrg 608143df4709Smrg _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" 6082ad43ddacSmrg else 608343df4709Smrg if test "$host_cpu" = ia64; then 608443df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6085ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 608643df4709Smrg _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" 6087ad43ddacSmrg else 6088ad43ddacSmrg # Determine the default libpath from the value encoded in an 6089ad43ddacSmrg # empty executable. 609068105dcbSveego _LT_SYS_MODULE_PATH_AIX([$1]) 609143df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6092ad43ddacSmrg # Warning - without using the other run time loading flags, 6093ad43ddacSmrg # -berok will link without error, but may produce a broken library. 609443df4709Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 609543df4709Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 609643df4709Smrg if test "$with_gnu_ld" = yes; then 609768105dcbSveego # We only use this code for GNU lds that support --whole-archive. 609843df4709Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 609968105dcbSveego else 610068105dcbSveego # Exported symbols can be pulled into shared objects from archives 610168105dcbSveego _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 610268105dcbSveego fi 6103ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 610443df4709Smrg # This is similar to how AIX traditionally builds its shared 610543df4709Smrg # libraries. 610643df4709Smrg _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' 6107ad43ddacSmrg fi 6108ad43ddacSmrg fi 6109ad43ddacSmrg ;; 6110209ff23fSmrg 6111ad43ddacSmrg beos*) 6112ad43ddacSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6113ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6114ad43ddacSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6115ad43ddacSmrg # support --undefined. This deserves some investigation. FIXME 611643df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6117ad43ddacSmrg else 6118ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6119ad43ddacSmrg fi 6120ad43ddacSmrg ;; 6121209ff23fSmrg 6122ad43ddacSmrg chorus*) 6123ad43ddacSmrg case $cc_basename in 6124ad43ddacSmrg *) 6125ad43ddacSmrg # FIXME: insert proper C++ library support 6126ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6127ad43ddacSmrg ;; 6128ad43ddacSmrg esac 6129ad43ddacSmrg ;; 6130209ff23fSmrg 61312f39173dSmrg cygwin* | mingw* | pw32* | cegcc*) 613268105dcbSveego case $GXX,$cc_basename in 613368105dcbSveego ,cl* | no,cl*) 613468105dcbSveego # Native MSVC 613568105dcbSveego # hardcode_libdir_flag_spec is actually meaningless, as there is 613668105dcbSveego # no search path for DLLs. 613768105dcbSveego _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 613868105dcbSveego _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 613968105dcbSveego _LT_TAGVAR(always_export_symbols, $1)=yes 614068105dcbSveego _LT_TAGVAR(file_list_spec, $1)='@' 614168105dcbSveego # Tell ltmain to make .lib files, not .a files. 614268105dcbSveego libext=lib 614368105dcbSveego # Tell ltmain to make .dll files, not .so files. 614443df4709Smrg shrext_cmds=".dll" 614568105dcbSveego # FIXME: Setting linknames here is a bad hack. 614643df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 614743df4709Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 614843df4709Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 614943df4709Smrg else 615043df4709Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 615143df4709Smrg fi~ 615243df4709Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 615343df4709Smrg linknames=' 615468105dcbSveego # The linker will not automatically build a static lib if we build a DLL. 615568105dcbSveego # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 615668105dcbSveego _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 615768105dcbSveego # Don't use ranlib 615868105dcbSveego _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 615968105dcbSveego _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 616043df4709Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 616143df4709Smrg case $lt_outputfile in 616243df4709Smrg *.exe|*.EXE) ;; 616343df4709Smrg *) 616443df4709Smrg lt_outputfile="$lt_outputfile.exe" 616543df4709Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 616643df4709Smrg ;; 616743df4709Smrg esac~ 616843df4709Smrg func_to_tool_file "$lt_outputfile"~ 616943df4709Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 617043df4709Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 617143df4709Smrg $RM "$lt_outputfile.manifest"; 617243df4709Smrg fi' 617368105dcbSveego ;; 617468105dcbSveego *) 617568105dcbSveego # g++ 617668105dcbSveego # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 617768105dcbSveego # as there is no search path for DLLs. 617868105dcbSveego _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 617943df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 618068105dcbSveego _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 618168105dcbSveego _LT_TAGVAR(always_export_symbols, $1)=no 618268105dcbSveego _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 618368105dcbSveego 618468105dcbSveego if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 618543df4709Smrg _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' 618643df4709Smrg # If the export-symbols file already is a .def file (1st line 618743df4709Smrg # is EXPORTS), use it as is; otherwise, prepend... 618843df4709Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 618943df4709Smrg cp $export_symbols $output_objdir/$soname.def; 619043df4709Smrg else 619143df4709Smrg echo EXPORTS > $output_objdir/$soname.def; 619243df4709Smrg cat $export_symbols >> $output_objdir/$soname.def; 619343df4709Smrg fi~ 619443df4709Smrg $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' 619568105dcbSveego else 619668105dcbSveego _LT_TAGVAR(ld_shlibs, $1)=no 619768105dcbSveego fi 619868105dcbSveego ;; 619968105dcbSveego esac 620068105dcbSveego ;; 6201ad43ddacSmrg darwin* | rhapsody*) 6202ad43ddacSmrg _LT_DARWIN_LINKER_FEATURES($1) 6203ad43ddacSmrg ;; 6204209ff23fSmrg 6205ad43ddacSmrg dgux*) 6206ad43ddacSmrg case $cc_basename in 6207ad43ddacSmrg ec++*) 6208ad43ddacSmrg # FIXME: insert proper C++ library support 6209ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6210ad43ddacSmrg ;; 6211ad43ddacSmrg ghcx*) 6212ad43ddacSmrg # Green Hills C++ Compiler 6213ad43ddacSmrg # FIXME: insert proper C++ library support 6214ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6215ad43ddacSmrg ;; 6216ad43ddacSmrg *) 6217ad43ddacSmrg # FIXME: insert proper C++ library support 6218ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6219ad43ddacSmrg ;; 6220ad43ddacSmrg esac 6221ad43ddacSmrg ;; 6222209ff23fSmrg 622368105dcbSveego freebsd2.*) 6224ad43ddacSmrg # C++ shared libraries reported to be fairly broken before 6225ad43ddacSmrg # switch to ELF 6226ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6227ad43ddacSmrg ;; 6228209ff23fSmrg 6229ad43ddacSmrg freebsd-elf*) 6230ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6231ad43ddacSmrg ;; 6232209ff23fSmrg 6233ad43ddacSmrg freebsd* | dragonfly*) 6234ad43ddacSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6235ad43ddacSmrg # conventions 6236ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6237ad43ddacSmrg ;; 6238209ff23fSmrg 623943df4709Smrg gnu*) 624043df4709Smrg ;; 624143df4709Smrg 624268105dcbSveego haiku*) 624343df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 624468105dcbSveego _LT_TAGVAR(link_all_deplibs, $1)=yes 624568105dcbSveego ;; 624668105dcbSveego 6247ad43ddacSmrg hpux9*) 624843df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6249ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 625043df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6251ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6252ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6253ad43ddacSmrg # but as the default 6254ad43ddacSmrg # location of the library. 6255ad43ddacSmrg 6256ad43ddacSmrg case $cc_basename in 6257ad43ddacSmrg CC*) 6258ad43ddacSmrg # FIXME: insert proper C++ library support 6259ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6260ad43ddacSmrg ;; 6261ad43ddacSmrg aCC*) 626243df4709Smrg _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' 6263ad43ddacSmrg # Commands to make compiler produce verbose output that lists 6264ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 6265ad43ddacSmrg # linking a shared library. 6266ad43ddacSmrg # 6267ad43ddacSmrg # There doesn't appear to be a way to prevent this compiler from 6268ad43ddacSmrg # explicitly linking system object files so we need to strip them 6269ad43ddacSmrg # from the output so that they don't get included in the library 6270ad43ddacSmrg # dependencies. 627143df4709Smrg 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"' 6272ad43ddacSmrg ;; 6273ad43ddacSmrg *) 627443df4709Smrg if test "$GXX" = yes; then 627543df4709Smrg _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' 6276ad43ddacSmrg else 6277ad43ddacSmrg # FIXME: insert proper C++ library support 6278ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6279ad43ddacSmrg fi 6280ad43ddacSmrg ;; 6281ad43ddacSmrg esac 6282ad43ddacSmrg ;; 6283209ff23fSmrg 6284ad43ddacSmrg hpux10*|hpux11*) 628543df4709Smrg if test $with_gnu_ld = no; then 628643df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6287ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6288ad43ddacSmrg 6289ad43ddacSmrg case $host_cpu in 6290ad43ddacSmrg hppa*64*|ia64*) 6291ad43ddacSmrg ;; 6292ad43ddacSmrg *) 629343df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6294ad43ddacSmrg ;; 6295ad43ddacSmrg esac 6296ad43ddacSmrg fi 6297ad43ddacSmrg case $host_cpu in 6298ad43ddacSmrg hppa*64*|ia64*) 6299ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6300ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6301ad43ddacSmrg ;; 6302ad43ddacSmrg *) 6303ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6304ad43ddacSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6305ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6306ad43ddacSmrg # but as the default 6307ad43ddacSmrg # location of the library. 6308ad43ddacSmrg ;; 6309ad43ddacSmrg esac 6310ad43ddacSmrg 6311ad43ddacSmrg case $cc_basename in 6312ad43ddacSmrg CC*) 6313ad43ddacSmrg # FIXME: insert proper C++ library support 6314ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6315ad43ddacSmrg ;; 6316ad43ddacSmrg aCC*) 6317ad43ddacSmrg case $host_cpu in 6318ad43ddacSmrg hppa*64*) 631943df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6320ad43ddacSmrg ;; 6321ad43ddacSmrg ia64*) 632243df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6323ad43ddacSmrg ;; 6324ad43ddacSmrg *) 632543df4709Smrg _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' 6326ad43ddacSmrg ;; 6327ad43ddacSmrg esac 6328ad43ddacSmrg # Commands to make compiler produce verbose output that lists 6329ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 6330ad43ddacSmrg # linking a shared library. 6331ad43ddacSmrg # 6332ad43ddacSmrg # There doesn't appear to be a way to prevent this compiler from 6333ad43ddacSmrg # explicitly linking system object files so we need to strip them 6334ad43ddacSmrg # from the output so that they don't get included in the library 6335ad43ddacSmrg # dependencies. 633643df4709Smrg 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"' 6337ad43ddacSmrg ;; 6338ad43ddacSmrg *) 633943df4709Smrg if test "$GXX" = yes; then 634043df4709Smrg if test $with_gnu_ld = no; then 6341ad43ddacSmrg case $host_cpu in 6342ad43ddacSmrg hppa*64*) 634343df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6344ad43ddacSmrg ;; 6345ad43ddacSmrg ia64*) 634643df4709Smrg _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' 6347ad43ddacSmrg ;; 6348ad43ddacSmrg *) 634943df4709Smrg _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' 6350ad43ddacSmrg ;; 6351ad43ddacSmrg esac 6352ad43ddacSmrg fi 6353ad43ddacSmrg else 6354ad43ddacSmrg # FIXME: insert proper C++ library support 6355ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6356ad43ddacSmrg fi 6357ad43ddacSmrg ;; 6358ad43ddacSmrg esac 6359ad43ddacSmrg ;; 6360209ff23fSmrg 6361ad43ddacSmrg interix[[3-9]]*) 6362ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6363ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 636443df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 636543df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6366ad43ddacSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6367ad43ddacSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6368ad43ddacSmrg # default) and relocated if they conflict, which is a slow very memory 6369ad43ddacSmrg # consuming and fragmenting process. To avoid this, we pick a random, 6370ad43ddacSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6371ad43ddacSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 637243df4709Smrg _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' 637343df4709Smrg _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' 6374ad43ddacSmrg ;; 6375ad43ddacSmrg irix5* | irix6*) 6376ad43ddacSmrg case $cc_basename in 6377ad43ddacSmrg CC*) 6378ad43ddacSmrg # SGI C++ 637943df4709Smrg _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' 6380ad43ddacSmrg 6381ad43ddacSmrg # Archives containing C++ object files must be created using 6382ad43ddacSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6383ad43ddacSmrg # necessary to make sure instantiated templates are included 6384ad43ddacSmrg # in the archive. 6385ad43ddacSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6386ad43ddacSmrg ;; 6387ad43ddacSmrg *) 638843df4709Smrg if test "$GXX" = yes; then 638943df4709Smrg if test "$with_gnu_ld" = no; then 639043df4709Smrg _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' 6391ad43ddacSmrg else 639243df4709Smrg _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' 6393ad43ddacSmrg fi 6394ad43ddacSmrg fi 6395ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6396ad43ddacSmrg ;; 6397ad43ddacSmrg esac 639843df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6399ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6400ad43ddacSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 6401ad43ddacSmrg ;; 6402209ff23fSmrg 640343df4709Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6404ad43ddacSmrg case $cc_basename in 6405ad43ddacSmrg KCC*) 6406ad43ddacSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6407ad43ddacSmrg 6408ad43ddacSmrg # KCC will only create a shared library if the output file 6409ad43ddacSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6410ad43ddacSmrg # to its proper name (with version) after linking. 641143df4709Smrg _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' 641243df4709Smrg _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' 6413ad43ddacSmrg # Commands to make compiler produce verbose output that lists 6414ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 6415ad43ddacSmrg # linking a shared library. 6416ad43ddacSmrg # 6417ad43ddacSmrg # There doesn't appear to be a way to prevent this compiler from 6418ad43ddacSmrg # explicitly linking system object files so we need to strip them 6419ad43ddacSmrg # from the output so that they don't get included in the library 6420ad43ddacSmrg # dependencies. 642143df4709Smrg 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"' 6422ad43ddacSmrg 642343df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 642443df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6425ad43ddacSmrg 6426ad43ddacSmrg # Archives containing C++ object files must be created using 6427ad43ddacSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6428ad43ddacSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6429ad43ddacSmrg ;; 6430ad43ddacSmrg icpc* | ecpc* ) 6431ad43ddacSmrg # Intel C++ 6432ad43ddacSmrg with_gnu_ld=yes 6433ad43ddacSmrg # version 8.0 and above of icpc choke on multiply defined symbols 6434ad43ddacSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6435ad43ddacSmrg # earlier do not add the objects themselves. 6436ad43ddacSmrg case `$CC -V 2>&1` in 6437ad43ddacSmrg *"Version 7."*) 643843df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 643943df4709Smrg _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' 6440ad43ddacSmrg ;; 6441ad43ddacSmrg *) # Version 8.0 or newer 6442ad43ddacSmrg tmp_idyn= 6443ad43ddacSmrg case $host_cpu in 6444ad43ddacSmrg ia64*) tmp_idyn=' -i_dynamic';; 6445ad43ddacSmrg esac 644643df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 644743df4709Smrg _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' 6448ad43ddacSmrg ;; 6449ad43ddacSmrg esac 6450ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 645143df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 645243df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 645343df4709Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6454ad43ddacSmrg ;; 6455ad43ddacSmrg pgCC* | pgcpp*) 6456ad43ddacSmrg # Portland Group C++ compiler 6457ad43ddacSmrg case `$CC -V` in 645868105dcbSveego *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6459ad43ddacSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 646043df4709Smrg rm -rf $tpldir~ 646143df4709Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 646243df4709Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6463ad43ddacSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 646443df4709Smrg rm -rf $tpldir~ 646543df4709Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 646643df4709Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 646743df4709Smrg $RANLIB $oldlib' 6468ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 646943df4709Smrg rm -rf $tpldir~ 647043df4709Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 647143df4709Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6472ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 647343df4709Smrg rm -rf $tpldir~ 647443df4709Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 647543df4709Smrg $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' 6476ad43ddacSmrg ;; 647768105dcbSveego *) # Version 6 and above use weak symbols 647843df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 647943df4709Smrg _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' 6480ad43ddacSmrg ;; 6481ad43ddacSmrg esac 6482209ff23fSmrg 648343df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 648443df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 648543df4709Smrg _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' 6486ad43ddacSmrg ;; 6487ad43ddacSmrg cxx*) 6488ad43ddacSmrg # Compaq C++ 648943df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 649043df4709Smrg _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' 6491209ff23fSmrg 6492ad43ddacSmrg runpath_var=LD_RUN_PATH 6493ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6494ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6495209ff23fSmrg 6496ad43ddacSmrg # Commands to make compiler produce verbose output that lists 6497ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 6498ad43ddacSmrg # linking a shared library. 6499ad43ddacSmrg # 6500ad43ddacSmrg # There doesn't appear to be a way to prevent this compiler from 6501ad43ddacSmrg # explicitly linking system object files so we need to strip them 6502ad43ddacSmrg # from the output so that they don't get included in the library 6503ad43ddacSmrg # dependencies. 650443df4709Smrg 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' 6505ad43ddacSmrg ;; 650668105dcbSveego xl* | mpixl* | bgxl*) 6507ad43ddacSmrg # IBM XL 8.0 on PPC, with GNU ld 650843df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 650943df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 651043df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 651143df4709Smrg if test "x$supports_anon_versioning" = xyes; then 6512ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 651343df4709Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 651443df4709Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 651543df4709Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6516ad43ddacSmrg fi 6517ad43ddacSmrg ;; 6518ad43ddacSmrg *) 6519ad43ddacSmrg case `$CC -V 2>&1 | sed 5q` in 6520ad43ddacSmrg *Sun\ C*) 6521ad43ddacSmrg # Sun C++ 5.9 6522ad43ddacSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 652343df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 652443df4709Smrg _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' 6525ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 652643df4709Smrg _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' 6527ad43ddacSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6528ad43ddacSmrg 6529ad43ddacSmrg # Not sure whether something based on 6530ad43ddacSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6531ad43ddacSmrg # would be better. 653268105dcbSveego output_verbose_link_cmd='func_echo_all' 6533ad43ddacSmrg 6534ad43ddacSmrg # Archives containing C++ object files must be created using 6535ad43ddacSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6536ad43ddacSmrg # necessary to make sure instantiated templates are included 6537ad43ddacSmrg # in the archive. 6538ad43ddacSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6539ad43ddacSmrg ;; 6540ad43ddacSmrg esac 6541ad43ddacSmrg ;; 6542ad43ddacSmrg esac 6543ad43ddacSmrg ;; 6544209ff23fSmrg 6545ad43ddacSmrg lynxos*) 6546ad43ddacSmrg # FIXME: insert proper C++ library support 6547ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6548ad43ddacSmrg ;; 6549209ff23fSmrg 6550ad43ddacSmrg m88k*) 6551ad43ddacSmrg # FIXME: insert proper C++ library support 6552ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6553ad43ddacSmrg ;; 6554209ff23fSmrg 6555ad43ddacSmrg mvs*) 6556ad43ddacSmrg case $cc_basename in 6557ad43ddacSmrg cxx*) 6558ad43ddacSmrg # FIXME: insert proper C++ library support 6559ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6560ad43ddacSmrg ;; 6561ad43ddacSmrg *) 6562ad43ddacSmrg # FIXME: insert proper C++ library support 6563ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6564ad43ddacSmrg ;; 6565ad43ddacSmrg esac 6566ad43ddacSmrg ;; 6567209ff23fSmrg 6568ad43ddacSmrg netbsd*) 6569ad43ddacSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6570ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6571ad43ddacSmrg wlarc= 6572ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6573ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6574ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6575ad43ddacSmrg fi 6576ad43ddacSmrg # Workaround some broken pre-1.5 toolchains 6577ad43ddacSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6578ad43ddacSmrg ;; 6579209ff23fSmrg 6580ad43ddacSmrg *nto* | *qnx*) 6581ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6582ad43ddacSmrg ;; 6583209ff23fSmrg 658443df4709Smrg openbsd2*) 658543df4709Smrg # C++ shared libraries are fairly broken 658643df4709Smrg _LT_TAGVAR(ld_shlibs, $1)=no 658743df4709Smrg ;; 658843df4709Smrg 658943df4709Smrg openbsd*) 6590ad43ddacSmrg if test -f /usr/libexec/ld.so; then 6591ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6592ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6593ad43ddacSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6594ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 659543df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 659643df4709Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 659743df4709Smrg _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' 659843df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 659943df4709Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6600ad43ddacSmrg fi 660168105dcbSveego output_verbose_link_cmd=func_echo_all 6602ad43ddacSmrg else 6603ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6604ad43ddacSmrg fi 6605ad43ddacSmrg ;; 6606209ff23fSmrg 6607ad43ddacSmrg osf3* | osf4* | osf5*) 6608ad43ddacSmrg case $cc_basename in 6609ad43ddacSmrg KCC*) 6610ad43ddacSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6611ad43ddacSmrg 6612ad43ddacSmrg # KCC will only create a shared library if the output file 6613ad43ddacSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6614ad43ddacSmrg # to its proper name (with version) after linking. 661543df4709Smrg _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' 6616ad43ddacSmrg 661743df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6618ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6619ad43ddacSmrg 6620ad43ddacSmrg # Archives containing C++ object files must be created using 6621ad43ddacSmrg # the KAI C++ compiler. 6622ad43ddacSmrg case $host in 6623ad43ddacSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6624ad43ddacSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6625ad43ddacSmrg esac 6626ad43ddacSmrg ;; 6627ad43ddacSmrg RCC*) 6628ad43ddacSmrg # Rational C++ 2.4.1 6629ad43ddacSmrg # FIXME: insert proper C++ library support 6630ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6631ad43ddacSmrg ;; 6632ad43ddacSmrg cxx*) 6633ad43ddacSmrg case $host in 6634ad43ddacSmrg osf3*) 663543df4709Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 663643df4709Smrg _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' 663743df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6638ad43ddacSmrg ;; 6639ad43ddacSmrg *) 6640ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 664143df4709Smrg _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' 6642ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 664343df4709Smrg echo "-hidden">> $lib.exp~ 664443df4709Smrg $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~ 664543df4709Smrg $RM $lib.exp' 6646ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6647ad43ddacSmrg ;; 6648ad43ddacSmrg esac 6649209ff23fSmrg 6650ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6651209ff23fSmrg 6652ad43ddacSmrg # Commands to make compiler produce verbose output that lists 6653ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 6654ad43ddacSmrg # linking a shared library. 6655ad43ddacSmrg # 6656ad43ddacSmrg # There doesn't appear to be a way to prevent this compiler from 6657ad43ddacSmrg # explicitly linking system object files so we need to strip them 6658ad43ddacSmrg # from the output so that they don't get included in the library 6659ad43ddacSmrg # dependencies. 666043df4709Smrg 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"' 6661ad43ddacSmrg ;; 6662ad43ddacSmrg *) 666343df4709Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 666443df4709Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6665ad43ddacSmrg case $host in 6666ad43ddacSmrg osf3*) 666743df4709Smrg _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' 6668ad43ddacSmrg ;; 6669ad43ddacSmrg *) 667043df4709Smrg _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' 6671ad43ddacSmrg ;; 6672ad43ddacSmrg esac 6673ad43ddacSmrg 667443df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6675ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6676ad43ddacSmrg 6677ad43ddacSmrg # Commands to make compiler produce verbose output that lists 6678ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 6679ad43ddacSmrg # linking a shared library. 668068105dcbSveego output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6681ad43ddacSmrg 6682ad43ddacSmrg else 6683ad43ddacSmrg # FIXME: insert proper C++ library support 6684ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6685ad43ddacSmrg fi 6686ad43ddacSmrg ;; 6687ad43ddacSmrg esac 6688ad43ddacSmrg ;; 6689209ff23fSmrg 6690ad43ddacSmrg psos*) 6691ad43ddacSmrg # FIXME: insert proper C++ library support 6692ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6693ad43ddacSmrg ;; 6694209ff23fSmrg 6695ad43ddacSmrg sunos4*) 6696ad43ddacSmrg case $cc_basename in 6697ad43ddacSmrg CC*) 6698ad43ddacSmrg # Sun C++ 4.x 6699ad43ddacSmrg # FIXME: insert proper C++ library support 6700ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6701ad43ddacSmrg ;; 6702ad43ddacSmrg lcc*) 6703ad43ddacSmrg # Lucid 6704ad43ddacSmrg # FIXME: insert proper C++ library support 6705ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6706ad43ddacSmrg ;; 6707ad43ddacSmrg *) 6708ad43ddacSmrg # FIXME: insert proper C++ library support 6709ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6710ad43ddacSmrg ;; 6711ad43ddacSmrg esac 6712ad43ddacSmrg ;; 6713209ff23fSmrg 6714ad43ddacSmrg solaris*) 6715ad43ddacSmrg case $cc_basename in 671668105dcbSveego CC* | sunCC*) 6717ad43ddacSmrg # Sun C++ 4.2, 5.x and Centerline C++ 6718ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6719ad43ddacSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 672043df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6721ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 672243df4709Smrg $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' 6723ad43ddacSmrg 6724ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6725ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6726ad43ddacSmrg case $host_os in 6727ad43ddacSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6728ad43ddacSmrg *) 6729ad43ddacSmrg # The compiler driver will combine and reorder linker options, 673043df4709Smrg # but understands `-z linker_flag'. 6731ad43ddacSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6732ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6733ad43ddacSmrg ;; 6734ad43ddacSmrg esac 6735ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6736209ff23fSmrg 673768105dcbSveego output_verbose_link_cmd='func_echo_all' 6738209ff23fSmrg 6739ad43ddacSmrg # Archives containing C++ object files must be created using 6740ad43ddacSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6741ad43ddacSmrg # necessary to make sure instantiated templates are included 6742ad43ddacSmrg # in the archive. 6743ad43ddacSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6744ad43ddacSmrg ;; 6745ad43ddacSmrg gcx*) 6746ad43ddacSmrg # Green Hills C++ Compiler 674743df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6748209ff23fSmrg 6749ad43ddacSmrg # The C++ compiler must be used to create the archive. 6750ad43ddacSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6751ad43ddacSmrg ;; 6752ad43ddacSmrg *) 6753ad43ddacSmrg # GNU C++ compiler with Solaris linker 675443df4709Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 675543df4709Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6756ad43ddacSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 675743df4709Smrg _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' 6758ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 675943df4709Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6760ad43ddacSmrg 6761ad43ddacSmrg # Commands to make compiler produce verbose output that lists 6762ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 6763ad43ddacSmrg # linking a shared library. 676468105dcbSveego output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6765ad43ddacSmrg else 676643df4709Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6767ad43ddacSmrg # platform. 676843df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6769ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 677043df4709Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6771ad43ddacSmrg 6772ad43ddacSmrg # Commands to make compiler produce verbose output that lists 6773ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 6774ad43ddacSmrg # linking a shared library. 677568105dcbSveego output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6776ad43ddacSmrg fi 6777ad43ddacSmrg 677843df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6779ad43ddacSmrg case $host_os in 6780ad43ddacSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6781ad43ddacSmrg *) 678243df4709Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6783ad43ddacSmrg ;; 6784ad43ddacSmrg esac 6785ad43ddacSmrg fi 6786ad43ddacSmrg ;; 6787ad43ddacSmrg esac 6788ad43ddacSmrg ;; 6789209ff23fSmrg 6790ad43ddacSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 679143df4709Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6792ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6793ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6794ad43ddacSmrg runpath_var='LD_RUN_PATH' 6795209ff23fSmrg 6796ad43ddacSmrg case $cc_basename in 6797ad43ddacSmrg CC*) 679843df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 679943df4709Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6800ad43ddacSmrg ;; 6801ad43ddacSmrg *) 680243df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 680343df4709Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6804ad43ddacSmrg ;; 6805ad43ddacSmrg esac 6806ad43ddacSmrg ;; 6807209ff23fSmrg 6808ad43ddacSmrg sysv5* | sco3.2v5* | sco5v6*) 680943df4709Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6810ad43ddacSmrg # link with -lc, and that would cause any symbols used from libc to 6811ad43ddacSmrg # always be unresolved, which means just about no library would 6812ad43ddacSmrg # ever link correctly. If we're not using GNU ld we use -z text 6813ad43ddacSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6814ad43ddacSmrg # as -z defs. 681543df4709Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 681643df4709Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6817ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6818ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 681943df4709Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6820ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6821ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 682243df4709Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6823ad43ddacSmrg runpath_var='LD_RUN_PATH' 6824209ff23fSmrg 6825ad43ddacSmrg case $cc_basename in 6826ad43ddacSmrg CC*) 682743df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 682843df4709Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 682968105dcbSveego _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 683043df4709Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 683168105dcbSveego _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 683243df4709Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 6833ad43ddacSmrg ;; 6834ad43ddacSmrg *) 683543df4709Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 683643df4709Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6837ad43ddacSmrg ;; 6838ad43ddacSmrg esac 6839ad43ddacSmrg ;; 6840209ff23fSmrg 6841ad43ddacSmrg tandem*) 6842ad43ddacSmrg case $cc_basename in 6843ad43ddacSmrg NCC*) 6844ad43ddacSmrg # NonStop-UX NCC 3.20 6845ad43ddacSmrg # FIXME: insert proper C++ library support 6846ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6847ad43ddacSmrg ;; 6848ad43ddacSmrg *) 6849ad43ddacSmrg # FIXME: insert proper C++ library support 6850ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6851ad43ddacSmrg ;; 6852ad43ddacSmrg esac 6853ad43ddacSmrg ;; 6854209ff23fSmrg 6855ad43ddacSmrg vxworks*) 6856ad43ddacSmrg # FIXME: insert proper C++ library support 6857ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6858ad43ddacSmrg ;; 6859209ff23fSmrg 6860ad43ddacSmrg *) 6861ad43ddacSmrg # FIXME: insert proper C++ library support 6862ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6863ad43ddacSmrg ;; 6864ad43ddacSmrg esac 6865209ff23fSmrg 6866ad43ddacSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 686743df4709Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6868ad43ddacSmrg 686943df4709Smrg _LT_TAGVAR(GCC, $1)="$GXX" 687043df4709Smrg _LT_TAGVAR(LD, $1)="$LD" 6871ad43ddacSmrg 6872ad43ddacSmrg ## CAVEAT EMPTOR: 6873ad43ddacSmrg ## There is no encapsulation within the following macros, do not change 6874ad43ddacSmrg ## the running order or otherwise move them around unless you know exactly 6875ad43ddacSmrg ## what you are doing... 6876ad43ddacSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 6877ad43ddacSmrg _LT_COMPILER_PIC($1) 6878ad43ddacSmrg _LT_COMPILER_C_O($1) 6879ad43ddacSmrg _LT_COMPILER_FILE_LOCKS($1) 6880ad43ddacSmrg _LT_LINKER_SHLIBS($1) 6881ad43ddacSmrg _LT_SYS_DYNAMIC_LINKER($1) 6882ad43ddacSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6883ad43ddacSmrg 6884ad43ddacSmrg _LT_CONFIG($1) 6885ad43ddacSmrg fi # test -n "$compiler" 6886ad43ddacSmrg 6887ad43ddacSmrg CC=$lt_save_CC 688868105dcbSveego CFLAGS=$lt_save_CFLAGS 6889ad43ddacSmrg LDCXX=$LD 6890ad43ddacSmrg LD=$lt_save_LD 6891ad43ddacSmrg GCC=$lt_save_GCC 6892ad43ddacSmrg with_gnu_ld=$lt_save_with_gnu_ld 6893ad43ddacSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 6894ad43ddacSmrg lt_cv_path_LD=$lt_save_path_LD 6895ad43ddacSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6896ad43ddacSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 689743df4709Smrgfi # test "$_lt_caught_CXX_error" != yes 6898209ff23fSmrg 6899ad43ddacSmrgAC_LANG_POP 6900ad43ddacSmrg])# _LT_LANG_CXX_CONFIG 6901209ff23fSmrg 6902209ff23fSmrg 690368105dcbSveego# _LT_FUNC_STRIPNAME_CNF 690468105dcbSveego# ---------------------- 690568105dcbSveego# func_stripname_cnf prefix suffix name 690668105dcbSveego# strip PREFIX and SUFFIX off of NAME. 690768105dcbSveego# PREFIX and SUFFIX must not contain globbing or regex special 690868105dcbSveego# characters, hashes, percent signs, but SUFFIX may contain a leading 690968105dcbSveego# dot (in which case that matches only a dot). 691068105dcbSveego# 691168105dcbSveego# This function is identical to the (non-XSI) version of func_stripname, 691268105dcbSveego# except this one can be used by m4 code that may be executed by configure, 691368105dcbSveego# rather than the libtool script. 691468105dcbSveegom4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 691568105dcbSveegoAC_REQUIRE([_LT_DECL_SED]) 691668105dcbSveegoAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 691768105dcbSveegofunc_stripname_cnf () 691868105dcbSveego{ 691943df4709Smrg case ${2} in 692043df4709Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 692143df4709Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 692268105dcbSveego esac 692368105dcbSveego} # func_stripname_cnf 692468105dcbSveego])# _LT_FUNC_STRIPNAME_CNF 692568105dcbSveego 6926ad43ddacSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6927ad43ddacSmrg# --------------------------------- 6928ad43ddacSmrg# Figure out "hidden" library dependencies from verbose 6929ad43ddacSmrg# compiler output when linking a shared library. 6930ad43ddacSmrg# Parse the compiler output and extract the necessary 6931ad43ddacSmrg# objects, libraries and library flags. 6932ad43ddacSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6933ad43ddacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 693468105dcbSveegoAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6935ad43ddacSmrg# Dependencies to place before and after the object being linked: 6936ad43ddacSmrg_LT_TAGVAR(predep_objects, $1)= 6937ad43ddacSmrg_LT_TAGVAR(postdep_objects, $1)= 6938ad43ddacSmrg_LT_TAGVAR(predeps, $1)= 6939ad43ddacSmrg_LT_TAGVAR(postdeps, $1)= 6940ad43ddacSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6941209ff23fSmrg 6942ad43ddacSmrgdnl we can't use the lt_simple_compile_test_code here, 6943ad43ddacSmrgdnl because it contains code intended for an executable, 6944ad43ddacSmrgdnl not a library. It's possible we should let each 6945ad43ddacSmrgdnl tag define a new lt_????_link_test_code variable, 6946ad43ddacSmrgdnl but it's only used here... 6947ad43ddacSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6948ad43ddacSmrgint a; 6949ad43ddacSmrgvoid foo (void) { a = 0; } 6950ad43ddacSmrg_LT_EOF 6951ad43ddacSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6952ad43ddacSmrgclass Foo 6953ad43ddacSmrg{ 6954ad43ddacSmrgpublic: 6955ad43ddacSmrg Foo (void) { a = 0; } 6956ad43ddacSmrgprivate: 6957ad43ddacSmrg int a; 6958ad43ddacSmrg}; 6959ad43ddacSmrg_LT_EOF 6960ad43ddacSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6961ad43ddacSmrg subroutine foo 6962ad43ddacSmrg implicit none 6963ad43ddacSmrg integer*4 a 6964ad43ddacSmrg a=0 6965ad43ddacSmrg return 6966ad43ddacSmrg end 6967ad43ddacSmrg_LT_EOF 6968ad43ddacSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6969ad43ddacSmrg subroutine foo 6970ad43ddacSmrg implicit none 6971ad43ddacSmrg integer a 6972ad43ddacSmrg a=0 6973ad43ddacSmrg return 6974ad43ddacSmrg end 6975ad43ddacSmrg_LT_EOF 6976ad43ddacSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6977ad43ddacSmrgpublic class foo { 6978ad43ddacSmrg private int a; 6979ad43ddacSmrg public void bar (void) { 6980ad43ddacSmrg a = 0; 6981ad43ddacSmrg } 6982ad43ddacSmrg}; 6983ad43ddacSmrg_LT_EOF 698468105dcbSveego], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 698568105dcbSveegopackage foo 698668105dcbSveegofunc foo() { 698768105dcbSveego} 698868105dcbSveego_LT_EOF 6989209ff23fSmrg]) 699068105dcbSveego 699168105dcbSveego_lt_libdeps_save_CFLAGS=$CFLAGS 699268105dcbSveegocase "$CC $CFLAGS " in #( 699368105dcbSveego*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 699468105dcbSveego*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 699568105dcbSveego*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 699668105dcbSveegoesac 699768105dcbSveego 6998ad43ddacSmrgdnl Parse the compiler output and extract the necessary 6999ad43ddacSmrgdnl objects, libraries and library flags. 7000ad43ddacSmrgif AC_TRY_EVAL(ac_compile); then 7001ad43ddacSmrg # Parse the compiler output and extract the necessary 7002ad43ddacSmrg # objects, libraries and library flags. 7003209ff23fSmrg 7004ad43ddacSmrg # Sentinel used to keep track of whether or not we are before 7005ad43ddacSmrg # the conftest object file. 7006ad43ddacSmrg pre_test_object_deps_done=no 7007209ff23fSmrg 7008ad43ddacSmrg for p in `eval "$output_verbose_link_cmd"`; do 700943df4709Smrg case ${prev}${p} in 7010209ff23fSmrg 7011ad43ddacSmrg -L* | -R* | -l*) 7012ad43ddacSmrg # Some compilers place space between "-{L,R}" and the path. 7013ad43ddacSmrg # Remove the space. 701443df4709Smrg if test $p = "-L" || 701543df4709Smrg test $p = "-R"; then 7016ad43ddacSmrg prev=$p 7017ad43ddacSmrg continue 7018ad43ddacSmrg fi 7019209ff23fSmrg 702068105dcbSveego # Expand the sysroot to ease extracting the directories later. 702168105dcbSveego if test -z "$prev"; then 702268105dcbSveego case $p in 702368105dcbSveego -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 702468105dcbSveego -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 702568105dcbSveego -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 702668105dcbSveego esac 702768105dcbSveego fi 702868105dcbSveego case $p in 702968105dcbSveego =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 703068105dcbSveego esac 703143df4709Smrg if test "$pre_test_object_deps_done" = no; then 703243df4709Smrg case ${prev} in 703368105dcbSveego -L | -R) 7034ad43ddacSmrg # Internal compiler library paths should come after those 7035ad43ddacSmrg # provided the user. The postdeps already come after the 7036ad43ddacSmrg # user supplied libs so there is no need to process them. 7037ad43ddacSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 703843df4709Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 7039ad43ddacSmrg else 704043df4709Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 7041ad43ddacSmrg fi 7042ad43ddacSmrg ;; 7043ad43ddacSmrg # The "-l" case would never come before the object being 7044ad43ddacSmrg # linked, so don't bother handling this case. 7045ad43ddacSmrg esac 7046ad43ddacSmrg else 7047ad43ddacSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 704843df4709Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 7049ad43ddacSmrg else 705043df4709Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 7051ad43ddacSmrg fi 7052ad43ddacSmrg fi 705368105dcbSveego prev= 7054ad43ddacSmrg ;; 7055209ff23fSmrg 705668105dcbSveego *.lto.$objext) ;; # Ignore GCC LTO objects 7057ad43ddacSmrg *.$objext) 7058ad43ddacSmrg # This assumes that the test object file only shows up 7059ad43ddacSmrg # once in the compiler output. 7060ad43ddacSmrg if test "$p" = "conftest.$objext"; then 7061ad43ddacSmrg pre_test_object_deps_done=yes 7062ad43ddacSmrg continue 7063ad43ddacSmrg fi 7064209ff23fSmrg 706543df4709Smrg if test "$pre_test_object_deps_done" = no; then 7066ad43ddacSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 706743df4709Smrg _LT_TAGVAR(predep_objects, $1)="$p" 7068ad43ddacSmrg else 7069ad43ddacSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7070ad43ddacSmrg fi 7071ad43ddacSmrg else 7072ad43ddacSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 707343df4709Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 7074ad43ddacSmrg else 7075ad43ddacSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7076ad43ddacSmrg fi 7077ad43ddacSmrg fi 7078ad43ddacSmrg ;; 7079209ff23fSmrg 7080ad43ddacSmrg *) ;; # Ignore the rest. 7081209ff23fSmrg 7082ad43ddacSmrg esac 7083ad43ddacSmrg done 7084209ff23fSmrg 7085ad43ddacSmrg # Clean up. 7086ad43ddacSmrg rm -f a.out a.exe 7087ad43ddacSmrgelse 7088ad43ddacSmrg echo "libtool.m4: error: problem compiling $1 test program" 7089ad43ddacSmrgfi 7090209ff23fSmrg 7091ad43ddacSmrg$RM -f confest.$objext 709268105dcbSveegoCFLAGS=$_lt_libdeps_save_CFLAGS 7093209ff23fSmrg 7094ad43ddacSmrg# PORTME: override above test on systems where it is broken 7095ad43ddacSmrgm4_if([$1], [CXX], 7096ad43ddacSmrg[case $host_os in 7097ad43ddacSmrginterix[[3-9]]*) 7098ad43ddacSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7099ad43ddacSmrg # hack all around it, let's just trust "g++" to DTRT. 7100ad43ddacSmrg _LT_TAGVAR(predep_objects,$1)= 7101ad43ddacSmrg _LT_TAGVAR(postdep_objects,$1)= 7102ad43ddacSmrg _LT_TAGVAR(postdeps,$1)= 7103209ff23fSmrg ;; 710443df4709Smrg 710543df4709Smrglinux*) 710643df4709Smrg case `$CC -V 2>&1 | sed 5q` in 710743df4709Smrg *Sun\ C*) 710843df4709Smrg # Sun C++ 5.9 710943df4709Smrg 711043df4709Smrg # The more standards-conforming stlport4 library is 711143df4709Smrg # incompatible with the Cstd library. Avoid specifying 711243df4709Smrg # it if it's in CXXFLAGS. Ignore libCrun as 711343df4709Smrg # -library=stlport4 depends on it. 711443df4709Smrg case " $CXX $CXXFLAGS " in 711543df4709Smrg *" -library=stlport4 "*) 711643df4709Smrg solaris_use_stlport4=yes 711743df4709Smrg ;; 711843df4709Smrg esac 711943df4709Smrg 712043df4709Smrg if test "$solaris_use_stlport4" != yes; then 712143df4709Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 712243df4709Smrg fi 712343df4709Smrg ;; 712443df4709Smrg esac 712543df4709Smrg ;; 712643df4709Smrg 712743df4709Smrgsolaris*) 712843df4709Smrg case $cc_basename in 712943df4709Smrg CC* | sunCC*) 713043df4709Smrg # The more standards-conforming stlport4 library is 713143df4709Smrg # incompatible with the Cstd library. Avoid specifying 713243df4709Smrg # it if it's in CXXFLAGS. Ignore libCrun as 713343df4709Smrg # -library=stlport4 depends on it. 713443df4709Smrg case " $CXX $CXXFLAGS " in 713543df4709Smrg *" -library=stlport4 "*) 713643df4709Smrg solaris_use_stlport4=yes 713743df4709Smrg ;; 713843df4709Smrg esac 713943df4709Smrg 714043df4709Smrg # Adding this requires a known-good setup of shared libraries for 714143df4709Smrg # Sun compiler versions before 5.6, else PIC objects from an old 714243df4709Smrg # archive will be linked into the output, leading to subtle bugs. 714343df4709Smrg if test "$solaris_use_stlport4" != yes; then 714443df4709Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 714543df4709Smrg fi 714643df4709Smrg ;; 714743df4709Smrg esac 714843df4709Smrg ;; 7149209ff23fSmrgesac 7150ad43ddacSmrg]) 7151209ff23fSmrg 7152ad43ddacSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 7153ad43ddacSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7154209ff23fSmrgesac 7155ad43ddacSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7156ad43ddacSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 715743df4709Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7158ad43ddacSmrgfi 7159ad43ddacSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7160ad43ddacSmrg [The directories searched by this compiler when creating a shared library]) 7161ad43ddacSmrg_LT_TAGDECL([], [predep_objects], [1], 7162ad43ddacSmrg [Dependencies to place before and after the objects being linked to 7163ad43ddacSmrg create a shared library]) 7164ad43ddacSmrg_LT_TAGDECL([], [postdep_objects], [1]) 7165ad43ddacSmrg_LT_TAGDECL([], [predeps], [1]) 7166ad43ddacSmrg_LT_TAGDECL([], [postdeps], [1]) 7167ad43ddacSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7168ad43ddacSmrg [The library search path used internally by the compiler when linking 7169ad43ddacSmrg a shared library]) 7170ad43ddacSmrg])# _LT_SYS_HIDDEN_LIBDEPS 7171ad43ddacSmrg 7172ad43ddacSmrg 7173ad43ddacSmrg# _LT_LANG_F77_CONFIG([TAG]) 7174ad43ddacSmrg# -------------------------- 7175ad43ddacSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 7176ad43ddacSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 717743df4709Smrg# to write the compiler configuration to `libtool'. 7178ad43ddacSmrgm4_defun([_LT_LANG_F77_CONFIG], 717968105dcbSveego[AC_LANG_PUSH(Fortran 77) 718043df4709Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 718168105dcbSveego _lt_disable_F77=yes 718268105dcbSveegofi 7183209ff23fSmrg 7184ad43ddacSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7185ad43ddacSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7186ad43ddacSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7187ad43ddacSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7188ad43ddacSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7189ad43ddacSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7190ad43ddacSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7191ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7192ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7193ad43ddacSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7194ad43ddacSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7195ad43ddacSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7196ad43ddacSmrg_LT_TAGVAR(module_cmds, $1)= 7197ad43ddacSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7198ad43ddacSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7199ad43ddacSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 720068105dcbSveego_LT_TAGVAR(reload_flag, $1)=$reload_flag 720168105dcbSveego_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7202ad43ddacSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7203ad43ddacSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7204ad43ddacSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7205209ff23fSmrg 7206ad43ddacSmrg# Source file extension for f77 test sources. 7207ad43ddacSmrgac_ext=f 7208209ff23fSmrg 7209ad43ddacSmrg# Object file extension for compiled f77 test sources. 7210ad43ddacSmrgobjext=o 7211ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext 7212ad43ddacSmrg 7213ad43ddacSmrg# No sense in running all these tests if we already determined that 7214ad43ddacSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 7215ad43ddacSmrg# are currently assumed to apply to all compilers on this platform, 7216ad43ddacSmrg# and will be corrupted by setting them based on a non-working compiler. 721743df4709Smrgif test "$_lt_disable_F77" != yes; then 7218ad43ddacSmrg # Code to be used in simple compile tests 7219ad43ddacSmrg lt_simple_compile_test_code="\ 7220ad43ddacSmrg subroutine t 7221ad43ddacSmrg return 7222ad43ddacSmrg end 7223ad43ddacSmrg" 7224209ff23fSmrg 7225ad43ddacSmrg # Code to be used in simple link tests 7226ad43ddacSmrg lt_simple_link_test_code="\ 7227ad43ddacSmrg program t 7228ad43ddacSmrg end 7229ad43ddacSmrg" 7230209ff23fSmrg 7231ad43ddacSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7232ad43ddacSmrg _LT_TAG_COMPILER 7233209ff23fSmrg 7234ad43ddacSmrg # save warnings/boilerplate of simple test code 7235ad43ddacSmrg _LT_COMPILER_BOILERPLATE 7236ad43ddacSmrg _LT_LINKER_BOILERPLATE 7237209ff23fSmrg 7238ad43ddacSmrg # Allow CC to be a program name with arguments. 723943df4709Smrg lt_save_CC="$CC" 7240ad43ddacSmrg lt_save_GCC=$GCC 724168105dcbSveego lt_save_CFLAGS=$CFLAGS 7242ad43ddacSmrg CC=${F77-"f77"} 724368105dcbSveego CFLAGS=$FFLAGS 7244ad43ddacSmrg compiler=$CC 7245ad43ddacSmrg _LT_TAGVAR(compiler, $1)=$CC 7246ad43ddacSmrg _LT_CC_BASENAME([$compiler]) 7247ad43ddacSmrg GCC=$G77 7248ad43ddacSmrg if test -n "$compiler"; then 7249ad43ddacSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7250ad43ddacSmrg AC_MSG_RESULT([$can_build_shared]) 7251209ff23fSmrg 7252ad43ddacSmrg AC_MSG_CHECKING([whether to build shared libraries]) 725343df4709Smrg test "$can_build_shared" = "no" && enable_shared=no 7254ad43ddacSmrg 7255ad43ddacSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7256ad43ddacSmrg # are all built from PIC. 7257ad43ddacSmrg case $host_os in 7258ad43ddacSmrg aix3*) 725943df4709Smrg test "$enable_shared" = yes && enable_static=no 7260ad43ddacSmrg if test -n "$RANLIB"; then 7261ad43ddacSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7262ad43ddacSmrg postinstall_cmds='$RANLIB $lib' 7263ad43ddacSmrg fi 7264ad43ddacSmrg ;; 7265ad43ddacSmrg aix[[4-9]]*) 726643df4709Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 726743df4709Smrg test "$enable_shared" = yes && enable_static=no 7268209ff23fSmrg fi 7269ad43ddacSmrg ;; 7270ad43ddacSmrg esac 7271ad43ddacSmrg AC_MSG_RESULT([$enable_shared]) 7272ad43ddacSmrg 7273ad43ddacSmrg AC_MSG_CHECKING([whether to build static libraries]) 7274ad43ddacSmrg # Make sure either enable_shared or enable_static is yes. 727543df4709Smrg test "$enable_shared" = yes || enable_static=yes 7276ad43ddacSmrg AC_MSG_RESULT([$enable_static]) 7277ad43ddacSmrg 727843df4709Smrg _LT_TAGVAR(GCC, $1)="$G77" 727943df4709Smrg _LT_TAGVAR(LD, $1)="$LD" 7280ad43ddacSmrg 7281ad43ddacSmrg ## CAVEAT EMPTOR: 7282ad43ddacSmrg ## There is no encapsulation within the following macros, do not change 7283ad43ddacSmrg ## the running order or otherwise move them around unless you know exactly 7284ad43ddacSmrg ## what you are doing... 7285ad43ddacSmrg _LT_COMPILER_PIC($1) 7286ad43ddacSmrg _LT_COMPILER_C_O($1) 7287ad43ddacSmrg _LT_COMPILER_FILE_LOCKS($1) 7288ad43ddacSmrg _LT_LINKER_SHLIBS($1) 7289ad43ddacSmrg _LT_SYS_DYNAMIC_LINKER($1) 7290ad43ddacSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7291ad43ddacSmrg 7292ad43ddacSmrg _LT_CONFIG($1) 7293ad43ddacSmrg fi # test -n "$compiler" 7294ad43ddacSmrg 7295ad43ddacSmrg GCC=$lt_save_GCC 729643df4709Smrg CC="$lt_save_CC" 729743df4709Smrg CFLAGS="$lt_save_CFLAGS" 729843df4709Smrgfi # test "$_lt_disable_F77" != yes 7299209ff23fSmrg 7300ad43ddacSmrgAC_LANG_POP 7301ad43ddacSmrg])# _LT_LANG_F77_CONFIG 7302ad43ddacSmrg 7303ad43ddacSmrg 7304ad43ddacSmrg# _LT_LANG_FC_CONFIG([TAG]) 7305ad43ddacSmrg# ------------------------- 7306ad43ddacSmrg# Ensure that the configuration variables for a Fortran compiler are 7307ad43ddacSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 730843df4709Smrg# to write the compiler configuration to `libtool'. 7309ad43ddacSmrgm4_defun([_LT_LANG_FC_CONFIG], 731068105dcbSveego[AC_LANG_PUSH(Fortran) 731168105dcbSveego 731243df4709Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 731368105dcbSveego _lt_disable_FC=yes 731468105dcbSveegofi 7315ad43ddacSmrg 7316ad43ddacSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7317ad43ddacSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7318ad43ddacSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7319ad43ddacSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7320ad43ddacSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7321ad43ddacSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7322ad43ddacSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7323ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7324ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7325ad43ddacSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7326ad43ddacSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7327ad43ddacSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7328ad43ddacSmrg_LT_TAGVAR(module_cmds, $1)= 7329ad43ddacSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7330ad43ddacSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7331ad43ddacSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 733268105dcbSveego_LT_TAGVAR(reload_flag, $1)=$reload_flag 733368105dcbSveego_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7334ad43ddacSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7335ad43ddacSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7336ad43ddacSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7337ad43ddacSmrg 7338ad43ddacSmrg# Source file extension for fc test sources. 7339ad43ddacSmrgac_ext=${ac_fc_srcext-f} 7340ad43ddacSmrg 7341ad43ddacSmrg# Object file extension for compiled fc test sources. 7342ad43ddacSmrgobjext=o 7343ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext 7344ad43ddacSmrg 7345ad43ddacSmrg# No sense in running all these tests if we already determined that 7346ad43ddacSmrg# the FC compiler isn't working. Some variables (like enable_shared) 7347ad43ddacSmrg# are currently assumed to apply to all compilers on this platform, 7348ad43ddacSmrg# and will be corrupted by setting them based on a non-working compiler. 734943df4709Smrgif test "$_lt_disable_FC" != yes; then 7350ad43ddacSmrg # Code to be used in simple compile tests 7351ad43ddacSmrg lt_simple_compile_test_code="\ 7352ad43ddacSmrg subroutine t 7353ad43ddacSmrg return 7354ad43ddacSmrg end 7355ad43ddacSmrg" 7356ad43ddacSmrg 7357ad43ddacSmrg # Code to be used in simple link tests 7358ad43ddacSmrg lt_simple_link_test_code="\ 7359ad43ddacSmrg program t 7360ad43ddacSmrg end 7361ad43ddacSmrg" 7362ad43ddacSmrg 7363ad43ddacSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7364ad43ddacSmrg _LT_TAG_COMPILER 7365ad43ddacSmrg 7366ad43ddacSmrg # save warnings/boilerplate of simple test code 7367ad43ddacSmrg _LT_COMPILER_BOILERPLATE 7368ad43ddacSmrg _LT_LINKER_BOILERPLATE 7369209ff23fSmrg 7370ad43ddacSmrg # Allow CC to be a program name with arguments. 737143df4709Smrg lt_save_CC="$CC" 7372ad43ddacSmrg lt_save_GCC=$GCC 737368105dcbSveego lt_save_CFLAGS=$CFLAGS 7374ad43ddacSmrg CC=${FC-"f95"} 737568105dcbSveego CFLAGS=$FCFLAGS 7376ad43ddacSmrg compiler=$CC 7377ad43ddacSmrg GCC=$ac_cv_fc_compiler_gnu 7378ad43ddacSmrg 7379ad43ddacSmrg _LT_TAGVAR(compiler, $1)=$CC 7380ad43ddacSmrg _LT_CC_BASENAME([$compiler]) 7381ad43ddacSmrg 7382ad43ddacSmrg if test -n "$compiler"; then 7383ad43ddacSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7384ad43ddacSmrg AC_MSG_RESULT([$can_build_shared]) 7385ad43ddacSmrg 7386ad43ddacSmrg AC_MSG_CHECKING([whether to build shared libraries]) 738743df4709Smrg test "$can_build_shared" = "no" && enable_shared=no 7388ad43ddacSmrg 7389ad43ddacSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7390ad43ddacSmrg # are all built from PIC. 7391209ff23fSmrg case $host_os in 7392ad43ddacSmrg aix3*) 739343df4709Smrg test "$enable_shared" = yes && enable_static=no 7394ad43ddacSmrg if test -n "$RANLIB"; then 7395ad43ddacSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7396ad43ddacSmrg postinstall_cmds='$RANLIB $lib' 7397ad43ddacSmrg fi 7398ad43ddacSmrg ;; 7399209ff23fSmrg aix[[4-9]]*) 740043df4709Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 740143df4709Smrg test "$enable_shared" = yes && enable_static=no 7402209ff23fSmrg fi 7403ad43ddacSmrg ;; 7404209ff23fSmrg esac 7405ad43ddacSmrg AC_MSG_RESULT([$enable_shared]) 7406ad43ddacSmrg 7407ad43ddacSmrg AC_MSG_CHECKING([whether to build static libraries]) 7408ad43ddacSmrg # Make sure either enable_shared or enable_static is yes. 740943df4709Smrg test "$enable_shared" = yes || enable_static=yes 7410ad43ddacSmrg AC_MSG_RESULT([$enable_static]) 7411ad43ddacSmrg 741243df4709Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 741343df4709Smrg _LT_TAGVAR(LD, $1)="$LD" 7414ad43ddacSmrg 7415ad43ddacSmrg ## CAVEAT EMPTOR: 7416ad43ddacSmrg ## There is no encapsulation within the following macros, do not change 7417ad43ddacSmrg ## the running order or otherwise move them around unless you know exactly 7418ad43ddacSmrg ## what you are doing... 7419ad43ddacSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 7420ad43ddacSmrg _LT_COMPILER_PIC($1) 7421ad43ddacSmrg _LT_COMPILER_C_O($1) 7422ad43ddacSmrg _LT_COMPILER_FILE_LOCKS($1) 7423ad43ddacSmrg _LT_LINKER_SHLIBS($1) 7424ad43ddacSmrg _LT_SYS_DYNAMIC_LINKER($1) 7425ad43ddacSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7426ad43ddacSmrg 7427ad43ddacSmrg _LT_CONFIG($1) 7428ad43ddacSmrg fi # test -n "$compiler" 7429ad43ddacSmrg 7430ad43ddacSmrg GCC=$lt_save_GCC 743168105dcbSveego CC=$lt_save_CC 743268105dcbSveego CFLAGS=$lt_save_CFLAGS 743343df4709Smrgfi # test "$_lt_disable_FC" != yes 7434209ff23fSmrg 7435ad43ddacSmrgAC_LANG_POP 7436ad43ddacSmrg])# _LT_LANG_FC_CONFIG 7437209ff23fSmrg 7438209ff23fSmrg 7439ad43ddacSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 7440ad43ddacSmrg# -------------------------- 7441ad43ddacSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7442ad43ddacSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 744343df4709Smrg# to write the compiler configuration to `libtool'. 7444ad43ddacSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 7445ad43ddacSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7446ad43ddacSmrgAC_LANG_SAVE 7447209ff23fSmrg 7448ad43ddacSmrg# Source file extension for Java test sources. 7449ad43ddacSmrgac_ext=java 7450209ff23fSmrg 7451ad43ddacSmrg# Object file extension for compiled Java test sources. 7452ad43ddacSmrgobjext=o 7453ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext 7454209ff23fSmrg 7455ad43ddacSmrg# Code to be used in simple compile tests 7456ad43ddacSmrglt_simple_compile_test_code="class foo {}" 7457209ff23fSmrg 7458ad43ddacSmrg# Code to be used in simple link tests 7459ad43ddacSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7460209ff23fSmrg 7461ad43ddacSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7462ad43ddacSmrg_LT_TAG_COMPILER 7463209ff23fSmrg 7464ad43ddacSmrg# save warnings/boilerplate of simple test code 7465ad43ddacSmrg_LT_COMPILER_BOILERPLATE 7466ad43ddacSmrg_LT_LINKER_BOILERPLATE 7467209ff23fSmrg 7468ad43ddacSmrg# Allow CC to be a program name with arguments. 746968105dcbSveegolt_save_CC=$CC 747068105dcbSveegolt_save_CFLAGS=$CFLAGS 7471ad43ddacSmrglt_save_GCC=$GCC 7472ad43ddacSmrgGCC=yes 7473ad43ddacSmrgCC=${GCJ-"gcj"} 747468105dcbSveegoCFLAGS=$GCJFLAGS 7475ad43ddacSmrgcompiler=$CC 7476ad43ddacSmrg_LT_TAGVAR(compiler, $1)=$CC 747743df4709Smrg_LT_TAGVAR(LD, $1)="$LD" 7478ad43ddacSmrg_LT_CC_BASENAME([$compiler]) 7479209ff23fSmrg 7480ad43ddacSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7481ad43ddacSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7482209ff23fSmrg 7483ad43ddacSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 748468105dcbSveego_LT_TAGVAR(reload_flag, $1)=$reload_flag 748568105dcbSveego_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7486209ff23fSmrg 7487ad43ddacSmrgif test -n "$compiler"; then 7488ad43ddacSmrg _LT_COMPILER_NO_RTTI($1) 7489ad43ddacSmrg _LT_COMPILER_PIC($1) 7490ad43ddacSmrg _LT_COMPILER_C_O($1) 7491ad43ddacSmrg _LT_COMPILER_FILE_LOCKS($1) 7492ad43ddacSmrg _LT_LINKER_SHLIBS($1) 7493ad43ddacSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7494209ff23fSmrg 7495ad43ddacSmrg _LT_CONFIG($1) 7496ad43ddacSmrgfi 7497209ff23fSmrg 7498ad43ddacSmrgAC_LANG_RESTORE 7499209ff23fSmrg 7500ad43ddacSmrgGCC=$lt_save_GCC 750168105dcbSveegoCC=$lt_save_CC 750268105dcbSveegoCFLAGS=$lt_save_CFLAGS 7503ad43ddacSmrg])# _LT_LANG_GCJ_CONFIG 7504209ff23fSmrg 7505209ff23fSmrg 750668105dcbSveego# _LT_LANG_GO_CONFIG([TAG]) 750768105dcbSveego# -------------------------- 750868105dcbSveego# Ensure that the configuration variables for the GNU Go compiler 7509ad43ddacSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 751043df4709Smrg# to write the compiler configuration to `libtool'. 751168105dcbSveegom4_defun([_LT_LANG_GO_CONFIG], 751268105dcbSveego[AC_REQUIRE([LT_PROG_GO])dnl 7513ad43ddacSmrgAC_LANG_SAVE 7514209ff23fSmrg 751568105dcbSveego# Source file extension for Go test sources. 751668105dcbSveegoac_ext=go 7517209ff23fSmrg 751868105dcbSveego# Object file extension for compiled Go test sources. 7519ad43ddacSmrgobjext=o 7520ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext 7521209ff23fSmrg 7522ad43ddacSmrg# Code to be used in simple compile tests 752368105dcbSveegolt_simple_compile_test_code="package main; func main() { }" 7524209ff23fSmrg 7525ad43ddacSmrg# Code to be used in simple link tests 752668105dcbSveegolt_simple_link_test_code='package main; func main() { }' 7527209ff23fSmrg 7528ad43ddacSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7529ad43ddacSmrg_LT_TAG_COMPILER 7530ad43ddacSmrg 7531ad43ddacSmrg# save warnings/boilerplate of simple test code 7532ad43ddacSmrg_LT_COMPILER_BOILERPLATE 7533ad43ddacSmrg_LT_LINKER_BOILERPLATE 7534ad43ddacSmrg 7535ad43ddacSmrg# Allow CC to be a program name with arguments. 753668105dcbSveegolt_save_CC=$CC 753768105dcbSveegolt_save_CFLAGS=$CFLAGS 7538ad43ddacSmrglt_save_GCC=$GCC 753968105dcbSveegoGCC=yes 754068105dcbSveegoCC=${GOC-"gccgo"} 754168105dcbSveegoCFLAGS=$GOFLAGS 7542ad43ddacSmrgcompiler=$CC 7543ad43ddacSmrg_LT_TAGVAR(compiler, $1)=$CC 754443df4709Smrg_LT_TAGVAR(LD, $1)="$LD" 7545ad43ddacSmrg_LT_CC_BASENAME([$compiler]) 754668105dcbSveego 754768105dcbSveego# Go did not exist at the time GCC didn't implicitly link libc in. 754868105dcbSveego_LT_TAGVAR(archive_cmds_need_lc, $1)=no 754968105dcbSveego 755068105dcbSveego_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 755168105dcbSveego_LT_TAGVAR(reload_flag, $1)=$reload_flag 755268105dcbSveego_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7553ad43ddacSmrg 7554ad43ddacSmrgif test -n "$compiler"; then 755568105dcbSveego _LT_COMPILER_NO_RTTI($1) 755668105dcbSveego _LT_COMPILER_PIC($1) 755768105dcbSveego _LT_COMPILER_C_O($1) 755868105dcbSveego _LT_COMPILER_FILE_LOCKS($1) 755968105dcbSveego _LT_LINKER_SHLIBS($1) 756068105dcbSveego _LT_LINKER_HARDCODE_LIBPATH($1) 756168105dcbSveego 7562ad43ddacSmrg _LT_CONFIG($1) 7563ad43ddacSmrgfi 7564ad43ddacSmrg 7565ad43ddacSmrgAC_LANG_RESTORE 7566ad43ddacSmrg 756768105dcbSveegoGCC=$lt_save_GCC 756868105dcbSveegoCC=$lt_save_CC 756968105dcbSveegoCFLAGS=$lt_save_CFLAGS 757068105dcbSveego])# _LT_LANG_GO_CONFIG 7571ad43ddacSmrg 757268105dcbSveego 757368105dcbSveego# _LT_LANG_RC_CONFIG([TAG]) 757468105dcbSveego# ------------------------- 757568105dcbSveego# Ensure that the configuration variables for the Windows resource compiler 757668105dcbSveego# are suitably defined. These variables are subsequently used by _LT_CONFIG 757743df4709Smrg# to write the compiler configuration to `libtool'. 757868105dcbSveegom4_defun([_LT_LANG_RC_CONFIG], 757968105dcbSveego[AC_REQUIRE([LT_PROG_RC])dnl 758068105dcbSveegoAC_LANG_SAVE 758168105dcbSveego 758268105dcbSveego# Source file extension for RC test sources. 758368105dcbSveegoac_ext=rc 758468105dcbSveego 758568105dcbSveego# Object file extension for compiled RC test sources. 758668105dcbSveegoobjext=o 758768105dcbSveego_LT_TAGVAR(objext, $1)=$objext 758868105dcbSveego 758968105dcbSveego# Code to be used in simple compile tests 759068105dcbSveegolt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 759168105dcbSveego 759268105dcbSveego# Code to be used in simple link tests 759343df4709Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 759468105dcbSveego 759568105dcbSveego# ltmain only uses $CC for tagged configurations so make sure $CC is set. 759668105dcbSveego_LT_TAG_COMPILER 759768105dcbSveego 759868105dcbSveego# save warnings/boilerplate of simple test code 759968105dcbSveego_LT_COMPILER_BOILERPLATE 760068105dcbSveego_LT_LINKER_BOILERPLATE 760168105dcbSveego 760268105dcbSveego# Allow CC to be a program name with arguments. 760343df4709Smrglt_save_CC="$CC" 760468105dcbSveegolt_save_CFLAGS=$CFLAGS 760568105dcbSveegolt_save_GCC=$GCC 760668105dcbSveegoGCC= 760768105dcbSveegoCC=${RC-"windres"} 760868105dcbSveegoCFLAGS= 760968105dcbSveegocompiler=$CC 761068105dcbSveego_LT_TAGVAR(compiler, $1)=$CC 761168105dcbSveego_LT_CC_BASENAME([$compiler]) 761268105dcbSveego_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 761368105dcbSveego 761468105dcbSveegoif test -n "$compiler"; then 761568105dcbSveego : 761668105dcbSveego _LT_CONFIG($1) 761768105dcbSveegofi 761868105dcbSveego 761968105dcbSveegoGCC=$lt_save_GCC 762068105dcbSveegoAC_LANG_RESTORE 762168105dcbSveegoCC=$lt_save_CC 762268105dcbSveegoCFLAGS=$lt_save_CFLAGS 762368105dcbSveego])# _LT_LANG_RC_CONFIG 762468105dcbSveego 762568105dcbSveego 762668105dcbSveego# LT_PROG_GCJ 762768105dcbSveego# ----------- 762868105dcbSveegoAC_DEFUN([LT_PROG_GCJ], 762968105dcbSveego[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7630ad43ddacSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7631ad43ddacSmrg [AC_CHECK_TOOL(GCJ, gcj,) 763243df4709Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7633ad43ddacSmrg AC_SUBST(GCJFLAGS)])])[]dnl 7634ad43ddacSmrg]) 7635ad43ddacSmrg 7636ad43ddacSmrg# Old name: 7637ad43ddacSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7638ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 7639ad43ddacSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7640ad43ddacSmrg 7641ad43ddacSmrg 764268105dcbSveego# LT_PROG_GO 764368105dcbSveego# ---------- 764468105dcbSveegoAC_DEFUN([LT_PROG_GO], 764568105dcbSveego[AC_CHECK_TOOL(GOC, gccgo,) 764668105dcbSveego]) 764768105dcbSveego 764868105dcbSveego 7649ad43ddacSmrg# LT_PROG_RC 7650ad43ddacSmrg# ---------- 7651ad43ddacSmrgAC_DEFUN([LT_PROG_RC], 7652ad43ddacSmrg[AC_CHECK_TOOL(RC, windres,) 7653ad43ddacSmrg]) 7654ad43ddacSmrg 7655ad43ddacSmrg# Old name: 7656ad43ddacSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7657ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 7658ad43ddacSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 7659ad43ddacSmrg 7660ad43ddacSmrg 7661ad43ddacSmrg# _LT_DECL_EGREP 7662ad43ddacSmrg# -------------- 7663ad43ddacSmrg# If we don't have a new enough Autoconf to choose the best grep 7664ad43ddacSmrg# available, choose the one first in the user's PATH. 7665ad43ddacSmrgm4_defun([_LT_DECL_EGREP], 7666ad43ddacSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7667ad43ddacSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7668ad43ddacSmrgtest -z "$GREP" && GREP=grep 7669ad43ddacSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7670ad43ddacSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7671ad43ddacSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7672ad43ddacSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7673ad43ddacSmrgAC_SUBST([GREP]) 7674ad43ddacSmrg]) 7675ad43ddacSmrg 7676ad43ddacSmrg 76772f39173dSmrg# _LT_DECL_OBJDUMP 76782f39173dSmrg# -------------- 76792f39173dSmrg# If we don't have a new enough Autoconf to choose the best objdump 76802f39173dSmrg# available, choose the one first in the user's PATH. 76812f39173dSmrgm4_defun([_LT_DECL_OBJDUMP], 76822f39173dSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 76832f39173dSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 76842f39173dSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 76852f39173dSmrgAC_SUBST([OBJDUMP]) 76862f39173dSmrg]) 76872f39173dSmrg 768868105dcbSveego# _LT_DECL_DLLTOOL 768968105dcbSveego# ---------------- 769068105dcbSveego# Ensure DLLTOOL variable is set. 769168105dcbSveegom4_defun([_LT_DECL_DLLTOOL], 769268105dcbSveego[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 769368105dcbSveegotest -z "$DLLTOOL" && DLLTOOL=dlltool 769468105dcbSveego_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 769568105dcbSveegoAC_SUBST([DLLTOOL]) 769668105dcbSveego]) 76972f39173dSmrg 7698ad43ddacSmrg# _LT_DECL_SED 7699ad43ddacSmrg# ------------ 7700ad43ddacSmrg# Check for a fully-functional sed program, that truncates 7701ad43ddacSmrg# as few characters as possible. Prefer GNU sed if found. 7702ad43ddacSmrgm4_defun([_LT_DECL_SED], 7703ad43ddacSmrg[AC_PROG_SED 7704ad43ddacSmrgtest -z "$SED" && SED=sed 7705ad43ddacSmrgXsed="$SED -e 1s/^X//" 7706ad43ddacSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7707ad43ddacSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7708ad43ddacSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7709ad43ddacSmrg])# _LT_DECL_SED 7710ad43ddacSmrg 7711ad43ddacSmrgm4_ifndef([AC_PROG_SED], [ 7712ad43ddacSmrg# NOTE: This macro has been submitted for inclusion into # 7713ad43ddacSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7714ad43ddacSmrg# a released version of Autoconf we should remove this # 7715ad43ddacSmrg# macro and use it instead. # 7716ad43ddacSmrg 7717ad43ddacSmrgm4_defun([AC_PROG_SED], 7718ad43ddacSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7719ad43ddacSmrgAC_CACHE_VAL(lt_cv_path_SED, 7720ad43ddacSmrg[# Loop through the user's path and test for sed and gsed. 7721ad43ddacSmrg# Then use that list of sed's as ones to test for truncation. 7722ad43ddacSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7723ad43ddacSmrgfor as_dir in $PATH 7724ad43ddacSmrgdo 7725ad43ddacSmrg IFS=$as_save_IFS 7726ad43ddacSmrg test -z "$as_dir" && as_dir=. 7727ad43ddacSmrg for lt_ac_prog in sed gsed; do 7728ad43ddacSmrg for ac_exec_ext in '' $ac_executable_extensions; do 7729ad43ddacSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7730ad43ddacSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7731ad43ddacSmrg fi 7732ad43ddacSmrg done 7733ad43ddacSmrg done 7734ad43ddacSmrgdone 7735ad43ddacSmrgIFS=$as_save_IFS 7736ad43ddacSmrglt_ac_max=0 7737ad43ddacSmrglt_ac_count=0 7738ad43ddacSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7739ad43ddacSmrg# along with /bin/sed that truncates output. 7740ad43ddacSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 774143df4709Smrg test ! -f $lt_ac_sed && continue 7742ad43ddacSmrg cat /dev/null > conftest.in 7743ad43ddacSmrg lt_ac_count=0 7744ad43ddacSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7745ad43ddacSmrg # Check for GNU sed and select it if it is found. 7746ad43ddacSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7747ad43ddacSmrg lt_cv_path_SED=$lt_ac_sed 7748ad43ddacSmrg break 7749ad43ddacSmrg fi 7750ad43ddacSmrg while true; do 7751ad43ddacSmrg cat conftest.in conftest.in >conftest.tmp 7752ad43ddacSmrg mv conftest.tmp conftest.in 7753ad43ddacSmrg cp conftest.in conftest.nl 7754ad43ddacSmrg echo >>conftest.nl 7755ad43ddacSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7756ad43ddacSmrg cmp -s conftest.out conftest.nl || break 7757ad43ddacSmrg # 10000 chars as input seems more than enough 775843df4709Smrg test $lt_ac_count -gt 10 && break 7759ad43ddacSmrg lt_ac_count=`expr $lt_ac_count + 1` 776043df4709Smrg if test $lt_ac_count -gt $lt_ac_max; then 7761ad43ddacSmrg lt_ac_max=$lt_ac_count 7762ad43ddacSmrg lt_cv_path_SED=$lt_ac_sed 7763ad43ddacSmrg fi 7764ad43ddacSmrg done 7765ad43ddacSmrgdone 7766ad43ddacSmrg]) 7767ad43ddacSmrgSED=$lt_cv_path_SED 7768ad43ddacSmrgAC_SUBST([SED]) 7769ad43ddacSmrgAC_MSG_RESULT([$SED]) 7770ad43ddacSmrg])#AC_PROG_SED 7771ad43ddacSmrg])#m4_ifndef 7772209ff23fSmrg 7773ad43ddacSmrg# Old name: 7774ad43ddacSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7775ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 7776ad43ddacSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7777209ff23fSmrg 7778209ff23fSmrg 7779ad43ddacSmrg# _LT_CHECK_SHELL_FEATURES 7780ad43ddacSmrg# ------------------------ 7781ad43ddacSmrg# Find out whether the shell is Bourne or XSI compatible, 7782ad43ddacSmrg# or has some other useful features. 7783ad43ddacSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 778443df4709Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 778543df4709Smrg# Try some XSI features 778643df4709Smrgxsi_shell=no 778743df4709Smrg( _lt_dummy="a/b/c" 778843df4709Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 778943df4709Smrg = c,a/b,b/c, \ 779043df4709Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 779143df4709Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 779243df4709Smrg && xsi_shell=yes 779343df4709SmrgAC_MSG_RESULT([$xsi_shell]) 779443df4709Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 779543df4709Smrg 779643df4709SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 779743df4709Smrglt_shell_append=no 779843df4709Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 779943df4709Smrg >/dev/null 2>&1 \ 780043df4709Smrg && lt_shell_append=yes 780143df4709SmrgAC_MSG_RESULT([$lt_shell_append]) 780243df4709Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 780343df4709Smrg 780443df4709Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7805ad43ddacSmrg lt_unset=unset 7806ad43ddacSmrgelse 7807ad43ddacSmrg lt_unset=false 7808209ff23fSmrgfi 7809ad43ddacSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7810ad43ddacSmrg 7811ad43ddacSmrg# test EBCDIC or ASCII 7812ad43ddacSmrgcase `echo X|tr X '\101'` in 7813ad43ddacSmrg A) # ASCII based system 7814ad43ddacSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7815ad43ddacSmrg lt_SP2NL='tr \040 \012' 7816ad43ddacSmrg lt_NL2SP='tr \015\012 \040\040' 7817ad43ddacSmrg ;; 7818ad43ddacSmrg *) # EBCDIC based system 7819ad43ddacSmrg lt_SP2NL='tr \100 \n' 7820ad43ddacSmrg lt_NL2SP='tr \r\n \100\100' 7821ad43ddacSmrg ;; 7822209ff23fSmrgesac 7823ad43ddacSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7824ad43ddacSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7825ad43ddacSmrg])# _LT_CHECK_SHELL_FEATURES 7826209ff23fSmrg 7827209ff23fSmrg 782843df4709Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 782943df4709Smrg# ------------------------------------------------------ 783043df4709Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 783143df4709Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 783243df4709Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 783343df4709Smrg[dnl { 783443df4709Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 783543df4709Smrg$1 ()\ 783643df4709Smrg{\ 783743df4709Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 783843df4709Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 783943df4709Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 784043df4709Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 784143df4709Smrgtest 0 -eq $? || _lt_function_replace_fail=: 784243df4709Smrg]) 784343df4709Smrg 784443df4709Smrg 784543df4709Smrg# _LT_PROG_REPLACE_SHELLFNS 784643df4709Smrg# ------------------------- 784743df4709Smrg# Replace existing portable implementations of several shell functions with 784843df4709Smrg# equivalent extended shell implementations where those features are available.. 784943df4709Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 785043df4709Smrg[if test x"$xsi_shell" = xyes; then 785143df4709Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 785243df4709Smrg case ${1} in 785343df4709Smrg */*) func_dirname_result="${1%/*}${2}" ;; 785443df4709Smrg * ) func_dirname_result="${3}" ;; 785543df4709Smrg esac]) 785643df4709Smrg 785743df4709Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 785843df4709Smrg func_basename_result="${1##*/}"]) 785943df4709Smrg 786043df4709Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 786143df4709Smrg case ${1} in 786243df4709Smrg */*) func_dirname_result="${1%/*}${2}" ;; 786343df4709Smrg * ) func_dirname_result="${3}" ;; 786443df4709Smrg esac 786543df4709Smrg func_basename_result="${1##*/}"]) 786643df4709Smrg 786743df4709Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 786843df4709Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 786943df4709Smrg # positional parameters, so assign one to ordinary parameter first. 787043df4709Smrg func_stripname_result=${3} 787143df4709Smrg func_stripname_result=${func_stripname_result#"${1}"} 787243df4709Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 787343df4709Smrg 787443df4709Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 787543df4709Smrg func_split_long_opt_name=${1%%=*} 787643df4709Smrg func_split_long_opt_arg=${1#*=}]) 787743df4709Smrg 787843df4709Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 787943df4709Smrg func_split_short_opt_arg=${1#??} 788043df4709Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 788143df4709Smrg 788243df4709Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 788343df4709Smrg case ${1} in 788443df4709Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 788543df4709Smrg *) func_lo2o_result=${1} ;; 788643df4709Smrg esac]) 788743df4709Smrg 788843df4709Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 788943df4709Smrg 789043df4709Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 789143df4709Smrg 789243df4709Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 789343df4709Smrgfi 789443df4709Smrg 789543df4709Smrgif test x"$lt_shell_append" = xyes; then 789643df4709Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 789743df4709Smrg 789843df4709Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 789943df4709Smrg func_quote_for_eval "${2}" 790043df4709Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 790143df4709Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 790243df4709Smrg 790343df4709Smrg # Save a `func_append' function call where possible by direct use of '+=' 790443df4709Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 790543df4709Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 790643df4709Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 790743df4709Smrg test 0 -eq $? || _lt_function_replace_fail=: 790843df4709Smrgelse 790943df4709Smrg # Save a `func_append' function call even when '+=' is not available 791043df4709Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 791143df4709Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 791243df4709Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 791343df4709Smrg test 0 -eq $? || _lt_function_replace_fail=: 791443df4709Smrgfi 791543df4709Smrg 791643df4709Smrgif test x"$_lt_function_replace_fail" = x":"; then 791743df4709Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 791843df4709Smrgfi 791943df4709Smrg]) 792043df4709Smrg 792168105dcbSveego# _LT_PATH_CONVERSION_FUNCTIONS 792268105dcbSveego# ----------------------------- 792343df4709Smrg# Determine which file name conversion functions should be used by 792468105dcbSveego# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 792568105dcbSveego# for certain cross-compile configurations and native mingw. 792668105dcbSveegom4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 792768105dcbSveego[AC_REQUIRE([AC_CANONICAL_HOST])dnl 792868105dcbSveegoAC_REQUIRE([AC_CANONICAL_BUILD])dnl 792968105dcbSveegoAC_MSG_CHECKING([how to convert $build file names to $host format]) 793068105dcbSveegoAC_CACHE_VAL(lt_cv_to_host_file_cmd, 793168105dcbSveego[case $host in 793268105dcbSveego *-*-mingw* ) 793368105dcbSveego case $build in 793468105dcbSveego *-*-mingw* ) # actually msys 793568105dcbSveego lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 793668105dcbSveego ;; 793768105dcbSveego *-*-cygwin* ) 793868105dcbSveego lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 793968105dcbSveego ;; 794068105dcbSveego * ) # otherwise, assume *nix 794168105dcbSveego lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 794268105dcbSveego ;; 794368105dcbSveego esac 7944ad43ddacSmrg ;; 794568105dcbSveego *-*-cygwin* ) 794668105dcbSveego case $build in 794768105dcbSveego *-*-mingw* ) # actually msys 794868105dcbSveego lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 794968105dcbSveego ;; 795068105dcbSveego *-*-cygwin* ) 795168105dcbSveego lt_cv_to_host_file_cmd=func_convert_file_noop 795268105dcbSveego ;; 795368105dcbSveego * ) # otherwise, assume *nix 795468105dcbSveego lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 795568105dcbSveego ;; 795668105dcbSveego esac 7957ad43ddacSmrg ;; 795868105dcbSveego * ) # unhandled hosts (and "normal" native builds) 795968105dcbSveego lt_cv_to_host_file_cmd=func_convert_file_noop 796068105dcbSveego ;; 796168105dcbSveegoesac 7962ad43ddacSmrg]) 796368105dcbSveegoto_host_file_cmd=$lt_cv_to_host_file_cmd 796468105dcbSveegoAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 796568105dcbSveego_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 796668105dcbSveego [0], [convert $build file names to $host format])dnl 796768105dcbSveego 796868105dcbSveegoAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 796968105dcbSveegoAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 797068105dcbSveego[#assume ordinary cross tools, or native build. 797168105dcbSveegolt_cv_to_tool_file_cmd=func_convert_file_noop 797268105dcbSveegocase $host in 797368105dcbSveego *-*-mingw* ) 797468105dcbSveego case $build in 797568105dcbSveego *-*-mingw* ) # actually msys 797668105dcbSveego lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 797768105dcbSveego ;; 797868105dcbSveego esac 797968105dcbSveego ;; 798068105dcbSveegoesac 798168105dcbSveego]) 798268105dcbSveegoto_tool_file_cmd=$lt_cv_to_tool_file_cmd 798368105dcbSveegoAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 798468105dcbSveego_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 798568105dcbSveego [0], [convert $build files to toolchain format])dnl 798668105dcbSveego])# _LT_PATH_CONVERSION_FUNCTIONS 7987ad43ddacSmrg 7988ad43ddacSmrg# Helper functions for option handling. -*- Autoconf -*- 7989ad43ddacSmrg# 799043df4709Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 799143df4709Smrg# Inc. 7992ad43ddacSmrg# Written by Gary V. Vaughan, 2004 7993ad43ddacSmrg# 7994ad43ddacSmrg# This file is free software; the Free Software Foundation gives 7995ad43ddacSmrg# unlimited permission to copy and/or distribute it, with or without 7996ad43ddacSmrg# modifications, as long as this notice is preserved. 7997ad43ddacSmrg 799843df4709Smrg# serial 7 ltoptions.m4 7999ad43ddacSmrg 8000ad43ddacSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8001ad43ddacSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8002ad43ddacSmrg 8003209ff23fSmrg 8004ad43ddacSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8005ad43ddacSmrg# ------------------------------------------ 8006ad43ddacSmrgm4_define([_LT_MANGLE_OPTION], 8007ad43ddacSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8008209ff23fSmrg 8009209ff23fSmrg 8010ad43ddacSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8011ad43ddacSmrg# --------------------------------------- 8012ad43ddacSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8013ad43ddacSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8014ad43ddacSmrg# saved as a flag. 8015ad43ddacSmrgm4_define([_LT_SET_OPTION], 8016ad43ddacSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8017ad43ddacSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8018ad43ddacSmrg _LT_MANGLE_DEFUN([$1], [$2]), 801943df4709Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 8020ad43ddacSmrg]) 8021209ff23fSmrg 8022209ff23fSmrg 8023ad43ddacSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8024ad43ddacSmrg# ------------------------------------------------------------ 8025ad43ddacSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8026ad43ddacSmrgm4_define([_LT_IF_OPTION], 8027ad43ddacSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8028ad43ddacSmrg 8029ad43ddacSmrg 8030ad43ddacSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8031ad43ddacSmrg# ------------------------------------------------------- 8032ad43ddacSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8033ad43ddacSmrg# are set. 8034ad43ddacSmrgm4_define([_LT_UNLESS_OPTIONS], 8035ad43ddacSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8036ad43ddacSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8037ad43ddacSmrg [m4_define([$0_found])])])[]dnl 8038ad43ddacSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8039ad43ddacSmrg])[]dnl 8040ad43ddacSmrg]) 8041209ff23fSmrg 8042209ff23fSmrg 8043ad43ddacSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8044ad43ddacSmrg# ---------------------------------------- 8045ad43ddacSmrg# OPTION-LIST is a space-separated list of Libtool options associated 8046ad43ddacSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 8047ad43ddacSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8048ad43ddacSmrg# the unknown option and exit. 8049ad43ddacSmrgm4_defun([_LT_SET_OPTIONS], 8050ad43ddacSmrg[# Set options 8051ad43ddacSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8052ad43ddacSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 8053ad43ddacSmrg 8054ad43ddacSmrgm4_if([$1],[LT_INIT],[ 8055ad43ddacSmrg dnl 8056ad43ddacSmrg dnl Simply set some default values (i.e off) if boolean options were not 8057ad43ddacSmrg dnl specified: 8058ad43ddacSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8059ad43ddacSmrg ]) 8060ad43ddacSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8061ad43ddacSmrg ]) 8062ad43ddacSmrg dnl 8063ad43ddacSmrg dnl If no reference was made to various pairs of opposing options, then 8064ad43ddacSmrg dnl we run the default mode handler for the pair. For example, if neither 806543df4709Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 8066ad43ddacSmrg dnl archives by default: 8067ad43ddacSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8068ad43ddacSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8069ad43ddacSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8070ad43ddacSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 807143df4709Smrg [_LT_ENABLE_FAST_INSTALL]) 8072ad43ddacSmrg ]) 8073ad43ddacSmrg])# _LT_SET_OPTIONS 8074209ff23fSmrg 8075209ff23fSmrg 8076209ff23fSmrg 8077ad43ddacSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8078ad43ddacSmrg# ----------------------------------------- 8079ad43ddacSmrgm4_define([_LT_MANGLE_DEFUN], 8080ad43ddacSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8081209ff23fSmrg 8082209ff23fSmrg 8083ad43ddacSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8084ad43ddacSmrg# ----------------------------------------------- 8085ad43ddacSmrgm4_define([LT_OPTION_DEFINE], 8086ad43ddacSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8087ad43ddacSmrg])# LT_OPTION_DEFINE 8088209ff23fSmrg 8089209ff23fSmrg 8090ad43ddacSmrg# dlopen 8091ad43ddacSmrg# ------ 8092ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8093ad43ddacSmrg]) 8094209ff23fSmrg 8095ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 8096ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 8097ad43ddacSmrgAC_DIAGNOSE([obsolete], 8098ad43ddacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 809943df4709Smrgput the `dlopen' option into LT_INIT's first parameter.]) 8100ad43ddacSmrg]) 8101209ff23fSmrg 8102ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 8103ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8104209ff23fSmrg 8105209ff23fSmrg 8106ad43ddacSmrg# win32-dll 8107ad43ddacSmrg# --------- 8108ad43ddacSmrg# Declare package support for building win32 dll's. 8109ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8110ad43ddacSmrg[enable_win32_dll=yes 8111209ff23fSmrg 8112ad43ddacSmrgcase $host in 811368105dcbSveego*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8114ad43ddacSmrg AC_CHECK_TOOL(AS, as, false) 8115ad43ddacSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8116ad43ddacSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 8117ad43ddacSmrg ;; 8118ad43ddacSmrgesac 8119209ff23fSmrg 8120ad43ddacSmrgtest -z "$AS" && AS=as 812168105dcbSveego_LT_DECL([], [AS], [1], [Assembler program])dnl 8122209ff23fSmrg 8123ad43ddacSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 812468105dcbSveego_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8125209ff23fSmrg 8126ad43ddacSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 812768105dcbSveego_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8128ad43ddacSmrg])# win32-dll 8129209ff23fSmrg 8130ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8131ad43ddacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8132ad43ddacSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 8133ad43ddacSmrgAC_DIAGNOSE([obsolete], 8134ad43ddacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 813543df4709Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 8136ad43ddacSmrg]) 8137209ff23fSmrg 8138ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 8139ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8140ad43ddacSmrg 8141ad43ddacSmrg 8142ad43ddacSmrg# _LT_ENABLE_SHARED([DEFAULT]) 8143ad43ddacSmrg# ---------------------------- 814443df4709Smrg# implement the --enable-shared flag, and supports the `shared' and 814543df4709Smrg# `disable-shared' LT_INIT options. 814643df4709Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8147ad43ddacSmrgm4_define([_LT_ENABLE_SHARED], 8148ad43ddacSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8149ad43ddacSmrgAC_ARG_ENABLE([shared], 8150ad43ddacSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8151ad43ddacSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8152ad43ddacSmrg [p=${PACKAGE-default} 8153ad43ddacSmrg case $enableval in 8154ad43ddacSmrg yes) enable_shared=yes ;; 8155ad43ddacSmrg no) enable_shared=no ;; 8156ad43ddacSmrg *) 8157ad43ddacSmrg enable_shared=no 8158ad43ddacSmrg # Look at the argument we got. We use all the common list separators. 815943df4709Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8160ad43ddacSmrg for pkg in $enableval; do 816143df4709Smrg IFS="$lt_save_ifs" 8162ad43ddacSmrg if test "X$pkg" = "X$p"; then 8163ad43ddacSmrg enable_shared=yes 8164ad43ddacSmrg fi 8165ad43ddacSmrg done 816643df4709Smrg IFS="$lt_save_ifs" 8167209ff23fSmrg ;; 8168ad43ddacSmrg esac], 8169ad43ddacSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8170209ff23fSmrg 8171ad43ddacSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8172ad43ddacSmrg [Whether or not to build shared libraries]) 8173ad43ddacSmrg])# _LT_ENABLE_SHARED 8174209ff23fSmrg 8175ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8176ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8177209ff23fSmrg 8178ad43ddacSmrg# Old names: 8179ad43ddacSmrgAC_DEFUN([AC_ENABLE_SHARED], 8180ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8181ad43ddacSmrg]) 8182209ff23fSmrg 8183ad43ddacSmrgAC_DEFUN([AC_DISABLE_SHARED], 8184ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8185ad43ddacSmrg]) 8186209ff23fSmrg 8187ad43ddacSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8188ad43ddacSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8189209ff23fSmrg 8190ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 8191ad43ddacSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8192ad43ddacSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8193ad43ddacSmrg 8194ad43ddacSmrg 8195ad43ddacSmrg 8196ad43ddacSmrg# _LT_ENABLE_STATIC([DEFAULT]) 8197ad43ddacSmrg# ---------------------------- 819843df4709Smrg# implement the --enable-static flag, and support the `static' and 819943df4709Smrg# `disable-static' LT_INIT options. 820043df4709Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8201ad43ddacSmrgm4_define([_LT_ENABLE_STATIC], 8202ad43ddacSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8203ad43ddacSmrgAC_ARG_ENABLE([static], 8204ad43ddacSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8205ad43ddacSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8206ad43ddacSmrg [p=${PACKAGE-default} 8207ad43ddacSmrg case $enableval in 8208ad43ddacSmrg yes) enable_static=yes ;; 8209ad43ddacSmrg no) enable_static=no ;; 8210ad43ddacSmrg *) 8211ad43ddacSmrg enable_static=no 8212ad43ddacSmrg # Look at the argument we got. We use all the common list separators. 821343df4709Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8214ad43ddacSmrg for pkg in $enableval; do 821543df4709Smrg IFS="$lt_save_ifs" 8216ad43ddacSmrg if test "X$pkg" = "X$p"; then 8217ad43ddacSmrg enable_static=yes 8218ad43ddacSmrg fi 8219ad43ddacSmrg done 822043df4709Smrg IFS="$lt_save_ifs" 8221209ff23fSmrg ;; 8222ad43ddacSmrg esac], 8223ad43ddacSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8224209ff23fSmrg 8225ad43ddacSmrg _LT_DECL([build_old_libs], [enable_static], [0], 8226ad43ddacSmrg [Whether or not to build static libraries]) 8227ad43ddacSmrg])# _LT_ENABLE_STATIC 8228209ff23fSmrg 8229ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8230ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8231209ff23fSmrg 8232ad43ddacSmrg# Old names: 8233ad43ddacSmrgAC_DEFUN([AC_ENABLE_STATIC], 8234ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8235ad43ddacSmrg]) 8236209ff23fSmrg 8237ad43ddacSmrgAC_DEFUN([AC_DISABLE_STATIC], 8238ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8239ad43ddacSmrg]) 8240209ff23fSmrg 8241ad43ddacSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8242ad43ddacSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8243209ff23fSmrg 8244ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 8245ad43ddacSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8246ad43ddacSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8247ad43ddacSmrg 8248ad43ddacSmrg 8249ad43ddacSmrg 8250ad43ddacSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8251ad43ddacSmrg# ---------------------------------- 825243df4709Smrg# implement the --enable-fast-install flag, and support the `fast-install' 825343df4709Smrg# and `disable-fast-install' LT_INIT options. 825443df4709Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8255ad43ddacSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 8256ad43ddacSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8257ad43ddacSmrgAC_ARG_ENABLE([fast-install], 8258ad43ddacSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8259ad43ddacSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8260ad43ddacSmrg [p=${PACKAGE-default} 8261ad43ddacSmrg case $enableval in 8262ad43ddacSmrg yes) enable_fast_install=yes ;; 8263ad43ddacSmrg no) enable_fast_install=no ;; 8264ad43ddacSmrg *) 8265ad43ddacSmrg enable_fast_install=no 8266ad43ddacSmrg # Look at the argument we got. We use all the common list separators. 826743df4709Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8268ad43ddacSmrg for pkg in $enableval; do 826943df4709Smrg IFS="$lt_save_ifs" 8270ad43ddacSmrg if test "X$pkg" = "X$p"; then 8271ad43ddacSmrg enable_fast_install=yes 8272209ff23fSmrg fi 8273ad43ddacSmrg done 827443df4709Smrg IFS="$lt_save_ifs" 8275209ff23fSmrg ;; 8276ad43ddacSmrg esac], 8277ad43ddacSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8278209ff23fSmrg 8279ad43ddacSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 8280ad43ddacSmrg [Whether or not to optimize for fast installation])dnl 8281ad43ddacSmrg])# _LT_ENABLE_FAST_INSTALL 8282209ff23fSmrg 8283ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8284ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8285209ff23fSmrg 8286ad43ddacSmrg# Old names: 8287ad43ddacSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8288ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8289ad43ddacSmrgAC_DIAGNOSE([obsolete], 8290ad43ddacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 829143df4709Smrgthe `fast-install' option into LT_INIT's first parameter.]) 8292ad43ddacSmrg]) 8293209ff23fSmrg 8294ad43ddacSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8295ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8296ad43ddacSmrgAC_DIAGNOSE([obsolete], 8297ad43ddacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 829843df4709Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 8299ad43ddacSmrg]) 8300209ff23fSmrg 8301ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 8302ad43ddacSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8303ad43ddacSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8304209ff23fSmrg 8305209ff23fSmrg 8306ad43ddacSmrg# _LT_WITH_PIC([MODE]) 8307ad43ddacSmrg# -------------------- 830843df4709Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 8309ad43ddacSmrg# LT_INIT options. 831043df4709Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 8311ad43ddacSmrgm4_define([_LT_WITH_PIC], 8312ad43ddacSmrg[AC_ARG_WITH([pic], 831368105dcbSveego [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8314ad43ddacSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 831568105dcbSveego [lt_p=${PACKAGE-default} 831668105dcbSveego case $withval in 831768105dcbSveego yes|no) pic_mode=$withval ;; 831868105dcbSveego *) 831968105dcbSveego pic_mode=default 832068105dcbSveego # Look at the argument we got. We use all the common list separators. 832143df4709Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 832268105dcbSveego for lt_pkg in $withval; do 832343df4709Smrg IFS="$lt_save_ifs" 832468105dcbSveego if test "X$lt_pkg" = "X$lt_p"; then 832568105dcbSveego pic_mode=yes 832668105dcbSveego fi 832768105dcbSveego done 832843df4709Smrg IFS="$lt_save_ifs" 832968105dcbSveego ;; 833068105dcbSveego esac], 833143df4709Smrg [pic_mode=default]) 833243df4709Smrg 833343df4709Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 8334209ff23fSmrg 8335ad43ddacSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8336ad43ddacSmrg])# _LT_WITH_PIC 8337209ff23fSmrg 8338ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8339ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8340ad43ddacSmrg 8341ad43ddacSmrg# Old name: 8342ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8343ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8344ad43ddacSmrgAC_DIAGNOSE([obsolete], 8345ad43ddacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 834643df4709Smrgput the `pic-only' option into LT_INIT's first parameter.]) 8347209ff23fSmrg]) 8348209ff23fSmrg 8349ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 8350ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8351209ff23fSmrg 8352209ff23fSmrg 8353ad43ddacSmrgm4_define([_LTDL_MODE], []) 8354ad43ddacSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8355ad43ddacSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8356ad43ddacSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8357ad43ddacSmrg [m4_define([_LTDL_MODE], [recursive])]) 8358ad43ddacSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8359ad43ddacSmrg [m4_define([_LTDL_MODE], [subproject])]) 8360209ff23fSmrg 8361ad43ddacSmrgm4_define([_LTDL_TYPE], []) 8362ad43ddacSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8363ad43ddacSmrg [m4_define([_LTDL_TYPE], [installable])]) 8364ad43ddacSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8365ad43ddacSmrg [m4_define([_LTDL_TYPE], [convenience])]) 8366209ff23fSmrg 8367ad43ddacSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8368209ff23fSmrg# 836943df4709Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 83702f39173dSmrg# Written by Gary V. Vaughan, 2004 8371209ff23fSmrg# 8372ad43ddacSmrg# This file is free software; the Free Software Foundation gives 8373ad43ddacSmrg# unlimited permission to copy and/or distribute it, with or without 8374ad43ddacSmrg# modifications, as long as this notice is preserved. 8375ad43ddacSmrg 83762f39173dSmrg# serial 6 ltsugar.m4 8377ad43ddacSmrg 8378ad43ddacSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8379ad43ddacSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8380ad43ddacSmrg 8381ad43ddacSmrg 8382ad43ddacSmrg# lt_join(SEP, ARG1, [ARG2...]) 8383ad43ddacSmrg# ----------------------------- 8384ad43ddacSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8385ad43ddacSmrg# associated separator. 8386ad43ddacSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8387ad43ddacSmrg# versions in m4sugar had bugs. 8388ad43ddacSmrgm4_define([lt_join], 8389ad43ddacSmrg[m4_if([$#], [1], [], 8390ad43ddacSmrg [$#], [2], [[$2]], 8391ad43ddacSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8392ad43ddacSmrgm4_define([_lt_join], 8393ad43ddacSmrg[m4_if([$#$2], [2], [], 8394ad43ddacSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8395ad43ddacSmrg 8396ad43ddacSmrg 8397ad43ddacSmrg# lt_car(LIST) 8398ad43ddacSmrg# lt_cdr(LIST) 8399ad43ddacSmrg# ------------ 8400ad43ddacSmrg# Manipulate m4 lists. 8401ad43ddacSmrg# These macros are necessary as long as will still need to support 840243df4709Smrg# Autoconf-2.59 which quotes differently. 8403ad43ddacSmrgm4_define([lt_car], [[$1]]) 8404ad43ddacSmrgm4_define([lt_cdr], 8405ad43ddacSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8406ad43ddacSmrg [$#], 1, [], 8407ad43ddacSmrg [m4_dquote(m4_shift($@))])]) 8408ad43ddacSmrgm4_define([lt_unquote], $1) 8409ad43ddacSmrg 8410ad43ddacSmrg 8411ad43ddacSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8412ad43ddacSmrg# ------------------------------------------ 841343df4709Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 8414ad43ddacSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8415ad43ddacSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8416ad43ddacSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8417ad43ddacSmrg# than defined and empty). 8418209ff23fSmrg# 8419ad43ddacSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8420ad43ddacSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8421ad43ddacSmrgm4_define([lt_append], 8422ad43ddacSmrg[m4_define([$1], 8423ad43ddacSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8424ad43ddacSmrg 8425ad43ddacSmrg 8426ad43ddacSmrg 8427ad43ddacSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8428ad43ddacSmrg# ---------------------------------------------------------- 8429ad43ddacSmrg# Produce a SEP delimited list of all paired combinations of elements of 8430ad43ddacSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8431ad43ddacSmrg# has the form PREFIXmINFIXSUFFIXn. 84322f39173dSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8433ad43ddacSmrgm4_define([lt_combine], 84342f39173dSmrg[m4_if(m4_eval([$# > 3]), [1], 84352f39173dSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 84362f39173dSmrg[[m4_foreach([_Lt_prefix], [$2], 84372f39173dSmrg [m4_foreach([_Lt_suffix], 84382f39173dSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 84392f39173dSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8440209ff23fSmrg 8441209ff23fSmrg 8442ad43ddacSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8443ad43ddacSmrg# ----------------------------------------------------------------------- 8444ad43ddacSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8445ad43ddacSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8446ad43ddacSmrgm4_define([lt_if_append_uniq], 8447ad43ddacSmrg[m4_ifdef([$1], 8448ad43ddacSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8449ad43ddacSmrg [lt_append([$1], [$2], [$3])$4], 8450ad43ddacSmrg [$5])], 8451ad43ddacSmrg [lt_append([$1], [$2], [$3])$4])]) 8452209ff23fSmrg 8453209ff23fSmrg 8454ad43ddacSmrg# lt_dict_add(DICT, KEY, VALUE) 8455ad43ddacSmrg# ----------------------------- 8456ad43ddacSmrgm4_define([lt_dict_add], 8457ad43ddacSmrg[m4_define([$1($2)], [$3])]) 8458209ff23fSmrg 8459209ff23fSmrg 8460ad43ddacSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8461ad43ddacSmrg# -------------------------------------------- 8462ad43ddacSmrgm4_define([lt_dict_add_subkey], 8463ad43ddacSmrg[m4_define([$1($2:$3)], [$4])]) 8464209ff23fSmrg 8465209ff23fSmrg 8466ad43ddacSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8467ad43ddacSmrg# ---------------------------------- 8468ad43ddacSmrgm4_define([lt_dict_fetch], 8469ad43ddacSmrg[m4_ifval([$3], 8470ad43ddacSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8471ad43ddacSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8472209ff23fSmrg 8473209ff23fSmrg 8474ad43ddacSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8475ad43ddacSmrg# ----------------------------------------------------------------- 8476ad43ddacSmrgm4_define([lt_if_dict_fetch], 8477ad43ddacSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8478ad43ddacSmrg [$5], 8479ad43ddacSmrg [$6])]) 8480209ff23fSmrg 8481209ff23fSmrg 8482ad43ddacSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8483ad43ddacSmrg# -------------------------------------------------------------- 8484ad43ddacSmrgm4_define([lt_dict_filter], 8485ad43ddacSmrg[m4_if([$5], [], [], 8486ad43ddacSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8487ad43ddacSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8488ad43ddacSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8489209ff23fSmrg]) 8490ad43ddacSmrg 8491ad43ddacSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8492ad43ddacSmrg# 849343df4709Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 8494ad43ddacSmrg# Written by Scott James Remnant, 2004 8495ad43ddacSmrg# 8496ad43ddacSmrg# This file is free software; the Free Software Foundation gives 8497ad43ddacSmrg# unlimited permission to copy and/or distribute it, with or without 8498ad43ddacSmrg# modifications, as long as this notice is preserved. 8499ad43ddacSmrg 850068105dcbSveego# @configure_input@ 8501ad43ddacSmrg 850243df4709Smrg# serial 3337 ltversion.m4 8503ad43ddacSmrg# This file is part of GNU Libtool 8504ad43ddacSmrg 850543df4709Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 850643df4709Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 8507ad43ddacSmrg 8508ad43ddacSmrgAC_DEFUN([LTVERSION_VERSION], 850943df4709Smrg[macro_version='2.4.2' 851043df4709Smrgmacro_revision='1.3337' 8511ad43ddacSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8512ad43ddacSmrg_LT_DECL(, macro_revision, 0) 8513209ff23fSmrg]) 8514209ff23fSmrg 8515ad43ddacSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8516ad43ddacSmrg# 851743df4709Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 8518ad43ddacSmrg# Written by Scott James Remnant, 2004. 8519ad43ddacSmrg# 8520ad43ddacSmrg# This file is free software; the Free Software Foundation gives 8521ad43ddacSmrg# unlimited permission to copy and/or distribute it, with or without 8522ad43ddacSmrg# modifications, as long as this notice is preserved. 8523ad43ddacSmrg 852468105dcbSveego# serial 5 lt~obsolete.m4 8525ad43ddacSmrg 8526ad43ddacSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 8527ad43ddacSmrg# 852843df4709Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 8529ad43ddacSmrg# which have later been changed to m4_define as they aren't part of the 8530ad43ddacSmrg# exported API, or moved to Autoconf or Automake where they belong. 8531ad43ddacSmrg# 8532ad43ddacSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8533ad43ddacSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8534ad43ddacSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 8535ad43ddacSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8536ad43ddacSmrg# and doesn't know about Autoconf macros at all.) 8537ad43ddacSmrg# 8538ad43ddacSmrg# So we provide this file, which has a silly filename so it's always 8539ad43ddacSmrg# included after everything else. This provides aclocal with the 8540ad43ddacSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8541ad43ddacSmrg# because those macros already exist, or will be overwritten later. 854243df4709Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8543ad43ddacSmrg# 8544ad43ddacSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8545ad43ddacSmrg# Yes, that means every name once taken will need to remain here until 8546ad43ddacSmrg# we give up compatibility with versions before 1.7, at which point 8547ad43ddacSmrg# we need to keep only those names which we still refer to. 8548ad43ddacSmrg 8549ad43ddacSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8550ad43ddacSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8551ad43ddacSmrg 8552ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8553ad43ddacSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8554ad43ddacSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8555ad43ddacSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8556ad43ddacSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8557ad43ddacSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8558ad43ddacSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8559ad43ddacSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8560ad43ddacSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8561ad43ddacSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8562ad43ddacSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8563ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8564ad43ddacSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8565ad43ddacSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8566ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8567ad43ddacSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8568ad43ddacSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8569ad43ddacSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8570ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8571ad43ddacSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8572ad43ddacSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8573ad43ddacSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8574ad43ddacSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8575ad43ddacSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8576ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8577ad43ddacSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8578ad43ddacSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8579ad43ddacSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8580ad43ddacSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8581ad43ddacSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8582ad43ddacSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8583ad43ddacSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8584ad43ddacSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8585ad43ddacSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8586ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8587ad43ddacSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8588ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8589ad43ddacSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8590ad43ddacSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8591ad43ddacSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8592ad43ddacSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8593ad43ddacSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8594ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8595ad43ddacSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8596ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8597ad43ddacSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8598ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8599ad43ddacSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8600ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8601ad43ddacSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8602ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8603ad43ddacSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8604ad43ddacSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8605ad43ddacSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 860668105dcbSveegom4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 860768105dcbSveegom4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 860868105dcbSveegom4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 860968105dcbSveegom4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 861068105dcbSveegom4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 861168105dcbSveegom4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 861268105dcbSveegom4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 8613ad43ddacSmrg 861443df4709Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 861543df4709Smrg# serial 1 (pkg-config-0.24) 861643df4709Smrg# 861743df4709Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 861843df4709Smrg# 861943df4709Smrg# This program is free software; you can redistribute it and/or modify 862043df4709Smrg# it under the terms of the GNU General Public License as published by 862143df4709Smrg# the Free Software Foundation; either version 2 of the License, or 862243df4709Smrg# (at your option) any later version. 862343df4709Smrg# 862443df4709Smrg# This program is distributed in the hope that it will be useful, but 862543df4709Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 862643df4709Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 862743df4709Smrg# General Public License for more details. 862843df4709Smrg# 862943df4709Smrg# You should have received a copy of the GNU General Public License 863043df4709Smrg# along with this program; if not, write to the Free Software 863143df4709Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 863243df4709Smrg# 863343df4709Smrg# As a special exception to the GNU General Public License, if you 863443df4709Smrg# distribute this file as part of a program that contains a 863543df4709Smrg# configuration script generated by Autoconf, you may include it under 863643df4709Smrg# the same distribution terms that you use for the rest of that program. 863743df4709Smrg 863843df4709Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 863943df4709Smrg# ---------------------------------- 8640209ff23fSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 8641209ff23fSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 864243df4709Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 864368105dcbSveegoAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 864468105dcbSveegoAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 864568105dcbSveegoAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 864668105dcbSveego 8647209ff23fSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8648209ff23fSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8649209ff23fSmrgfi 8650209ff23fSmrgif test -n "$PKG_CONFIG"; then 8651209ff23fSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 8652209ff23fSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8653209ff23fSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8654209ff23fSmrg AC_MSG_RESULT([yes]) 8655209ff23fSmrg else 8656209ff23fSmrg AC_MSG_RESULT([no]) 8657209ff23fSmrg PKG_CONFIG="" 8658209ff23fSmrg fi 8659209ff23fSmrgfi[]dnl 866043df4709Smrg])# PKG_PROG_PKG_CONFIG 8661209ff23fSmrg 866243df4709Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 866343df4709Smrg# 866443df4709Smrg# Check to see whether a particular set of modules exists. Similar 866543df4709Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 866643df4709Smrg# 866743df4709Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 866843df4709Smrg# only at the first occurence in configure.ac, so if the first place 866943df4709Smrg# it's called might be skipped (such as if it is within an "if", you 867043df4709Smrg# have to call PKG_CHECK_EXISTS manually 867143df4709Smrg# -------------------------------------------------------------- 8672209ff23fSmrgAC_DEFUN([PKG_CHECK_EXISTS], 8673209ff23fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8674209ff23fSmrgif test -n "$PKG_CONFIG" && \ 8675209ff23fSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 867668105dcbSveego m4_default([$2], [:]) 8677209ff23fSmrgm4_ifvaln([$3], [else 8678209ff23fSmrg $3])dnl 8679209ff23fSmrgfi]) 8680209ff23fSmrg 868143df4709Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 868243df4709Smrg# --------------------------------------------- 8683209ff23fSmrgm4_define([_PKG_CONFIG], 86842f39173dSmrg[if test -n "$$1"; then 86852f39173dSmrg pkg_cv_[]$1="$$1" 86862f39173dSmrg elif test -n "$PKG_CONFIG"; then 86872f39173dSmrg PKG_CHECK_EXISTS([$3], 868843df4709Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 86892f39173dSmrg [pkg_failed=yes]) 86902f39173dSmrg else 86912f39173dSmrg pkg_failed=untried 8692209ff23fSmrgfi[]dnl 869343df4709Smrg])# _PKG_CONFIG 8694209ff23fSmrg 869543df4709Smrg# _PKG_SHORT_ERRORS_SUPPORTED 869643df4709Smrg# ----------------------------- 8697209ff23fSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8698209ff23fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8699209ff23fSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8700209ff23fSmrg _pkg_short_errors_supported=yes 8701209ff23fSmrgelse 8702209ff23fSmrg _pkg_short_errors_supported=no 8703209ff23fSmrgfi[]dnl 870443df4709Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 8705209ff23fSmrg 8706209ff23fSmrg 870743df4709Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 870843df4709Smrg# [ACTION-IF-NOT-FOUND]) 870943df4709Smrg# 871043df4709Smrg# 871143df4709Smrg# Note that if there is a possibility the first call to 871243df4709Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 871343df4709Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 871443df4709Smrg# 871543df4709Smrg# 871643df4709Smrg# -------------------------------------------------------------- 8717209ff23fSmrgAC_DEFUN([PKG_CHECK_MODULES], 8718209ff23fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8719209ff23fSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8720209ff23fSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8721209ff23fSmrg 8722209ff23fSmrgpkg_failed=no 8723209ff23fSmrgAC_MSG_CHECKING([for $1]) 8724209ff23fSmrg 8725209ff23fSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8726209ff23fSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8727209ff23fSmrg 8728209ff23fSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8729209ff23fSmrgand $1[]_LIBS to avoid the need to call pkg-config. 8730209ff23fSmrgSee the pkg-config man page for more details.]) 8731209ff23fSmrg 8732209ff23fSmrgif test $pkg_failed = yes; then 873368105dcbSveego AC_MSG_RESULT([no]) 8734209ff23fSmrg _PKG_SHORT_ERRORS_SUPPORTED 8735209ff23fSmrg if test $_pkg_short_errors_supported = yes; then 873643df4709Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 8737209ff23fSmrg else 873843df4709Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 8739209ff23fSmrg fi 8740209ff23fSmrg # Put the nasty error message in config.log where it belongs 8741209ff23fSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8742209ff23fSmrg 874368105dcbSveego m4_default([$4], [AC_MSG_ERROR( 8744209ff23fSmrg[Package requirements ($2) were not met: 8745209ff23fSmrg 8746209ff23fSmrg$$1_PKG_ERRORS 8747209ff23fSmrg 8748209ff23fSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8749209ff23fSmrginstalled software in a non-standard prefix. 8750209ff23fSmrg 875143df4709Smrg_PKG_TEXT]) 875268105dcbSveego ]) 8753209ff23fSmrgelif test $pkg_failed = untried; then 875468105dcbSveego AC_MSG_RESULT([no]) 875568105dcbSveego m4_default([$4], [AC_MSG_FAILURE( 8756209ff23fSmrg[The pkg-config script could not be found or is too old. Make sure it 8757209ff23fSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 8758209ff23fSmrgpath to pkg-config. 8759209ff23fSmrg 8760209ff23fSmrg_PKG_TEXT 8761209ff23fSmrg 876243df4709SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 876368105dcbSveego ]) 8764209ff23fSmrgelse 8765209ff23fSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8766209ff23fSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8767209ff23fSmrg AC_MSG_RESULT([yes]) 876868105dcbSveego $3 8769209ff23fSmrgfi[]dnl 877043df4709Smrg])# PKG_CHECK_MODULES 8771209ff23fSmrg 87722f39173dSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 8773c503f109Smrgdnl 877468105dcbSveegodnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 877543df4709Smrgdnl 8776c503f109Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 87772f39173dSmrgdnl copy of this software and associated documentation files (the "Software"), 87782f39173dSmrgdnl to deal in the Software without restriction, including without limitation 87792f39173dSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 87802f39173dSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 87812f39173dSmrgdnl Software is furnished to do so, subject to the following conditions: 8782c503f109Smrgdnl 87832f39173dSmrgdnl The above copyright notice and this permission notice (including the next 87842f39173dSmrgdnl paragraph) shall be included in all copies or substantial portions of the 87852f39173dSmrgdnl Software. 8786c503f109Smrgdnl 87872f39173dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 87882f39173dSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 87892f39173dSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 87902f39173dSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 87912f39173dSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 87922f39173dSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 87932f39173dSmrgdnl DEALINGS IN THE SOFTWARE. 8794209ff23fSmrg 8795c503f109Smrg# XORG_MACROS_VERSION(required-version) 8796c503f109Smrg# ------------------------------------- 8797c503f109Smrg# Minimum version: 1.1.0 8798209ff23fSmrg# 8799c503f109Smrg# If you're using a macro added in Version 1.1 or newer, include this in 8800c503f109Smrg# your configure.ac with the minimum required version, such as: 8801c503f109Smrg# XORG_MACROS_VERSION(1.1) 8802209ff23fSmrg# 88032f39173dSmrg# To ensure that this macro is defined, also add: 88042f39173dSmrg# m4_ifndef([XORG_MACROS_VERSION], 88052f39173dSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 8806209ff23fSmrg# 8807209ff23fSmrg# 880843df4709Smrg# See the "minimum version" comment for each macro you use to see what 8809c503f109Smrg# version you require. 88102f39173dSmrgm4_defun([XORG_MACROS_VERSION],[ 881143df4709Smrgm4_define([vers_have], [1.16.1]) 88122f39173dSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 88132f39173dSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 88142f39173dSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 88152f39173dSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 88162f39173dSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 88172f39173dSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 88182f39173dSmrgm4_undefine([vers_have]) 88192f39173dSmrgm4_undefine([maj_have]) 88202f39173dSmrgm4_undefine([maj_needed]) 8821c503f109Smrg]) # XORG_MACROS_VERSION 8822209ff23fSmrg 8823c503f109Smrg# XORG_PROG_RAWCPP() 8824c503f109Smrg# ------------------ 8825c503f109Smrg# Minimum version: 1.0.0 8826209ff23fSmrg# 8827c503f109Smrg# Find cpp program and necessary flags for use in pre-processing text files 8828c503f109Smrg# such as man pages and config files 8829c503f109SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 8830c503f109SmrgAC_REQUIRE([AC_PROG_CPP]) 883143df4709SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 8832c503f109Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 8833209ff23fSmrg 8834c503f109Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 8835c503f109Smrg# which is not the best choice for supporting other OS'es, but covers most 8836c503f109Smrg# of the ones we need for now. 8837c503f109SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 883868105dcbSveegoAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 8839c503f109Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8840c503f109Smrg AC_MSG_RESULT([no]) 8841c503f109Smrgelse 8842c503f109Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8843c503f109Smrg RAWCPPFLAGS=-undef 8844c503f109Smrg AC_MSG_RESULT([yes]) 88452f39173dSmrg # under Cygwin unix is still defined even with -undef 88462f39173dSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 88472f39173dSmrg RAWCPPFLAGS="-undef -ansi" 88482f39173dSmrg AC_MSG_RESULT([yes, with -ansi]) 8849c503f109Smrg else 8850c503f109Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 8851c503f109Smrg fi 8852c503f109Smrgfi 8853c503f109Smrgrm -f conftest.$ac_ext 8854209ff23fSmrg 8855c503f109SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 885668105dcbSveegoAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 8857c503f109Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8858c503f109Smrg AC_MSG_RESULT([no]) 8859209ff23fSmrgelse 8860c503f109Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8861c503f109Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 8862c503f109Smrg AC_MSG_RESULT([yes]) 8863c503f109Smrg else 8864c503f109Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 8865c503f109Smrg fi 8866209ff23fSmrgfi 8867c503f109Smrgrm -f conftest.$ac_ext 8868c503f109SmrgAC_SUBST(RAWCPPFLAGS) 8869c503f109Smrg]) # XORG_PROG_RAWCPP 8870209ff23fSmrg 8871c503f109Smrg# XORG_MANPAGE_SECTIONS() 8872c503f109Smrg# ----------------------- 8873c503f109Smrg# Minimum version: 1.0.0 8874209ff23fSmrg# 8875c503f109Smrg# Determine which sections man pages go in for the different man page types 8876c503f109Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 8877c503f109Smrg# Not sure if there's any better way than just hardcoding by OS name. 8878c503f109Smrg# Override default settings by setting environment variables 88792f39173dSmrg# Added MAN_SUBSTS in version 1.8 88802f39173dSmrg# Added AC_PROG_SED in version 1.8 8881209ff23fSmrg 8882c503f109SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 8883c503f109SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 88842f39173dSmrgAC_REQUIRE([AC_PROG_SED]) 8885209ff23fSmrg 8886c503f109Smrgif test x$APP_MAN_SUFFIX = x ; then 8887c503f109Smrg APP_MAN_SUFFIX=1 8888c503f109Smrgfi 8889c503f109Smrgif test x$APP_MAN_DIR = x ; then 8890c503f109Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 8891c503f109Smrgfi 8892209ff23fSmrg 8893c503f109Smrgif test x$LIB_MAN_SUFFIX = x ; then 8894c503f109Smrg LIB_MAN_SUFFIX=3 8895c503f109Smrgfi 8896c503f109Smrgif test x$LIB_MAN_DIR = x ; then 8897c503f109Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 8898c503f109Smrgfi 8899209ff23fSmrg 8900c503f109Smrgif test x$FILE_MAN_SUFFIX = x ; then 8901c503f109Smrg case $host_os in 8902c503f109Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 8903c503f109Smrg *) FILE_MAN_SUFFIX=5 ;; 8904c503f109Smrg esac 8905c503f109Smrgfi 8906c503f109Smrgif test x$FILE_MAN_DIR = x ; then 8907c503f109Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 8908c503f109Smrgfi 8909209ff23fSmrg 8910c503f109Smrgif test x$MISC_MAN_SUFFIX = x ; then 8911c503f109Smrg case $host_os in 8912c503f109Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 8913c503f109Smrg *) MISC_MAN_SUFFIX=7 ;; 8914209ff23fSmrg esac 8915c503f109Smrgfi 8916c503f109Smrgif test x$MISC_MAN_DIR = x ; then 8917c503f109Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 8918c503f109Smrgfi 8919209ff23fSmrg 8920c503f109Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 8921c503f109Smrg case $host_os in 8922c503f109Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 8923c503f109Smrg *) DRIVER_MAN_SUFFIX=4 ;; 8924c503f109Smrg esac 8925c503f109Smrgfi 8926c503f109Smrgif test x$DRIVER_MAN_DIR = x ; then 8927c503f109Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 8928209ff23fSmrgfi 8929209ff23fSmrg 8930c503f109Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 8931c503f109Smrg case $host_os in 8932c503f109Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 8933c503f109Smrg *) ADMIN_MAN_SUFFIX=8 ;; 8934c503f109Smrg esac 8935c503f109Smrgfi 8936c503f109Smrgif test x$ADMIN_MAN_DIR = x ; then 8937c503f109Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 8938c503f109Smrgfi 8939209ff23fSmrg 8940209ff23fSmrg 8941c503f109SmrgAC_SUBST([APP_MAN_SUFFIX]) 8942c503f109SmrgAC_SUBST([LIB_MAN_SUFFIX]) 8943c503f109SmrgAC_SUBST([FILE_MAN_SUFFIX]) 8944c503f109SmrgAC_SUBST([MISC_MAN_SUFFIX]) 8945c503f109SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 8946c503f109SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 8947c503f109SmrgAC_SUBST([APP_MAN_DIR]) 8948c503f109SmrgAC_SUBST([LIB_MAN_DIR]) 8949c503f109SmrgAC_SUBST([FILE_MAN_DIR]) 8950c503f109SmrgAC_SUBST([MISC_MAN_DIR]) 8951c503f109SmrgAC_SUBST([DRIVER_MAN_DIR]) 8952c503f109SmrgAC_SUBST([ADMIN_MAN_DIR]) 89532f39173dSmrg 89542f39173dSmrgXORG_MAN_PAGE="X Version 11" 89552f39173dSmrgAC_SUBST([XORG_MAN_PAGE]) 89562f39173dSmrgMAN_SUBSTS="\ 89572f39173dSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 89582f39173dSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 89592f39173dSmrg -e 's|__xservername__|Xorg|g' \ 89602f39173dSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 89612f39173dSmrg -e 's|__projectroot__|\$(prefix)|g' \ 896268105dcbSveego -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 89632f39173dSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 89642f39173dSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 89652f39173dSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 89662f39173dSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 89672f39173dSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 89682f39173dSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 89692f39173dSmrgAC_SUBST([MAN_SUBSTS]) 89702f39173dSmrg 8971c503f109Smrg]) # XORG_MANPAGE_SECTIONS 8972209ff23fSmrg 89732f39173dSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 89742f39173dSmrg# ------------------------ 89752f39173dSmrg# Minimum version: 1.7.0 89762f39173dSmrg# 89772f39173dSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 89782f39173dSmrg# provided by xorg-sgml-doctools, if installed. 89792f39173dSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 89802f39173dSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 89812f39173dSmrgXORG_SGML_PATH= 89822f39173dSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 89832f39173dSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 89842f39173dSmrg [m4_ifval([$1],[:], 89852f39173dSmrg [if test x"$cross_compiling" != x"yes" ; then 89862f39173dSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 89872f39173dSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 89882f39173dSmrg fi]) 89892f39173dSmrg ]) 89902f39173dSmrg 899140732134Srjs# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 899240732134Srjs# the path and the name of the doc stylesheet 89932f39173dSmrgif test "x$XORG_SGML_PATH" != "x" ; then 89942f39173dSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 899540732134Srjs STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 899640732134Srjs XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 89972f39173dSmrgelse 89982f39173dSmrg AC_MSG_RESULT([no]) 89992f39173dSmrgfi 90002f39173dSmrg 90012f39173dSmrgAC_SUBST(XORG_SGML_PATH) 900240732134SrjsAC_SUBST(STYLESHEET_SRCDIR) 900340732134SrjsAC_SUBST(XSL_STYLESHEET) 900440732134SrjsAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 90052f39173dSmrg]) # XORG_CHECK_SGML_DOCTOOLS 90062f39173dSmrg 9007c503f109Smrg# XORG_CHECK_LINUXDOC 9008c503f109Smrg# ------------------- 9009c503f109Smrg# Minimum version: 1.0.0 9010c503f109Smrg# 9011c503f109Smrg# Defines the variable MAKE_TEXT if the necessary tools and 9012c503f109Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9013c503f109Smrg# Whether or not the necessary tools and files are found can be checked 9014c503f109Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9015c503f109SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 90162f39173dSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 90172f39173dSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9018209ff23fSmrg 9019c503f109SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9020209ff23fSmrg 90212f39173dSmrgAC_MSG_CHECKING([whether to build documentation]) 9022209ff23fSmrg 90232f39173dSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9024c503f109Smrg BUILDDOC=yes 9025c503f109Smrgelse 9026c503f109Smrg BUILDDOC=no 9027c503f109Smrgfi 9028209ff23fSmrg 9029c503f109SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9030209ff23fSmrg 9031c503f109SmrgAC_MSG_RESULT([$BUILDDOC]) 9032209ff23fSmrg 90332f39173dSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9034209ff23fSmrg 90352f39173dSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9036c503f109Smrg BUILDPDFDOC=yes 9037c503f109Smrgelse 9038c503f109Smrg BUILDPDFDOC=no 9039c503f109Smrgfi 9040209ff23fSmrg 9041c503f109SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9042209ff23fSmrg 9043c503f109SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9044209ff23fSmrg 90452f39173dSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9046c503f109SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9047c503f109SmrgMAKE_PDF="$PS2PDF" 9048c503f109SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9049209ff23fSmrg 9050c503f109SmrgAC_SUBST(MAKE_TEXT) 9051c503f109SmrgAC_SUBST(MAKE_PS) 9052c503f109SmrgAC_SUBST(MAKE_PDF) 9053c503f109SmrgAC_SUBST(MAKE_HTML) 9054c503f109Smrg]) # XORG_CHECK_LINUXDOC 9055209ff23fSmrg 9056c503f109Smrg# XORG_CHECK_DOCBOOK 9057c503f109Smrg# ------------------- 9058c503f109Smrg# Minimum version: 1.0.0 9059c503f109Smrg# 9060c503f109Smrg# Checks for the ability to build output formats from SGML DocBook source. 9061c503f109Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9062c503f109Smrg# indicates whether the necessary tools and files are found and, if set, 9063c503f109Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9064c503f109SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 90652f39173dSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 90662f39173dSmrg 9067c503f109SmrgBUILDTXTDOC=no 9068c503f109SmrgBUILDPDFDOC=no 9069c503f109SmrgBUILDPSDOC=no 9070c503f109SmrgBUILDHTMLDOC=no 9071209ff23fSmrg 9072c503f109SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9073c503f109SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9074c503f109SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9075c503f109SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9076209ff23fSmrg 90772f39173dSmrgAC_MSG_CHECKING([whether to build text documentation]) 90782f39173dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9079c503f109Smrg test x$BUILD_TXTDOC != xno; then 9080c503f109Smrg BUILDTXTDOC=yes 9081c503f109Smrgfi 9082c503f109SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9083c503f109SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9084209ff23fSmrg 90852f39173dSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 90862f39173dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9087ad43ddacSmrg test x$BUILD_PDFDOC != xno; then 9088ad43ddacSmrg BUILDPDFDOC=yes 9089ad43ddacSmrgfi 9090ad43ddacSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9091ad43ddacSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9092ad43ddacSmrg 90932f39173dSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 90942f39173dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9095ad43ddacSmrg test x$BUILD_PSDOC != xno; then 9096ad43ddacSmrg BUILDPSDOC=yes 9097ad43ddacSmrgfi 9098ad43ddacSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9099ad43ddacSmrgAC_MSG_RESULT([$BUILDPSDOC]) 9100ad43ddacSmrg 91012f39173dSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 91022f39173dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9103ad43ddacSmrg test x$BUILD_HTMLDOC != xno; then 9104ad43ddacSmrg BUILDHTMLDOC=yes 9105ad43ddacSmrgfi 9106ad43ddacSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9107ad43ddacSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9108ad43ddacSmrg 9109ad43ddacSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9110ad43ddacSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9111ad43ddacSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9112ad43ddacSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9113ad43ddacSmrg 9114ad43ddacSmrgAC_SUBST(MAKE_TEXT) 9115ad43ddacSmrgAC_SUBST(MAKE_PS) 9116ad43ddacSmrgAC_SUBST(MAKE_PDF) 9117ad43ddacSmrgAC_SUBST(MAKE_HTML) 9118ad43ddacSmrg]) # XORG_CHECK_DOCBOOK 9119ad43ddacSmrg 912068105dcbSveego# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 91212f39173dSmrg# ---------------- 91222f39173dSmrg# Minimum version: 1.5.0 912368105dcbSveego# Minimum version for optional DEFAULT argument: 1.11.0 91242f39173dSmrg# 91252f39173dSmrg# Documentation tools are not always available on all platforms and sometimes 91262f39173dSmrg# not at the appropriate level. This macro enables a module to test for the 91272f39173dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 91282f39173dSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 912968105dcbSveego# as whether or not to use the xmlto package. When DEFAULT is not specified, 913068105dcbSveego# --with-xmlto assumes 'auto'. 91312f39173dSmrg# 91322f39173dSmrg# Interface to module: 91332f39173dSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 91342f39173dSmrg# XMLTO: returns the path of the xmlto program found 91352f39173dSmrg# returns the path set by the user in the environment 91362f39173dSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 91372f39173dSmrg# 'no' user instructs the module not to use xmlto 91382f39173dSmrg# 913940732134Srjs# Added in version 1.10.0 914040732134Srjs# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 914140732134Srjs# xmlto for text output requires either lynx, links, or w3m browsers 914240732134Srjs# 91432f39173dSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 91442f39173dSmrg# 91452f39173dSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 91462f39173dSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 914768105dcbSveegom4_define([_defopt], m4_default([$2], [auto])) 91482f39173dSmrgAC_ARG_WITH(xmlto, 91492f39173dSmrg AS_HELP_STRING([--with-xmlto], 915068105dcbSveego [Use xmlto to regenerate documentation (default: ]_defopt[)]), 915168105dcbSveego [use_xmlto=$withval], [use_xmlto=]_defopt) 915268105dcbSveegom4_undefine([_defopt]) 91532f39173dSmrg 91542f39173dSmrgif test "x$use_xmlto" = x"auto"; then 91552f39173dSmrg AC_PATH_PROG([XMLTO], [xmlto]) 91562f39173dSmrg if test "x$XMLTO" = "x"; then 91572f39173dSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 91582f39173dSmrg have_xmlto=no 91592f39173dSmrg else 91602f39173dSmrg have_xmlto=yes 91612f39173dSmrg fi 91622f39173dSmrgelif test "x$use_xmlto" = x"yes" ; then 91632f39173dSmrg AC_PATH_PROG([XMLTO], [xmlto]) 91642f39173dSmrg if test "x$XMLTO" = "x"; then 91652f39173dSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 91662f39173dSmrg fi 91672f39173dSmrg have_xmlto=yes 91682f39173dSmrgelif test "x$use_xmlto" = x"no" ; then 91692f39173dSmrg if test "x$XMLTO" != "x"; then 91702f39173dSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 91712f39173dSmrg fi 91722f39173dSmrg have_xmlto=no 91732f39173dSmrgelse 91742f39173dSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 91752f39173dSmrgfi 917640732134Srjs 917740732134Srjs# Test for a minimum version of xmlto, if provided. 91782f39173dSmrgm4_ifval([$1], 91792f39173dSmrg[if test "$have_xmlto" = yes; then 91802f39173dSmrg # scrape the xmlto version 91812f39173dSmrg AC_MSG_CHECKING([the xmlto version]) 91822f39173dSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 91832f39173dSmrg AC_MSG_RESULT([$xmlto_version]) 91842f39173dSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 91852f39173dSmrg [if test "x$use_xmlto" = xauto; then 91862f39173dSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 91872f39173dSmrg have_xmlto=no 91882f39173dSmrg else 91892f39173dSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 91902f39173dSmrg fi]) 91912f39173dSmrgfi]) 919240732134Srjs 919340732134Srjs# Test for the ability of xmlto to generate a text target 919440732134Srjshave_xmlto_text=no 919540732134Srjscat > conftest.xml << "EOF" 919640732134SrjsEOF 919740732134SrjsAS_IF([test "$have_xmlto" = yes], 919840732134Srjs [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 919940732134Srjs [have_xmlto_text=yes], 920043df4709Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 920140732134Srjsrm -f conftest.xml 920240732134SrjsAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 92032f39173dSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 92042f39173dSmrg]) # XORG_WITH_XMLTO 92052f39173dSmrg 920668105dcbSveego# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 920768105dcbSveego# -------------------------------------------- 920868105dcbSveego# Minimum version: 1.12.0 920968105dcbSveego# Minimum version for optional DEFAULT argument: 1.12.0 921068105dcbSveego# 921168105dcbSveego# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 921268105dcbSveego# XML-based language used for the transformation of XML documents. 921368105dcbSveego# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 921468105dcbSveego# It is used under the cover by xmlto to generate html files from DocBook/XML. 921568105dcbSveego# The XSLT processor is often used as a standalone tool for transformations. 921668105dcbSveego# It should not be assumed that this tool is used only to work with documnetation. 921768105dcbSveego# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 921868105dcbSveego# 921968105dcbSveego# Interface to module: 922068105dcbSveego# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 922168105dcbSveego# XSLTPROC: returns the path of the xsltproc program found 922268105dcbSveego# returns the path set by the user in the environment 922368105dcbSveego# --with-xsltproc: 'yes' user instructs the module to use xsltproc 922468105dcbSveego# 'no' user instructs the module not to use xsltproc 922568105dcbSveego# have_xsltproc: returns yes if xsltproc found in PATH or no 922668105dcbSveego# 922768105dcbSveego# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 922868105dcbSveego# 922968105dcbSveegoAC_DEFUN([XORG_WITH_XSLTPROC],[ 923068105dcbSveegoAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 923168105dcbSveego# Preserves the interface, should it be implemented later 923268105dcbSveegom4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 923368105dcbSveegom4_define([_defopt], m4_default([$2], [auto])) 923468105dcbSveegoAC_ARG_WITH(xsltproc, 923568105dcbSveego AS_HELP_STRING([--with-xsltproc], 923668105dcbSveego [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 923768105dcbSveego [use_xsltproc=$withval], [use_xsltproc=]_defopt) 923868105dcbSveegom4_undefine([_defopt]) 923968105dcbSveego 924068105dcbSveegoif test "x$use_xsltproc" = x"auto"; then 924168105dcbSveego AC_PATH_PROG([XSLTPROC], [xsltproc]) 924268105dcbSveego if test "x$XSLTPROC" = "x"; then 924368105dcbSveego AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 924468105dcbSveego have_xsltproc=no 924568105dcbSveego else 924668105dcbSveego have_xsltproc=yes 924768105dcbSveego fi 924868105dcbSveegoelif test "x$use_xsltproc" = x"yes" ; then 924968105dcbSveego AC_PATH_PROG([XSLTPROC], [xsltproc]) 925068105dcbSveego if test "x$XSLTPROC" = "x"; then 925168105dcbSveego AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 925268105dcbSveego fi 925368105dcbSveego have_xsltproc=yes 925468105dcbSveegoelif test "x$use_xsltproc" = x"no" ; then 925568105dcbSveego if test "x$XSLTPROC" != "x"; then 925668105dcbSveego AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 925768105dcbSveego fi 925868105dcbSveego have_xsltproc=no 925968105dcbSveegoelse 926068105dcbSveego AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 926168105dcbSveegofi 926268105dcbSveego 926368105dcbSveegoAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 926468105dcbSveego]) # XORG_WITH_XSLTPROC 926568105dcbSveego 926668105dcbSveego# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 926768105dcbSveego# ---------------------------------------- 926868105dcbSveego# Minimum version: 1.15.0 926968105dcbSveego# 927068105dcbSveego# PERL (Practical Extraction and Report Language) is a language optimized for 927168105dcbSveego# scanning arbitrary text files, extracting information from those text files, 927268105dcbSveego# and printing reports based on that information. 927368105dcbSveego# 927468105dcbSveego# When DEFAULT is not specified, --with-perl assumes 'auto'. 927568105dcbSveego# 927668105dcbSveego# Interface to module: 927768105dcbSveego# HAVE_PERL: used in makefiles to conditionally scan text files 927868105dcbSveego# PERL: returns the path of the perl program found 927968105dcbSveego# returns the path set by the user in the environment 928068105dcbSveego# --with-perl: 'yes' user instructs the module to use perl 928168105dcbSveego# 'no' user instructs the module not to use perl 928268105dcbSveego# have_perl: returns yes if perl found in PATH or no 928368105dcbSveego# 928468105dcbSveego# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 928568105dcbSveego# 928668105dcbSveegoAC_DEFUN([XORG_WITH_PERL],[ 928768105dcbSveegoAC_ARG_VAR([PERL], [Path to perl command]) 928868105dcbSveego# Preserves the interface, should it be implemented later 928968105dcbSveegom4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 929068105dcbSveegom4_define([_defopt], m4_default([$2], [auto])) 929168105dcbSveegoAC_ARG_WITH(perl, 929268105dcbSveego AS_HELP_STRING([--with-perl], 929368105dcbSveego [Use perl for extracting information from files (default: ]_defopt[)]), 929468105dcbSveego [use_perl=$withval], [use_perl=]_defopt) 929568105dcbSveegom4_undefine([_defopt]) 929668105dcbSveego 929768105dcbSveegoif test "x$use_perl" = x"auto"; then 929868105dcbSveego AC_PATH_PROG([PERL], [perl]) 929968105dcbSveego if test "x$PERL" = "x"; then 930068105dcbSveego AC_MSG_WARN([perl not found - cannot extract information and report]) 930168105dcbSveego have_perl=no 930268105dcbSveego else 930368105dcbSveego have_perl=yes 930468105dcbSveego fi 930568105dcbSveegoelif test "x$use_perl" = x"yes" ; then 930668105dcbSveego AC_PATH_PROG([PERL], [perl]) 930768105dcbSveego if test "x$PERL" = "x"; then 930868105dcbSveego AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 930968105dcbSveego fi 931068105dcbSveego have_perl=yes 931168105dcbSveegoelif test "x$use_perl" = x"no" ; then 931268105dcbSveego if test "x$PERL" != "x"; then 931368105dcbSveego AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 931468105dcbSveego fi 931568105dcbSveego have_perl=no 931668105dcbSveegoelse 931768105dcbSveego AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 931868105dcbSveegofi 931968105dcbSveego 932068105dcbSveegoAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 932168105dcbSveego]) # XORG_WITH_PERL 932268105dcbSveego 932368105dcbSveego# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 93242f39173dSmrg# ---------------- 93252f39173dSmrg# Minimum version: 1.5.0 932668105dcbSveego# Minimum version for optional DEFAULT argument: 1.11.0 93272f39173dSmrg# 93282f39173dSmrg# Documentation tools are not always available on all platforms and sometimes 93292f39173dSmrg# not at the appropriate level. This macro enables a module to test for the 93302f39173dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 93312f39173dSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 933268105dcbSveego# as whether or not to use the asciidoc package. When DEFAULT is not specified, 933368105dcbSveego# --with-asciidoc assumes 'auto'. 93342f39173dSmrg# 93352f39173dSmrg# Interface to module: 93362f39173dSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 93372f39173dSmrg# ASCIIDOC: returns the path of the asciidoc program found 93382f39173dSmrg# returns the path set by the user in the environment 93392f39173dSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 93402f39173dSmrg# 'no' user instructs the module not to use asciidoc 93412f39173dSmrg# 93422f39173dSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 93432f39173dSmrg# 93442f39173dSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 93452f39173dSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 934668105dcbSveegom4_define([_defopt], m4_default([$2], [auto])) 93472f39173dSmrgAC_ARG_WITH(asciidoc, 93482f39173dSmrg AS_HELP_STRING([--with-asciidoc], 934968105dcbSveego [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 935068105dcbSveego [use_asciidoc=$withval], [use_asciidoc=]_defopt) 935168105dcbSveegom4_undefine([_defopt]) 93522f39173dSmrg 93532f39173dSmrgif test "x$use_asciidoc" = x"auto"; then 93542f39173dSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 93552f39173dSmrg if test "x$ASCIIDOC" = "x"; then 93562f39173dSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 93572f39173dSmrg have_asciidoc=no 93582f39173dSmrg else 93592f39173dSmrg have_asciidoc=yes 93602f39173dSmrg fi 93612f39173dSmrgelif test "x$use_asciidoc" = x"yes" ; then 93622f39173dSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 93632f39173dSmrg if test "x$ASCIIDOC" = "x"; then 93642f39173dSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 93652f39173dSmrg fi 93662f39173dSmrg have_asciidoc=yes 93672f39173dSmrgelif test "x$use_asciidoc" = x"no" ; then 93682f39173dSmrg if test "x$ASCIIDOC" != "x"; then 93692f39173dSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 93702f39173dSmrg fi 93712f39173dSmrg have_asciidoc=no 93722f39173dSmrgelse 93732f39173dSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 93742f39173dSmrgfi 93752f39173dSmrgm4_ifval([$1], 93762f39173dSmrg[if test "$have_asciidoc" = yes; then 93772f39173dSmrg # scrape the asciidoc version 93782f39173dSmrg AC_MSG_CHECKING([the asciidoc version]) 93792f39173dSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 93802f39173dSmrg AC_MSG_RESULT([$asciidoc_version]) 93812f39173dSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 93822f39173dSmrg [if test "x$use_asciidoc" = xauto; then 93832f39173dSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 93842f39173dSmrg have_asciidoc=no 93852f39173dSmrg else 93862f39173dSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 93872f39173dSmrg fi]) 93882f39173dSmrgfi]) 93892f39173dSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 93902f39173dSmrg]) # XORG_WITH_ASCIIDOC 93912f39173dSmrg 939268105dcbSveego# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 939343df4709Smrg# -------------------------------- 93942f39173dSmrg# Minimum version: 1.5.0 939568105dcbSveego# Minimum version for optional DEFAULT argument: 1.11.0 93962f39173dSmrg# 93972f39173dSmrg# Documentation tools are not always available on all platforms and sometimes 93982f39173dSmrg# not at the appropriate level. This macro enables a module to test for the 93992f39173dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 94002f39173dSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 940168105dcbSveego# as whether or not to use the doxygen package. When DEFAULT is not specified, 940268105dcbSveego# --with-doxygen assumes 'auto'. 94032f39173dSmrg# 94042f39173dSmrg# Interface to module: 94052f39173dSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 94062f39173dSmrg# DOXYGEN: returns the path of the doxygen program found 94072f39173dSmrg# returns the path set by the user in the environment 94082f39173dSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 94092f39173dSmrg# 'no' user instructs the module not to use doxygen 94102f39173dSmrg# 94112f39173dSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 94122f39173dSmrg# 94132f39173dSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 94142f39173dSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 941568105dcbSveegom4_define([_defopt], m4_default([$2], [auto])) 94162f39173dSmrgAC_ARG_WITH(doxygen, 94172f39173dSmrg AS_HELP_STRING([--with-doxygen], 941868105dcbSveego [Use doxygen to regenerate documentation (default: ]_defopt[)]), 941968105dcbSveego [use_doxygen=$withval], [use_doxygen=]_defopt) 942068105dcbSveegom4_undefine([_defopt]) 94212f39173dSmrg 94222f39173dSmrgif test "x$use_doxygen" = x"auto"; then 94232f39173dSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 94242f39173dSmrg if test "x$DOXYGEN" = "x"; then 94252f39173dSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 94262f39173dSmrg have_doxygen=no 94272f39173dSmrg else 94282f39173dSmrg have_doxygen=yes 94292f39173dSmrg fi 94302f39173dSmrgelif test "x$use_doxygen" = x"yes" ; then 94312f39173dSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 94322f39173dSmrg if test "x$DOXYGEN" = "x"; then 94332f39173dSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 94342f39173dSmrg fi 94352f39173dSmrg have_doxygen=yes 94362f39173dSmrgelif test "x$use_doxygen" = x"no" ; then 94372f39173dSmrg if test "x$DOXYGEN" != "x"; then 94382f39173dSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 94392f39173dSmrg fi 94402f39173dSmrg have_doxygen=no 94412f39173dSmrgelse 94422f39173dSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 94432f39173dSmrgfi 94442f39173dSmrgm4_ifval([$1], 94452f39173dSmrg[if test "$have_doxygen" = yes; then 94462f39173dSmrg # scrape the doxygen version 94472f39173dSmrg AC_MSG_CHECKING([the doxygen version]) 94482f39173dSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 94492f39173dSmrg AC_MSG_RESULT([$doxygen_version]) 94502f39173dSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 94512f39173dSmrg [if test "x$use_doxygen" = xauto; then 94522f39173dSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 94532f39173dSmrg have_doxygen=no 94542f39173dSmrg else 94552f39173dSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 94562f39173dSmrg fi]) 94572f39173dSmrgfi]) 94582f39173dSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 94592f39173dSmrg]) # XORG_WITH_DOXYGEN 94602f39173dSmrg 946168105dcbSveego# XORG_WITH_GROFF([DEFAULT]) 94622f39173dSmrg# ---------------- 94632f39173dSmrg# Minimum version: 1.6.0 946468105dcbSveego# Minimum version for optional DEFAULT argument: 1.11.0 94652f39173dSmrg# 94662f39173dSmrg# Documentation tools are not always available on all platforms and sometimes 94672f39173dSmrg# not at the appropriate level. This macro enables a module to test for the 94682f39173dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 94692f39173dSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 947068105dcbSveego# as whether or not to use the groff package. When DEFAULT is not specified, 947168105dcbSveego# --with-groff assumes 'auto'. 94722f39173dSmrg# 94732f39173dSmrg# Interface to module: 94742f39173dSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 94752f39173dSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 94762f39173dSmrg# HAVE_GROFF_MS: the -ms macros package 94772f39173dSmrg# GROFF: returns the path of the groff program found 94782f39173dSmrg# returns the path set by the user in the environment 94792f39173dSmrg# --with-groff: 'yes' user instructs the module to use groff 94802f39173dSmrg# 'no' user instructs the module not to use groff 94812f39173dSmrg# 948240732134Srjs# Added in version 1.9.0: 948340732134Srjs# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 948440732134Srjs# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 948540732134Srjs# psselect from the psutils package. 948640732134Srjs# the ghostcript package. Refer to the grohtml man pages 948740732134Srjs# 94882f39173dSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 94892f39173dSmrg# 94902f39173dSmrg# OS and distros often splits groff in a basic and full package, the former 94912f39173dSmrg# having the groff program and the later having devices, fonts and macros 94922f39173dSmrg# Checking for the groff executable is not enough. 94932f39173dSmrg# 94942f39173dSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 94952f39173dSmrg# unset HAVE_GROFF or GROFF env variables. 94962f39173dSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 94972f39173dSmrg# 94982f39173dSmrgAC_DEFUN([XORG_WITH_GROFF],[ 94992f39173dSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 950068105dcbSveegom4_define([_defopt], m4_default([$1], [auto])) 95012f39173dSmrgAC_ARG_WITH(groff, 95022f39173dSmrg AS_HELP_STRING([--with-groff], 950368105dcbSveego [Use groff to regenerate documentation (default: ]_defopt[)]), 950468105dcbSveego [use_groff=$withval], [use_groff=]_defopt) 950568105dcbSveegom4_undefine([_defopt]) 95062f39173dSmrg 95072f39173dSmrgif test "x$use_groff" = x"auto"; then 95082f39173dSmrg AC_PATH_PROG([GROFF], [groff]) 95092f39173dSmrg if test "x$GROFF" = "x"; then 95102f39173dSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 95112f39173dSmrg have_groff=no 95122f39173dSmrg else 95132f39173dSmrg have_groff=yes 95142f39173dSmrg fi 95152f39173dSmrgelif test "x$use_groff" = x"yes" ; then 95162f39173dSmrg AC_PATH_PROG([GROFF], [groff]) 95172f39173dSmrg if test "x$GROFF" = "x"; then 95182f39173dSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 95192f39173dSmrg fi 95202f39173dSmrg have_groff=yes 95212f39173dSmrgelif test "x$use_groff" = x"no" ; then 95222f39173dSmrg if test "x$GROFF" != "x"; then 95232f39173dSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 95242f39173dSmrg fi 95252f39173dSmrg have_groff=no 95262f39173dSmrgelse 95272f39173dSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 95282f39173dSmrgfi 952940732134Srjs 95302f39173dSmrg# We have groff, test for the presence of the macro packages 95312f39173dSmrgif test "x$have_groff" = x"yes"; then 95322f39173dSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 95332f39173dSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 95342f39173dSmrg groff_ms_works=yes 95352f39173dSmrg else 95362f39173dSmrg groff_ms_works=no 95372f39173dSmrg fi 95382f39173dSmrg AC_MSG_RESULT([$groff_ms_works]) 95392f39173dSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 95402f39173dSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 95412f39173dSmrg groff_mm_works=yes 95422f39173dSmrg else 95432f39173dSmrg groff_mm_works=no 95442f39173dSmrg fi 95452f39173dSmrg AC_MSG_RESULT([$groff_mm_works]) 95462f39173dSmrgfi 954740732134Srjs 954840732134Srjs# We have groff, test for HTML dependencies, one command per package 954940732134Srjsif test "x$have_groff" = x"yes"; then 955040732134Srjs AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 955140732134Srjs AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 955240732134Srjs AC_PATH_PROG(PSSELECT_PATH, [psselect]) 955340732134Srjs if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 955440732134Srjs have_groff_html=yes 955540732134Srjs else 955640732134Srjs have_groff_html=no 955740732134Srjs AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 955840732134Srjs fi 955940732134Srjsfi 956040732134Srjs 956140732134Srjs# Set Automake conditionals for Makefiles 95622f39173dSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 95632f39173dSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 95642f39173dSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 956540732134SrjsAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 95662f39173dSmrg]) # XORG_WITH_GROFF 95672f39173dSmrg 956868105dcbSveego# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 956968105dcbSveego# --------------------------------------- 95702f39173dSmrg# Minimum version: 1.6.0 957168105dcbSveego# Minimum version for optional DEFAULT argument: 1.11.0 957268105dcbSveego# Minimum version for optional MIN-VERSION argument: 1.15.0 95732f39173dSmrg# 95742f39173dSmrg# Documentation tools are not always available on all platforms and sometimes 95752f39173dSmrg# not at the appropriate level. This macro enables a module to test for the 95762f39173dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 95772f39173dSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 957868105dcbSveego# as whether or not to use the fop package. When DEFAULT is not specified, 957968105dcbSveego# --with-fop assumes 'auto'. 95802f39173dSmrg# 95812f39173dSmrg# Interface to module: 95822f39173dSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 95832f39173dSmrg# FOP: returns the path of the fop program found 95842f39173dSmrg# returns the path set by the user in the environment 95852f39173dSmrg# --with-fop: 'yes' user instructs the module to use fop 95862f39173dSmrg# 'no' user instructs the module not to use fop 95872f39173dSmrg# 95882f39173dSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 95892f39173dSmrg# 95902f39173dSmrgAC_DEFUN([XORG_WITH_FOP],[ 95912f39173dSmrgAC_ARG_VAR([FOP], [Path to fop command]) 959268105dcbSveegom4_define([_defopt], m4_default([$2], [auto])) 95932f39173dSmrgAC_ARG_WITH(fop, 95942f39173dSmrg AS_HELP_STRING([--with-fop], 959568105dcbSveego [Use fop to regenerate documentation (default: ]_defopt[)]), 959668105dcbSveego [use_fop=$withval], [use_fop=]_defopt) 959768105dcbSveegom4_undefine([_defopt]) 95982f39173dSmrg 95992f39173dSmrgif test "x$use_fop" = x"auto"; then 96002f39173dSmrg AC_PATH_PROG([FOP], [fop]) 96012f39173dSmrg if test "x$FOP" = "x"; then 96022f39173dSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 96032f39173dSmrg have_fop=no 96042f39173dSmrg else 96052f39173dSmrg have_fop=yes 96062f39173dSmrg fi 96072f39173dSmrgelif test "x$use_fop" = x"yes" ; then 96082f39173dSmrg AC_PATH_PROG([FOP], [fop]) 96092f39173dSmrg if test "x$FOP" = "x"; then 96102f39173dSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 96112f39173dSmrg fi 96122f39173dSmrg have_fop=yes 96132f39173dSmrgelif test "x$use_fop" = x"no" ; then 96142f39173dSmrg if test "x$FOP" != "x"; then 96152f39173dSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 96162f39173dSmrg fi 96172f39173dSmrg have_fop=no 96182f39173dSmrgelse 96192f39173dSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 96202f39173dSmrgfi 962168105dcbSveego 962268105dcbSveego# Test for a minimum version of fop, if provided. 962368105dcbSveegom4_ifval([$1], 962468105dcbSveego[if test "$have_fop" = yes; then 962568105dcbSveego # scrape the fop version 962668105dcbSveego AC_MSG_CHECKING([for fop minimum version]) 962768105dcbSveego fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 962868105dcbSveego AC_MSG_RESULT([$fop_version]) 962968105dcbSveego AS_VERSION_COMPARE([$fop_version], [$1], 963068105dcbSveego [if test "x$use_fop" = xauto; then 963168105dcbSveego AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 963268105dcbSveego have_fop=no 963368105dcbSveego else 963468105dcbSveego AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 963568105dcbSveego fi]) 963668105dcbSveegofi]) 96372f39173dSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 96382f39173dSmrg]) # XORG_WITH_FOP 96392f39173dSmrg 964068105dcbSveego# XORG_WITH_PS2PDF([DEFAULT]) 96412f39173dSmrg# ---------------- 96422f39173dSmrg# Minimum version: 1.6.0 964368105dcbSveego# Minimum version for optional DEFAULT argument: 1.11.0 96442f39173dSmrg# 96452f39173dSmrg# Documentation tools are not always available on all platforms and sometimes 96462f39173dSmrg# not at the appropriate level. This macro enables a module to test for the 96472f39173dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 96482f39173dSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 964968105dcbSveego# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 965068105dcbSveego# --with-ps2pdf assumes 'auto'. 96512f39173dSmrg# 96522f39173dSmrg# Interface to module: 96532f39173dSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 96542f39173dSmrg# PS2PDF: returns the path of the ps2pdf program found 96552f39173dSmrg# returns the path set by the user in the environment 96562f39173dSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 96572f39173dSmrg# 'no' user instructs the module not to use ps2pdf 96582f39173dSmrg# 96592f39173dSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 96602f39173dSmrg# 96612f39173dSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 96622f39173dSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 966368105dcbSveegom4_define([_defopt], m4_default([$1], [auto])) 96642f39173dSmrgAC_ARG_WITH(ps2pdf, 96652f39173dSmrg AS_HELP_STRING([--with-ps2pdf], 966668105dcbSveego [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 966768105dcbSveego [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 966868105dcbSveegom4_undefine([_defopt]) 96692f39173dSmrg 96702f39173dSmrgif test "x$use_ps2pdf" = x"auto"; then 96712f39173dSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 96722f39173dSmrg if test "x$PS2PDF" = "x"; then 96732f39173dSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 96742f39173dSmrg have_ps2pdf=no 96752f39173dSmrg else 96762f39173dSmrg have_ps2pdf=yes 96772f39173dSmrg fi 96782f39173dSmrgelif test "x$use_ps2pdf" = x"yes" ; then 96792f39173dSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 96802f39173dSmrg if test "x$PS2PDF" = "x"; then 96812f39173dSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 96822f39173dSmrg fi 96832f39173dSmrg have_ps2pdf=yes 96842f39173dSmrgelif test "x$use_ps2pdf" = x"no" ; then 96852f39173dSmrg if test "x$PS2PDF" != "x"; then 96862f39173dSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 96872f39173dSmrg fi 96882f39173dSmrg have_ps2pdf=no 96892f39173dSmrgelse 96902f39173dSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 96912f39173dSmrgfi 96922f39173dSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 96932f39173dSmrg]) # XORG_WITH_PS2PDF 96942f39173dSmrg 96952f39173dSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 96962f39173dSmrg# ---------------- 96972f39173dSmrg# Minimum version: 1.6.0 96982f39173dSmrg# 96992f39173dSmrg# Documentation tools are not always available on all platforms and sometimes 97002f39173dSmrg# not at the appropriate level. This macro enables a builder to skip all 97012f39173dSmrg# documentation targets except traditional man pages. 97022f39173dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 97032f39173dSmrg# maximum flexibilty in controlling documentation building. 97042f39173dSmrg# Refer to: 97052f39173dSmrg# XORG_WITH_XMLTO --with-xmlto 97062f39173dSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 97072f39173dSmrg# XORG_WITH_DOXYGEN --with-doxygen 97082f39173dSmrg# XORG_WITH_FOP --with-fop 97092f39173dSmrg# XORG_WITH_GROFF --with-groff 97102f39173dSmrg# XORG_WITH_PS2PDF --with-ps2pdf 97112f39173dSmrg# 97122f39173dSmrg# Interface to module: 97132f39173dSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 97142f39173dSmrg# --enable-docs: 'yes' user instructs the module to generate docs 97152f39173dSmrg# 'no' user instructs the module not to generate docs 97162f39173dSmrg# parm1: specify the default value, yes or no. 97172f39173dSmrg# 97182f39173dSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 971968105dcbSveegom4_define([docs_default], m4_default([$1], [yes])) 97202f39173dSmrgAC_ARG_ENABLE(docs, 97212f39173dSmrg AS_HELP_STRING([--enable-docs], 972268105dcbSveego [Enable building the documentation (default: ]docs_default[)]), 972368105dcbSveego [build_docs=$enableval], [build_docs=]docs_default) 972468105dcbSveegom4_undefine([docs_default]) 97252f39173dSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 97262f39173dSmrgAC_MSG_CHECKING([whether to build documentation]) 97272f39173dSmrgAC_MSG_RESULT([$build_docs]) 97282f39173dSmrg]) # XORG_ENABLE_DOCS 97292f39173dSmrg 97302f39173dSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 97312f39173dSmrg# ---------------- 97322f39173dSmrg# Minimum version: 1.6.0 97332f39173dSmrg# 97342f39173dSmrg# This macro enables a builder to skip all developer documentation. 97352f39173dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 97362f39173dSmrg# maximum flexibilty in controlling documentation building. 97372f39173dSmrg# Refer to: 97382f39173dSmrg# XORG_WITH_XMLTO --with-xmlto 97392f39173dSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 97402f39173dSmrg# XORG_WITH_DOXYGEN --with-doxygen 97412f39173dSmrg# XORG_WITH_FOP --with-fop 97422f39173dSmrg# XORG_WITH_GROFF --with-groff 97432f39173dSmrg# XORG_WITH_PS2PDF --with-ps2pdf 97442f39173dSmrg# 97452f39173dSmrg# Interface to module: 97462f39173dSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 97472f39173dSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 97482f39173dSmrg# 'no' user instructs the module not to generate developer docs 97492f39173dSmrg# parm1: specify the default value, yes or no. 97502f39173dSmrg# 97512f39173dSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 975268105dcbSveegom4_define([devel_default], m4_default([$1], [yes])) 97532f39173dSmrgAC_ARG_ENABLE(devel-docs, 97542f39173dSmrg AS_HELP_STRING([--enable-devel-docs], 975568105dcbSveego [Enable building the developer documentation (default: ]devel_default[)]), 975668105dcbSveego [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 975768105dcbSveegom4_undefine([devel_default]) 97582f39173dSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 97592f39173dSmrgAC_MSG_CHECKING([whether to build developer documentation]) 97602f39173dSmrgAC_MSG_RESULT([$build_devel_docs]) 97612f39173dSmrg]) # XORG_ENABLE_DEVEL_DOCS 97622f39173dSmrg 97632f39173dSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 97642f39173dSmrg# ---------------- 97652f39173dSmrg# Minimum version: 1.6.0 97662f39173dSmrg# 97672f39173dSmrg# This macro enables a builder to skip all functional specification targets. 97682f39173dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 97692f39173dSmrg# maximum flexibilty in controlling documentation building. 97702f39173dSmrg# Refer to: 97712f39173dSmrg# XORG_WITH_XMLTO --with-xmlto 97722f39173dSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 97732f39173dSmrg# XORG_WITH_DOXYGEN --with-doxygen 97742f39173dSmrg# XORG_WITH_FOP --with-fop 97752f39173dSmrg# XORG_WITH_GROFF --with-groff 97762f39173dSmrg# XORG_WITH_PS2PDF --with-ps2pdf 97772f39173dSmrg# 97782f39173dSmrg# Interface to module: 97792f39173dSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 97802f39173dSmrg# --enable-specs: 'yes' user instructs the module to generate specs 97812f39173dSmrg# 'no' user instructs the module not to generate specs 97822f39173dSmrg# parm1: specify the default value, yes or no. 97832f39173dSmrg# 97842f39173dSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 978568105dcbSveegom4_define([spec_default], m4_default([$1], [yes])) 97862f39173dSmrgAC_ARG_ENABLE(specs, 97872f39173dSmrg AS_HELP_STRING([--enable-specs], 978868105dcbSveego [Enable building the specs (default: ]spec_default[)]), 978968105dcbSveego [build_specs=$enableval], [build_specs=]spec_default) 979068105dcbSveegom4_undefine([spec_default]) 97912f39173dSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 97922f39173dSmrgAC_MSG_CHECKING([whether to build functional specifications]) 97932f39173dSmrgAC_MSG_RESULT([$build_specs]) 97942f39173dSmrg]) # XORG_ENABLE_SPECS 97952f39173dSmrg 979668105dcbSveego# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 979768105dcbSveego# ---------------------------------------------- 979868105dcbSveego# Minimum version: 1.13.0 979968105dcbSveego# 980068105dcbSveego# This macro enables a builder to enable/disable unit testing 980168105dcbSveego# It makes no assumption about the test cases implementation 980268105dcbSveego# Test cases may or may not use Automake "Support for test suites" 980368105dcbSveego# They may or may not use the software utility library GLib 980468105dcbSveego# 980568105dcbSveego# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 980668105dcbSveego# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 980768105dcbSveego# The variable enable_unit_tests is used by other macros in this file. 980868105dcbSveego# 980968105dcbSveego# Interface to module: 981068105dcbSveego# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 981168105dcbSveego# enable_unit_tests: used in configure.ac for additional configuration 981268105dcbSveego# --enable-unit-tests: 'yes' user instructs the module to build tests 981368105dcbSveego# 'no' user instructs the module not to build tests 981468105dcbSveego# parm1: specify the default value, yes or no. 981568105dcbSveego# 981668105dcbSveegoAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 981768105dcbSveegoAC_BEFORE([$0], [XORG_WITH_GLIB]) 981868105dcbSveegoAC_BEFORE([$0], [XORG_LD_WRAP]) 981968105dcbSveegoAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 982068105dcbSveegom4_define([_defopt], m4_default([$1], [auto])) 982168105dcbSveegoAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 982268105dcbSveego [Enable building unit test cases (default: ]_defopt[)]), 982368105dcbSveego [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 982468105dcbSveegom4_undefine([_defopt]) 982568105dcbSveegoAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 982668105dcbSveegoAC_MSG_CHECKING([whether to build unit test cases]) 982768105dcbSveegoAC_MSG_RESULT([$enable_unit_tests]) 982868105dcbSveego]) # XORG_ENABLE_UNIT_TESTS 982968105dcbSveego 983068105dcbSveego# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 983168105dcbSveego# ---------------------------------------- 983268105dcbSveego# Minimum version: 1.13.0 983368105dcbSveego# 983468105dcbSveego# GLib is a library which provides advanced data structures and functions. 983568105dcbSveego# This macro enables a module to test for the presence of Glib. 983668105dcbSveego# 983768105dcbSveego# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 983868105dcbSveego# Otherwise the value of $enable_unit_tests is blank. 983968105dcbSveego# 984068105dcbSveego# Interface to module: 984168105dcbSveego# HAVE_GLIB: used in makefiles to conditionally build targets 984268105dcbSveego# with_glib: used in configure.ac to know if GLib has been found 984368105dcbSveego# --with-glib: 'yes' user instructs the module to use glib 984468105dcbSveego# 'no' user instructs the module not to use glib 984568105dcbSveego# 984668105dcbSveegoAC_DEFUN([XORG_WITH_GLIB],[ 984768105dcbSveegoAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 984868105dcbSveegom4_define([_defopt], m4_default([$2], [auto])) 984968105dcbSveegoAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 985068105dcbSveego [Use GLib library for unit testing (default: ]_defopt[)]), 985168105dcbSveego [with_glib=$withval], [with_glib=]_defopt) 985268105dcbSveegom4_undefine([_defopt]) 985368105dcbSveego 985468105dcbSveegohave_glib=no 985568105dcbSveego# Do not probe GLib if user explicitly disabled unit testing 985668105dcbSveegoif test "x$enable_unit_tests" != x"no"; then 985768105dcbSveego # Do not probe GLib if user explicitly disabled it 985868105dcbSveego if test "x$with_glib" != x"no"; then 985968105dcbSveego m4_ifval( 986068105dcbSveego [$1], 986168105dcbSveego [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 986268105dcbSveego [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 986368105dcbSveego ) 986468105dcbSveego fi 986568105dcbSveegofi 986668105dcbSveego 986768105dcbSveego# Not having GLib when unit testing has been explicitly requested is an error 986868105dcbSveegoif test "x$enable_unit_tests" = x"yes"; then 986968105dcbSveego if test "x$have_glib" = x"no"; then 987068105dcbSveego AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 987168105dcbSveego fi 987268105dcbSveegofi 987368105dcbSveego 987468105dcbSveego# Having unit testing disabled when GLib has been explicitly requested is an error 987568105dcbSveegoif test "x$enable_unit_tests" = x"no"; then 987668105dcbSveego if test "x$with_glib" = x"yes"; then 987768105dcbSveego AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 987868105dcbSveego fi 987968105dcbSveegofi 988068105dcbSveego 988168105dcbSveego# Not having GLib when it has been explicitly requested is an error 988268105dcbSveegoif test "x$with_glib" = x"yes"; then 988368105dcbSveego if test "x$have_glib" = x"no"; then 988468105dcbSveego AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 988568105dcbSveego fi 988668105dcbSveegofi 988768105dcbSveego 988868105dcbSveegoAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 988968105dcbSveego]) # XORG_WITH_GLIB 989068105dcbSveego 989168105dcbSveego# XORG_LD_WRAP([required|optional]) 989268105dcbSveego# --------------------------------- 989368105dcbSveego# Minimum version: 1.13.0 989468105dcbSveego# 989568105dcbSveego# Check if linker supports -wrap, passed via compiler flags 989668105dcbSveego# 989768105dcbSveego# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 989868105dcbSveego# Otherwise the value of $enable_unit_tests is blank. 989968105dcbSveego# 990068105dcbSveego# Argument added in 1.16.0 - default is "required", to match existing behavior 990168105dcbSveego# of returning an error if enable_unit_tests is yes, and ld -wrap is not 990268105dcbSveego# available, an argument of "optional" allows use when some unit tests require 990368105dcbSveego# ld -wrap and others do not. 990468105dcbSveego# 990568105dcbSveegoAC_DEFUN([XORG_LD_WRAP],[ 990668105dcbSveegoXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 990768105dcbSveego [AC_LANG_PROGRAM([#include <stdlib.h> 990868105dcbSveego void __wrap_exit(int status) { return; }], 990968105dcbSveego [exit(0);])]) 991068105dcbSveego# Not having ld wrap when unit testing has been explicitly requested is an error 991168105dcbSveegoif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 991268105dcbSveego if test "x$have_ld_wrap" = x"no"; then 991368105dcbSveego AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 991468105dcbSveego fi 991568105dcbSveegofi 991668105dcbSveegoAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 991768105dcbSveego# 991868105dcbSveego]) # XORG_LD_WRAP 991968105dcbSveego 992068105dcbSveego# XORG_CHECK_LINKER_FLAGS 992168105dcbSveego# ----------------------- 992268105dcbSveego# SYNOPSIS 992368105dcbSveego# 992468105dcbSveego# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 992568105dcbSveego# 992668105dcbSveego# DESCRIPTION 992768105dcbSveego# 992868105dcbSveego# Check whether the given linker FLAGS work with the current language's 992968105dcbSveego# linker, or whether they give an error. 993068105dcbSveego# 993168105dcbSveego# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 993268105dcbSveego# success/failure. 993368105dcbSveego# 993468105dcbSveego# PROGRAM-SOURCE is the program source to link with, if needed 993568105dcbSveego# 993668105dcbSveego# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 993768105dcbSveego# 993868105dcbSveego# LICENSE 993968105dcbSveego# 994068105dcbSveego# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 994168105dcbSveego# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 994268105dcbSveego# Copyright (c) 2009 Matteo Frigo 994368105dcbSveego# 994468105dcbSveego# This program is free software: you can redistribute it and/or modify it 994568105dcbSveego# under the terms of the GNU General Public License as published by the 994668105dcbSveego# Free Software Foundation, either version 3 of the License, or (at your 994768105dcbSveego# option) any later version. 994868105dcbSveego# 994968105dcbSveego# This program is distributed in the hope that it will be useful, but 995068105dcbSveego# WITHOUT ANY WARRANTY; without even the implied warranty of 995168105dcbSveego# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 995268105dcbSveego# Public License for more details. 995368105dcbSveego# 995468105dcbSveego# You should have received a copy of the GNU General Public License along 995568105dcbSveego# with this program. If not, see <http://www.gnu.org/licenses/>. 995668105dcbSveego# 995768105dcbSveego# As a special exception, the respective Autoconf Macro's copyright owner 995868105dcbSveego# gives unlimited permission to copy, distribute and modify the configure 995968105dcbSveego# scripts that are the output of Autoconf when processing the Macro. You 996068105dcbSveego# need not follow the terms of the GNU General Public License when using 996168105dcbSveego# or distributing such scripts, even though portions of the text of the 996268105dcbSveego# Macro appear in them. The GNU General Public License (GPL) does govern 996368105dcbSveego# all other use of the material that constitutes the Autoconf Macro. 996468105dcbSveego# 996568105dcbSveego# This special exception to the GPL applies to versions of the Autoconf 996668105dcbSveego# Macro released by the Autoconf Archive. When you make and distribute a 996768105dcbSveego# modified version of the Autoconf Macro, you may extend this special 996868105dcbSveego# exception to the GPL to apply to your modified version as well.# 996968105dcbSveegoAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 997068105dcbSveego[AC_MSG_CHECKING([whether the linker accepts $1]) 997168105dcbSveegodnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 997268105dcbSveegoAS_LITERAL_IF([$1], 997368105dcbSveego [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 997468105dcbSveego ax_save_FLAGS=$LDFLAGS 997568105dcbSveego LDFLAGS="$1" 997668105dcbSveego AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 997768105dcbSveego AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 997868105dcbSveego AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 997968105dcbSveego LDFLAGS=$ax_save_FLAGS])], 998068105dcbSveego [ax_save_FLAGS=$LDFLAGS 998168105dcbSveego LDFLAGS="$1" 998268105dcbSveego AC_LINK_IFELSE([AC_LANG_PROGRAM()], 998368105dcbSveego eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 998468105dcbSveego eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 998568105dcbSveego LDFLAGS=$ax_save_FLAGS]) 998668105dcbSveegoeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 998768105dcbSveegoAC_MSG_RESULT($xorg_check_linker_flags) 998868105dcbSveegoif test "x$xorg_check_linker_flags" = xyes; then 998968105dcbSveego m4_default([$2], :) 999068105dcbSveegoelse 999168105dcbSveego m4_default([$3], :) 999268105dcbSveegofi 999368105dcbSveego]) # XORG_CHECK_LINKER_FLAGS 999468105dcbSveego 999568105dcbSveego# XORG_MEMORY_CHECK_FLAGS 999668105dcbSveego# ----------------------- 999768105dcbSveego# Minimum version: 1.16.0 999868105dcbSveego# 999968105dcbSveego# This macro attempts to find appropriate memory checking functionality 1000068105dcbSveego# for various platforms which unit testing code may use to catch various 1000168105dcbSveego# forms of memory allocation and access errors in testing. 1000268105dcbSveego# 1000368105dcbSveego# Interface to module: 1000468105dcbSveego# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1000568105dcbSveego# Usually added to TESTS_ENVIRONMENT in Makefile.am 1000668105dcbSveego# 1000768105dcbSveego# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1000868105dcbSveego# 1000968105dcbSveegoAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 1001068105dcbSveego 1001168105dcbSveegoAC_REQUIRE([AC_CANONICAL_HOST]) 1001268105dcbSveegoAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1001368105dcbSveego [Environment variables to enable memory checking in tests]) 1001468105dcbSveego 1001568105dcbSveego# Check for different types of support on different platforms 1001668105dcbSveegocase $host_os in 1001768105dcbSveego solaris*) 1001868105dcbSveego AC_CHECK_LIB([umem], [umem_alloc], 1001968105dcbSveego [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1002068105dcbSveego ;; 1002168105dcbSveego *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1002268105dcbSveego # both directly and inverted, so should not be 0 or 255. 1002368105dcbSveego malloc_debug_env='MALLOC_PERTURB_=15' 1002468105dcbSveego ;; 1002568105dcbSveego darwin*) 1002668105dcbSveego malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1002768105dcbSveego ;; 1002868105dcbSveego *bsd*) 1002968105dcbSveego malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1003068105dcbSveego ;; 1003168105dcbSveegoesac 1003268105dcbSveego 1003368105dcbSveego# User supplied flags override default flags 1003468105dcbSveegoif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1003568105dcbSveego malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1003668105dcbSveegofi 1003768105dcbSveego 1003868105dcbSveegoAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1003968105dcbSveego]) # XORG_WITH_LINT 1004068105dcbSveego 10041ad43ddacSmrg# XORG_CHECK_MALLOC_ZERO 10042ad43ddacSmrg# ---------------------- 10043ad43ddacSmrg# Minimum version: 1.0.0 10044ad43ddacSmrg# 10045ad43ddacSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10046ad43ddacSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 10047ad43ddacSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10048ad43ddacSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10049ad43ddacSmrgAC_ARG_ENABLE(malloc0returnsnull, 100502f39173dSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 10051ad43ddacSmrg [malloc(0) returns NULL (default: auto)]), 10052ad43ddacSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 10053ad43ddacSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10054ad43ddacSmrg 10055ad43ddacSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 10056ad43ddacSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1005743df4709Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 1005868105dcbSveego#include <stdlib.h> 1005968105dcbSveego],[ 10060ad43ddacSmrg char *m0, *r0, *c0, *p; 10061ad43ddacSmrg m0 = malloc(0); 10062ad43ddacSmrg p = malloc(10); 10063ad43ddacSmrg r0 = realloc(p,0); 1006468105dcbSveego c0 = calloc(0,10); 1006568105dcbSveego exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 1006668105dcbSveego])], 1006743df4709Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 1006843df4709Smrg [MALLOC_ZERO_RETURNS_NULL=no], 1006943df4709Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 10070ad43ddacSmrgfi 10071ad43ddacSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10072ad43ddacSmrg 10073ad43ddacSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10074ad43ddacSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10075ad43ddacSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10076ad43ddacSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10077ad43ddacSmrgelse 10078ad43ddacSmrg MALLOC_ZERO_CFLAGS="" 10079ad43ddacSmrg XMALLOC_ZERO_CFLAGS="" 10080ad43ddacSmrg XTMALLOC_ZERO_CFLAGS="" 10081ad43ddacSmrgfi 10082ad43ddacSmrg 10083ad43ddacSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 10084ad43ddacSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 10085ad43ddacSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10086ad43ddacSmrg]) # XORG_CHECK_MALLOC_ZERO 10087ad43ddacSmrg 10088ad43ddacSmrg# XORG_WITH_LINT() 10089ad43ddacSmrg# ---------------- 10090ad43ddacSmrg# Minimum version: 1.1.0 10091ad43ddacSmrg# 100922f39173dSmrg# This macro enables the use of a tool that flags some suspicious and 100932f39173dSmrg# non-portable constructs (likely to be bugs) in C language source code. 100942f39173dSmrg# It will attempt to locate the tool and use appropriate options. 100952f39173dSmrg# There are various lint type tools on different platforms. 100962f39173dSmrg# 100972f39173dSmrg# Interface to module: 100982f39173dSmrg# LINT: returns the path to the tool found on the platform 100992f39173dSmrg# or the value set to LINT on the configure cmd line 101002f39173dSmrg# also an Automake conditional 101012f39173dSmrg# LINT_FLAGS: an Automake variable with appropriate flags 101022f39173dSmrg# 101032f39173dSmrg# --with-lint: 'yes' user instructs the module to use lint 101042f39173dSmrg# 'no' user instructs the module not to use lint (default) 101052f39173dSmrg# 101062f39173dSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 101072f39173dSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 10108ad43ddacSmrg# 10109ad43ddacSmrgAC_DEFUN([XORG_WITH_LINT],[ 10110ad43ddacSmrg 101112f39173dSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 101122f39173dSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 101132f39173dSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10114ad43ddacSmrg [Use a lint-style source code checker (default: disabled)])], 10115ad43ddacSmrg [use_lint=$withval], [use_lint=no]) 101162f39173dSmrg 101172f39173dSmrg# Obtain platform specific info like program name and options 101182f39173dSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 101192f39173dSmrgcase $host_os in 101202f39173dSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 101212f39173dSmrg lint_name=splint 101222f39173dSmrg lint_options="-badflag" 101232f39173dSmrg ;; 101242f39173dSmrg *freebsd* | *netbsd*) 101252f39173dSmrg lint_name=lint 101262f39173dSmrg lint_options="-u -b" 101272f39173dSmrg ;; 101282f39173dSmrg *solaris*) 101292f39173dSmrg lint_name=lint 101302f39173dSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 101312f39173dSmrg ;; 101322f39173dSmrgesac 101332f39173dSmrg 101342f39173dSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 101352f39173dSmrgif test "x$use_lint" = x"yes" ; then 101362f39173dSmrg AC_PATH_PROG([LINT], [$lint_name]) 101372f39173dSmrg if test "x$LINT" = "x"; then 101382f39173dSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 101392f39173dSmrg fi 101402f39173dSmrgelif test "x$use_lint" = x"no" ; then 101412f39173dSmrg if test "x$LINT" != "x"; then 101422f39173dSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 101432f39173dSmrg fi 10144ad43ddacSmrgelse 101452f39173dSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10146ad43ddacSmrgfi 101472f39173dSmrg 101482f39173dSmrg# User supplied flags override default flags 101492f39173dSmrgif test "x$LINT_FLAGS" != "x"; then 101502f39173dSmrg lint_options=$LINT_FLAGS 10151ad43ddacSmrgfi 10152ad43ddacSmrg 101532f39173dSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 101542f39173dSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10155ad43ddacSmrg 10156ad43ddacSmrg]) # XORG_WITH_LINT 10157ad43ddacSmrg 10158ad43ddacSmrg# XORG_LINT_LIBRARY(LIBNAME) 10159ad43ddacSmrg# -------------------------- 10160ad43ddacSmrg# Minimum version: 1.1.0 10161ad43ddacSmrg# 10162ad43ddacSmrg# Sets up flags for building lint libraries for checking programs that call 10163ad43ddacSmrg# functions in the library. 10164ad43ddacSmrg# 101652f39173dSmrg# Interface to module: 101662f39173dSmrg# LINTLIB - Automake variable with the name of lint library file to make 101672f39173dSmrg# MAKE_LINT_LIB - Automake conditional 101682f39173dSmrg# 101692f39173dSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 101702f39173dSmrg# - 'no' user instructs the module not to create a lint library (default) 10171ad43ddacSmrg 10172ad43ddacSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 10173ad43ddacSmrgAC_REQUIRE([XORG_WITH_LINT]) 101742f39173dSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10175ad43ddacSmrg [Create lint library (default: disabled)])], 10176ad43ddacSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 101772f39173dSmrg 101782f39173dSmrgif test "x$make_lint_lib" = x"yes" ; then 101792f39173dSmrg LINTLIB=llib-l$1.ln 101802f39173dSmrg if test "x$LINT" = "x"; then 101812f39173dSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 101822f39173dSmrg fi 101832f39173dSmrgelif test "x$make_lint_lib" != x"no" ; then 101842f39173dSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10185ad43ddacSmrgfi 101862f39173dSmrg 10187ad43ddacSmrgAC_SUBST(LINTLIB) 10188ad43ddacSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10189ad43ddacSmrg 10190ad43ddacSmrg]) # XORG_LINT_LIBRARY 10191ad43ddacSmrg 1019268105dcbSveego# XORG_COMPILER_BRAND 1019368105dcbSveego# ------------------- 1019468105dcbSveego# Minimum version: 1.14.0 1019568105dcbSveego# 1019668105dcbSveego# Checks for various brands of compilers and sets flags as appropriate: 1019768105dcbSveego# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1019868105dcbSveego# clang compiler - sets CLANGCC to "yes" 1019968105dcbSveego# Intel compiler - sets INTELCC to "yes" 1020068105dcbSveego# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1020168105dcbSveego# 1020268105dcbSveegoAC_DEFUN([XORG_COMPILER_BRAND], [ 1020343df4709SmrgAC_REQUIRE([AC_PROG_CC_C99]) 1020468105dcbSveegoAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 1020568105dcbSveegoAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1020668105dcbSveegoAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1020768105dcbSveego]) # XORG_COMPILER_BRAND 1020868105dcbSveego 1020968105dcbSveego# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 1021068105dcbSveego# --------------- 1021168105dcbSveego# Minimum version: 1.16.0 1021268105dcbSveego# 1021368105dcbSveego# Test if the compiler works when passed the given flag as a command line argument. 1021468105dcbSveego# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1021568105dcbSveego# next flag in the list until there are no more options. 1021668105dcbSveego# 1021768105dcbSveego# Note that this does not guarantee that the compiler supports the flag as some 1021868105dcbSveego# compilers will simply ignore arguments that they do not understand, but we do 1021968105dcbSveego# attempt to weed out false positives by using -Werror=unknown-warning-option and 1022068105dcbSveego# -Werror=unused-command-line-argument 1022168105dcbSveego# 1022268105dcbSveegoAC_DEFUN([XORG_TESTSET_CFLAG], [ 1022343df4709SmrgAC_REQUIRE([AC_PROG_CC_C99]) 1022468105dcbSveegom4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1022568105dcbSveegom4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1022668105dcbSveego 1022743df4709Smrgxorg_testset_save_CFLAGS="$CFLAGS" 1022868105dcbSveego 1022943df4709Smrgif test "x$xorg_testset_unknown_warning_option" = "x" ; then 1023043df4709Smrg CFLAGS="$CFLAGS -Werror=unknown-warning-option" 1023143df4709Smrg AC_MSG_CHECKING([if $CC supports -Werror=unknown-warning-option]) 1023243df4709Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1023343df4709Smrg [xorg_testset_unknown_warning_option=yes], 1023443df4709Smrg [xorg_testset_unknown_warning_option=no]) 1023543df4709Smrg AC_MSG_RESULT([$xorg_testset_unknown_warning_option]) 1023643df4709Smrg CFLAGS="$xorg_testset_save_CFLAGS" 1023768105dcbSveegofi 1023868105dcbSveego 1023943df4709Smrgif test "x$xorg_testset_unused_command_line_argument" = "x" ; then 1024043df4709Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 1024143df4709Smrg CFLAGS="$CFLAGS -Werror=unknown-warning-option" 1024268105dcbSveego fi 1024343df4709Smrg CFLAGS="$CFLAGS -Werror=unused-command-line-argument" 1024443df4709Smrg AC_MSG_CHECKING([if $CC supports -Werror=unused-command-line-argument]) 1024543df4709Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1024643df4709Smrg [xorg_testset_unused_command_line_argument=yes], 1024743df4709Smrg [xorg_testset_unused_command_line_argument=no]) 1024843df4709Smrg AC_MSG_RESULT([$xorg_testset_unused_command_line_argument]) 1024943df4709Smrg CFLAGS="$xorg_testset_save_CFLAGS" 1025068105dcbSveegofi 1025168105dcbSveego 1025268105dcbSveegofound="no" 1025368105dcbSveegom4_foreach([flag], m4_cdr($@), [ 1025468105dcbSveego if test $found = "no" ; then 1025543df4709Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 1025643df4709Smrg CFLAGS="$CFLAGS -Werror=unknown-warning-option" 1025768105dcbSveego fi 1025868105dcbSveego 1025943df4709Smrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 1026043df4709Smrg CFLAGS="$CFLAGS -Werror=unused-command-line-argument" 1026168105dcbSveego fi 1026268105dcbSveego 1026343df4709Smrg CFLAGS="$CFLAGS ]flag[" 1026468105dcbSveego 1026543df4709Smrg AC_MSG_CHECKING([if $CC supports ]flag[]) 1026643df4709Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1026743df4709Smrg [supported=yes], [supported=no]) 102686322c902Smrg AC_MSG_RESULT([$supported]) 1026943df4709Smrg CFLAGS="$xorg_testset_save_CFLAGS" 1027043df4709Smrg 1027168105dcbSveego if test "$supported" = "yes" ; then 1027268105dcbSveego $1="$$1 ]flag[" 1027368105dcbSveego found="yes" 1027468105dcbSveego fi 1027568105dcbSveego fi 1027668105dcbSveego]) 1027768105dcbSveego]) # XORG_TESTSET_CFLAG 1027868105dcbSveego 1027968105dcbSveego# XORG_COMPILER_FLAGS 1028068105dcbSveego# --------------- 1028168105dcbSveego# Minimum version: 1.16.0 1028268105dcbSveego# 1028343df4709Smrg# Defines BASE_CFLAGS to contain a set of command line arguments supported 1028443df4709Smrg# by the selected compiler which do NOT alter the generated code. These 1028543df4709Smrg# arguments will cause the compiler to print various warnings during 1028643df4709Smrg# compilation AND turn a conservative set of warnings into errors. 1028768105dcbSveego# 1028843df4709Smrg# The set of flags supported by BASE_CFLAGS will grow in future 1028943df4709Smrg# versions of util-macros as options are added to new compilers. 1029068105dcbSveego# 1029168105dcbSveegoAC_DEFUN([XORG_COMPILER_FLAGS], [ 1029268105dcbSveegoAC_REQUIRE([XORG_COMPILER_BRAND]) 1029368105dcbSveego 1029468105dcbSveegoAC_ARG_ENABLE(selective-werror, 1029568105dcbSveego AS_HELP_STRING([--disable-selective-werror], 1029668105dcbSveego [Turn off selective compiler errors. (default: enabled)]), 1029768105dcbSveego [SELECTIVE_WERROR=$enableval], 1029868105dcbSveego [SELECTIVE_WERROR=yes]) 1029968105dcbSveego 1030068105dcbSveego# -v is too short to test reliably with XORG_TESTSET_CFLAG 1030168105dcbSveegoif test "x$SUNCC" = "xyes"; then 1030243df4709Smrg BASE_CFLAGS="-v" 1030368105dcbSveegoelse 1030443df4709Smrg BASE_CFLAGS="" 1030568105dcbSveegofi 1030668105dcbSveego 1030768105dcbSveego# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1030843df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wall]) 1030943df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wpointer-arith]) 1031043df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wstrict-prototypes]) 1031143df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-prototypes]) 1031243df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-declarations]) 1031343df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wnested-externs]) 1031443df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wbad-function-cast]) 1031543df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wformat=2], [-Wformat]) 1031643df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wold-style-definition]) 1031743df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wdeclaration-after-statement]) 1031868105dcbSveego 1031968105dcbSveego# This chunk adds additional warnings that could catch undesired effects. 1032043df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wunused]) 1032143df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wuninitialized]) 1032243df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wshadow]) 1032343df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-qual]) 1032443df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-noreturn]) 1032543df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-format-attribute]) 1032643df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wredundant-decls]) 1032768105dcbSveego 1032868105dcbSveego# These are currently disabled because they are noisy. They will be enabled 1032968105dcbSveego# in the future once the codebase is sufficiently modernized to silence 1033068105dcbSveego# them. For now, I don't want them to drown out the other warnings. 1033143df4709Smrg# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wlogical-op]) 1033243df4709Smrg# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wparentheses]) 1033343df4709Smrg# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-align]) 1033468105dcbSveego 1033568105dcbSveego# Turn some warnings into errors, so we don't accidently get successful builds 1033668105dcbSveego# when there are problems that should be fixed. 1033768105dcbSveego 1033868105dcbSveegoif test "x$SELECTIVE_WERROR" = "xyes" ; then 1033943df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1034043df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=nonnull]) 1034143df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=init-self]) 1034243df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=main]) 1034343df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=missing-braces]) 1034443df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=sequence-point]) 1034543df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1034643df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=trigraphs]) 1034743df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=array-bounds]) 1034843df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=write-strings]) 1034943df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=address]) 1035043df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1035143df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 1035268105dcbSveegoelse 1035368105dcbSveegoAC_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]) 1035443df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wimplicit]) 1035543df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wnonnull]) 1035643df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Winit-self]) 1035743df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmain]) 1035843df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-braces]) 1035943df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wsequence-point]) 1036043df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wreturn-type]) 1036143df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wtrigraphs]) 1036243df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Warray-bounds]) 1036343df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wwrite-strings]) 1036443df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Waddress]) 1036543df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wint-to-pointer-cast]) 1036643df4709SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wpointer-to-int-cast]) 1036768105dcbSveegofi 1036868105dcbSveego 1036943df4709SmrgAC_SUBST([BASE_CFLAGS]) 1037068105dcbSveego]) # XORG_COMPILER_FLAGS 1037168105dcbSveego 103722f39173dSmrg# XORG_CWARNFLAGS 103732f39173dSmrg# --------------- 103742f39173dSmrg# Minimum version: 1.2.0 1037568105dcbSveego# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 10376ad43ddacSmrg# 103772f39173dSmrg# Defines CWARNFLAGS to enable C compiler warnings. 10378ad43ddacSmrg# 1037968105dcbSveego# This function is deprecated because it defines -fno-strict-aliasing 1038068105dcbSveego# which alters the code generated by the compiler. If -fno-strict-aliasing 1038168105dcbSveego# is needed, then it should be added explicitly in the module when 1038268105dcbSveego# it is updated to use BASE_CFLAGS. 1038368105dcbSveego# 103842f39173dSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1038568105dcbSveegoAC_REQUIRE([XORG_COMPILER_FLAGS]) 1038668105dcbSveegoAC_REQUIRE([XORG_COMPILER_BRAND]) 1038743df4709SmrgCWARNFLAGS="$BASE_CFLAGS" 1038843df4709Smrgif test "x$GCC" = xyes ; then 1038943df4709Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1039043df4709Smrgfi 1039143df4709SmrgAC_SUBST(CWARNFLAGS) 103922f39173dSmrg]) # XORG_CWARNFLAGS 103932f39173dSmrg 103942f39173dSmrg# XORG_STRICT_OPTION 103952f39173dSmrg# ----------------------- 103962f39173dSmrg# Minimum version: 1.3.0 103972f39173dSmrg# 1039868105dcbSveego# Add configure option to enable strict compilation flags, such as treating 1039968105dcbSveego# warnings as fatal errors. 1040068105dcbSveego# If --enable-strict-compilation is passed to configure, adds strict flags to 1040143df4709Smrg# $BASE_CFLAGS and the deprecated $CWARNFLAGS. 1040268105dcbSveego# 1040368105dcbSveego# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 1040468105dcbSveego# when strict compilation is unconditionally desired. 104052f39173dSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 104062f39173dSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1040768105dcbSveegoAC_REQUIRE([XORG_COMPILER_FLAGS]) 104082f39173dSmrg 104092f39173dSmrgAC_ARG_ENABLE(strict-compilation, 104102f39173dSmrg AS_HELP_STRING([--enable-strict-compilation], 104112f39173dSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 104122f39173dSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1041368105dcbSveego 1041443df4709SmrgSTRICT_CFLAGS="" 1041543df4709SmrgXORG_TESTSET_CFLAG([STRICT_CFLAGS], [-pedantic]) 1041643df4709SmrgXORG_TESTSET_CFLAG([STRICT_CFLAGS], [-Werror], [-errwarn]) 1041768105dcbSveego 1041868105dcbSveego# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1041968105dcbSveego# activate it with -Werror, so we add it here explicitly. 1042043df4709SmrgXORG_TESTSET_CFLAG([STRICT_CFLAGS], [-Werror=attributes]) 1042168105dcbSveego 104222f39173dSmrgif test "x$STRICT_COMPILE" = "xyes"; then 1042343df4709Smrg BASE_CFLAGS="$BASE_CFLAGS $STRICT_CFLAGS" 1042443df4709Smrg CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 104252f39173dSmrgfi 1042643df4709SmrgAC_SUBST([STRICT_CFLAGS]) 1042743df4709SmrgAC_SUBST([BASE_CFLAGS]) 1042843df4709SmrgAC_SUBST([CWARNFLAGS]) 104292f39173dSmrg]) # XORG_STRICT_OPTION 104302f39173dSmrg 104312f39173dSmrg# XORG_DEFAULT_OPTIONS 104322f39173dSmrg# -------------------- 104332f39173dSmrg# Minimum version: 1.3.0 104342f39173dSmrg# 104352f39173dSmrg# Defines default options for X.Org modules. 104362f39173dSmrg# 104372f39173dSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 104382f39173dSmrgAC_REQUIRE([AC_PROG_INSTALL]) 1043968105dcbSveegoXORG_COMPILER_FLAGS 104402f39173dSmrgXORG_CWARNFLAGS 104412f39173dSmrgXORG_STRICT_OPTION 104422f39173dSmrgXORG_RELEASE_VERSION 104432f39173dSmrgXORG_CHANGELOG 104442f39173dSmrgXORG_INSTALL 104452f39173dSmrgXORG_MANPAGE_SECTIONS 104462f39173dSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 104472f39173dSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 104482f39173dSmrg]) # XORG_DEFAULT_OPTIONS 104492f39173dSmrg 104502f39173dSmrg# XORG_INSTALL() 104512f39173dSmrg# ---------------- 104522f39173dSmrg# Minimum version: 1.4.0 104532f39173dSmrg# 104542f39173dSmrg# Defines the variable INSTALL_CMD as the command to copy 104552f39173dSmrg# INSTALL from $prefix/share/util-macros. 104562f39173dSmrg# 104572f39173dSmrgAC_DEFUN([XORG_INSTALL], [ 104582f39173dSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 104592f39173dSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 104602f39173dSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 104612f39173dSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 104622f39173dSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 104632f39173dSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 104642f39173dSmrgAC_SUBST([INSTALL_CMD]) 104652f39173dSmrg]) # XORG_INSTALL 104662f39173dSmrgdnl Copyright 2005 Red Hat, Inc 104672f39173dSmrgdnl 104682f39173dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 104692f39173dSmrgdnl documentation for any purpose is hereby granted without fee, provided that 104702f39173dSmrgdnl the above copyright notice appear in all copies and that both that 104712f39173dSmrgdnl copyright notice and this permission notice appear in supporting 104722f39173dSmrgdnl documentation. 104732f39173dSmrgdnl 104742f39173dSmrgdnl The above copyright notice and this permission notice shall be included 104752f39173dSmrgdnl in all copies or substantial portions of the Software. 104762f39173dSmrgdnl 104772f39173dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 104782f39173dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 104792f39173dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 104802f39173dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 104812f39173dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 104822f39173dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 104832f39173dSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 104842f39173dSmrgdnl 104852f39173dSmrgdnl Except as contained in this notice, the name of the copyright holders shall 104862f39173dSmrgdnl not be used in advertising or otherwise to promote the sale, use or 104872f39173dSmrgdnl other dealings in this Software without prior written authorization 104882f39173dSmrgdnl from the copyright holders. 104892f39173dSmrgdnl 104902f39173dSmrg 104912f39173dSmrg# XORG_RELEASE_VERSION 104922f39173dSmrg# -------------------- 104932f39173dSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1049443df4709Smrg 104952f39173dSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 104962f39173dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 104972f39173dSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 104982f39173dSmrg [Major version of this package]) 104992f39173dSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 105002f39173dSmrg if test "x$PVM" = "x"; then 105012f39173dSmrg PVM="0" 105022f39173dSmrg fi 105032f39173dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 105042f39173dSmrg [$PVM], 105052f39173dSmrg [Minor version of this package]) 105062f39173dSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 105072f39173dSmrg if test "x$PVP" = "x"; then 105082f39173dSmrg PVP="0" 105092f39173dSmrg fi 105102f39173dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 105112f39173dSmrg [$PVP], 105122f39173dSmrg [Patch version of this package]) 105132f39173dSmrg]) 105142f39173dSmrg 105152f39173dSmrg# XORG_CHANGELOG() 105162f39173dSmrg# ---------------- 105172f39173dSmrg# Minimum version: 1.2.0 105182f39173dSmrg# 105192f39173dSmrg# Defines the variable CHANGELOG_CMD as the command to generate 105202f39173dSmrg# ChangeLog from git. 105212f39173dSmrg# 105222f39173dSmrg# 105232f39173dSmrgAC_DEFUN([XORG_CHANGELOG], [ 105242f39173dSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 105252f39173dSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 105262f39173dSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 105272f39173dSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 105282f39173dSmrgAC_SUBST([CHANGELOG_CMD]) 105292f39173dSmrg]) # XORG_CHANGELOG 105302f39173dSmrg 105312f39173dSmrgdnl Copyright 2005 Red Hat, Inc 105322f39173dSmrgdnl 105332f39173dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 105342f39173dSmrgdnl documentation for any purpose is hereby granted without fee, provided that 105352f39173dSmrgdnl the above copyright notice appear in all copies and that both that 105362f39173dSmrgdnl copyright notice and this permission notice appear in supporting 105372f39173dSmrgdnl documentation. 105382f39173dSmrgdnl 105392f39173dSmrgdnl The above copyright notice and this permission notice shall be included 105402f39173dSmrgdnl in all copies or substantial portions of the Software. 105412f39173dSmrgdnl 105422f39173dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 105432f39173dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 105442f39173dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 105452f39173dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 105462f39173dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 105472f39173dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 105482f39173dSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 105492f39173dSmrgdnl 105502f39173dSmrgdnl Except as contained in this notice, the name of the copyright holders shall 105512f39173dSmrgdnl not be used in advertising or otherwise to promote the sale, use or 105522f39173dSmrgdnl other dealings in this Software without prior written authorization 105532f39173dSmrgdnl from the copyright holders. 105542f39173dSmrgdnl 105552f39173dSmrg 1055643df4709Smrg# XORG_DRIVER_CHECK_EXT() 105572f39173dSmrg# -------------------------- 1055843df4709Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 1055943df4709Smrg# is defined, then add $1 to $REQUIRED_MODULES. 105602f39173dSmrg 105612f39173dSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 105622f39173dSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 105632f39173dSmrg SAVE_CFLAGS="$CFLAGS" 105642f39173dSmrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 105652f39173dSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 105662f39173dSmrg#include "xorg-server.h" 105672f39173dSmrg#if !defined $1 105682f39173dSmrg#error $1 not defined 105692f39173dSmrg#endif 105702f39173dSmrg ]])], 105712f39173dSmrg [_EXT_CHECK=yes], 105722f39173dSmrg [_EXT_CHECK=no]) 105732f39173dSmrg CFLAGS="$SAVE_CFLAGS" 105742f39173dSmrg AC_MSG_CHECKING([if $1 is defined]) 105752f39173dSmrg AC_MSG_RESULT([$_EXT_CHECK]) 105762f39173dSmrg if test "$_EXT_CHECK" != no; then 105772f39173dSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 105782f39173dSmrg fi 105792f39173dSmrg]) 105802f39173dSmrg 1058143df4709Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software 1058243df4709Smrg# Foundation, Inc. 105832f39173dSmrg# 105842f39173dSmrg# This file is free software; the Free Software Foundation 105852f39173dSmrg# gives unlimited permission to copy and/or distribute it, 105862f39173dSmrg# with or without modifications, as long as this notice is preserved. 105872f39173dSmrg 1058843df4709Smrg# serial 1 1058943df4709Smrg 105902f39173dSmrg# AM_AUTOMAKE_VERSION(VERSION) 105912f39173dSmrg# ---------------------------- 105922f39173dSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 105932f39173dSmrg# generated from the m4 files accompanying Automake X.Y. 105942f39173dSmrg# (This private macro should not be called outside this file.) 105952f39173dSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 1059643df4709Smrg[am__api_version='1.11' 105972f39173dSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 105982f39173dSmrgdnl require some minimum version. Point them to the right macro. 1059943df4709Smrgm4_if([$1], [1.11.3], [], 106002f39173dSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 106012f39173dSmrg]) 106022f39173dSmrg 106032f39173dSmrg# _AM_AUTOCONF_VERSION(VERSION) 106042f39173dSmrg# ----------------------------- 106052f39173dSmrg# aclocal traces this macro to find the Autoconf version. 106062f39173dSmrg# This is a private macro too. Using m4_define simplifies 106072f39173dSmrg# the logic in aclocal, which can simply ignore this definition. 106082f39173dSmrgm4_define([_AM_AUTOCONF_VERSION], []) 106092f39173dSmrg 106102f39173dSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 106112f39173dSmrg# ------------------------------- 106122f39173dSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 106132f39173dSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 106142f39173dSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1061543df4709Smrg[AM_AUTOMAKE_VERSION([1.11.3])dnl 106162f39173dSmrgm4_ifndef([AC_AUTOCONF_VERSION], 106172f39173dSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 106182f39173dSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 106192f39173dSmrg 106202f39173dSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 106212f39173dSmrg 1062243df4709Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 106232f39173dSmrg# 106242f39173dSmrg# This file is free software; the Free Software Foundation 106252f39173dSmrg# gives unlimited permission to copy and/or distribute it, 106262f39173dSmrg# with or without modifications, as long as this notice is preserved. 106272f39173dSmrg 1062843df4709Smrg# serial 1 1062943df4709Smrg 106302f39173dSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 1063143df4709Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 1063243df4709Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 10633ad43ddacSmrg# 10634ad43ddacSmrg# Of course, Automake must honor this variable whenever it calls a 10635ad43ddacSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 10636ad43ddacSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 10637ad43ddacSmrg# depending on how configure is run. This is pretty annoying, since 10638ad43ddacSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 10639ad43ddacSmrg# source directory, any form will work fine, but in subdirectories a 10640ad43ddacSmrg# relative path needs to be adjusted first. 10641ad43ddacSmrg# 10642ad43ddacSmrg# $ac_aux_dir/missing 10643ad43ddacSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 10644ad43ddacSmrg# $top_srcdir/$ac_aux_dir/missing 10645ad43ddacSmrg# fails if $ac_aux_dir is absolute, 10646ad43ddacSmrg# fails when called from a subdirectory in a VPATH build with 10647ad43ddacSmrg# a relative $ac_aux_dir 10648ad43ddacSmrg# 10649ad43ddacSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 10650ad43ddacSmrg# are both prefixed by $srcdir. In an in-source build this is usually 1065143df4709Smrg# harmless because $srcdir is `.', but things will broke when you 10652ad43ddacSmrg# start a VPATH build or use an absolute $srcdir. 10653ad43ddacSmrg# 10654ad43ddacSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 10655ad43ddacSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 10656ad43ddacSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 10657ad43ddacSmrg# and then we would define $MISSING as 10658ad43ddacSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 10659ad43ddacSmrg# This will work as long as MISSING is not called from configure, because 10660ad43ddacSmrg# unfortunately $(top_srcdir) has no meaning in configure. 10661ad43ddacSmrg# However there are other variables, like CC, which are often used in 10662ad43ddacSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 10663ad43ddacSmrg# 10664ad43ddacSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 10665ad43ddacSmrg# absolute PATH. The drawback is that using absolute paths prevent a 10666ad43ddacSmrg# configured tree to be moved without reconfiguration. 10667ad43ddacSmrg 10668ad43ddacSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1066943df4709Smrg[dnl Rely on autoconf to set up CDPATH properly. 1067043df4709SmrgAC_PREREQ([2.50])dnl 1067143df4709Smrg# expand $ac_aux_dir to an absolute path 1067243df4709Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 10673ad43ddacSmrg]) 10674ad43ddacSmrg 10675ad43ddacSmrg# AM_CONDITIONAL -*- Autoconf -*- 10676ad43ddacSmrg 1067743df4709Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 1067843df4709Smrg# Free Software Foundation, Inc. 10679ad43ddacSmrg# 10680ad43ddacSmrg# This file is free software; the Free Software Foundation 10681ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 10682ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 10683ad43ddacSmrg 1068443df4709Smrg# serial 9 1068543df4709Smrg 10686ad43ddacSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 10687ad43ddacSmrg# ------------------------------------- 10688ad43ddacSmrg# Define a conditional. 10689ad43ddacSmrgAC_DEFUN([AM_CONDITIONAL], 1069043df4709Smrg[AC_PREREQ(2.52)dnl 1069143df4709Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1069243df4709Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 10693ad43ddacSmrgAC_SUBST([$1_TRUE])dnl 10694ad43ddacSmrgAC_SUBST([$1_FALSE])dnl 10695ad43ddacSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 10696ad43ddacSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 106972f39173dSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 10698ad43ddacSmrgif $2; then 10699ad43ddacSmrg $1_TRUE= 10700ad43ddacSmrg $1_FALSE='#' 10701ad43ddacSmrgelse 10702ad43ddacSmrg $1_TRUE='#' 10703ad43ddacSmrg $1_FALSE= 10704c503f109Smrgfi 10705ad43ddacSmrgAC_CONFIG_COMMANDS_PRE( 10706ad43ddacSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 10707ad43ddacSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 10708ad43ddacSmrgUsually this means the macro was only invoked conditionally.]]) 10709ad43ddacSmrgfi])]) 10710209ff23fSmrg 1071143df4709Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 1071243df4709Smrg# 2010, 2011 Free Software Foundation, Inc. 10713ad43ddacSmrg# 10714ad43ddacSmrg# This file is free software; the Free Software Foundation 10715ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 10716ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 10717209ff23fSmrg 1071843df4709Smrg# serial 12 10719209ff23fSmrg 1072043df4709Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 10721ad43ddacSmrg# written in clear, in which case automake, when reading aclocal.m4, 10722ad43ddacSmrg# will think it sees a *use*, and therefore will trigger all it's 10723ad43ddacSmrg# C support machinery. Also note that it means that autoscan, seeing 10724ad43ddacSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 10725209ff23fSmrg 10726ad43ddacSmrg 10727ad43ddacSmrg# _AM_DEPENDENCIES(NAME) 10728c503f109Smrg# ---------------------- 10729ad43ddacSmrg# See how the compiler implements dependency checking. 1073043df4709Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 10731ad43ddacSmrg# We try a few techniques and use that to set a single cache variable. 10732209ff23fSmrg# 10733ad43ddacSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 10734ad43ddacSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 10735ad43ddacSmrg# dependency, and given that the user is not expected to run this macro, 10736ad43ddacSmrg# just rely on AC_PROG_CC. 10737ad43ddacSmrgAC_DEFUN([_AM_DEPENDENCIES], 10738ad43ddacSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 10739ad43ddacSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 10740ad43ddacSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 10741ad43ddacSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 10742209ff23fSmrg 1074343df4709Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 1074443df4709Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 1074543df4709Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1074643df4709Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 1074743df4709Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1074843df4709Smrg [depcc="$$1" am_compiler_list=]) 10749209ff23fSmrg 10750ad43ddacSmrgAC_CACHE_CHECK([dependency style of $depcc], 10751ad43ddacSmrg [am_cv_$1_dependencies_compiler_type], 10752ad43ddacSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 10753ad43ddacSmrg # We make a subdir and do the tests there. Otherwise we can end up 10754ad43ddacSmrg # making bogus files that we don't know about and never remove. For 10755ad43ddacSmrg # instance it was reported that on HP-UX the gcc test will end up 1075643df4709Smrg # making a dummy file named `D' -- because `-MD' means `put the output 1075743df4709Smrg # in D'. 1075868105dcbSveego rm -rf conftest.dir 10759ad43ddacSmrg mkdir conftest.dir 10760ad43ddacSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 10761ad43ddacSmrg # using a relative directory. 10762ad43ddacSmrg cp "$am_depcomp" conftest.dir 10763ad43ddacSmrg cd conftest.dir 10764ad43ddacSmrg # We will build objects and dependencies in a subdirectory because 10765ad43ddacSmrg # it helps to detect inapplicable dependency modes. For instance 10766ad43ddacSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 10767ad43ddacSmrg # side effect of compilation, but ICC will put the dependencies in 10768ad43ddacSmrg # the current directory while Tru64 will put them in the object 10769ad43ddacSmrg # directory. 10770ad43ddacSmrg mkdir sub 10771209ff23fSmrg 10772ad43ddacSmrg am_cv_$1_dependencies_compiler_type=none 10773ad43ddacSmrg if test "$am_compiler_list" = ""; then 10774ad43ddacSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 10775ad43ddacSmrg fi 107762f39173dSmrg am__universal=false 107772f39173dSmrg m4_case([$1], [CC], 107782f39173dSmrg [case " $depcc " in #( 107792f39173dSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 107802f39173dSmrg esac], 107812f39173dSmrg [CXX], 107822f39173dSmrg [case " $depcc " in #( 107832f39173dSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 107842f39173dSmrg esac]) 107852f39173dSmrg 10786ad43ddacSmrg for depmode in $am_compiler_list; do 10787ad43ddacSmrg # Setup a source with many dependencies, because some compilers 10788ad43ddacSmrg # like to wrap large dependency lists on column 80 (with \), and 10789ad43ddacSmrg # we should not choose a depcomp mode which is confused by this. 10790ad43ddacSmrg # 10791ad43ddacSmrg # We need to recreate these files for each test, as the compiler may 10792ad43ddacSmrg # overwrite some of them when testing with obscure command lines. 10793ad43ddacSmrg # This happens at least with the AIX C compiler. 10794ad43ddacSmrg : > sub/conftest.c 10795ad43ddacSmrg for i in 1 2 3 4 5 6; do 10796ad43ddacSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 1079743df4709Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 1079843df4709Smrg # Solaris 8's {/usr,}/bin/sh. 1079943df4709Smrg touch sub/conftst$i.h 10800ad43ddacSmrg done 10801ad43ddacSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 10802209ff23fSmrg 1080343df4709Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 108042f39173dSmrg # mode. It turns out that the SunPro C++ compiler does not properly 1080543df4709Smrg # handle `-M -o', and we need to detect this. Also, some Intel 1080643df4709Smrg # versions had trouble with output in subdirs 108072f39173dSmrg am__obj=sub/conftest.${OBJEXT-o} 108082f39173dSmrg am__minus_obj="-o $am__obj" 10809ad43ddacSmrg case $depmode in 108102f39173dSmrg gcc) 108112f39173dSmrg # This depmode causes a compiler race in universal mode. 108122f39173dSmrg test "$am__universal" = false || continue 108132f39173dSmrg ;; 10814ad43ddacSmrg nosideeffect) 1081543df4709Smrg # after this tag, mechanisms are not by side-effect, so they'll 1081643df4709Smrg # only be used when explicitly requested 10817ad43ddacSmrg if test "x$enable_dependency_tracking" = xyes; then 10818ad43ddacSmrg continue 10819ad43ddacSmrg else 10820ad43ddacSmrg break 10821ad43ddacSmrg fi 10822ad43ddacSmrg ;; 1082368105dcbSveego msvc7 | msvc7msys | msvisualcpp | msvcmsys) 1082443df4709Smrg # This compiler won't grok `-c -o', but also, the minuso test has 108252f39173dSmrg # not run yet. These depmodes are late enough in the game, and 108262f39173dSmrg # so weak that their functioning should not be impacted. 108272f39173dSmrg am__obj=conftest.${OBJEXT-o} 108282f39173dSmrg am__minus_obj= 108292f39173dSmrg ;; 10830ad43ddacSmrg none) break ;; 10831ad43ddacSmrg esac 10832ad43ddacSmrg if depmode=$depmode \ 108332f39173dSmrg source=sub/conftest.c object=$am__obj \ 10834ad43ddacSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 108352f39173dSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 10836ad43ddacSmrg >/dev/null 2>conftest.err && 10837ad43ddacSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 10838ad43ddacSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 108392f39173dSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 10840ad43ddacSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 10841ad43ddacSmrg # icc doesn't choke on unknown options, it will just issue warnings 10842ad43ddacSmrg # or remarks (even with -Werror). So we grep stderr for any message 10843ad43ddacSmrg # that says an option was ignored or not supported. 10844ad43ddacSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 10845ad43ddacSmrg # icc: Command line warning: ignoring option '-M'; no argument required 10846ad43ddacSmrg # The diagnosis changed in icc 8.0: 10847ad43ddacSmrg # icc: Command line remark: option '-MP' not supported 10848ad43ddacSmrg if (grep 'ignoring option' conftest.err || 10849ad43ddacSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 10850ad43ddacSmrg am_cv_$1_dependencies_compiler_type=$depmode 10851ad43ddacSmrg break 10852ad43ddacSmrg fi 10853ad43ddacSmrg fi 10854ad43ddacSmrg done 10855209ff23fSmrg 10856ad43ddacSmrg cd .. 10857ad43ddacSmrg rm -rf conftest.dir 10858c503f109Smrgelse 10859ad43ddacSmrg am_cv_$1_dependencies_compiler_type=none 10860c503f109Smrgfi 10861ad43ddacSmrg]) 10862ad43ddacSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 10863ad43ddacSmrgAM_CONDITIONAL([am__fastdep$1], [ 10864ad43ddacSmrg test "x$enable_dependency_tracking" != xno \ 10865ad43ddacSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 10866ad43ddacSmrg]) 10867ad43ddacSmrg 10868ad43ddacSmrg 10869ad43ddacSmrg# AM_SET_DEPDIR 10870ad43ddacSmrg# ------------- 10871ad43ddacSmrg# Choose a directory name for dependency files. 1087243df4709Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 10873ad43ddacSmrgAC_DEFUN([AM_SET_DEPDIR], 10874ad43ddacSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 10875ad43ddacSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 10876ad43ddacSmrg]) 10877ad43ddacSmrg 10878ad43ddacSmrg 10879ad43ddacSmrg# AM_DEP_TRACK 10880ad43ddacSmrg# ------------ 10881ad43ddacSmrgAC_DEFUN([AM_DEP_TRACK], 1088243df4709Smrg[AC_ARG_ENABLE(dependency-tracking, 1088343df4709Smrg[ --disable-dependency-tracking speeds up one-time build 1088443df4709Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 10885ad43ddacSmrgif test "x$enable_dependency_tracking" != xno; then 10886ad43ddacSmrg am_depcomp="$ac_aux_dir/depcomp" 10887ad43ddacSmrg AMDEPBACKSLASH='\' 1088868105dcbSveego am__nodep='_no' 10889c503f109Smrgfi 10890ad43ddacSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 10891ad43ddacSmrgAC_SUBST([AMDEPBACKSLASH])dnl 10892ad43ddacSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1089368105dcbSveegoAC_SUBST([am__nodep])dnl 1089468105dcbSveego_AM_SUBST_NOTMAKE([am__nodep])dnl 10895ad43ddacSmrg]) 10896209ff23fSmrg 10897ad43ddacSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 10898209ff23fSmrg 1089943df4709Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 1090043df4709Smrg# Free Software Foundation, Inc. 10901209ff23fSmrg# 10902ad43ddacSmrg# This file is free software; the Free Software Foundation 10903ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 10904ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 10905209ff23fSmrg 1090643df4709Smrg#serial 5 10907209ff23fSmrg 10908ad43ddacSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 10909ad43ddacSmrg# ------------------------------ 10910ad43ddacSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 109112f39173dSmrg[{ 1091243df4709Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 109132f39173dSmrg # are listed without --file. Let's play safe and only enable the eval 109142f39173dSmrg # if we detect the quoting. 109152f39173dSmrg case $CONFIG_FILES in 109162f39173dSmrg *\'*) eval set x "$CONFIG_FILES" ;; 109172f39173dSmrg *) set x $CONFIG_FILES ;; 109182f39173dSmrg esac 109192f39173dSmrg shift 109202f39173dSmrg for mf 109212f39173dSmrg do 109222f39173dSmrg # Strip MF so we end up with the name of the file. 109232f39173dSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 109242f39173dSmrg # Check whether this is an Automake generated Makefile or not. 1092543df4709Smrg # We used to match only the files named `Makefile.in', but 109262f39173dSmrg # some people rename them; so instead we look at the file content. 109272f39173dSmrg # Grep'ing the first line is not enough: some people post-process 109282f39173dSmrg # each Makefile.in and add a new line on top of each file to say so. 109292f39173dSmrg # Grep'ing the whole file is not good either: AIX grep has a line 109302f39173dSmrg # limit of 2048, but all sed's we know have understand at least 4000. 109312f39173dSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 109322f39173dSmrg dirpart=`AS_DIRNAME("$mf")` 109332f39173dSmrg else 109342f39173dSmrg continue 109352f39173dSmrg fi 109362f39173dSmrg # Extract the definition of DEPDIR, am__include, and am__quote 1093743df4709Smrg # from the Makefile without running `make'. 109382f39173dSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 109392f39173dSmrg test -z "$DEPDIR" && continue 109402f39173dSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 1094143df4709Smrg test -z "am__include" && continue 109422f39173dSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 1094343df4709Smrg # When using ansi2knr, U may be empty or an underscore; expand it 1094443df4709Smrg U=`sed -n 's/^U = //p' < "$mf"` 109452f39173dSmrg # Find all dependency output files, they are included files with 109462f39173dSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 109472f39173dSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 109482f39173dSmrg # expansion. 109492f39173dSmrg for file in `sed -n " 109502f39173dSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 1095143df4709Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 109522f39173dSmrg # Make sure the directory exists. 109532f39173dSmrg test -f "$dirpart/$file" && continue 109542f39173dSmrg fdir=`AS_DIRNAME(["$file"])` 109552f39173dSmrg AS_MKDIR_P([$dirpart/$fdir]) 109562f39173dSmrg # echo "creating $dirpart/$file" 109572f39173dSmrg echo '# dummy' > "$dirpart/$file" 109582f39173dSmrg done 10959ad43ddacSmrg done 109602f39173dSmrg} 10961ad43ddacSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 10962209ff23fSmrg 10963209ff23fSmrg 10964ad43ddacSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 10965ad43ddacSmrg# ----------------------------- 10966ad43ddacSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 10967ad43ddacSmrg# 10968ad43ddacSmrg# This code is only required when automatic dependency tracking 1096943df4709Smrg# is enabled. FIXME. This creates each `.P' file that we will 10970ad43ddacSmrg# need in order to bootstrap the dependency handling code. 10971ad43ddacSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 10972ad43ddacSmrg[AC_CONFIG_COMMANDS([depfiles], 10973ad43ddacSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 10974ad43ddacSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 10975c503f109Smrg]) 10976209ff23fSmrg 10977ad43ddacSmrg# Do all the work for Automake. -*- Autoconf -*- 10978ad43ddacSmrg 1097943df4709Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 1098043df4709Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 10981c503f109Smrg# 10982ad43ddacSmrg# This file is free software; the Free Software Foundation 10983ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 10984ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 10985c503f109Smrg 1098643df4709Smrg# serial 16 1098743df4709Smrg 10988ad43ddacSmrg# This macro actually does too much. Some checks are only needed if 10989ad43ddacSmrg# your package does certain things. But this isn't really a big deal. 10990209ff23fSmrg 10991ad43ddacSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 10992ad43ddacSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 10993ad43ddacSmrg# ----------------------------------------------- 10994ad43ddacSmrg# The call with PACKAGE and VERSION arguments is the old style 10995ad43ddacSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 10996ad43ddacSmrg# and VERSION should now be passed to AC_INIT and removed from 10997ad43ddacSmrg# the call to AM_INIT_AUTOMAKE. 10998ad43ddacSmrg# We support both call styles for the transition. After 10999ad43ddacSmrg# the next Automake release, Autoconf can make the AC_INIT 11000ad43ddacSmrg# arguments mandatory, and then we can depend on a new Autoconf 11001ad43ddacSmrg# release and drop the old call support. 11002ad43ddacSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 1100343df4709Smrg[AC_PREREQ([2.62])dnl 11004ad43ddacSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 11005ad43ddacSmrgdnl the ones we care about. 11006ad43ddacSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11007ad43ddacSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11008ad43ddacSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 11009ad43ddacSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 11010ad43ddacSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11011ad43ddacSmrg # is not polluted with repeated "-I." 11012ad43ddacSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11013ad43ddacSmrg # test to see if srcdir already configured 11014ad43ddacSmrg if test -f $srcdir/config.status; then 11015ad43ddacSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11016ad43ddacSmrg fi 11017ad43ddacSmrgfi 11018ad43ddacSmrg 11019ad43ddacSmrg# test whether we have cygpath 11020ad43ddacSmrgif test -z "$CYGPATH_W"; then 11021ad43ddacSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 11022ad43ddacSmrg CYGPATH_W='cygpath -w' 11023ad43ddacSmrg else 11024ad43ddacSmrg CYGPATH_W=echo 11025ad43ddacSmrg fi 11026ad43ddacSmrgfi 11027ad43ddacSmrgAC_SUBST([CYGPATH_W]) 11028209ff23fSmrg 11029ad43ddacSmrg# Define the identity of the package. 11030ad43ddacSmrgdnl Distinguish between old-style and new-style calls. 11031ad43ddacSmrgm4_ifval([$2], 1103243df4709Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11033ad43ddacSmrg AC_SUBST([PACKAGE], [$1])dnl 11034ad43ddacSmrg AC_SUBST([VERSION], [$2])], 11035ad43ddacSmrg[_AM_SET_OPTIONS([$1])dnl 11036ad43ddacSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1103743df4709Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 11038ad43ddacSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11039ad43ddacSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11040ad43ddacSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11041209ff23fSmrg 11042ad43ddacSmrg_AM_IF_OPTION([no-define],, 1104343df4709Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 1104443df4709Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 11045ad43ddacSmrg 11046ad43ddacSmrg# Some tools Automake needs. 11047ad43ddacSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 11048ad43ddacSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 1104943df4709SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 1105043df4709SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 1105143df4709SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 1105243df4709SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 1105343df4709SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 110542f39173dSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 110552f39173dSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1105643df4709SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 1105743df4709Smrg# We need awk for the "check" target. The system "awk" is bad on 1105843df4709Smrg# some platforms. 11059ad43ddacSmrgAC_REQUIRE([AC_PROG_AWK])dnl 11060ad43ddacSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 11061ad43ddacSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 11062ad43ddacSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 110632f39173dSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 110642f39173dSmrg [_AM_PROG_TAR([v7])])]) 11065ad43ddacSmrg_AM_IF_OPTION([no-dependencies],, 11066ad43ddacSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 1106743df4709Smrg [_AM_DEPENDENCIES(CC)], 1106843df4709Smrg [define([AC_PROG_CC], 1106943df4709Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 11070ad43ddacSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 1107143df4709Smrg [_AM_DEPENDENCIES(CXX)], 1107243df4709Smrg [define([AC_PROG_CXX], 1107343df4709Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 11074ad43ddacSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 1107543df4709Smrg [_AM_DEPENDENCIES(OBJC)], 1107643df4709Smrg [define([AC_PROG_OBJC], 1107743df4709Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 11078ad43ddacSmrg]) 1107943df4709Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 1108043df4709Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 1108143df4709Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 1108243df4709Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 110832f39173dSmrgAC_CONFIG_COMMANDS_PRE(dnl 110842f39173dSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 110852f39173dSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11086209ff23fSmrg]) 11087209ff23fSmrg 1108843df4709Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 110892f39173dSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 110902f39173dSmrgdnl mangled by Autoconf and run in a shell conditional statement. 110912f39173dSmrgm4_define([_AC_COMPILER_EXEEXT], 110922f39173dSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 110932f39173dSmrg 1109443df4709Smrg 11095ad43ddacSmrg# When config.status generates a header, we must update the stamp-h file. 11096ad43ddacSmrg# This file resides in the same directory as the config header 11097ad43ddacSmrg# that is generated. The stamp files are numbered to have different names. 11098209ff23fSmrg 11099ad43ddacSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11100ad43ddacSmrg# loop where config.status creates the headers, so we can generate 11101ad43ddacSmrg# our stamp files there. 11102ad43ddacSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11103ad43ddacSmrg[# Compute $1's index in $config_headers. 11104ad43ddacSmrg_am_arg=$1 11105ad43ddacSmrg_am_stamp_count=1 11106ad43ddacSmrgfor _am_header in $config_headers :; do 11107ad43ddacSmrg case $_am_header in 11108ad43ddacSmrg $_am_arg | $_am_arg:* ) 11109ad43ddacSmrg break ;; 11110ad43ddacSmrg * ) 11111ad43ddacSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11112ad43ddacSmrg esac 11113ad43ddacSmrgdone 11114ad43ddacSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11115c503f109Smrg 1111643df4709Smrg# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, 1111743df4709Smrg# Inc. 11118209ff23fSmrg# 11119209ff23fSmrg# This file is free software; the Free Software Foundation 11120209ff23fSmrg# gives unlimited permission to copy and/or distribute it, 11121209ff23fSmrg# with or without modifications, as long as this notice is preserved. 11122209ff23fSmrg 1112343df4709Smrg# serial 1 1112443df4709Smrg 11125ad43ddacSmrg# AM_PROG_INSTALL_SH 11126ad43ddacSmrg# ------------------ 11127ad43ddacSmrg# Define $install_sh. 11128ad43ddacSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 11129ad43ddacSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1113043df4709Smrgif test x"${install_sh}" != xset; then 111312f39173dSmrg case $am_aux_dir in 111322f39173dSmrg *\ * | *\ *) 111332f39173dSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 111342f39173dSmrg *) 111352f39173dSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 111362f39173dSmrg esac 111372f39173dSmrgfi 1113843df4709SmrgAC_SUBST(install_sh)]) 11139209ff23fSmrg 1114043df4709Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 11141209ff23fSmrg# 11142209ff23fSmrg# This file is free software; the Free Software Foundation 11143209ff23fSmrg# gives unlimited permission to copy and/or distribute it, 11144209ff23fSmrg# with or without modifications, as long as this notice is preserved. 11145209ff23fSmrg 1114643df4709Smrg# serial 2 1114743df4709Smrg 11148ad43ddacSmrg# Check whether the underlying file-system supports filenames 11149ad43ddacSmrg# with a leading dot. For instance MS-DOS doesn't. 11150ad43ddacSmrgAC_DEFUN([AM_SET_LEADING_DOT], 11151ad43ddacSmrg[rm -rf .tst 2>/dev/null 11152ad43ddacSmrgmkdir .tst 2>/dev/null 11153ad43ddacSmrgif test -d .tst; then 11154ad43ddacSmrg am__leading_dot=. 11155209ff23fSmrgelse 11156ad43ddacSmrg am__leading_dot=_ 11157209ff23fSmrgfi 11158ad43ddacSmrgrmdir .tst 2>/dev/null 11159ad43ddacSmrgAC_SUBST([am__leading_dot])]) 11160ad43ddacSmrg 11161ad43ddacSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 11162ad43ddacSmrg# From Jim Meyering 11163209ff23fSmrg 1116443df4709Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 1116543df4709Smrg# 2011 Free Software Foundation, Inc. 11166209ff23fSmrg# 11167209ff23fSmrg# This file is free software; the Free Software Foundation 11168209ff23fSmrg# gives unlimited permission to copy and/or distribute it, 11169209ff23fSmrg# with or without modifications, as long as this notice is preserved. 11170209ff23fSmrg 1117143df4709Smrg# serial 5 1117243df4709Smrg 111732f39173dSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 111742f39173dSmrg# ---------------------------------- 111752f39173dSmrg# Control maintainer-specific portions of Makefiles. 1117643df4709Smrg# Default is to disable them, unless `enable' is passed literally. 1117743df4709Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 111782f39173dSmrg# can override the default with the --enable/--disable switch. 11179ad43ddacSmrgAC_DEFUN([AM_MAINTAINER_MODE], 111802f39173dSmrg[m4_case(m4_default([$1], [disable]), 111812f39173dSmrg [enable], [m4_define([am_maintainer_other], [disable])], 111822f39173dSmrg [disable], [m4_define([am_maintainer_other], [enable])], 111832f39173dSmrg [m4_define([am_maintainer_other], [enable]) 111842f39173dSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 1118568105dcbSveegoAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 111862f39173dSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 111872f39173dSmrg AC_ARG_ENABLE([maintainer-mode], 1118843df4709Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 1118943df4709Smrg (and sometimes confusing) to the casual installer], 1119043df4709Smrg [USE_MAINTAINER_MODE=$enableval], 1119143df4709Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 11192ad43ddacSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 111932f39173dSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 11194ad43ddacSmrg MAINT=$MAINTAINER_MODE_TRUE 111952f39173dSmrg AC_SUBST([MAINT])dnl 11196ad43ddacSmrg] 11197ad43ddacSmrg) 11198209ff23fSmrg 1119943df4709SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 1120043df4709Smrg 11201ad43ddacSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 11202ad43ddacSmrg 1120343df4709Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 11204209ff23fSmrg# 11205ad43ddacSmrg# This file is free software; the Free Software Foundation 11206ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 11207ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 11208209ff23fSmrg 1120943df4709Smrg# serial 4 1121043df4709Smrg 11211ad43ddacSmrg# AM_MAKE_INCLUDE() 11212ad43ddacSmrg# ----------------- 11213ad43ddacSmrg# Check to see how make treats includes. 11214ad43ddacSmrgAC_DEFUN([AM_MAKE_INCLUDE], 11215ad43ddacSmrg[am_make=${MAKE-make} 11216ad43ddacSmrgcat > confinc << 'END' 11217ad43ddacSmrgam__doit: 112182f39173dSmrg @echo this is the am__doit target 11219ad43ddacSmrg.PHONY: am__doit 11220ad43ddacSmrgEND 11221ad43ddacSmrg# If we don't find an include directive, just comment out the code. 11222ad43ddacSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 11223ad43ddacSmrgam__include="#" 11224ad43ddacSmrgam__quote= 11225ad43ddacSmrg_am_result=none 11226ad43ddacSmrg# First try GNU make style include. 11227ad43ddacSmrgecho "include confinc" > confmf 1122843df4709Smrg# Ignore all kinds of additional output from `make'. 112292f39173dSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 112302f39173dSmrg*the\ am__doit\ target*) 112312f39173dSmrg am__include=include 112322f39173dSmrg am__quote= 112332f39173dSmrg _am_result=GNU 112342f39173dSmrg ;; 112352f39173dSmrgesac 11236ad43ddacSmrg# Now try BSD make style include. 11237ad43ddacSmrgif test "$am__include" = "#"; then 11238ad43ddacSmrg echo '.include "confinc"' > confmf 112392f39173dSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 112402f39173dSmrg *the\ am__doit\ target*) 112412f39173dSmrg am__include=.include 112422f39173dSmrg am__quote="\"" 112432f39173dSmrg _am_result=BSD 112442f39173dSmrg ;; 112452f39173dSmrg esac 11246ad43ddacSmrgfi 11247ad43ddacSmrgAC_SUBST([am__include]) 11248ad43ddacSmrgAC_SUBST([am__quote]) 11249ad43ddacSmrgAC_MSG_RESULT([$_am_result]) 11250ad43ddacSmrgrm -f confinc confmf 11251ad43ddacSmrg]) 11252c503f109Smrg 1125343df4709Smrg# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 1125443df4709Smrg# Free Software Foundation, Inc. 1125543df4709Smrg# 1125643df4709Smrg# This file is free software; the Free Software Foundation 1125743df4709Smrg# gives unlimited permission to copy and/or distribute it, 1125843df4709Smrg# with or without modifications, as long as this notice is preserved. 1125943df4709Smrg 1126043df4709Smrg# serial 6 1126143df4709Smrg 1126243df4709Smrg# AM_PROG_CC_C_O 1126343df4709Smrg# -------------- 1126443df4709Smrg# Like AC_PROG_CC_C_O, but changed for automake. 1126543df4709SmrgAC_DEFUN([AM_PROG_CC_C_O], 1126643df4709Smrg[AC_REQUIRE([AC_PROG_CC_C_O])dnl 1126743df4709SmrgAC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1126843df4709SmrgAC_REQUIRE_AUX_FILE([compile])dnl 1126943df4709Smrg# FIXME: we rely on the cache variable name because 1127043df4709Smrg# there is no other way. 1127143df4709Smrgset dummy $CC 1127243df4709Smrgam_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` 1127343df4709Smrgeval am_t=\$ac_cv_prog_cc_${am_cc}_c_o 1127443df4709Smrgif test "$am_t" != yes; then 1127543df4709Smrg # Losing compiler, so override with the script. 1127643df4709Smrg # FIXME: It is wrong to rewrite CC. 1127743df4709Smrg # But if we don't then we get into trouble of one sort or another. 1127843df4709Smrg # A longer-term fix would be to have automake use am__CC in this case, 1127943df4709Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 1128043df4709Smrg CC="$am_aux_dir/compile $CC" 1128143df4709Smrgfi 1128243df4709Smrgdnl Make sure AC_PROG_CC is never called again, or it will override our 1128343df4709Smrgdnl setting of CC. 1128443df4709Smrgm4_define([AC_PROG_CC], 1128543df4709Smrg [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) 1128643df4709Smrg]) 1128743df4709Smrg 11288ad43ddacSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11289c503f109Smrg 1129043df4709Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 1129143df4709Smrg# Free Software Foundation, Inc. 11292ad43ddacSmrg# 11293ad43ddacSmrg# This file is free software; the Free Software Foundation 11294ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 11295ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 11296209ff23fSmrg 1129743df4709Smrg# serial 6 1129843df4709Smrg 11299ad43ddacSmrg# AM_MISSING_PROG(NAME, PROGRAM) 11300ad43ddacSmrg# ------------------------------ 11301ad43ddacSmrgAC_DEFUN([AM_MISSING_PROG], 11302ad43ddacSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 11303ad43ddacSmrg$1=${$1-"${am_missing_run}$2"} 11304ad43ddacSmrgAC_SUBST($1)]) 11305ad43ddacSmrg 1130643df4709Smrg 11307ad43ddacSmrg# AM_MISSING_HAS_RUN 11308ad43ddacSmrg# ------------------ 1130943df4709Smrg# Define MISSING if not defined so far and test if it supports --run. 1131043df4709Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 11311ad43ddacSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 11312ad43ddacSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11313ad43ddacSmrgAC_REQUIRE_AUX_FILE([missing])dnl 113142f39173dSmrgif test x"${MISSING+set}" != xset; then 113152f39173dSmrg case $am_aux_dir in 113162f39173dSmrg *\ * | *\ *) 113172f39173dSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 113182f39173dSmrg *) 113192f39173dSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 113202f39173dSmrg esac 113212f39173dSmrgfi 11322ad43ddacSmrg# Use eval to expand $SHELL 1132343df4709Smrgif eval "$MISSING --run true"; then 1132443df4709Smrg am_missing_run="$MISSING --run " 11325c503f109Smrgelse 11326ad43ddacSmrg am_missing_run= 1132743df4709Smrg AC_MSG_WARN([`missing' script is too old or missing]) 11328c503f109Smrgfi 11329c503f109Smrg]) 11330209ff23fSmrg 1133143df4709Smrg# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, 1133243df4709Smrg# Inc. 1133343df4709Smrg# 1133443df4709Smrg# This file is free software; the Free Software Foundation 1133543df4709Smrg# gives unlimited permission to copy and/or distribute it, 1133643df4709Smrg# with or without modifications, as long as this notice is preserved. 1133743df4709Smrg 1133843df4709Smrg# serial 1 1133943df4709Smrg 1134043df4709Smrg# AM_PROG_MKDIR_P 1134143df4709Smrg# --------------- 1134243df4709Smrg# Check for `mkdir -p'. 1134343df4709SmrgAC_DEFUN([AM_PROG_MKDIR_P], 1134443df4709Smrg[AC_PREREQ([2.60])dnl 1134543df4709SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 1134643df4709Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 1134743df4709Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 1134843df4709Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 1134943df4709Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 1135043df4709Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 1135143df4709Smrgdnl adjustment using top_builddir (which is defined more often than 1135243df4709Smrgdnl MKDIR_P). 1135343df4709SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 1135443df4709Smrgcase $mkdir_p in 1135543df4709Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 1135643df4709Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 1135743df4709Smrgesac 1135843df4709Smrg]) 1135943df4709Smrg 11360ad43ddacSmrg# Helper functions for option handling. -*- Autoconf -*- 11361209ff23fSmrg 1136243df4709Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software 1136343df4709Smrg# Foundation, Inc. 11364ad43ddacSmrg# 11365ad43ddacSmrg# This file is free software; the Free Software Foundation 11366ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 11367ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 11368209ff23fSmrg 1136943df4709Smrg# serial 5 1137043df4709Smrg 11371ad43ddacSmrg# _AM_MANGLE_OPTION(NAME) 11372ad43ddacSmrg# ----------------------- 11373ad43ddacSmrgAC_DEFUN([_AM_MANGLE_OPTION], 11374ad43ddacSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 11375ad43ddacSmrg 11376ad43ddacSmrg# _AM_SET_OPTION(NAME) 1137768105dcbSveego# -------------------- 11378ad43ddacSmrg# Set option NAME. Presently that only means defining a flag for this option. 11379ad43ddacSmrgAC_DEFUN([_AM_SET_OPTION], 1138043df4709Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 11381ad43ddacSmrg 11382ad43ddacSmrg# _AM_SET_OPTIONS(OPTIONS) 1138368105dcbSveego# ------------------------ 11384ad43ddacSmrg# OPTIONS is a space-separated list of Automake options. 11385ad43ddacSmrgAC_DEFUN([_AM_SET_OPTIONS], 113862f39173dSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 11387ad43ddacSmrg 11388ad43ddacSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 11389ad43ddacSmrg# ------------------------------------------- 11390ad43ddacSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11391ad43ddacSmrgAC_DEFUN([_AM_IF_OPTION], 11392ad43ddacSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 11393ad43ddacSmrg 113946322c902Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 113956322c902Smrg 1139643df4709Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 1139743df4709Smrg# Free Software Foundation, Inc. 113986322c902Smrg# 113996322c902Smrg# This file is free software; the Free Software Foundation 114006322c902Smrg# gives unlimited permission to copy and/or distribute it, 114016322c902Smrg# with or without modifications, as long as this notice is preserved. 11402209ff23fSmrg 1140343df4709Smrg# serial 5 1140443df4709Smrg 11405ad43ddacSmrg# AM_SANITY_CHECK 11406ad43ddacSmrg# --------------- 11407ad43ddacSmrgAC_DEFUN([AM_SANITY_CHECK], 11408ad43ddacSmrg[AC_MSG_CHECKING([whether build environment is sane]) 1140943df4709Smrg# Just in case 1141043df4709Smrgsleep 1 1141143df4709Smrgecho timestamp > conftest.file 114122f39173dSmrg# Reject unsafe characters in $srcdir or the absolute working directory 114132f39173dSmrg# name. Accept space and tab only in the latter. 114142f39173dSmrgam_lf=' 114152f39173dSmrg' 114162f39173dSmrgcase `pwd` in 114172f39173dSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 114182f39173dSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 114192f39173dSmrgesac 114202f39173dSmrgcase $srcdir in 114212f39173dSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1142243df4709Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 114232f39173dSmrgesac 114242f39173dSmrg 1142543df4709Smrg# Do `set' in a subshell so we don't clobber the current shell's 11426ad43ddacSmrg# arguments. Must try -L first in case configure is actually a 11427ad43ddacSmrg# symlink; some systems play weird games with the mod time of symlinks 11428ad43ddacSmrg# (eg FreeBSD returns the mod time of the symlink's containing 11429ad43ddacSmrg# directory). 11430ad43ddacSmrgif ( 1143143df4709Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1143243df4709Smrg if test "$[*]" = "X"; then 1143343df4709Smrg # -L didn't work. 1143443df4709Smrg set X `ls -t "$srcdir/configure" conftest.file` 1143543df4709Smrg fi 1143643df4709Smrg rm -f conftest.file 1143743df4709Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 1143843df4709Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 1143943df4709Smrg 1144043df4709Smrg # If neither matched, then we have a broken ls. This can happen 1144143df4709Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 1144243df4709Smrg # broken ls alias from the environment. This has actually 1144343df4709Smrg # happened. Such a system could not be considered "sane". 1144443df4709Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1144543df4709Smrgalias in your environment]) 1144643df4709Smrg fi 1144743df4709Smrg 11448ad43ddacSmrg test "$[2]" = conftest.file 11449ad43ddacSmrg ) 11450ad43ddacSmrgthen 11451ad43ddacSmrg # Ok. 11452ad43ddacSmrg : 11453ad43ddacSmrgelse 11454ad43ddacSmrg AC_MSG_ERROR([newly created file is older than distributed files! 11455ad43ddacSmrgCheck your system clock]) 11456ad43ddacSmrgfi 1145743df4709SmrgAC_MSG_RESULT(yes)]) 11458209ff23fSmrg 1145943df4709Smrg# Copyright (C) 2009, 2011 Free Software Foundation, Inc. 114602f39173dSmrg# 114612f39173dSmrg# This file is free software; the Free Software Foundation 114622f39173dSmrg# gives unlimited permission to copy and/or distribute it, 114632f39173dSmrg# with or without modifications, as long as this notice is preserved. 114642f39173dSmrg 1146543df4709Smrg# serial 2 1146643df4709Smrg 114672f39173dSmrg# AM_SILENT_RULES([DEFAULT]) 114682f39173dSmrg# -------------------------- 114692f39173dSmrg# Enable less verbose build rules; with the default set to DEFAULT 1147043df4709Smrg# (`yes' being less verbose, `no' or empty being verbose). 114712f39173dSmrgAC_DEFUN([AM_SILENT_RULES], 1147243df4709Smrg[AC_ARG_ENABLE([silent-rules], 1147343df4709Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 1147443df4709Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 1147543df4709Smrgcase $enable_silent_rules in 1147643df4709Smrgyes) AM_DEFAULT_VERBOSITY=0;; 1147743df4709Smrgno) AM_DEFAULT_VERBOSITY=1;; 1147843df4709Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 114792f39173dSmrgesac 1148068105dcbSveegodnl 1148143df4709Smrgdnl A few `make' implementations (e.g., NonStop OS and NextStep) 1148268105dcbSveegodnl do not support nested variable expansions. 1148368105dcbSveegodnl See automake bug#9928 and bug#10237. 1148468105dcbSveegoam_make=${MAKE-make} 1148568105dcbSveegoAC_CACHE_CHECK([whether $am_make supports nested variables], 1148668105dcbSveego [am_cv_make_support_nested_variables], 1148768105dcbSveego [if AS_ECHO([['TRUE=$(BAR$(V)) 1148868105dcbSveegoBAR0=false 1148968105dcbSveegoBAR1=true 1149068105dcbSveegoV=1 1149168105dcbSveegoam__doit: 1149268105dcbSveego @$(TRUE) 1149368105dcbSveego.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1149468105dcbSveego am_cv_make_support_nested_variables=yes 1149568105dcbSveegoelse 1149668105dcbSveego am_cv_make_support_nested_variables=no 1149768105dcbSveegofi]) 1149868105dcbSveegoif test $am_cv_make_support_nested_variables = yes; then 1149943df4709Smrg dnl Using `$V' instead of `$(V)' breaks IRIX make. 1150068105dcbSveego AM_V='$(V)' 1150168105dcbSveego AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1150268105dcbSveegoelse 1150368105dcbSveego AM_V=$AM_DEFAULT_VERBOSITY 1150468105dcbSveego AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1150568105dcbSveegofi 1150668105dcbSveegoAC_SUBST([AM_V])dnl 1150768105dcbSveegoAM_SUBST_NOTMAKE([AM_V])dnl 1150868105dcbSveegoAC_SUBST([AM_DEFAULT_V])dnl 1150968105dcbSveegoAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 115102f39173dSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 115112f39173dSmrgAM_BACKSLASH='\' 115122f39173dSmrgAC_SUBST([AM_BACKSLASH])dnl 115132f39173dSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 115142f39173dSmrg]) 115152f39173dSmrg 1151643df4709Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 11517c503f109Smrg# 11518ad43ddacSmrg# This file is free software; the Free Software Foundation 11519ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 11520ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 11521ad43ddacSmrg 1152243df4709Smrg# serial 1 1152343df4709Smrg 11524ad43ddacSmrg# AM_PROG_INSTALL_STRIP 11525ad43ddacSmrg# --------------------- 1152643df4709Smrg# One issue with vendor `install' (even GNU) is that you can't 11527ad43ddacSmrg# specify the program used to strip binaries. This is especially 11528ad43ddacSmrg# annoying in cross-compiling environments, where the build's strip 11529ad43ddacSmrg# is unlikely to handle the host's binaries. 11530ad43ddacSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 1153143df4709Smrg# always use install-sh in `make install-strip', and initialize 11532ad43ddacSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 11533ad43ddacSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 11534ad43ddacSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1153543df4709Smrg# Installed binaries are usually stripped using `strip' when the user 1153643df4709Smrg# run `make install-strip'. However `strip' might not be the right 11537ad43ddacSmrg# tool to use in cross-compilation environments, therefore Automake 1153843df4709Smrg# will honor the `STRIP' environment variable to overrule this program. 1153943df4709Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 11540ad43ddacSmrgif test "$cross_compiling" != no; then 11541ad43ddacSmrg AC_CHECK_TOOL([STRIP], [strip], :) 11542ad43ddacSmrgfi 11543ad43ddacSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 11544ad43ddacSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 11545209ff23fSmrg 1154643df4709Smrg# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. 11547c503f109Smrg# 11548c503f109Smrg# This file is free software; the Free Software Foundation 11549c503f109Smrg# gives unlimited permission to copy and/or distribute it, 11550c503f109Smrg# with or without modifications, as long as this notice is preserved. 11551209ff23fSmrg 1155243df4709Smrg# serial 3 1155343df4709Smrg 11554ad43ddacSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 11555ad43ddacSmrg# --------------------------- 11556ad43ddacSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 11557ad43ddacSmrg# This macro is traced by Automake. 11558ad43ddacSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 11559209ff23fSmrg 115602f39173dSmrg# AM_SUBST_NOTMAKE(VARIABLE) 1156168105dcbSveego# -------------------------- 115622f39173dSmrg# Public sister of _AM_SUBST_NOTMAKE. 115632f39173dSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 115642f39173dSmrg 11565ad43ddacSmrg# Check how to create a tarball. -*- Autoconf -*- 11566209ff23fSmrg 1156743df4709Smrg# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. 11568209ff23fSmrg# 11569c503f109Smrg# This file is free software; the Free Software Foundation 11570c503f109Smrg# gives unlimited permission to copy and/or distribute it, 11571c503f109Smrg# with or without modifications, as long as this notice is preserved. 11572209ff23fSmrg 1157343df4709Smrg# serial 2 1157443df4709Smrg 11575ad43ddacSmrg# _AM_PROG_TAR(FORMAT) 11576ad43ddacSmrg# -------------------- 11577ad43ddacSmrg# Check how to create a tarball in format FORMAT. 1157843df4709Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 11579ad43ddacSmrg# 11580ad43ddacSmrg# Substitute a variable $(am__tar) that is a command 11581ad43ddacSmrg# writing to stdout a FORMAT-tarball containing the directory 11582ad43ddacSmrg# $tardir. 11583ad43ddacSmrg# tardir=directory && $(am__tar) > result.tar 11584ad43ddacSmrg# 11585ad43ddacSmrg# Substitute a variable $(am__untar) that extract such 11586ad43ddacSmrg# a tarball read from stdin. 11587ad43ddacSmrg# $(am__untar) < result.tar 11588ad43ddacSmrgAC_DEFUN([_AM_PROG_TAR], 1158968105dcbSveego[# Always define AMTAR for backward compatibility. Yes, it's still used 1159068105dcbSveego# in the wild :-( We should find a proper way to deprecate it ... 1159168105dcbSveegoAC_SUBST([AMTAR], ['$${TAR-tar}']) 115926322c902Smrgm4_if([$1], [v7], 1159343df4709Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1159443df4709Smrg [m4_case([$1], [ustar],, [pax],, 1159543df4709Smrg [m4_fatal([Unknown tar format])]) 1159643df4709SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 1159743df4709Smrg# Loop over all known methods to create a tar archive until one works. 1159843df4709Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1159943df4709Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1160043df4709Smrg# Do not fold the above two line into one, because Tru64 sh and 1160143df4709Smrg# Solaris sh will not grok spaces in the rhs of `-'. 1160243df4709Smrgfor _am_tool in $_am_tools 1160343df4709Smrgdo 1160443df4709Smrg case $_am_tool in 1160543df4709Smrg gnutar) 1160643df4709Smrg for _am_tar in tar gnutar gtar; 1160743df4709Smrg do 1160843df4709Smrg AM_RUN_LOG([$_am_tar --version]) && break 1160943df4709Smrg done 1161043df4709Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1161143df4709Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1161243df4709Smrg am__untar="$_am_tar -xf -" 1161343df4709Smrg ;; 1161443df4709Smrg plaintar) 1161543df4709Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1161643df4709Smrg # ustar tarball either. 1161743df4709Smrg (tar --version) >/dev/null 2>&1 && continue 1161843df4709Smrg am__tar='tar chf - "$$tardir"' 1161943df4709Smrg am__tar_='tar chf - "$tardir"' 1162043df4709Smrg am__untar='tar xf -' 1162143df4709Smrg ;; 1162243df4709Smrg pax) 1162343df4709Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1162443df4709Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1162543df4709Smrg am__untar='pax -r' 1162643df4709Smrg ;; 1162743df4709Smrg cpio) 1162843df4709Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1162943df4709Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1163043df4709Smrg am__untar='cpio -i -H $1 -d' 1163143df4709Smrg ;; 1163243df4709Smrg none) 1163343df4709Smrg am__tar=false 1163443df4709Smrg am__tar_=false 1163543df4709Smrg am__untar=false 1163643df4709Smrg ;; 1163743df4709Smrg esac 116386322c902Smrg 1163943df4709Smrg # If the value was cached, stop now. We just wanted to have am__tar 1164043df4709Smrg # and am__untar set. 1164143df4709Smrg test -n "${am_cv_prog_tar_$1}" && break 116426322c902Smrg 1164343df4709Smrg # tar/untar a dummy directory, and stop if the command works 11644ad43ddacSmrg rm -rf conftest.dir 1164543df4709Smrg mkdir conftest.dir 1164643df4709Smrg echo GrepMe > conftest.dir/file 1164743df4709Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1164843df4709Smrg rm -rf conftest.dir 1164943df4709Smrg if test -s conftest.tar; then 1165043df4709Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1165143df4709Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1165243df4709Smrg fi 1165343df4709Smrgdone 1165443df4709Smrgrm -rf conftest.dir 11655ad43ddacSmrg 1165643df4709SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1165743df4709SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11658ad43ddacSmrgAC_SUBST([am__tar]) 11659ad43ddacSmrgAC_SUBST([am__untar]) 11660ad43ddacSmrg]) # _AM_PROG_TAR 11661ad43ddacSmrg 11662