aclocal.m4 revision eda3803b
1eda3803bSmrg# generated automatically by aclocal 1.10.2 -*- Autoconf -*- 2fe5e51b7Smrg 3fe5e51b7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4eda3803bSmrg# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 5fe5e51b7Smrg# This file is free software; the Free Software Foundation 6fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 7fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 8fe5e51b7Smrg 9fe5e51b7Smrg# This program is distributed in the hope that it will be useful, 10fe5e51b7Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11fe5e51b7Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12fe5e51b7Smrg# PARTICULAR PURPOSE. 13fe5e51b7Smrg 14eda3803bSmrgm4_ifndef([AC_AUTOCONF_VERSION], 15eda3803bSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16eda3803bSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 17eda3803bSmrg[m4_warning([this file was generated for autoconf 2.63. 18eda3803bSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19eda3803bSmrgIf you have problems, you may need to regenerate the build system entirely. 20eda3803bSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21fe5e51b7Smrg 22fe5e51b7Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23eda3803bSmrg# 24eda3803bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 25eda3803bSmrg# 2006, 2007, 2008 Free Software Foundation, Inc. 26eda3803bSmrg# Written by Gordon Matzigkeit, 1996 27eda3803bSmrg# 28eda3803bSmrg# This file is free software; the Free Software Foundation gives 29eda3803bSmrg# unlimited permission to copy and/or distribute it, with or without 30eda3803bSmrg# modifications, as long as this notice is preserved. 31eda3803bSmrg 32eda3803bSmrgm4_define([_LT_COPYING], [dnl 33eda3803bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 34eda3803bSmrg# 2006, 2007, 2008 Free Software Foundation, Inc. 35eda3803bSmrg# Written by Gordon Matzigkeit, 1996 36eda3803bSmrg# 37eda3803bSmrg# This file is part of GNU Libtool. 38eda3803bSmrg# 39eda3803bSmrg# GNU Libtool is free software; you can redistribute it and/or 40eda3803bSmrg# modify it under the terms of the GNU General Public License as 41eda3803bSmrg# published by the Free Software Foundation; either version 2 of 42eda3803bSmrg# the License, or (at your option) any later version. 43eda3803bSmrg# 44eda3803bSmrg# As a special exception to the GNU General Public License, 45eda3803bSmrg# if you distribute this file as part of a program or library that 46eda3803bSmrg# is built using GNU Libtool, you may include this file under the 47eda3803bSmrg# same distribution terms that you use for the rest of that program. 48eda3803bSmrg# 49eda3803bSmrg# GNU Libtool is distributed in the hope that it will be useful, 50eda3803bSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 51eda3803bSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 52eda3803bSmrg# GNU General Public License for more details. 53eda3803bSmrg# 54eda3803bSmrg# You should have received a copy of the GNU General Public License 55eda3803bSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 56eda3803bSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 57eda3803bSmrg# obtained by writing to the Free Software Foundation, Inc., 58eda3803bSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 59eda3803bSmrg]) 60fe5e51b7Smrg 61eda3803bSmrg# serial 56 LT_INIT 62fe5e51b7Smrg 63fe5e51b7Smrg 64eda3803bSmrg# LT_PREREQ(VERSION) 65eda3803bSmrg# ------------------ 66eda3803bSmrg# Complain and exit if this libtool version is less that VERSION. 67eda3803bSmrgm4_defun([LT_PREREQ], 68eda3803bSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 69eda3803bSmrg [m4_default([$3], 70eda3803bSmrg [m4_fatal([Libtool version $1 or higher is required], 71eda3803bSmrg 63)])], 72eda3803bSmrg [$2])]) 73fe5e51b7Smrg 74fe5e51b7Smrg 75eda3803bSmrg# _LT_CHECK_BUILDDIR 76eda3803bSmrg# ------------------ 77eda3803bSmrg# Complain if the absolute build directory name contains unusual characters 78eda3803bSmrgm4_defun([_LT_CHECK_BUILDDIR], 79eda3803bSmrg[case `pwd` in 80eda3803bSmrg *\ * | *\ *) 81eda3803bSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 82eda3803bSmrgesac 83eda3803bSmrg]) 84eda3803bSmrg 85eda3803bSmrg 86eda3803bSmrg# LT_INIT([OPTIONS]) 87eda3803bSmrg# ------------------ 88eda3803bSmrgAC_DEFUN([LT_INIT], 89eda3803bSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 90eda3803bSmrgAC_BEFORE([$0], [LT_LANG])dnl 91eda3803bSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 92eda3803bSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 93eda3803bSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 94eda3803bSmrg 95eda3803bSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 96eda3803bSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 97eda3803bSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 98eda3803bSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 99eda3803bSmrgdnl unless we require an AC_DEFUNed macro: 100eda3803bSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 101eda3803bSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 102eda3803bSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 103eda3803bSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 104eda3803bSmrgm4_require([_LT_PROG_LTMAIN])dnl 105eda3803bSmrg 106eda3803bSmrgdnl Parse OPTIONS 107eda3803bSmrg_LT_SET_OPTIONS([$0], [$1]) 108fe5e51b7Smrg 109fe5e51b7Smrg# This can be used to rebuild libtool when needed 110eda3803bSmrgLIBTOOL_DEPS="$ltmain" 111fe5e51b7Smrg 112fe5e51b7Smrg# Always use our own libtool. 113fe5e51b7SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 114fe5e51b7SmrgAC_SUBST(LIBTOOL)dnl 115fe5e51b7Smrg 116eda3803bSmrg_LT_SETUP 117fe5e51b7Smrg 118eda3803bSmrg# Only expand once: 119eda3803bSmrgm4_define([LT_INIT]) 120eda3803bSmrg])# LT_INIT 121fe5e51b7Smrg 122eda3803bSmrg# Old names: 123eda3803bSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 124eda3803bSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 125eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 126eda3803bSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 127eda3803bSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 128eda3803bSmrg 129eda3803bSmrg 130eda3803bSmrg# _LT_CC_BASENAME(CC) 131eda3803bSmrg# ------------------- 132eda3803bSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 133eda3803bSmrgm4_defun([_LT_CC_BASENAME], 134eda3803bSmrg[for cc_temp in $1""; do 135eda3803bSmrg case $cc_temp in 136eda3803bSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137eda3803bSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138eda3803bSmrg \-*) ;; 139eda3803bSmrg *) break;; 140eda3803bSmrg esac 141eda3803bSmrgdone 142eda3803bSmrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 143eda3803bSmrg]) 144eda3803bSmrg 145eda3803bSmrg 146eda3803bSmrg# _LT_FILEUTILS_DEFAULTS 147eda3803bSmrg# ---------------------- 148eda3803bSmrg# It is okay to use these file commands and assume they have been set 149eda3803bSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 150eda3803bSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 151eda3803bSmrg[: ${CP="cp -f"} 152eda3803bSmrg: ${MV="mv -f"} 153eda3803bSmrg: ${RM="rm -f"} 154eda3803bSmrg])# _LT_FILEUTILS_DEFAULTS 155eda3803bSmrg 156eda3803bSmrg 157eda3803bSmrg# _LT_SETUP 158eda3803bSmrg# --------- 159eda3803bSmrgm4_defun([_LT_SETUP], 160eda3803bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 161fe5e51b7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 162eda3803bSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 163eda3803bSmrg_LT_DECL([], [host], [0])dnl 164eda3803bSmrg_LT_DECL([], [host_os], [0])dnl 165eda3803bSmrgdnl 166eda3803bSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 167eda3803bSmrg_LT_DECL([], [build], [0])dnl 168eda3803bSmrg_LT_DECL([], [build_os], [0])dnl 169eda3803bSmrgdnl 170fe5e51b7SmrgAC_REQUIRE([AC_PROG_CC])dnl 171eda3803bSmrgAC_REQUIRE([LT_PATH_LD])dnl 172eda3803bSmrgAC_REQUIRE([LT_PATH_NM])dnl 173eda3803bSmrgdnl 174fe5e51b7SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 175eda3803bSmrgtest -z "$LN_S" && LN_S="ln -s" 176eda3803bSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 177eda3803bSmrgdnl 178eda3803bSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 179eda3803bSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 180eda3803bSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 181fe5e51b7Smrgdnl 182eda3803bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 183eda3803bSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 184eda3803bSmrgm4_require([_LT_CMD_RELOAD])dnl 185eda3803bSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 186eda3803bSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 187eda3803bSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 188eda3803bSmrg 189eda3803bSmrg_LT_CONFIG_LIBTOOL_INIT([ 190eda3803bSmrg# See if we are running on zsh, and set the options which allow our 191eda3803bSmrg# commands through without removal of \ escapes INIT. 192eda3803bSmrgif test -n "\${ZSH_VERSION+set}" ; then 193eda3803bSmrg setopt NO_GLOB_SUBST 194eda3803bSmrgfi 195eda3803bSmrg]) 196eda3803bSmrgif test -n "${ZSH_VERSION+set}" ; then 197eda3803bSmrg setopt NO_GLOB_SUBST 198eda3803bSmrgfi 199fe5e51b7Smrg 200eda3803bSmrg_LT_CHECK_OBJDIR 201fe5e51b7Smrg 202eda3803bSmrgm4_require([_LT_TAG_COMPILER])dnl 203eda3803bSmrg_LT_PROG_ECHO_BACKSLASH 204fe5e51b7Smrg 205fe5e51b7Smrgcase $host_os in 206fe5e51b7Smrgaix3*) 207fe5e51b7Smrg # AIX sometimes has problems with the GCC collect2 program. For some 208fe5e51b7Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 209fe5e51b7Smrg # vanish in a puff of smoke. 210fe5e51b7Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 211fe5e51b7Smrg COLLECT_NAMES= 212fe5e51b7Smrg export COLLECT_NAMES 213fe5e51b7Smrg fi 214fe5e51b7Smrg ;; 215fe5e51b7Smrgesac 216fe5e51b7Smrg 217fe5e51b7Smrg# Sed substitution that helps us do robust quoting. It backslashifies 218fe5e51b7Smrg# metacharacters that are still active within double-quoted strings. 219eda3803bSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 220fe5e51b7Smrg 221fe5e51b7Smrg# Same as above, but do not quote variable references. 222eda3803bSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 223fe5e51b7Smrg 224fe5e51b7Smrg# Sed substitution to delay expansion of an escaped shell variable in a 225fe5e51b7Smrg# double_quote_subst'ed string. 226fe5e51b7Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 227fe5e51b7Smrg 228eda3803bSmrg# Sed substitution to delay expansion of an escaped single quote. 229eda3803bSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 230eda3803bSmrg 231fe5e51b7Smrg# Sed substitution to avoid accidental globbing in evaled expressions 232fe5e51b7Smrgno_glob_subst='s/\*/\\\*/g' 233fe5e51b7Smrg 234fe5e51b7Smrg# Global variables: 235eda3803bSmrgofile=libtool 236fe5e51b7Smrgcan_build_shared=yes 237fe5e51b7Smrg 238fe5e51b7Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 239fe5e51b7Smrg# which needs '.lib'). 240fe5e51b7Smrglibext=a 241fe5e51b7Smrg 242eda3803bSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 243fe5e51b7Smrg 244fe5e51b7Smrgold_CC="$CC" 245fe5e51b7Smrgold_CFLAGS="$CFLAGS" 246fe5e51b7Smrg 247fe5e51b7Smrg# Set sane defaults for various variables 248fe5e51b7Smrgtest -z "$CC" && CC=cc 249fe5e51b7Smrgtest -z "$LTCC" && LTCC=$CC 250fe5e51b7Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 251fe5e51b7Smrgtest -z "$LD" && LD=ld 252fe5e51b7Smrgtest -z "$ac_objext" && ac_objext=o 253fe5e51b7Smrg 254fe5e51b7Smrg_LT_CC_BASENAME([$compiler]) 255fe5e51b7Smrg 256fe5e51b7Smrg# Only perform the check for file, if the check method requires it 257eda3803bSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 258fe5e51b7Smrgcase $deplibs_check_method in 259fe5e51b7Smrgfile_magic*) 260fe5e51b7Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 261eda3803bSmrg _LT_PATH_MAGIC 262fe5e51b7Smrg fi 263fe5e51b7Smrg ;; 264fe5e51b7Smrgesac 265fe5e51b7Smrg 266eda3803bSmrg# Use C for the default configuration in the libtool script 267eda3803bSmrgLT_SUPPORTED_TAG([CC]) 268eda3803bSmrg_LT_LANG_C_CONFIG 269eda3803bSmrg_LT_LANG_DEFAULT_CONFIG 270eda3803bSmrg_LT_CONFIG_COMMANDS 271eda3803bSmrg])# _LT_SETUP 272fe5e51b7Smrg 273fe5e51b7Smrg 274eda3803bSmrg# _LT_PROG_LTMAIN 275eda3803bSmrg# --------------- 276eda3803bSmrg# Note that this code is called both from `configure', and `config.status' 277eda3803bSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 278eda3803bSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 279eda3803bSmrg# so we pass a copy along to make sure it has a sensible value anyway. 280eda3803bSmrgm4_defun([_LT_PROG_LTMAIN], 281eda3803bSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 282eda3803bSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 283eda3803bSmrgltmain="$ac_aux_dir/ltmain.sh" 284eda3803bSmrg])# _LT_PROG_LTMAIN 285fe5e51b7Smrg 286fe5e51b7Smrg 287fe5e51b7Smrg 288eda3803bSmrg# So that we can recreate a full libtool script including additional 289eda3803bSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 290eda3803bSmrg# in macros and then make a single call at the end using the `libtool' 291eda3803bSmrg# label. 292eda3803bSmrg 293eda3803bSmrg 294eda3803bSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 295eda3803bSmrg# ---------------------------------------- 296eda3803bSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 297eda3803bSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 298eda3803bSmrg[m4_ifval([$1], 299eda3803bSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 300eda3803bSmrg [$1 301eda3803bSmrg])])]) 302eda3803bSmrg 303eda3803bSmrg# Initialize. 304eda3803bSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 305eda3803bSmrg 306eda3803bSmrg 307eda3803bSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 308eda3803bSmrg# ------------------------------ 309eda3803bSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 310eda3803bSmrgm4_define([_LT_CONFIG_LIBTOOL], 311eda3803bSmrg[m4_ifval([$1], 312eda3803bSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 313eda3803bSmrg [$1 314eda3803bSmrg])])]) 315eda3803bSmrg 316eda3803bSmrg# Initialize. 317eda3803bSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 318eda3803bSmrg 319eda3803bSmrg 320eda3803bSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 321eda3803bSmrg# ----------------------------------------------------- 322eda3803bSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 323eda3803bSmrg[_LT_CONFIG_LIBTOOL([$1]) 324eda3803bSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 325eda3803bSmrg]) 326eda3803bSmrg 327eda3803bSmrg 328eda3803bSmrg# _LT_FORMAT_COMMENT([COMMENT]) 329eda3803bSmrg# ----------------------------- 330eda3803bSmrg# Add leading comment marks to the start of each line, and a trailing 331eda3803bSmrg# full-stop to the whole comment if one is not present already. 332eda3803bSmrgm4_define([_LT_FORMAT_COMMENT], 333eda3803bSmrg[m4_ifval([$1], [ 334eda3803bSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 335eda3803bSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 336eda3803bSmrg)]) 337eda3803bSmrg 338eda3803bSmrg 339eda3803bSmrg 340eda3803bSmrg 341eda3803bSmrg 342eda3803bSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 343eda3803bSmrg# ------------------------------------------------------------------- 344eda3803bSmrg# CONFIGNAME is the name given to the value in the libtool script. 345eda3803bSmrg# VARNAME is the (base) name used in the configure script. 346eda3803bSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 347eda3803bSmrg# VARNAME. Any other value will be used directly. 348eda3803bSmrgm4_define([_LT_DECL], 349eda3803bSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 350eda3803bSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 351eda3803bSmrg [m4_ifval([$1], [$1], [$2])]) 352eda3803bSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 353eda3803bSmrg m4_ifval([$4], 354eda3803bSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 355eda3803bSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 356eda3803bSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 357eda3803bSmrg]) 358eda3803bSmrg 359eda3803bSmrg 360eda3803bSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 361eda3803bSmrg# -------------------------------------------------------- 362eda3803bSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 363eda3803bSmrg 364eda3803bSmrg 365eda3803bSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 366eda3803bSmrg# ------------------------------------------------ 367eda3803bSmrgm4_define([lt_decl_tag_varnames], 368eda3803bSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 369eda3803bSmrg 370eda3803bSmrg 371eda3803bSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 372eda3803bSmrg# --------------------------------------------------------- 373eda3803bSmrgm4_define([_lt_decl_filter], 374eda3803bSmrg[m4_case([$#], 375eda3803bSmrg [0], [m4_fatal([$0: too few arguments: $#])], 376eda3803bSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 377eda3803bSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 378eda3803bSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 379eda3803bSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 380eda3803bSmrg]) 381eda3803bSmrg 382eda3803bSmrg 383eda3803bSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 384eda3803bSmrg# -------------------------------------------------- 385eda3803bSmrgm4_define([lt_decl_quote_varnames], 386eda3803bSmrg[_lt_decl_filter([value], [1], $@)]) 387eda3803bSmrg 388eda3803bSmrg 389eda3803bSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 390eda3803bSmrg# --------------------------------------------------- 391eda3803bSmrgm4_define([lt_decl_dquote_varnames], 392eda3803bSmrg[_lt_decl_filter([value], [2], $@)]) 393eda3803bSmrg 394eda3803bSmrg 395eda3803bSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 396eda3803bSmrg# --------------------------------------------------- 397eda3803bSmrgm4_define([lt_decl_varnames_tagged], 398eda3803bSmrg[m4_assert([$# <= 2])dnl 399eda3803bSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 400eda3803bSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 401eda3803bSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 402eda3803bSmrgm4_define([_lt_decl_varnames_tagged], 403eda3803bSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 404eda3803bSmrg 405eda3803bSmrg 406eda3803bSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 407eda3803bSmrg# ------------------------------------------------ 408eda3803bSmrgm4_define([lt_decl_all_varnames], 409eda3803bSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 410eda3803bSmrg m4_if([$2], [], 411eda3803bSmrg m4_quote(lt_decl_varnames), 412eda3803bSmrg m4_quote(m4_shift($@))))[]dnl 413eda3803bSmrg]) 414eda3803bSmrgm4_define([_lt_decl_all_varnames], 415eda3803bSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 416eda3803bSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 417eda3803bSmrg]) 418eda3803bSmrg 419eda3803bSmrg 420eda3803bSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 421eda3803bSmrg# ------------------------------------ 422eda3803bSmrg# Quote a variable value, and forward it to `config.status' so that its 423eda3803bSmrg# declaration there will have the same value as in `configure'. VARNAME 424eda3803bSmrg# must have a single quote delimited value for this to work. 425eda3803bSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 426eda3803bSmrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) 427eda3803bSmrg 428eda3803bSmrg 429eda3803bSmrg# _LT_CONFIG_STATUS_DECLARATIONS 430eda3803bSmrg# ------------------------------ 431eda3803bSmrg# We delimit libtool config variables with single quotes, so when 432eda3803bSmrg# we write them to config.status, we have to be sure to quote all 433eda3803bSmrg# embedded single quotes properly. In configure, this macro expands 434eda3803bSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 435eda3803bSmrg# 436eda3803bSmrg# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' 437eda3803bSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 438eda3803bSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 439eda3803bSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 440eda3803bSmrg 441eda3803bSmrg 442eda3803bSmrg# _LT_LIBTOOL_TAGS 443eda3803bSmrg# ---------------- 444eda3803bSmrg# Output comment and list of tags supported by the script 445eda3803bSmrgm4_defun([_LT_LIBTOOL_TAGS], 446eda3803bSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 447eda3803bSmrgavailable_tags="_LT_TAGS"dnl 448eda3803bSmrg]) 449eda3803bSmrg 450eda3803bSmrg 451eda3803bSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 452eda3803bSmrg# ----------------------------------- 453eda3803bSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 454eda3803bSmrg# expand to a commented shell variable setting: 455eda3803bSmrg# 456eda3803bSmrg# # Some comment about what VAR is for. 457eda3803bSmrg# visible_name=$lt_internal_name 458eda3803bSmrgm4_define([_LT_LIBTOOL_DECLARE], 459eda3803bSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 460eda3803bSmrg [description])))[]dnl 461eda3803bSmrgm4_pushdef([_libtool_name], 462eda3803bSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 463eda3803bSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 464eda3803bSmrg [0], [_libtool_name=[$]$1], 465eda3803bSmrg [1], [_libtool_name=$lt_[]$1], 466eda3803bSmrg [2], [_libtool_name=$lt_[]$1], 467eda3803bSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 468eda3803bSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 469eda3803bSmrg]) 470eda3803bSmrg 471eda3803bSmrg 472eda3803bSmrg# _LT_LIBTOOL_CONFIG_VARS 473eda3803bSmrg# ----------------------- 474eda3803bSmrg# Produce commented declarations of non-tagged libtool config variables 475eda3803bSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 476eda3803bSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 477eda3803bSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 478eda3803bSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 479eda3803bSmrg[m4_foreach([_lt_var], 480eda3803bSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 481eda3803bSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 482eda3803bSmrg 483eda3803bSmrg 484eda3803bSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 485eda3803bSmrg# ------------------------- 486eda3803bSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 487eda3803bSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 488eda3803bSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 489eda3803bSmrg 490eda3803bSmrg 491eda3803bSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 492eda3803bSmrg# ------------------------------ 493eda3803bSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 494eda3803bSmrg 495eda3803bSmrg 496eda3803bSmrg# _LT_CONFIG_COMMANDS 497fe5e51b7Smrg# ------------------- 498eda3803bSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 499eda3803bSmrg# variables for single and double quote escaping we saved from calls 500eda3803bSmrg# to _LT_DECL, we can put quote escaped variables declarations 501eda3803bSmrg# into `config.status', and then the shell code to quote escape them in 502eda3803bSmrg# for loops in `config.status'. Finally, any additional code accumulated 503eda3803bSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 504eda3803bSmrgm4_defun([_LT_CONFIG_COMMANDS], 505eda3803bSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 506eda3803bSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 507eda3803bSmrg dnl instead of duplicating it all over again into config.status, 508eda3803bSmrg dnl then we will have config.status run $CONFIG_LT later, so it 509eda3803bSmrg dnl needs to know what name is stored there: 510eda3803bSmrg [AC_CONFIG_COMMANDS([libtool], 511eda3803bSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 512eda3803bSmrg dnl If the libtool generation code is destined for config.status, 513eda3803bSmrg dnl expand the accumulated commands and init code now: 514eda3803bSmrg [AC_CONFIG_COMMANDS([libtool], 515eda3803bSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 516eda3803bSmrg])#_LT_CONFIG_COMMANDS 517eda3803bSmrg 518eda3803bSmrg 519eda3803bSmrg# Initialize. 520eda3803bSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 521eda3803bSmrg[ 522eda3803bSmrg 523eda3803bSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 524eda3803bSmrg# if CDPATH is set. 525eda3803bSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 526eda3803bSmrg 527eda3803bSmrgsed_quote_subst='$sed_quote_subst' 528eda3803bSmrgdouble_quote_subst='$double_quote_subst' 529eda3803bSmrgdelay_variable_subst='$delay_variable_subst' 530eda3803bSmrg_LT_CONFIG_STATUS_DECLARATIONS 531eda3803bSmrgLTCC='$LTCC' 532eda3803bSmrgLTCFLAGS='$LTCFLAGS' 533eda3803bSmrgcompiler='$compiler_DEFAULT' 534eda3803bSmrg 535eda3803bSmrg# Quote evaled strings. 536eda3803bSmrgfor var in lt_decl_all_varnames([[ \ 537eda3803bSmrg]], lt_decl_quote_varnames); do 538eda3803bSmrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 539eda3803bSmrg *[[\\\\\\\`\\"\\\$]]*) 540eda3803bSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 541eda3803bSmrg ;; 542eda3803bSmrg *) 543eda3803bSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 544eda3803bSmrg ;; 545eda3803bSmrg esac 546eda3803bSmrgdone 547eda3803bSmrg 548eda3803bSmrg# Double-quote double-evaled strings. 549eda3803bSmrgfor var in lt_decl_all_varnames([[ \ 550eda3803bSmrg]], lt_decl_dquote_varnames); do 551eda3803bSmrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 552eda3803bSmrg *[[\\\\\\\`\\"\\\$]]*) 553eda3803bSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 554eda3803bSmrg ;; 555eda3803bSmrg *) 556eda3803bSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 557eda3803bSmrg ;; 558eda3803bSmrg esac 559eda3803bSmrgdone 560eda3803bSmrg 561eda3803bSmrg# Fix-up fallback echo if it was mangled by the above quoting rules. 562eda3803bSmrgcase \$lt_ECHO in 563eda3803bSmrg*'\\\[$]0 --fallback-echo"')dnl " 564eda3803bSmrg lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` 565eda3803bSmrg ;; 566eda3803bSmrgesac 567eda3803bSmrg 568eda3803bSmrg_LT_OUTPUT_LIBTOOL_INIT 569eda3803bSmrg]) 570eda3803bSmrg 571eda3803bSmrg 572eda3803bSmrg# LT_OUTPUT 573eda3803bSmrg# --------- 574eda3803bSmrg# This macro allows early generation of the libtool script (before 575eda3803bSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 576eda3803bSmrg# tests. 577eda3803bSmrgAC_DEFUN([LT_OUTPUT], 578eda3803bSmrg[: ${CONFIG_LT=./config.lt} 579eda3803bSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 580eda3803bSmrgcat >"$CONFIG_LT" <<_LTEOF 581eda3803bSmrg#! $SHELL 582eda3803bSmrg# Generated by $as_me. 583eda3803bSmrg# Run this file to recreate a libtool stub with the current configuration. 584eda3803bSmrg 585eda3803bSmrglt_cl_silent=false 586eda3803bSmrgSHELL=\${CONFIG_SHELL-$SHELL} 587eda3803bSmrg_LTEOF 588eda3803bSmrg 589eda3803bSmrgcat >>"$CONFIG_LT" <<\_LTEOF 590eda3803bSmrgAS_SHELL_SANITIZE 591eda3803bSmrg_AS_PREPARE 592eda3803bSmrg 593eda3803bSmrgexec AS_MESSAGE_FD>&1 594eda3803bSmrgexec AS_MESSAGE_LOG_FD>>config.log 595eda3803bSmrg{ 596eda3803bSmrg echo 597eda3803bSmrg AS_BOX([Running $as_me.]) 598eda3803bSmrg} >&AS_MESSAGE_LOG_FD 599eda3803bSmrg 600eda3803bSmrglt_cl_help="\ 601eda3803bSmrg\`$as_me' creates a local libtool stub from the current configuration, 602eda3803bSmrgfor use in further configure time tests before the real libtool is 603eda3803bSmrggenerated. 604eda3803bSmrg 605eda3803bSmrgUsage: $[0] [[OPTIONS]] 606eda3803bSmrg 607eda3803bSmrg -h, --help print this help, then exit 608eda3803bSmrg -V, --version print version number, then exit 609eda3803bSmrg -q, --quiet do not print progress messages 610eda3803bSmrg -d, --debug don't remove temporary files 611eda3803bSmrg 612eda3803bSmrgReport bugs to <bug-libtool@gnu.org>." 613eda3803bSmrg 614eda3803bSmrglt_cl_version="\ 615eda3803bSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 616eda3803bSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 617eda3803bSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 618eda3803bSmrg 619eda3803bSmrgCopyright (C) 2008 Free Software Foundation, Inc. 620eda3803bSmrgThis config.lt script is free software; the Free Software Foundation 621eda3803bSmrggives unlimited permision to copy, distribute and modify it." 622eda3803bSmrg 623eda3803bSmrgwhile test $[#] != 0 624eda3803bSmrgdo 625eda3803bSmrg case $[1] in 626eda3803bSmrg --version | --v* | -V ) 627eda3803bSmrg echo "$lt_cl_version"; exit 0 ;; 628eda3803bSmrg --help | --h* | -h ) 629eda3803bSmrg echo "$lt_cl_help"; exit 0 ;; 630eda3803bSmrg --debug | --d* | -d ) 631eda3803bSmrg debug=: ;; 632eda3803bSmrg --quiet | --q* | --silent | --s* | -q ) 633eda3803bSmrg lt_cl_silent=: ;; 634eda3803bSmrg 635eda3803bSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 636eda3803bSmrgTry \`$[0] --help' for more information.]) ;; 637eda3803bSmrg 638eda3803bSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 639eda3803bSmrgTry \`$[0] --help' for more information.]) ;; 640eda3803bSmrg esac 641eda3803bSmrg shift 642eda3803bSmrgdone 643eda3803bSmrg 644eda3803bSmrgif $lt_cl_silent; then 645eda3803bSmrg exec AS_MESSAGE_FD>/dev/null 646eda3803bSmrgfi 647eda3803bSmrg_LTEOF 648eda3803bSmrg 649eda3803bSmrgcat >>"$CONFIG_LT" <<_LTEOF 650eda3803bSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 651eda3803bSmrg_LTEOF 652eda3803bSmrg 653eda3803bSmrgcat >>"$CONFIG_LT" <<\_LTEOF 654eda3803bSmrgAC_MSG_NOTICE([creating $ofile]) 655eda3803bSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 656eda3803bSmrgAS_EXIT(0) 657eda3803bSmrg_LTEOF 658eda3803bSmrgchmod +x "$CONFIG_LT" 659eda3803bSmrg 660eda3803bSmrg# configure is writing to config.log, but config.lt does its own redirection, 661eda3803bSmrg# appending to config.log, which fails on DOS, as config.log is still kept 662eda3803bSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 663eda3803bSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 664eda3803bSmrgif test "$no_create" != yes; then 665eda3803bSmrg lt_cl_success=: 666eda3803bSmrg test "$silent" = yes && 667eda3803bSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 668eda3803bSmrg exec AS_MESSAGE_LOG_FD>/dev/null 669eda3803bSmrg $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 670eda3803bSmrg exec AS_MESSAGE_LOG_FD>>config.log 671eda3803bSmrg $lt_cl_success || AS_EXIT(1) 672eda3803bSmrgfi 673eda3803bSmrg])# LT_OUTPUT 674eda3803bSmrg 675eda3803bSmrg 676eda3803bSmrg# _LT_CONFIG(TAG) 677eda3803bSmrg# --------------- 678eda3803bSmrg# If TAG is the built-in tag, create an initial libtool script with a 679eda3803bSmrg# default configuration from the untagged config vars. Otherwise add code 680eda3803bSmrg# to config.status for appending the configuration named by TAG from the 681eda3803bSmrg# matching tagged config vars. 682eda3803bSmrgm4_defun([_LT_CONFIG], 683eda3803bSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 684eda3803bSmrg_LT_CONFIG_SAVE_COMMANDS([ 685eda3803bSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 686eda3803bSmrg m4_if(_LT_TAG, [C], [ 687eda3803bSmrg # See if we are running on zsh, and set the options which allow our 688eda3803bSmrg # commands through without removal of \ escapes. 689eda3803bSmrg if test -n "${ZSH_VERSION+set}" ; then 690eda3803bSmrg setopt NO_GLOB_SUBST 691eda3803bSmrg fi 692eda3803bSmrg 693eda3803bSmrg cfgfile="${ofile}T" 694eda3803bSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 695eda3803bSmrg $RM "$cfgfile" 696eda3803bSmrg 697eda3803bSmrg cat <<_LT_EOF >> "$cfgfile" 698eda3803bSmrg#! $SHELL 699eda3803bSmrg 700eda3803bSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 701eda3803bSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 702eda3803bSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 703eda3803bSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 704eda3803bSmrg# 705eda3803bSmrg_LT_COPYING 706eda3803bSmrg_LT_LIBTOOL_TAGS 707eda3803bSmrg 708eda3803bSmrg# ### BEGIN LIBTOOL CONFIG 709eda3803bSmrg_LT_LIBTOOL_CONFIG_VARS 710eda3803bSmrg_LT_LIBTOOL_TAG_VARS 711eda3803bSmrg# ### END LIBTOOL CONFIG 712eda3803bSmrg 713eda3803bSmrg_LT_EOF 714eda3803bSmrg 715eda3803bSmrg case $host_os in 716eda3803bSmrg aix3*) 717eda3803bSmrg cat <<\_LT_EOF >> "$cfgfile" 718eda3803bSmrg# AIX sometimes has problems with the GCC collect2 program. For some 719eda3803bSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 720eda3803bSmrg# vanish in a puff of smoke. 721eda3803bSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 722eda3803bSmrg COLLECT_NAMES= 723eda3803bSmrg export COLLECT_NAMES 724eda3803bSmrgfi 725eda3803bSmrg_LT_EOF 726eda3803bSmrg ;; 727eda3803bSmrg esac 728eda3803bSmrg 729eda3803bSmrg _LT_PROG_LTMAIN 730eda3803bSmrg 731eda3803bSmrg # We use sed instead of cat because bash on DJGPP gets confused if 732eda3803bSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 733eda3803bSmrg # text mode, it properly converts lines to CR/LF. This bash problem 734eda3803bSmrg # is reportedly fixed, but why not run on old versions too? 735eda3803bSmrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 736eda3803bSmrg || (rm -f "$cfgfile"; exit 1) 737eda3803bSmrg 738eda3803bSmrg _LT_PROG_XSI_SHELLFNS 739eda3803bSmrg 740eda3803bSmrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 741eda3803bSmrg || (rm -f "$cfgfile"; exit 1) 742eda3803bSmrg 743eda3803bSmrg mv -f "$cfgfile" "$ofile" || 744eda3803bSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 745eda3803bSmrg chmod +x "$ofile" 746eda3803bSmrg], 747eda3803bSmrg[cat <<_LT_EOF >> "$ofile" 748eda3803bSmrg 749eda3803bSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 750eda3803bSmrgdnl in a comment (ie after a #). 751eda3803bSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 752eda3803bSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 753eda3803bSmrg# ### END LIBTOOL TAG CONFIG: $1 754eda3803bSmrg_LT_EOF 755eda3803bSmrg])dnl /m4_if 756eda3803bSmrg], 757eda3803bSmrg[m4_if([$1], [], [ 758eda3803bSmrg PACKAGE='$PACKAGE' 759eda3803bSmrg VERSION='$VERSION' 760eda3803bSmrg TIMESTAMP='$TIMESTAMP' 761eda3803bSmrg RM='$RM' 762eda3803bSmrg ofile='$ofile'], []) 763eda3803bSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 764eda3803bSmrg])# _LT_CONFIG 765eda3803bSmrg 766eda3803bSmrg 767eda3803bSmrg# LT_SUPPORTED_TAG(TAG) 768eda3803bSmrg# --------------------- 769eda3803bSmrg# Trace this macro to discover what tags are supported by the libtool 770eda3803bSmrg# --tag option, using: 771eda3803bSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 772eda3803bSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 773eda3803bSmrg 774eda3803bSmrg 775eda3803bSmrg# C support is built-in for now 776eda3803bSmrgm4_define([_LT_LANG_C_enabled], []) 777eda3803bSmrgm4_define([_LT_TAGS], []) 778eda3803bSmrg 779eda3803bSmrg 780eda3803bSmrg# LT_LANG(LANG) 781eda3803bSmrg# ------------- 782eda3803bSmrg# Enable libtool support for the given language if not already enabled. 783eda3803bSmrgAC_DEFUN([LT_LANG], 784eda3803bSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 785eda3803bSmrgm4_case([$1], 786eda3803bSmrg [C], [_LT_LANG(C)], 787eda3803bSmrg [C++], [_LT_LANG(CXX)], 788eda3803bSmrg [Java], [_LT_LANG(GCJ)], 789eda3803bSmrg [Fortran 77], [_LT_LANG(F77)], 790eda3803bSmrg [Fortran], [_LT_LANG(FC)], 791eda3803bSmrg [Windows Resource], [_LT_LANG(RC)], 792eda3803bSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 793eda3803bSmrg [_LT_LANG($1)], 794eda3803bSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 795eda3803bSmrg])# LT_LANG 796eda3803bSmrg 797eda3803bSmrg 798eda3803bSmrg# _LT_LANG(LANGNAME) 799eda3803bSmrg# ------------------ 800eda3803bSmrgm4_defun([_LT_LANG], 801eda3803bSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 802eda3803bSmrg [LT_SUPPORTED_TAG([$1])dnl 803eda3803bSmrg m4_append([_LT_TAGS], [$1 ])dnl 804eda3803bSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 805eda3803bSmrg _LT_LANG_$1_CONFIG($1)])dnl 806eda3803bSmrg])# _LT_LANG 807eda3803bSmrg 808eda3803bSmrg 809eda3803bSmrg# _LT_LANG_DEFAULT_CONFIG 810eda3803bSmrg# ----------------------- 811eda3803bSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 812eda3803bSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 813eda3803bSmrg [LT_LANG(CXX)], 814eda3803bSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 815eda3803bSmrg 816eda3803bSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 817eda3803bSmrg [LT_LANG(F77)], 818eda3803bSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 819eda3803bSmrg 820eda3803bSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 821eda3803bSmrg [LT_LANG(FC)], 822eda3803bSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 823eda3803bSmrg 824eda3803bSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 825eda3803bSmrgdnl pulling things in needlessly. 826eda3803bSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 827eda3803bSmrg [LT_LANG(GCJ)], 828eda3803bSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 829eda3803bSmrg [LT_LANG(GCJ)], 830eda3803bSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 831eda3803bSmrg [LT_LANG(GCJ)], 832eda3803bSmrg [m4_ifdef([AC_PROG_GCJ], 833eda3803bSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 834eda3803bSmrg m4_ifdef([A][M_PROG_GCJ], 835eda3803bSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 836eda3803bSmrg m4_ifdef([LT_PROG_GCJ], 837eda3803bSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 838eda3803bSmrg 839eda3803bSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 840eda3803bSmrg [LT_LANG(RC)], 841eda3803bSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 842eda3803bSmrg])# _LT_LANG_DEFAULT_CONFIG 843eda3803bSmrg 844eda3803bSmrg# Obsolete macros: 845eda3803bSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 846eda3803bSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 847eda3803bSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 848eda3803bSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 849eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 850eda3803bSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 851eda3803bSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 852eda3803bSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 853eda3803bSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 854eda3803bSmrg 855eda3803bSmrg 856eda3803bSmrg# _LT_TAG_COMPILER 857eda3803bSmrg# ---------------- 858eda3803bSmrgm4_defun([_LT_TAG_COMPILER], 859fe5e51b7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 860fe5e51b7Smrg 861eda3803bSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 862eda3803bSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 863eda3803bSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 864eda3803bSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 865eda3803bSmrg 866fe5e51b7Smrg# If no C compiler was specified, use CC. 867fe5e51b7SmrgLTCC=${LTCC-"$CC"} 868fe5e51b7Smrg 869fe5e51b7Smrg# If no C compiler flags were specified, use CFLAGS. 870fe5e51b7SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 871fe5e51b7Smrg 872fe5e51b7Smrg# Allow CC to be a program name with arguments. 873fe5e51b7Smrgcompiler=$CC 874eda3803bSmrg])# _LT_TAG_COMPILER 875fe5e51b7Smrg 876fe5e51b7Smrg 877fe5e51b7Smrg# _LT_COMPILER_BOILERPLATE 878fe5e51b7Smrg# ------------------------ 879fe5e51b7Smrg# Check for compiler boilerplate output or warnings with 880fe5e51b7Smrg# the simple compiler test code. 881eda3803bSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 882eda3803bSmrg[m4_require([_LT_DECL_SED])dnl 883fe5e51b7Smrgac_outfile=conftest.$ac_objext 884fe5e51b7Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 885fe5e51b7Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 886fe5e51b7Smrg_lt_compiler_boilerplate=`cat conftest.err` 887eda3803bSmrg$RM conftest* 888fe5e51b7Smrg])# _LT_COMPILER_BOILERPLATE 889fe5e51b7Smrg 890fe5e51b7Smrg 891fe5e51b7Smrg# _LT_LINKER_BOILERPLATE 892fe5e51b7Smrg# ---------------------- 893fe5e51b7Smrg# Check for linker boilerplate output or warnings with 894fe5e51b7Smrg# the simple link test code. 895eda3803bSmrgm4_defun([_LT_LINKER_BOILERPLATE], 896eda3803bSmrg[m4_require([_LT_DECL_SED])dnl 897fe5e51b7Smrgac_outfile=conftest.$ac_objext 898fe5e51b7Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 899fe5e51b7Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 900fe5e51b7Smrg_lt_linker_boilerplate=`cat conftest.err` 901eda3803bSmrg$RM -r conftest* 902fe5e51b7Smrg])# _LT_LINKER_BOILERPLATE 903fe5e51b7Smrg 904eda3803bSmrg# _LT_REQUIRED_DARWIN_CHECKS 905eda3803bSmrg# ------------------------- 906eda3803bSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 907eda3803bSmrg case $host_os in 908eda3803bSmrg rhapsody* | darwin*) 909eda3803bSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 910eda3803bSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 911eda3803bSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 912eda3803bSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 913eda3803bSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 914eda3803bSmrg _LT_DECL([], [DSYMUTIL], [1], 915eda3803bSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 916eda3803bSmrg _LT_DECL([], [NMEDIT], [1], 917eda3803bSmrg [Tool to change global to local symbols on Mac OS X]) 918eda3803bSmrg _LT_DECL([], [LIPO], [1], 919eda3803bSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 920eda3803bSmrg _LT_DECL([], [OTOOL], [1], 921eda3803bSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 922eda3803bSmrg _LT_DECL([], [OTOOL64], [1], 923eda3803bSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 924eda3803bSmrg 925eda3803bSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 926eda3803bSmrg [lt_cv_apple_cc_single_mod=no 927eda3803bSmrg if test -z "${LT_MULTI_MODULE}"; then 928eda3803bSmrg # By default we will add the -single_module flag. You can override 929eda3803bSmrg # by either setting the environment variable LT_MULTI_MODULE 930eda3803bSmrg # non-empty at configure time, or by adding -multi_module to the 931eda3803bSmrg # link flags. 932eda3803bSmrg rm -rf libconftest.dylib* 933eda3803bSmrg echo "int foo(void){return 1;}" > conftest.c 934eda3803bSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 935eda3803bSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 936eda3803bSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 937eda3803bSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 938eda3803bSmrg _lt_result=$? 939eda3803bSmrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 940eda3803bSmrg lt_cv_apple_cc_single_mod=yes 941eda3803bSmrg else 942eda3803bSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 943eda3803bSmrg fi 944eda3803bSmrg rm -rf libconftest.dylib* 945eda3803bSmrg rm -f conftest.* 946eda3803bSmrg fi]) 947eda3803bSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 948eda3803bSmrg [lt_cv_ld_exported_symbols_list], 949eda3803bSmrg [lt_cv_ld_exported_symbols_list=no 950eda3803bSmrg save_LDFLAGS=$LDFLAGS 951eda3803bSmrg echo "_main" > conftest.sym 952eda3803bSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 953eda3803bSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 954eda3803bSmrg [lt_cv_ld_exported_symbols_list=yes], 955eda3803bSmrg [lt_cv_ld_exported_symbols_list=no]) 956eda3803bSmrg LDFLAGS="$save_LDFLAGS" 957eda3803bSmrg ]) 958eda3803bSmrg case $host_os in 959eda3803bSmrg rhapsody* | darwin1.[[012]]) 960eda3803bSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 961eda3803bSmrg darwin1.*) 962eda3803bSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 963eda3803bSmrg darwin*) # darwin 5.x on 964eda3803bSmrg # if running on 10.5 or later, the deployment target defaults 965eda3803bSmrg # to the OS version, if on x86, and 10.4, the deployment 966eda3803bSmrg # target defaults to 10.4. Don't you love it? 967eda3803bSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 968eda3803bSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 969eda3803bSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 970eda3803bSmrg 10.[[012]]*) 971eda3803bSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 972eda3803bSmrg 10.*) 973eda3803bSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 974eda3803bSmrg esac 975eda3803bSmrg ;; 976eda3803bSmrg esac 977eda3803bSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 978eda3803bSmrg _lt_dar_single_mod='$single_module' 979eda3803bSmrg fi 980eda3803bSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 981eda3803bSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 982eda3803bSmrg else 983eda3803bSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 984eda3803bSmrg fi 985eda3803bSmrg if test "$DSYMUTIL" != ":"; then 986eda3803bSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 987eda3803bSmrg else 988eda3803bSmrg _lt_dsymutil= 989eda3803bSmrg fi 990eda3803bSmrg ;; 991eda3803bSmrg esac 992eda3803bSmrg]) 993eda3803bSmrg 994eda3803bSmrg 995eda3803bSmrg# _LT_DARWIN_LINKER_FEATURES 996eda3803bSmrg# -------------------------- 997eda3803bSmrg# Checks for linker and compiler features on darwin 998eda3803bSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 999eda3803bSmrg[ 1000eda3803bSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1001eda3803bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1002eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=no 1003eda3803bSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1004eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1005eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1006eda3803bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1007eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1008eda3803bSmrg case $cc_basename in 1009eda3803bSmrg ifort*) _lt_dar_can_shared=yes ;; 1010eda3803bSmrg *) _lt_dar_can_shared=$GCC ;; 1011eda3803bSmrg esac 1012eda3803bSmrg if test "$_lt_dar_can_shared" = "yes"; then 1013eda3803bSmrg output_verbose_link_cmd=echo 1014eda3803bSmrg _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}" 1015eda3803bSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1016eda3803bSmrg _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}" 1017eda3803bSmrg _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}" 1018eda3803bSmrg m4_if([$1], [CXX], 1019eda3803bSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1020eda3803bSmrg _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}" 1021eda3803bSmrg _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}" 1022eda3803bSmrg fi 1023eda3803bSmrg],[]) 1024eda3803bSmrg else 1025eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 1026eda3803bSmrg fi 1027eda3803bSmrg]) 1028eda3803bSmrg 1029eda3803bSmrg# _LT_SYS_MODULE_PATH_AIX 1030eda3803bSmrg# ----------------------- 1031fe5e51b7Smrg# Links a minimal program and checks the executable 1032fe5e51b7Smrg# for the system default hardcoded library path. In most cases, 1033fe5e51b7Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 1034fe5e51b7Smrg# the location of the communication and MPI libs are included too. 1035fe5e51b7Smrg# If we don't find anything, use the default library path according 1036fe5e51b7Smrg# to the aix ld manual. 1037eda3803bSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1038eda3803bSmrg[m4_require([_LT_DECL_SED])dnl 1039fe5e51b7SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 1040fe5e51b7Smrglt_aix_libpath_sed=' 1041fe5e51b7Smrg /Import File Strings/,/^$/ { 1042fe5e51b7Smrg /^0/ { 1043fe5e51b7Smrg s/^0 *\(.*\)$/\1/ 1044fe5e51b7Smrg p 1045fe5e51b7Smrg } 1046fe5e51b7Smrg }' 1047fe5e51b7Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1048fe5e51b7Smrg# Check for a 64-bit object if we didn't find anything. 1049fe5e51b7Smrgif test -z "$aix_libpath"; then 1050fe5e51b7Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1051fe5e51b7Smrgfi],[]) 1052fe5e51b7Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 1053eda3803bSmrg])# _LT_SYS_MODULE_PATH_AIX 1054fe5e51b7Smrg 1055fe5e51b7Smrg 1056eda3803bSmrg# _LT_SHELL_INIT(ARG) 1057eda3803bSmrg# ------------------- 1058eda3803bSmrgm4_define([_LT_SHELL_INIT], 1059fe5e51b7Smrg[ifdef([AC_DIVERSION_NOTICE], 1060fe5e51b7Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 1061fe5e51b7Smrg [AC_DIVERT_PUSH(NOTICE)]) 1062fe5e51b7Smrg$1 1063fe5e51b7SmrgAC_DIVERT_POP 1064eda3803bSmrg])# _LT_SHELL_INIT 1065fe5e51b7Smrg 1066fe5e51b7Smrg 1067eda3803bSmrg# _LT_PROG_ECHO_BACKSLASH 1068eda3803bSmrg# ----------------------- 1069fe5e51b7Smrg# Add some code to the start of the generated configure script which 1070fe5e51b7Smrg# will find an echo command which doesn't interpret backslashes. 1071eda3803bSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1072eda3803bSmrg[_LT_SHELL_INIT([ 1073fe5e51b7Smrg# Check that we are running under the correct shell. 1074fe5e51b7SmrgSHELL=${CONFIG_SHELL-/bin/sh} 1075fe5e51b7Smrg 1076eda3803bSmrgcase X$lt_ECHO in 1077fe5e51b7SmrgX*--fallback-echo) 1078fe5e51b7Smrg # Remove one level of quotation (which was required for Make). 1079eda3803bSmrg ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 1080fe5e51b7Smrg ;; 1081fe5e51b7Smrgesac 1082fe5e51b7Smrg 1083eda3803bSmrgECHO=${lt_ECHO-echo} 1084fe5e51b7Smrgif test "X[$]1" = X--no-reexec; then 1085fe5e51b7Smrg # Discard the --no-reexec flag, and continue. 1086fe5e51b7Smrg shift 1087fe5e51b7Smrgelif test "X[$]1" = X--fallback-echo; then 1088fe5e51b7Smrg # Avoid inline document here, it may be left over 1089fe5e51b7Smrg : 1090eda3803bSmrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then 1091eda3803bSmrg # Yippee, $ECHO works! 1092fe5e51b7Smrg : 1093fe5e51b7Smrgelse 1094fe5e51b7Smrg # Restart under the correct shell. 1095fe5e51b7Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 1096fe5e51b7Smrgfi 1097fe5e51b7Smrg 1098fe5e51b7Smrgif test "X[$]1" = X--fallback-echo; then 1099fe5e51b7Smrg # used as fallback echo 1100fe5e51b7Smrg shift 1101eda3803bSmrg cat <<_LT_EOF 1102fe5e51b7Smrg[$]* 1103eda3803bSmrg_LT_EOF 1104fe5e51b7Smrg exit 0 1105fe5e51b7Smrgfi 1106fe5e51b7Smrg 1107fe5e51b7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 1108fe5e51b7Smrg# if CDPATH is set. 1109fe5e51b7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1110fe5e51b7Smrg 1111eda3803bSmrgif test -z "$lt_ECHO"; then 1112eda3803bSmrg if test "X${echo_test_string+set}" != Xset; then 1113eda3803bSmrg # find a string as large as possible, as long as the shell can cope with it 1114eda3803bSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 1115eda3803bSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 1116eda3803bSmrg if { echo_test_string=`eval $cmd`; } 2>/dev/null && 1117eda3803bSmrg { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null 1118eda3803bSmrg then 1119eda3803bSmrg break 1120eda3803bSmrg fi 1121eda3803bSmrg done 1122eda3803bSmrg fi 1123fe5e51b7Smrg 1124eda3803bSmrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 1125eda3803bSmrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 1126eda3803bSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1127eda3803bSmrg : 1128eda3803bSmrg else 1129eda3803bSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 1130eda3803bSmrg # backslashes. This makes it impossible to quote backslashes using 1131eda3803bSmrg # echo "$something" | sed 's/\\/\\\\/g' 1132eda3803bSmrg # 1133eda3803bSmrg # So, first we look for a working echo in the user's PATH. 1134fe5e51b7Smrg 1135eda3803bSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 1136eda3803bSmrg for dir in $PATH /usr/ucb; do 1137eda3803bSmrg IFS="$lt_save_ifs" 1138eda3803bSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 1139eda3803bSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 1140eda3803bSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 1141eda3803bSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1142eda3803bSmrg ECHO="$dir/echo" 1143eda3803bSmrg break 1144eda3803bSmrg fi 1145eda3803bSmrg done 1146fe5e51b7Smrg IFS="$lt_save_ifs" 1147fe5e51b7Smrg 1148eda3803bSmrg if test "X$ECHO" = Xecho; then 1149eda3803bSmrg # We didn't find a better echo, so look for alternatives. 1150eda3803bSmrg if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && 1151eda3803bSmrg echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && 1152eda3803bSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1153eda3803bSmrg # This shell has a builtin print -r that does the trick. 1154eda3803bSmrg ECHO='print -r' 1155eda3803bSmrg elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && 1156eda3803bSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 1157eda3803bSmrg # If we have ksh, try running configure again with it. 1158eda3803bSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 1159eda3803bSmrg export ORIGINAL_CONFIG_SHELL 1160eda3803bSmrg CONFIG_SHELL=/bin/ksh 1161eda3803bSmrg export CONFIG_SHELL 1162eda3803bSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 1163fe5e51b7Smrg else 1164eda3803bSmrg # Try using printf. 1165eda3803bSmrg ECHO='printf %s\n' 1166eda3803bSmrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 1167eda3803bSmrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 1168eda3803bSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1169eda3803bSmrg # Cool, printf works 1170eda3803bSmrg : 1171eda3803bSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1172eda3803bSmrg test "X$echo_testing_string" = 'X\t' && 1173eda3803bSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1174eda3803bSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1175eda3803bSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 1176eda3803bSmrg export CONFIG_SHELL 1177eda3803bSmrg SHELL="$CONFIG_SHELL" 1178eda3803bSmrg export SHELL 1179eda3803bSmrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 1180eda3803bSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1181eda3803bSmrg test "X$echo_testing_string" = 'X\t' && 1182eda3803bSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1183eda3803bSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1184eda3803bSmrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 1185eda3803bSmrg else 1186eda3803bSmrg # maybe with a smaller string... 1187eda3803bSmrg prev=: 1188fe5e51b7Smrg 1189eda3803bSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 1190eda3803bSmrg if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null 1191eda3803bSmrg then 1192eda3803bSmrg break 1193eda3803bSmrg fi 1194eda3803bSmrg prev="$cmd" 1195eda3803bSmrg done 1196fe5e51b7Smrg 1197eda3803bSmrg if test "$prev" != 'sed 50q "[$]0"'; then 1198eda3803bSmrg echo_test_string=`eval $prev` 1199eda3803bSmrg export echo_test_string 1200eda3803bSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 1201eda3803bSmrg else 1202eda3803bSmrg # Oops. We lost completely, so just stick with echo. 1203eda3803bSmrg ECHO=echo 1204eda3803bSmrg fi 1205eda3803bSmrg fi 1206fe5e51b7Smrg fi 1207fe5e51b7Smrg fi 1208fe5e51b7Smrg fi 1209fe5e51b7Smrgfi 1210fe5e51b7Smrg 1211fe5e51b7Smrg# Copy echo and quote the copy suitably for passing to libtool from 1212fe5e51b7Smrg# the Makefile, instead of quoting the original, which is used later. 1213eda3803bSmrglt_ECHO=$ECHO 1214eda3803bSmrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 1215eda3803bSmrg lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 1216fe5e51b7Smrgfi 1217fe5e51b7Smrg 1218eda3803bSmrgAC_SUBST(lt_ECHO) 1219eda3803bSmrg]) 1220eda3803bSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1221eda3803bSmrg_LT_DECL([], [ECHO], [1], 1222eda3803bSmrg [An echo program that does not interpret backslashes]) 1223eda3803bSmrg])# _LT_PROG_ECHO_BACKSLASH 1224fe5e51b7Smrg 1225fe5e51b7Smrg 1226eda3803bSmrg# _LT_ENABLE_LOCK 1227eda3803bSmrg# --------------- 1228eda3803bSmrgm4_defun([_LT_ENABLE_LOCK], 1229fe5e51b7Smrg[AC_ARG_ENABLE([libtool-lock], 1230eda3803bSmrg [AS_HELP_STRING([--disable-libtool-lock], 1231eda3803bSmrg [avoid locking (might break parallel builds)])]) 1232fe5e51b7Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1233fe5e51b7Smrg 1234fe5e51b7Smrg# Some flags need to be propagated to the compiler or linker for good 1235fe5e51b7Smrg# libtool support. 1236fe5e51b7Smrgcase $host in 1237fe5e51b7Smrgia64-*-hpux*) 1238fe5e51b7Smrg # Find out which ABI we are using. 1239fe5e51b7Smrg echo 'int i;' > conftest.$ac_ext 1240fe5e51b7Smrg if AC_TRY_EVAL(ac_compile); then 1241fe5e51b7Smrg case `/usr/bin/file conftest.$ac_objext` in 1242eda3803bSmrg *ELF-32*) 1243eda3803bSmrg HPUX_IA64_MODE="32" 1244eda3803bSmrg ;; 1245eda3803bSmrg *ELF-64*) 1246eda3803bSmrg HPUX_IA64_MODE="64" 1247eda3803bSmrg ;; 1248fe5e51b7Smrg esac 1249fe5e51b7Smrg fi 1250fe5e51b7Smrg rm -rf conftest* 1251fe5e51b7Smrg ;; 1252fe5e51b7Smrg*-*-irix6*) 1253fe5e51b7Smrg # Find out which ABI we are using. 1254fe5e51b7Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 1255fe5e51b7Smrg if AC_TRY_EVAL(ac_compile); then 1256eda3803bSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 1257eda3803bSmrg case `/usr/bin/file conftest.$ac_objext` in 1258eda3803bSmrg *32-bit*) 1259eda3803bSmrg LD="${LD-ld} -melf32bsmip" 1260eda3803bSmrg ;; 1261eda3803bSmrg *N32*) 1262eda3803bSmrg LD="${LD-ld} -melf32bmipn32" 1263eda3803bSmrg ;; 1264eda3803bSmrg *64-bit*) 1265eda3803bSmrg LD="${LD-ld} -melf64bmip" 1266eda3803bSmrg ;; 1267eda3803bSmrg esac 1268eda3803bSmrg else 1269eda3803bSmrg case `/usr/bin/file conftest.$ac_objext` in 1270eda3803bSmrg *32-bit*) 1271eda3803bSmrg LD="${LD-ld} -32" 1272eda3803bSmrg ;; 1273eda3803bSmrg *N32*) 1274eda3803bSmrg LD="${LD-ld} -n32" 1275eda3803bSmrg ;; 1276eda3803bSmrg *64-bit*) 1277eda3803bSmrg LD="${LD-ld} -64" 1278eda3803bSmrg ;; 1279eda3803bSmrg esac 1280eda3803bSmrg fi 1281fe5e51b7Smrg fi 1282fe5e51b7Smrg rm -rf conftest* 1283fe5e51b7Smrg ;; 1284fe5e51b7Smrg 1285fe5e51b7Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1286eda3803bSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1287fe5e51b7Smrg # Find out which ABI we are using. 1288fe5e51b7Smrg echo 'int i;' > conftest.$ac_ext 1289fe5e51b7Smrg if AC_TRY_EVAL(ac_compile); then 1290fe5e51b7Smrg case `/usr/bin/file conftest.o` in 1291eda3803bSmrg *32-bit*) 1292eda3803bSmrg case $host in 1293eda3803bSmrg x86_64-*kfreebsd*-gnu) 1294eda3803bSmrg LD="${LD-ld} -m elf_i386_fbsd" 1295eda3803bSmrg ;; 1296eda3803bSmrg x86_64-*linux*) 1297eda3803bSmrg LD="${LD-ld} -m elf_i386" 1298eda3803bSmrg ;; 1299eda3803bSmrg ppc64-*linux*|powerpc64-*linux*) 1300eda3803bSmrg LD="${LD-ld} -m elf32ppclinux" 1301eda3803bSmrg ;; 1302eda3803bSmrg s390x-*linux*) 1303eda3803bSmrg LD="${LD-ld} -m elf_s390" 1304eda3803bSmrg ;; 1305eda3803bSmrg sparc64-*linux*) 1306eda3803bSmrg LD="${LD-ld} -m elf32_sparc" 1307eda3803bSmrg ;; 1308eda3803bSmrg esac 1309eda3803bSmrg ;; 1310eda3803bSmrg *64-bit*) 1311eda3803bSmrg case $host in 1312eda3803bSmrg x86_64-*kfreebsd*-gnu) 1313eda3803bSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 1314eda3803bSmrg ;; 1315eda3803bSmrg x86_64-*linux*) 1316eda3803bSmrg LD="${LD-ld} -m elf_x86_64" 1317eda3803bSmrg ;; 1318eda3803bSmrg ppc*-*linux*|powerpc*-*linux*) 1319eda3803bSmrg LD="${LD-ld} -m elf64ppc" 1320eda3803bSmrg ;; 1321eda3803bSmrg s390*-*linux*|s390*-*tpf*) 1322eda3803bSmrg LD="${LD-ld} -m elf64_s390" 1323eda3803bSmrg ;; 1324eda3803bSmrg sparc*-*linux*) 1325eda3803bSmrg LD="${LD-ld} -m elf64_sparc" 1326eda3803bSmrg ;; 1327eda3803bSmrg esac 1328eda3803bSmrg ;; 1329fe5e51b7Smrg esac 1330fe5e51b7Smrg fi 1331fe5e51b7Smrg rm -rf conftest* 1332fe5e51b7Smrg ;; 1333fe5e51b7Smrg 1334fe5e51b7Smrg*-*-sco3.2v5*) 1335fe5e51b7Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1336fe5e51b7Smrg SAVE_CFLAGS="$CFLAGS" 1337fe5e51b7Smrg CFLAGS="$CFLAGS -belf" 1338fe5e51b7Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1339fe5e51b7Smrg [AC_LANG_PUSH(C) 1340eda3803bSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1341fe5e51b7Smrg AC_LANG_POP]) 1342fe5e51b7Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1343fe5e51b7Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1344fe5e51b7Smrg CFLAGS="$SAVE_CFLAGS" 1345fe5e51b7Smrg fi 1346fe5e51b7Smrg ;; 1347fe5e51b7Smrgsparc*-*solaris*) 1348fe5e51b7Smrg # Find out which ABI we are using. 1349fe5e51b7Smrg echo 'int i;' > conftest.$ac_ext 1350fe5e51b7Smrg if AC_TRY_EVAL(ac_compile); then 1351fe5e51b7Smrg case `/usr/bin/file conftest.o` in 1352fe5e51b7Smrg *64-bit*) 1353fe5e51b7Smrg case $lt_cv_prog_gnu_ld in 1354fe5e51b7Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 1355eda3803bSmrg *) 1356eda3803bSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1357eda3803bSmrg LD="${LD-ld} -64" 1358eda3803bSmrg fi 1359eda3803bSmrg ;; 1360fe5e51b7Smrg esac 1361fe5e51b7Smrg ;; 1362fe5e51b7Smrg esac 1363fe5e51b7Smrg fi 1364fe5e51b7Smrg rm -rf conftest* 1365fe5e51b7Smrg ;; 1366fe5e51b7Smrgesac 1367fe5e51b7Smrg 1368fe5e51b7Smrgneed_locks="$enable_libtool_lock" 1369eda3803bSmrg])# _LT_ENABLE_LOCK 1370eda3803bSmrg 1371eda3803bSmrg 1372eda3803bSmrg# _LT_CMD_OLD_ARCHIVE 1373eda3803bSmrg# ------------------- 1374eda3803bSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1375eda3803bSmrg[AC_CHECK_TOOL(AR, ar, false) 1376eda3803bSmrgtest -z "$AR" && AR=ar 1377eda3803bSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 1378eda3803bSmrg_LT_DECL([], [AR], [1], [The archiver]) 1379eda3803bSmrg_LT_DECL([], [AR_FLAGS], [1]) 1380eda3803bSmrg 1381eda3803bSmrgAC_CHECK_TOOL(STRIP, strip, :) 1382eda3803bSmrgtest -z "$STRIP" && STRIP=: 1383eda3803bSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1384eda3803bSmrg 1385eda3803bSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1386eda3803bSmrgtest -z "$RANLIB" && RANLIB=: 1387eda3803bSmrg_LT_DECL([], [RANLIB], [1], 1388eda3803bSmrg [Commands used to install an old-style archive]) 1389eda3803bSmrg 1390eda3803bSmrg# Determine commands to create old-style static archives. 1391eda3803bSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1392eda3803bSmrgold_postinstall_cmds='chmod 644 $oldlib' 1393eda3803bSmrgold_postuninstall_cmds= 1394fe5e51b7Smrg 1395eda3803bSmrgif test -n "$RANLIB"; then 1396eda3803bSmrg case $host_os in 1397eda3803bSmrg openbsd*) 1398eda3803bSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1399eda3803bSmrg ;; 1400eda3803bSmrg *) 1401eda3803bSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1402eda3803bSmrg ;; 1403eda3803bSmrg esac 1404eda3803bSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1405eda3803bSmrgfi 1406eda3803bSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 1407eda3803bSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1408eda3803bSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 1409eda3803bSmrg [Commands used to build an old-style archive]) 1410eda3803bSmrg])# _LT_CMD_OLD_ARCHIVE 1411fe5e51b7Smrg 1412fe5e51b7Smrg 1413eda3803bSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1414fe5e51b7Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1415fe5e51b7Smrg# ---------------------------------------------------------------- 1416fe5e51b7Smrg# Check whether the given compiler option works 1417eda3803bSmrgAC_DEFUN([_LT_COMPILER_OPTION], 1418eda3803bSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1419eda3803bSmrgm4_require([_LT_DECL_SED])dnl 1420fe5e51b7SmrgAC_CACHE_CHECK([$1], [$2], 1421fe5e51b7Smrg [$2=no 1422eda3803bSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1423fe5e51b7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1424fe5e51b7Smrg lt_compiler_flag="$3" 1425fe5e51b7Smrg # Insert the option either (1) after the last *FLAGS variable, or 1426fe5e51b7Smrg # (2) before a word containing "conftest.", or (3) at the end. 1427fe5e51b7Smrg # Note that $ac_compile itself does not contain backslashes and begins 1428fe5e51b7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1429fe5e51b7Smrg # The option is referenced via a variable to avoid confusing sed. 1430fe5e51b7Smrg lt_compile=`echo "$ac_compile" | $SED \ 1431fe5e51b7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1432fe5e51b7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1433fe5e51b7Smrg -e 's:$: $lt_compiler_flag:'` 1434fe5e51b7Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1435fe5e51b7Smrg (eval "$lt_compile" 2>conftest.err) 1436fe5e51b7Smrg ac_status=$? 1437fe5e51b7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1438fe5e51b7Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1439fe5e51b7Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 1440fe5e51b7Smrg # The compiler can only warn and ignore the option if not recognized 1441fe5e51b7Smrg # So say no if there are warnings other than the usual output. 1442eda3803bSmrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 1443fe5e51b7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1444fe5e51b7Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1445fe5e51b7Smrg $2=yes 1446fe5e51b7Smrg fi 1447fe5e51b7Smrg fi 1448eda3803bSmrg $RM conftest* 1449fe5e51b7Smrg]) 1450fe5e51b7Smrg 1451fe5e51b7Smrgif test x"[$]$2" = xyes; then 1452eda3803bSmrg m4_if([$5], , :, [$5]) 1453fe5e51b7Smrgelse 1454eda3803bSmrg m4_if([$6], , :, [$6]) 1455fe5e51b7Smrgfi 1456eda3803bSmrg])# _LT_COMPILER_OPTION 1457fe5e51b7Smrg 1458eda3803bSmrg# Old name: 1459eda3803bSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1460eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 1461eda3803bSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1462fe5e51b7Smrg 1463eda3803bSmrg 1464eda3803bSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1465eda3803bSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1466eda3803bSmrg# ---------------------------------------------------- 1467eda3803bSmrg# Check whether the given linker option works 1468eda3803bSmrgAC_DEFUN([_LT_LINKER_OPTION], 1469eda3803bSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1470eda3803bSmrgm4_require([_LT_DECL_SED])dnl 1471fe5e51b7SmrgAC_CACHE_CHECK([$1], [$2], 1472fe5e51b7Smrg [$2=no 1473fe5e51b7Smrg save_LDFLAGS="$LDFLAGS" 1474fe5e51b7Smrg LDFLAGS="$LDFLAGS $3" 1475fe5e51b7Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1476fe5e51b7Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1477fe5e51b7Smrg # The linker can only warn and ignore the option if not recognized 1478fe5e51b7Smrg # So say no if there are warnings 1479fe5e51b7Smrg if test -s conftest.err; then 1480fe5e51b7Smrg # Append any errors to the config.log. 1481fe5e51b7Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1482eda3803bSmrg $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 1483fe5e51b7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1484fe5e51b7Smrg if diff conftest.exp conftest.er2 >/dev/null; then 1485fe5e51b7Smrg $2=yes 1486fe5e51b7Smrg fi 1487fe5e51b7Smrg else 1488fe5e51b7Smrg $2=yes 1489fe5e51b7Smrg fi 1490fe5e51b7Smrg fi 1491eda3803bSmrg $RM -r conftest* 1492fe5e51b7Smrg LDFLAGS="$save_LDFLAGS" 1493fe5e51b7Smrg]) 1494fe5e51b7Smrg 1495fe5e51b7Smrgif test x"[$]$2" = xyes; then 1496eda3803bSmrg m4_if([$4], , :, [$4]) 1497fe5e51b7Smrgelse 1498eda3803bSmrg m4_if([$5], , :, [$5]) 1499fe5e51b7Smrgfi 1500eda3803bSmrg])# _LT_LINKER_OPTION 1501fe5e51b7Smrg 1502eda3803bSmrg# Old name: 1503eda3803bSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1504eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 1505eda3803bSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1506fe5e51b7Smrg 1507eda3803bSmrg 1508eda3803bSmrg# LT_CMD_MAX_LEN 1509eda3803bSmrg#--------------- 1510eda3803bSmrgAC_DEFUN([LT_CMD_MAX_LEN], 1511eda3803bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1512eda3803bSmrg# find the maximum length of command line arguments 1513fe5e51b7SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1514fe5e51b7SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1515fe5e51b7Smrg i=0 1516fe5e51b7Smrg teststring="ABCD" 1517fe5e51b7Smrg 1518fe5e51b7Smrg case $build_os in 1519fe5e51b7Smrg msdosdjgpp*) 1520fe5e51b7Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1521fe5e51b7Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1522fe5e51b7Smrg # during glob expansion). Even if it were fixed, the result of this 1523fe5e51b7Smrg # check would be larger than it should be. 1524fe5e51b7Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1525fe5e51b7Smrg ;; 1526fe5e51b7Smrg 1527fe5e51b7Smrg gnu*) 1528fe5e51b7Smrg # Under GNU Hurd, this test is not required because there is 1529fe5e51b7Smrg # no limit to the length of command line arguments. 1530fe5e51b7Smrg # Libtool will interpret -1 as no limit whatsoever 1531fe5e51b7Smrg lt_cv_sys_max_cmd_len=-1; 1532fe5e51b7Smrg ;; 1533fe5e51b7Smrg 1534eda3803bSmrg cygwin* | mingw* | cegcc*) 1535fe5e51b7Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1536fe5e51b7Smrg # about 5 minutes as the teststring grows exponentially. 1537fe5e51b7Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 1538fe5e51b7Smrg # you end up with a "frozen" computer, even though with patience 1539fe5e51b7Smrg # the test eventually succeeds (with a max line length of 256k). 1540fe5e51b7Smrg # Instead, let's just punt: use the minimum linelength reported by 1541fe5e51b7Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 1542fe5e51b7Smrg lt_cv_sys_max_cmd_len=8192; 1543fe5e51b7Smrg ;; 1544fe5e51b7Smrg 1545fe5e51b7Smrg amigaos*) 1546fe5e51b7Smrg # On AmigaOS with pdksh, this test takes hours, literally. 1547fe5e51b7Smrg # So we just punt and use a minimum line length of 8192. 1548fe5e51b7Smrg lt_cv_sys_max_cmd_len=8192; 1549fe5e51b7Smrg ;; 1550fe5e51b7Smrg 1551fe5e51b7Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1552fe5e51b7Smrg # This has been around since 386BSD, at least. Likely further. 1553fe5e51b7Smrg if test -x /sbin/sysctl; then 1554fe5e51b7Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1555fe5e51b7Smrg elif test -x /usr/sbin/sysctl; then 1556fe5e51b7Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1557fe5e51b7Smrg else 1558fe5e51b7Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1559fe5e51b7Smrg fi 1560fe5e51b7Smrg # And add a safety zone 1561fe5e51b7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1562fe5e51b7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1563fe5e51b7Smrg ;; 1564fe5e51b7Smrg 1565fe5e51b7Smrg interix*) 1566fe5e51b7Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1567fe5e51b7Smrg lt_cv_sys_max_cmd_len=196608 1568fe5e51b7Smrg ;; 1569fe5e51b7Smrg 1570fe5e51b7Smrg osf*) 1571fe5e51b7Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1572fe5e51b7Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1573fe5e51b7Smrg # nice to cause kernel panics so lets avoid the loop below. 1574fe5e51b7Smrg # First set a reasonable default. 1575fe5e51b7Smrg lt_cv_sys_max_cmd_len=16384 1576fe5e51b7Smrg # 1577fe5e51b7Smrg if test -x /sbin/sysconfig; then 1578fe5e51b7Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1579fe5e51b7Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1580fe5e51b7Smrg esac 1581fe5e51b7Smrg fi 1582fe5e51b7Smrg ;; 1583fe5e51b7Smrg sco3.2v5*) 1584fe5e51b7Smrg lt_cv_sys_max_cmd_len=102400 1585fe5e51b7Smrg ;; 1586fe5e51b7Smrg sysv5* | sco5v6* | sysv4.2uw2*) 1587fe5e51b7Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1588fe5e51b7Smrg if test -n "$kargmax"; then 1589eda3803bSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1590fe5e51b7Smrg else 1591fe5e51b7Smrg lt_cv_sys_max_cmd_len=32768 1592fe5e51b7Smrg fi 1593fe5e51b7Smrg ;; 1594fe5e51b7Smrg *) 1595fe5e51b7Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1596fe5e51b7Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 1597fe5e51b7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1598fe5e51b7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1599fe5e51b7Smrg else 1600eda3803bSmrg # Make teststring a little bigger before we do anything with it. 1601eda3803bSmrg # a 1K string should be a reasonable start. 1602eda3803bSmrg for i in 1 2 3 4 5 6 7 8 ; do 1603eda3803bSmrg teststring=$teststring$teststring 1604eda3803bSmrg done 1605fe5e51b7Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1606eda3803bSmrg # If test is not a shell built-in, we'll probably end up computing a 1607eda3803bSmrg # maximum length that is only half of the actual maximum length, but 1608eda3803bSmrg # we can't tell. 1609eda3803bSmrg while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ 1610eda3803bSmrg = "XX$teststring$teststring"; } >/dev/null 2>&1 && 1611fe5e51b7Smrg test $i != 17 # 1/2 MB should be enough 1612fe5e51b7Smrg do 1613fe5e51b7Smrg i=`expr $i + 1` 1614fe5e51b7Smrg teststring=$teststring$teststring 1615fe5e51b7Smrg done 1616eda3803bSmrg # Only check the string length outside the loop. 1617eda3803bSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1618fe5e51b7Smrg teststring= 1619eda3803bSmrg # Add a significant safety factor because C++ compilers can tack on 1620eda3803bSmrg # massive amounts of additional arguments before passing them to the 1621eda3803bSmrg # linker. It appears as though 1/2 is a usable value. 1622fe5e51b7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1623fe5e51b7Smrg fi 1624fe5e51b7Smrg ;; 1625fe5e51b7Smrg esac 1626fe5e51b7Smrg]) 1627fe5e51b7Smrgif test -n $lt_cv_sys_max_cmd_len ; then 1628fe5e51b7Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1629fe5e51b7Smrgelse 1630fe5e51b7Smrg AC_MSG_RESULT(none) 1631fe5e51b7Smrgfi 1632eda3803bSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1633eda3803bSmrg_LT_DECL([], [max_cmd_len], [0], 1634eda3803bSmrg [What is the maximum length of a command?]) 1635eda3803bSmrg])# LT_CMD_MAX_LEN 1636fe5e51b7Smrg 1637eda3803bSmrg# Old name: 1638eda3803bSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1639eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 1640eda3803bSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1641fe5e51b7Smrg 1642eda3803bSmrg 1643eda3803bSmrg# _LT_HEADER_DLFCN 1644eda3803bSmrg# ---------------- 1645eda3803bSmrgm4_defun([_LT_HEADER_DLFCN], 1646eda3803bSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1647eda3803bSmrg])# _LT_HEADER_DLFCN 1648fe5e51b7Smrg 1649fe5e51b7Smrg 1650eda3803bSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1651eda3803bSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1652eda3803bSmrg# ---------------------------------------------------------------- 1653eda3803bSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 1654eda3803bSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1655fe5e51b7Smrgif test "$cross_compiling" = yes; then : 1656fe5e51b7Smrg [$4] 1657fe5e51b7Smrgelse 1658fe5e51b7Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1659fe5e51b7Smrg lt_status=$lt_dlunknown 1660eda3803bSmrg cat > conftest.$ac_ext <<_LT_EOF 1661fe5e51b7Smrg[#line __oline__ "configure" 1662fe5e51b7Smrg#include "confdefs.h" 1663fe5e51b7Smrg 1664fe5e51b7Smrg#if HAVE_DLFCN_H 1665fe5e51b7Smrg#include <dlfcn.h> 1666fe5e51b7Smrg#endif 1667fe5e51b7Smrg 1668fe5e51b7Smrg#include <stdio.h> 1669fe5e51b7Smrg 1670fe5e51b7Smrg#ifdef RTLD_GLOBAL 1671fe5e51b7Smrg# define LT_DLGLOBAL RTLD_GLOBAL 1672fe5e51b7Smrg#else 1673fe5e51b7Smrg# ifdef DL_GLOBAL 1674fe5e51b7Smrg# define LT_DLGLOBAL DL_GLOBAL 1675fe5e51b7Smrg# else 1676fe5e51b7Smrg# define LT_DLGLOBAL 0 1677fe5e51b7Smrg# endif 1678fe5e51b7Smrg#endif 1679fe5e51b7Smrg 1680fe5e51b7Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1681fe5e51b7Smrg find out it does not work in some platform. */ 1682fe5e51b7Smrg#ifndef LT_DLLAZY_OR_NOW 1683fe5e51b7Smrg# ifdef RTLD_LAZY 1684fe5e51b7Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1685fe5e51b7Smrg# else 1686fe5e51b7Smrg# ifdef DL_LAZY 1687fe5e51b7Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 1688fe5e51b7Smrg# else 1689fe5e51b7Smrg# ifdef RTLD_NOW 1690fe5e51b7Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1691fe5e51b7Smrg# else 1692fe5e51b7Smrg# ifdef DL_NOW 1693fe5e51b7Smrg# define LT_DLLAZY_OR_NOW DL_NOW 1694fe5e51b7Smrg# else 1695fe5e51b7Smrg# define LT_DLLAZY_OR_NOW 0 1696fe5e51b7Smrg# endif 1697fe5e51b7Smrg# endif 1698fe5e51b7Smrg# endif 1699fe5e51b7Smrg# endif 1700fe5e51b7Smrg#endif 1701fe5e51b7Smrg 1702fe5e51b7Smrgvoid fnord() { int i=42;} 1703fe5e51b7Smrgint main () 1704fe5e51b7Smrg{ 1705fe5e51b7Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1706fe5e51b7Smrg int status = $lt_dlunknown; 1707fe5e51b7Smrg 1708fe5e51b7Smrg if (self) 1709fe5e51b7Smrg { 1710fe5e51b7Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1711fe5e51b7Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1712fe5e51b7Smrg /* dlclose (self); */ 1713fe5e51b7Smrg } 1714fe5e51b7Smrg else 1715fe5e51b7Smrg puts (dlerror ()); 1716fe5e51b7Smrg 1717eda3803bSmrg return status; 1718fe5e51b7Smrg}] 1719eda3803bSmrg_LT_EOF 1720fe5e51b7Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1721fe5e51b7Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1722fe5e51b7Smrg lt_status=$? 1723fe5e51b7Smrg case x$lt_status in 1724fe5e51b7Smrg x$lt_dlno_uscore) $1 ;; 1725fe5e51b7Smrg x$lt_dlneed_uscore) $2 ;; 1726fe5e51b7Smrg x$lt_dlunknown|x*) $3 ;; 1727fe5e51b7Smrg esac 1728fe5e51b7Smrg else : 1729fe5e51b7Smrg # compilation failed 1730fe5e51b7Smrg $3 1731fe5e51b7Smrg fi 1732fe5e51b7Smrgfi 1733fe5e51b7Smrgrm -fr conftest* 1734eda3803bSmrg])# _LT_TRY_DLOPEN_SELF 1735fe5e51b7Smrg 1736fe5e51b7Smrg 1737eda3803bSmrg# LT_SYS_DLOPEN_SELF 1738eda3803bSmrg# ------------------ 1739eda3803bSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1740eda3803bSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1741fe5e51b7Smrgif test "x$enable_dlopen" != xyes; then 1742fe5e51b7Smrg enable_dlopen=unknown 1743fe5e51b7Smrg enable_dlopen_self=unknown 1744fe5e51b7Smrg enable_dlopen_self_static=unknown 1745fe5e51b7Smrgelse 1746fe5e51b7Smrg lt_cv_dlopen=no 1747fe5e51b7Smrg lt_cv_dlopen_libs= 1748fe5e51b7Smrg 1749fe5e51b7Smrg case $host_os in 1750fe5e51b7Smrg beos*) 1751fe5e51b7Smrg lt_cv_dlopen="load_add_on" 1752fe5e51b7Smrg lt_cv_dlopen_libs= 1753fe5e51b7Smrg lt_cv_dlopen_self=yes 1754fe5e51b7Smrg ;; 1755fe5e51b7Smrg 1756eda3803bSmrg mingw* | pw32* | cegcc*) 1757fe5e51b7Smrg lt_cv_dlopen="LoadLibrary" 1758fe5e51b7Smrg lt_cv_dlopen_libs= 1759eda3803bSmrg ;; 1760fe5e51b7Smrg 1761fe5e51b7Smrg cygwin*) 1762fe5e51b7Smrg lt_cv_dlopen="dlopen" 1763fe5e51b7Smrg lt_cv_dlopen_libs= 1764eda3803bSmrg ;; 1765fe5e51b7Smrg 1766fe5e51b7Smrg darwin*) 1767fe5e51b7Smrg # if libdl is installed we need to link against it 1768fe5e51b7Smrg AC_CHECK_LIB([dl], [dlopen], 1769fe5e51b7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1770fe5e51b7Smrg lt_cv_dlopen="dyld" 1771fe5e51b7Smrg lt_cv_dlopen_libs= 1772fe5e51b7Smrg lt_cv_dlopen_self=yes 1773fe5e51b7Smrg ]) 1774eda3803bSmrg ;; 1775fe5e51b7Smrg 1776fe5e51b7Smrg *) 1777fe5e51b7Smrg AC_CHECK_FUNC([shl_load], 1778fe5e51b7Smrg [lt_cv_dlopen="shl_load"], 1779fe5e51b7Smrg [AC_CHECK_LIB([dld], [shl_load], 1780eda3803bSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1781fe5e51b7Smrg [AC_CHECK_FUNC([dlopen], 1782fe5e51b7Smrg [lt_cv_dlopen="dlopen"], 1783fe5e51b7Smrg [AC_CHECK_LIB([dl], [dlopen], 1784fe5e51b7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1785fe5e51b7Smrg [AC_CHECK_LIB([svld], [dlopen], 1786fe5e51b7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1787fe5e51b7Smrg [AC_CHECK_LIB([dld], [dld_link], 1788eda3803bSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1789fe5e51b7Smrg ]) 1790fe5e51b7Smrg ]) 1791fe5e51b7Smrg ]) 1792fe5e51b7Smrg ]) 1793fe5e51b7Smrg ]) 1794fe5e51b7Smrg ;; 1795fe5e51b7Smrg esac 1796fe5e51b7Smrg 1797fe5e51b7Smrg if test "x$lt_cv_dlopen" != xno; then 1798fe5e51b7Smrg enable_dlopen=yes 1799fe5e51b7Smrg else 1800fe5e51b7Smrg enable_dlopen=no 1801fe5e51b7Smrg fi 1802fe5e51b7Smrg 1803fe5e51b7Smrg case $lt_cv_dlopen in 1804fe5e51b7Smrg dlopen) 1805fe5e51b7Smrg save_CPPFLAGS="$CPPFLAGS" 1806fe5e51b7Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1807fe5e51b7Smrg 1808fe5e51b7Smrg save_LDFLAGS="$LDFLAGS" 1809fe5e51b7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1810fe5e51b7Smrg 1811fe5e51b7Smrg save_LIBS="$LIBS" 1812fe5e51b7Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 1813fe5e51b7Smrg 1814fe5e51b7Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 1815fe5e51b7Smrg lt_cv_dlopen_self, [dnl 1816eda3803bSmrg _LT_TRY_DLOPEN_SELF( 1817fe5e51b7Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1818fe5e51b7Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1819fe5e51b7Smrg ]) 1820fe5e51b7Smrg 1821fe5e51b7Smrg if test "x$lt_cv_dlopen_self" = xyes; then 1822fe5e51b7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1823fe5e51b7Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1824eda3803bSmrg lt_cv_dlopen_self_static, [dnl 1825eda3803bSmrg _LT_TRY_DLOPEN_SELF( 1826fe5e51b7Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1827fe5e51b7Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1828fe5e51b7Smrg ]) 1829fe5e51b7Smrg fi 1830fe5e51b7Smrg 1831fe5e51b7Smrg CPPFLAGS="$save_CPPFLAGS" 1832fe5e51b7Smrg LDFLAGS="$save_LDFLAGS" 1833fe5e51b7Smrg LIBS="$save_LIBS" 1834fe5e51b7Smrg ;; 1835fe5e51b7Smrg esac 1836fe5e51b7Smrg 1837fe5e51b7Smrg case $lt_cv_dlopen_self in 1838fe5e51b7Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1839fe5e51b7Smrg *) enable_dlopen_self=unknown ;; 1840fe5e51b7Smrg esac 1841fe5e51b7Smrg 1842fe5e51b7Smrg case $lt_cv_dlopen_self_static in 1843fe5e51b7Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1844fe5e51b7Smrg *) enable_dlopen_self_static=unknown ;; 1845fe5e51b7Smrg esac 1846fe5e51b7Smrgfi 1847eda3803bSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1848eda3803bSmrg [Whether dlopen is supported]) 1849eda3803bSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1850eda3803bSmrg [Whether dlopen of programs is supported]) 1851eda3803bSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1852eda3803bSmrg [Whether dlopen of statically linked programs is supported]) 1853eda3803bSmrg])# LT_SYS_DLOPEN_SELF 1854fe5e51b7Smrg 1855eda3803bSmrg# Old name: 1856eda3803bSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1857eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 1858eda3803bSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1859fe5e51b7Smrg 1860eda3803bSmrg 1861eda3803bSmrg# _LT_COMPILER_C_O([TAGNAME]) 1862eda3803bSmrg# --------------------------- 1863eda3803bSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 1864eda3803bSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1865eda3803bSmrgm4_defun([_LT_COMPILER_C_O], 1866eda3803bSmrg[m4_require([_LT_DECL_SED])dnl 1867eda3803bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1868eda3803bSmrgm4_require([_LT_TAG_COMPILER])dnl 1869fe5e51b7SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1870eda3803bSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1871eda3803bSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1872eda3803bSmrg $RM -r conftest 2>/dev/null 1873fe5e51b7Smrg mkdir conftest 1874fe5e51b7Smrg cd conftest 1875fe5e51b7Smrg mkdir out 1876fe5e51b7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1877fe5e51b7Smrg 1878fe5e51b7Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1879fe5e51b7Smrg # Insert the option either (1) after the last *FLAGS variable, or 1880fe5e51b7Smrg # (2) before a word containing "conftest.", or (3) at the end. 1881fe5e51b7Smrg # Note that $ac_compile itself does not contain backslashes and begins 1882fe5e51b7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1883fe5e51b7Smrg lt_compile=`echo "$ac_compile" | $SED \ 1884fe5e51b7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1885fe5e51b7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1886fe5e51b7Smrg -e 's:$: $lt_compiler_flag:'` 1887fe5e51b7Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1888fe5e51b7Smrg (eval "$lt_compile" 2>out/conftest.err) 1889fe5e51b7Smrg ac_status=$? 1890fe5e51b7Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 1891fe5e51b7Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1892fe5e51b7Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 1893fe5e51b7Smrg then 1894fe5e51b7Smrg # The compiler can only warn and ignore the option if not recognized 1895fe5e51b7Smrg # So say no if there are warnings 1896eda3803bSmrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 1897fe5e51b7Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1898fe5e51b7Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1899eda3803bSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1900fe5e51b7Smrg fi 1901fe5e51b7Smrg fi 1902fe5e51b7Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1903eda3803bSmrg $RM conftest* 1904fe5e51b7Smrg # SGI C++ compiler will create directory out/ii_files/ for 1905fe5e51b7Smrg # template instantiation 1906eda3803bSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 1907eda3803bSmrg $RM out/* && rmdir out 1908fe5e51b7Smrg cd .. 1909eda3803bSmrg $RM -r conftest 1910eda3803bSmrg $RM conftest* 1911fe5e51b7Smrg]) 1912eda3803bSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 1913eda3803bSmrg [Does compiler simultaneously support -c and -o options?]) 1914eda3803bSmrg])# _LT_COMPILER_C_O 1915fe5e51b7Smrg 1916fe5e51b7Smrg 1917eda3803bSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 1918eda3803bSmrg# ---------------------------------- 1919fe5e51b7Smrg# Check to see if we can do hard links to lock some files if needed 1920eda3803bSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 1921eda3803bSmrg[m4_require([_LT_ENABLE_LOCK])dnl 1922eda3803bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1923eda3803bSmrg_LT_COMPILER_C_O([$1]) 1924fe5e51b7Smrg 1925fe5e51b7Smrghard_links="nottested" 1926eda3803bSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1927fe5e51b7Smrg # do not overwrite the value of need_locks provided by the user 1928fe5e51b7Smrg AC_MSG_CHECKING([if we can lock with hard links]) 1929fe5e51b7Smrg hard_links=yes 1930eda3803bSmrg $RM conftest* 1931fe5e51b7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1932fe5e51b7Smrg touch conftest.a 1933fe5e51b7Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 1934fe5e51b7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1935fe5e51b7Smrg AC_MSG_RESULT([$hard_links]) 1936fe5e51b7Smrg if test "$hard_links" = no; then 1937fe5e51b7Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1938fe5e51b7Smrg need_locks=warn 1939fe5e51b7Smrg fi 1940fe5e51b7Smrgelse 1941fe5e51b7Smrg need_locks=no 1942fe5e51b7Smrgfi 1943eda3803bSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 1944eda3803bSmrg])# _LT_COMPILER_FILE_LOCKS 1945fe5e51b7Smrg 1946fe5e51b7Smrg 1947eda3803bSmrg# _LT_CHECK_OBJDIR 1948eda3803bSmrg# ---------------- 1949eda3803bSmrgm4_defun([_LT_CHECK_OBJDIR], 1950fe5e51b7Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1951fe5e51b7Smrg[rm -f .libs 2>/dev/null 1952fe5e51b7Smrgmkdir .libs 2>/dev/null 1953fe5e51b7Smrgif test -d .libs; then 1954fe5e51b7Smrg lt_cv_objdir=.libs 1955fe5e51b7Smrgelse 1956fe5e51b7Smrg # MS-DOS does not allow filenames that begin with a dot. 1957fe5e51b7Smrg lt_cv_objdir=_libs 1958fe5e51b7Smrgfi 1959fe5e51b7Smrgrmdir .libs 2>/dev/null]) 1960fe5e51b7Smrgobjdir=$lt_cv_objdir 1961eda3803bSmrg_LT_DECL([], [objdir], [0], 1962eda3803bSmrg [The name of the directory that contains temporary libtool files])dnl 1963eda3803bSmrgm4_pattern_allow([LT_OBJDIR])dnl 1964eda3803bSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 1965eda3803bSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 1966eda3803bSmrg])# _LT_CHECK_OBJDIR 1967fe5e51b7Smrg 1968fe5e51b7Smrg 1969eda3803bSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 1970eda3803bSmrg# -------------------------------------- 1971fe5e51b7Smrg# Check hardcoding attributes. 1972eda3803bSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 1973fe5e51b7Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1974eda3803bSmrg_LT_TAGVAR(hardcode_action, $1)= 1975eda3803bSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 1976eda3803bSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 1977eda3803bSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1978fe5e51b7Smrg 1979eda3803bSmrg # We can hardcode non-existent directories. 1980eda3803bSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 1981fe5e51b7Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 1982fe5e51b7Smrg # have to relink, otherwise we might link with an installed library 1983fe5e51b7Smrg # when we should be linking with a yet-to-be-installed one 1984eda3803bSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1985eda3803bSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 1986fe5e51b7Smrg # Linking always hardcodes the temporary library directory. 1987eda3803bSmrg _LT_TAGVAR(hardcode_action, $1)=relink 1988fe5e51b7Smrg else 1989fe5e51b7Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1990eda3803bSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 1991fe5e51b7Smrg fi 1992fe5e51b7Smrgelse 1993fe5e51b7Smrg # We cannot hardcode anything, or else we can only hardcode existing 1994fe5e51b7Smrg # directories. 1995eda3803bSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 1996fe5e51b7Smrgfi 1997eda3803bSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 1998fe5e51b7Smrg 1999eda3803bSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2000eda3803bSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2001fe5e51b7Smrg # Fast installation is not supported 2002fe5e51b7Smrg enable_fast_install=no 2003fe5e51b7Smrgelif test "$shlibpath_overrides_runpath" = yes || 2004fe5e51b7Smrg test "$enable_shared" = no; then 2005fe5e51b7Smrg # Fast installation is not necessary 2006fe5e51b7Smrg enable_fast_install=needless 2007fe5e51b7Smrgfi 2008eda3803bSmrg_LT_TAGDECL([], [hardcode_action], [0], 2009eda3803bSmrg [How to hardcode a shared library path into an executable]) 2010eda3803bSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2011fe5e51b7Smrg 2012fe5e51b7Smrg 2013eda3803bSmrg# _LT_CMD_STRIPLIB 2014eda3803bSmrg# ---------------- 2015eda3803bSmrgm4_defun([_LT_CMD_STRIPLIB], 2016eda3803bSmrg[m4_require([_LT_DECL_EGREP]) 2017eda3803bSmrgstriplib= 2018fe5e51b7Smrgold_striplib= 2019fe5e51b7SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2020eda3803bSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2021fe5e51b7Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2022fe5e51b7Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2023fe5e51b7Smrg AC_MSG_RESULT([yes]) 2024fe5e51b7Smrgelse 2025fe5e51b7Smrg# FIXME - insert some real tests, host_os isn't really good enough 2026fe5e51b7Smrg case $host_os in 2027eda3803bSmrg darwin*) 2028eda3803bSmrg if test -n "$STRIP" ; then 2029eda3803bSmrg striplib="$STRIP -x" 2030eda3803bSmrg old_striplib="$STRIP -S" 2031eda3803bSmrg AC_MSG_RESULT([yes]) 2032eda3803bSmrg else 2033eda3803bSmrg AC_MSG_RESULT([no]) 2034eda3803bSmrg fi 2035eda3803bSmrg ;; 2036eda3803bSmrg *) 2037eda3803bSmrg AC_MSG_RESULT([no]) 2038fe5e51b7Smrg ;; 2039fe5e51b7Smrg esac 2040fe5e51b7Smrgfi 2041eda3803bSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2042eda3803bSmrg_LT_DECL([], [striplib], [1]) 2043eda3803bSmrg])# _LT_CMD_STRIPLIB 2044fe5e51b7Smrg 2045fe5e51b7Smrg 2046eda3803bSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2047fe5e51b7Smrg# ----------------------------- 2048fe5e51b7Smrg# PORTME Fill in your ld.so characteristics 2049eda3803bSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2050eda3803bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2051eda3803bSmrgm4_require([_LT_DECL_EGREP])dnl 2052eda3803bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2053eda3803bSmrgm4_require([_LT_DECL_OBJDUMP])dnl 2054eda3803bSmrgm4_require([_LT_DECL_SED])dnl 2055fe5e51b7SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2056eda3803bSmrgm4_if([$1], 2057eda3803bSmrg [], [ 2058fe5e51b7Smrgif test "$GCC" = yes; then 2059fe5e51b7Smrg case $host_os in 2060fe5e51b7Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2061fe5e51b7Smrg *) lt_awk_arg="/^libraries:/" ;; 2062fe5e51b7Smrg esac 2063fe5e51b7Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2064eda3803bSmrg if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then 2065fe5e51b7Smrg # if the path contains ";" then we assume it to be the separator 2066fe5e51b7Smrg # otherwise default to the standard path separator (i.e. ":") - it is 2067fe5e51b7Smrg # assumed that no part of a normal pathname contains ";" but that should 2068fe5e51b7Smrg # okay in the real world where ";" in dirpaths is itself problematic. 2069eda3803bSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` 2070fe5e51b7Smrg else 2071eda3803bSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2072fe5e51b7Smrg fi 2073fe5e51b7Smrg # Ok, now we have the path, separated by spaces, we can step through it 2074fe5e51b7Smrg # and add multilib dir if necessary. 2075fe5e51b7Smrg lt_tmp_lt_search_path_spec= 2076fe5e51b7Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2077fe5e51b7Smrg for lt_sys_path in $lt_search_path_spec; do 2078fe5e51b7Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2079fe5e51b7Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2080fe5e51b7Smrg else 2081fe5e51b7Smrg test -d "$lt_sys_path" && \ 2082fe5e51b7Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2083fe5e51b7Smrg fi 2084fe5e51b7Smrg done 2085eda3803bSmrg lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' 2086fe5e51b7SmrgBEGIN {RS=" "; FS="/|\n";} { 2087fe5e51b7Smrg lt_foo=""; 2088fe5e51b7Smrg lt_count=0; 2089fe5e51b7Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 2090fe5e51b7Smrg if ($lt_i != "" && $lt_i != ".") { 2091fe5e51b7Smrg if ($lt_i == "..") { 2092fe5e51b7Smrg lt_count++; 2093fe5e51b7Smrg } else { 2094fe5e51b7Smrg if (lt_count == 0) { 2095fe5e51b7Smrg lt_foo="/" $lt_i lt_foo; 2096fe5e51b7Smrg } else { 2097fe5e51b7Smrg lt_count--; 2098fe5e51b7Smrg } 2099fe5e51b7Smrg } 2100fe5e51b7Smrg } 2101fe5e51b7Smrg } 2102fe5e51b7Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2103fe5e51b7Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2104fe5e51b7Smrg}'` 2105eda3803bSmrg sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 2106fe5e51b7Smrgelse 2107fe5e51b7Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2108fe5e51b7Smrgfi]) 2109eda3803bSmrglibrary_names_spec= 2110eda3803bSmrglibname_spec='lib$name' 2111eda3803bSmrgsoname_spec= 2112eda3803bSmrgshrext_cmds=".so" 2113eda3803bSmrgpostinstall_cmds= 2114eda3803bSmrgpostuninstall_cmds= 2115eda3803bSmrgfinish_cmds= 2116eda3803bSmrgfinish_eval= 2117eda3803bSmrgshlibpath_var= 2118eda3803bSmrgshlibpath_overrides_runpath=unknown 2119eda3803bSmrgversion_type=none 2120eda3803bSmrgdynamic_linker="$host_os ld.so" 2121eda3803bSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2122fe5e51b7Smrgneed_lib_prefix=unknown 2123fe5e51b7Smrghardcode_into_libs=no 2124fe5e51b7Smrg 2125fe5e51b7Smrg# when you set need_version to no, make sure it does not cause -set_version 2126fe5e51b7Smrg# flags to be left without arguments 2127fe5e51b7Smrgneed_version=unknown 2128fe5e51b7Smrg 2129fe5e51b7Smrgcase $host_os in 2130fe5e51b7Smrgaix3*) 2131fe5e51b7Smrg version_type=linux 2132fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2133fe5e51b7Smrg shlibpath_var=LIBPATH 2134fe5e51b7Smrg 2135fe5e51b7Smrg # AIX 3 has no versioning support, so we append a major version to the name. 2136fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2137fe5e51b7Smrg ;; 2138fe5e51b7Smrg 2139eda3803bSmrgaix[[4-9]]*) 2140fe5e51b7Smrg version_type=linux 2141fe5e51b7Smrg need_lib_prefix=no 2142fe5e51b7Smrg need_version=no 2143fe5e51b7Smrg hardcode_into_libs=yes 2144fe5e51b7Smrg if test "$host_cpu" = ia64; then 2145fe5e51b7Smrg # AIX 5 supports IA64 2146fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2147fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2148fe5e51b7Smrg else 2149fe5e51b7Smrg # With GCC up to 2.95.x, collect2 would create an import file 2150fe5e51b7Smrg # for dependence libraries. The import file would start with 2151fe5e51b7Smrg # the line `#! .'. This would cause the generated library to 2152fe5e51b7Smrg # depend on `.', always an invalid library. This was fixed in 2153fe5e51b7Smrg # development snapshots of GCC prior to 3.0. 2154fe5e51b7Smrg case $host_os in 2155fe5e51b7Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2156fe5e51b7Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2157fe5e51b7Smrg echo ' yes ' 2158eda3803bSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2159fe5e51b7Smrg : 2160fe5e51b7Smrg else 2161fe5e51b7Smrg can_build_shared=no 2162fe5e51b7Smrg fi 2163fe5e51b7Smrg ;; 2164fe5e51b7Smrg esac 2165fe5e51b7Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2166fe5e51b7Smrg # soname into executable. Probably we can add versioning support to 2167fe5e51b7Smrg # collect2, so additional links can be useful in future. 2168fe5e51b7Smrg if test "$aix_use_runtimelinking" = yes; then 2169fe5e51b7Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2170fe5e51b7Smrg # instead of lib<name>.a to let people know that these are not 2171fe5e51b7Smrg # typical AIX shared libraries. 2172fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2173fe5e51b7Smrg else 2174fe5e51b7Smrg # We preserve .a as extension for shared libraries through AIX4.2 2175fe5e51b7Smrg # and later when we are not doing run time linking. 2176fe5e51b7Smrg library_names_spec='${libname}${release}.a $libname.a' 2177fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2178fe5e51b7Smrg fi 2179fe5e51b7Smrg shlibpath_var=LIBPATH 2180fe5e51b7Smrg fi 2181fe5e51b7Smrg ;; 2182fe5e51b7Smrg 2183fe5e51b7Smrgamigaos*) 2184eda3803bSmrg case $host_cpu in 2185eda3803bSmrg powerpc) 2186eda3803bSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2187eda3803bSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2188eda3803bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2189eda3803bSmrg ;; 2190eda3803bSmrg m68k) 2191eda3803bSmrg library_names_spec='$libname.ixlibrary $libname.a' 2192eda3803bSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2193eda3803bSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''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' 2194eda3803bSmrg ;; 2195eda3803bSmrg esac 2196fe5e51b7Smrg ;; 2197fe5e51b7Smrg 2198fe5e51b7Smrgbeos*) 2199fe5e51b7Smrg library_names_spec='${libname}${shared_ext}' 2200fe5e51b7Smrg dynamic_linker="$host_os ld.so" 2201fe5e51b7Smrg shlibpath_var=LIBRARY_PATH 2202fe5e51b7Smrg ;; 2203fe5e51b7Smrg 2204fe5e51b7Smrgbsdi[[45]]*) 2205fe5e51b7Smrg version_type=linux 2206fe5e51b7Smrg need_version=no 2207fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2208fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2209fe5e51b7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2210fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2211fe5e51b7Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2212fe5e51b7Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2213fe5e51b7Smrg # the default ld.so.conf also contains /usr/contrib/lib and 2214fe5e51b7Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2215fe5e51b7Smrg # libtool to hard-code these into programs 2216fe5e51b7Smrg ;; 2217fe5e51b7Smrg 2218eda3803bSmrgcygwin* | mingw* | pw32* | cegcc*) 2219fe5e51b7Smrg version_type=windows 2220fe5e51b7Smrg shrext_cmds=".dll" 2221fe5e51b7Smrg need_version=no 2222fe5e51b7Smrg need_lib_prefix=no 2223fe5e51b7Smrg 2224fe5e51b7Smrg case $GCC,$host_os in 2225eda3803bSmrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 2226fe5e51b7Smrg library_names_spec='$libname.dll.a' 2227fe5e51b7Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2228fe5e51b7Smrg postinstall_cmds='base_file=`basename \${file}`~ 2229eda3803bSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2230fe5e51b7Smrg dldir=$destdir/`dirname \$dlpath`~ 2231fe5e51b7Smrg test -d \$dldir || mkdir -p \$dldir~ 2232fe5e51b7Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2233eda3803bSmrg chmod a+x \$dldir/$dlname~ 2234eda3803bSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2235eda3803bSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2236eda3803bSmrg fi' 2237fe5e51b7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2238fe5e51b7Smrg dlpath=$dir/\$dldll~ 2239eda3803bSmrg $RM \$dlpath' 2240fe5e51b7Smrg shlibpath_overrides_runpath=yes 2241fe5e51b7Smrg 2242fe5e51b7Smrg case $host_os in 2243fe5e51b7Smrg cygwin*) 2244fe5e51b7Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2245fe5e51b7Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2246fe5e51b7Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 2247fe5e51b7Smrg ;; 2248eda3803bSmrg mingw* | cegcc*) 2249fe5e51b7Smrg # MinGW DLLs use traditional 'lib' prefix 2250fe5e51b7Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2251eda3803bSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2252eda3803bSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2253fe5e51b7Smrg # It is most probably a Windows format PATH printed by 2254fe5e51b7Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 2255fe5e51b7Smrg # path with ; separators, and with drive letters. We can handle the 2256fe5e51b7Smrg # drive letters (cygwin fileutils understands them), so leave them, 2257fe5e51b7Smrg # especially as we might pass files found there to a mingw objdump, 2258fe5e51b7Smrg # which wouldn't understand a cygwinified path. Ahh. 2259eda3803bSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2260fe5e51b7Smrg else 2261eda3803bSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2262fe5e51b7Smrg fi 2263fe5e51b7Smrg ;; 2264fe5e51b7Smrg pw32*) 2265fe5e51b7Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2266fe5e51b7Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2267fe5e51b7Smrg ;; 2268fe5e51b7Smrg esac 2269fe5e51b7Smrg ;; 2270fe5e51b7Smrg 2271fe5e51b7Smrg *) 2272fe5e51b7Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2273fe5e51b7Smrg ;; 2274fe5e51b7Smrg esac 2275fe5e51b7Smrg dynamic_linker='Win32 ld.exe' 2276fe5e51b7Smrg # FIXME: first we should search . and the directory the executable is in 2277fe5e51b7Smrg shlibpath_var=PATH 2278fe5e51b7Smrg ;; 2279fe5e51b7Smrg 2280fe5e51b7Smrgdarwin* | rhapsody*) 2281fe5e51b7Smrg dynamic_linker="$host_os dyld" 2282fe5e51b7Smrg version_type=darwin 2283fe5e51b7Smrg need_lib_prefix=no 2284fe5e51b7Smrg need_version=no 2285eda3803bSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2286fe5e51b7Smrg soname_spec='${libname}${release}${major}$shared_ext' 2287fe5e51b7Smrg shlibpath_overrides_runpath=yes 2288fe5e51b7Smrg shlibpath_var=DYLD_LIBRARY_PATH 2289fe5e51b7Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2290eda3803bSmrgm4_if([$1], [],[ 2291eda3803bSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2292fe5e51b7Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2293fe5e51b7Smrg ;; 2294fe5e51b7Smrg 2295fe5e51b7Smrgdgux*) 2296fe5e51b7Smrg version_type=linux 2297fe5e51b7Smrg need_lib_prefix=no 2298fe5e51b7Smrg need_version=no 2299fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2300fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2301fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2302fe5e51b7Smrg ;; 2303fe5e51b7Smrg 2304fe5e51b7Smrgfreebsd1*) 2305fe5e51b7Smrg dynamic_linker=no 2306fe5e51b7Smrg ;; 2307fe5e51b7Smrg 2308fe5e51b7Smrgfreebsd* | dragonfly*) 2309fe5e51b7Smrg # DragonFly does not have aout. When/if they implement a new 2310fe5e51b7Smrg # versioning mechanism, adjust this. 2311fe5e51b7Smrg if test -x /usr/bin/objformat; then 2312fe5e51b7Smrg objformat=`/usr/bin/objformat` 2313fe5e51b7Smrg else 2314fe5e51b7Smrg case $host_os in 2315fe5e51b7Smrg freebsd[[123]]*) objformat=aout ;; 2316fe5e51b7Smrg *) objformat=elf ;; 2317fe5e51b7Smrg esac 2318fe5e51b7Smrg fi 2319fe5e51b7Smrg version_type=freebsd-$objformat 2320fe5e51b7Smrg case $version_type in 2321fe5e51b7Smrg freebsd-elf*) 2322fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2323fe5e51b7Smrg need_version=no 2324fe5e51b7Smrg need_lib_prefix=no 2325fe5e51b7Smrg ;; 2326fe5e51b7Smrg freebsd-*) 2327fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2328fe5e51b7Smrg need_version=yes 2329fe5e51b7Smrg ;; 2330fe5e51b7Smrg esac 2331fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2332fe5e51b7Smrg case $host_os in 2333fe5e51b7Smrg freebsd2*) 2334fe5e51b7Smrg shlibpath_overrides_runpath=yes 2335fe5e51b7Smrg ;; 2336fe5e51b7Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2337fe5e51b7Smrg shlibpath_overrides_runpath=yes 2338fe5e51b7Smrg hardcode_into_libs=yes 2339fe5e51b7Smrg ;; 2340fe5e51b7Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2341fe5e51b7Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2342fe5e51b7Smrg shlibpath_overrides_runpath=no 2343fe5e51b7Smrg hardcode_into_libs=yes 2344fe5e51b7Smrg ;; 2345fe5e51b7Smrg *) # from 4.6 on, and DragonFly 2346fe5e51b7Smrg shlibpath_overrides_runpath=yes 2347fe5e51b7Smrg hardcode_into_libs=yes 2348fe5e51b7Smrg ;; 2349fe5e51b7Smrg esac 2350fe5e51b7Smrg ;; 2351fe5e51b7Smrg 2352fe5e51b7Smrggnu*) 2353fe5e51b7Smrg version_type=linux 2354fe5e51b7Smrg need_lib_prefix=no 2355fe5e51b7Smrg need_version=no 2356fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2357fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2358fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2359fe5e51b7Smrg hardcode_into_libs=yes 2360fe5e51b7Smrg ;; 2361fe5e51b7Smrg 2362fe5e51b7Smrghpux9* | hpux10* | hpux11*) 2363fe5e51b7Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 2364fe5e51b7Smrg # link against other versions. 2365fe5e51b7Smrg version_type=sunos 2366fe5e51b7Smrg need_lib_prefix=no 2367fe5e51b7Smrg need_version=no 2368fe5e51b7Smrg case $host_cpu in 2369fe5e51b7Smrg ia64*) 2370fe5e51b7Smrg shrext_cmds='.so' 2371fe5e51b7Smrg hardcode_into_libs=yes 2372fe5e51b7Smrg dynamic_linker="$host_os dld.so" 2373fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2374fe5e51b7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2375fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2376fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2377fe5e51b7Smrg if test "X$HPUX_IA64_MODE" = X32; then 2378fe5e51b7Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2379fe5e51b7Smrg else 2380fe5e51b7Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2381fe5e51b7Smrg fi 2382fe5e51b7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2383fe5e51b7Smrg ;; 2384eda3803bSmrg hppa*64*) 2385eda3803bSmrg shrext_cmds='.sl' 2386eda3803bSmrg hardcode_into_libs=yes 2387eda3803bSmrg dynamic_linker="$host_os dld.sl" 2388eda3803bSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2389eda3803bSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2390eda3803bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2391eda3803bSmrg soname_spec='${libname}${release}${shared_ext}$major' 2392eda3803bSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2393eda3803bSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2394eda3803bSmrg ;; 2395eda3803bSmrg *) 2396fe5e51b7Smrg shrext_cmds='.sl' 2397fe5e51b7Smrg dynamic_linker="$host_os dld.sl" 2398fe5e51b7Smrg shlibpath_var=SHLIB_PATH 2399fe5e51b7Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2400fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2401fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2402fe5e51b7Smrg ;; 2403fe5e51b7Smrg esac 2404fe5e51b7Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 2405fe5e51b7Smrg postinstall_cmds='chmod 555 $lib' 2406fe5e51b7Smrg ;; 2407fe5e51b7Smrg 2408fe5e51b7Smrginterix[[3-9]]*) 2409fe5e51b7Smrg version_type=linux 2410fe5e51b7Smrg need_lib_prefix=no 2411fe5e51b7Smrg need_version=no 2412fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2413fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2414fe5e51b7Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2415fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2416fe5e51b7Smrg shlibpath_overrides_runpath=no 2417fe5e51b7Smrg hardcode_into_libs=yes 2418fe5e51b7Smrg ;; 2419fe5e51b7Smrg 2420fe5e51b7Smrgirix5* | irix6* | nonstopux*) 2421fe5e51b7Smrg case $host_os in 2422fe5e51b7Smrg nonstopux*) version_type=nonstopux ;; 2423fe5e51b7Smrg *) 2424fe5e51b7Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 2425fe5e51b7Smrg version_type=linux 2426fe5e51b7Smrg else 2427fe5e51b7Smrg version_type=irix 2428fe5e51b7Smrg fi ;; 2429fe5e51b7Smrg esac 2430fe5e51b7Smrg need_lib_prefix=no 2431fe5e51b7Smrg need_version=no 2432fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2433fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2434fe5e51b7Smrg case $host_os in 2435fe5e51b7Smrg irix5* | nonstopux*) 2436fe5e51b7Smrg libsuff= shlibsuff= 2437fe5e51b7Smrg ;; 2438fe5e51b7Smrg *) 2439fe5e51b7Smrg case $LD in # libtool.m4 will add one of these switches to LD 2440fe5e51b7Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2441fe5e51b7Smrg libsuff= shlibsuff= libmagic=32-bit;; 2442fe5e51b7Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2443fe5e51b7Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2444fe5e51b7Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2445fe5e51b7Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2446fe5e51b7Smrg *) libsuff= shlibsuff= libmagic=never-match;; 2447fe5e51b7Smrg esac 2448fe5e51b7Smrg ;; 2449fe5e51b7Smrg esac 2450fe5e51b7Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2451fe5e51b7Smrg shlibpath_overrides_runpath=no 2452fe5e51b7Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2453fe5e51b7Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2454fe5e51b7Smrg hardcode_into_libs=yes 2455fe5e51b7Smrg ;; 2456fe5e51b7Smrg 2457fe5e51b7Smrg# No shared lib support for Linux oldld, aout, or coff. 2458fe5e51b7Smrglinux*oldld* | linux*aout* | linux*coff*) 2459fe5e51b7Smrg dynamic_linker=no 2460fe5e51b7Smrg ;; 2461fe5e51b7Smrg 2462fe5e51b7Smrg# This must be Linux ELF. 2463fe5e51b7Smrglinux* | k*bsd*-gnu) 2464fe5e51b7Smrg version_type=linux 2465fe5e51b7Smrg need_lib_prefix=no 2466fe5e51b7Smrg need_version=no 2467fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2468fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2469fe5e51b7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2470fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2471fe5e51b7Smrg shlibpath_overrides_runpath=no 2472eda3803bSmrg # Some binutils ld are patched to set DT_RUNPATH 2473eda3803bSmrg save_LDFLAGS=$LDFLAGS 2474eda3803bSmrg save_libdir=$libdir 2475eda3803bSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2476eda3803bSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2477eda3803bSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2478eda3803bSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2479eda3803bSmrg [shlibpath_overrides_runpath=yes])]) 2480eda3803bSmrg LDFLAGS=$save_LDFLAGS 2481eda3803bSmrg libdir=$save_libdir 2482eda3803bSmrg 2483fe5e51b7Smrg # This implies no fast_install, which is unacceptable. 2484fe5e51b7Smrg # Some rework will be needed to allow for fast_install 2485fe5e51b7Smrg # before this can be enabled. 2486fe5e51b7Smrg hardcode_into_libs=yes 2487fe5e51b7Smrg 2488eda3803bSmrg # Add ABI-specific directories to the system library path. 2489eda3803bSmrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2490eda3803bSmrg 2491fe5e51b7Smrg # Append ld.so.conf contents to the search path 2492fe5e51b7Smrg if test -f /etc/ld.so.conf; then 2493eda3803bSmrg 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;/^$/d' | tr '\n' ' '` 2494eda3803bSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2495fe5e51b7Smrg fi 2496fe5e51b7Smrg 2497fe5e51b7Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2498fe5e51b7Smrg # powerpc, because MkLinux only supported shared libraries with the 2499fe5e51b7Smrg # GNU dynamic linker. Since this was broken with cross compilers, 2500fe5e51b7Smrg # most powerpc-linux boxes support dynamic linking these days and 2501fe5e51b7Smrg # people can always --disable-shared, the test was removed, and we 2502fe5e51b7Smrg # assume the GNU/Linux dynamic linker is in use. 2503fe5e51b7Smrg dynamic_linker='GNU/Linux ld.so' 2504fe5e51b7Smrg ;; 2505fe5e51b7Smrg 2506fe5e51b7Smrgnetbsd*) 2507fe5e51b7Smrg version_type=sunos 2508fe5e51b7Smrg need_lib_prefix=no 2509fe5e51b7Smrg need_version=no 2510eda3803bSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2511fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2512fe5e51b7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2513fe5e51b7Smrg dynamic_linker='NetBSD (a.out) ld.so' 2514fe5e51b7Smrg else 2515fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2516fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2517fe5e51b7Smrg dynamic_linker='NetBSD ld.elf_so' 2518fe5e51b7Smrg fi 2519fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2520fe5e51b7Smrg shlibpath_overrides_runpath=yes 2521fe5e51b7Smrg hardcode_into_libs=yes 2522fe5e51b7Smrg ;; 2523fe5e51b7Smrg 2524fe5e51b7Smrgnewsos6) 2525fe5e51b7Smrg version_type=linux 2526fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2527fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2528fe5e51b7Smrg shlibpath_overrides_runpath=yes 2529fe5e51b7Smrg ;; 2530fe5e51b7Smrg 2531eda3803bSmrg*nto* | *qnx*) 2532eda3803bSmrg version_type=qnx 2533fe5e51b7Smrg need_lib_prefix=no 2534fe5e51b7Smrg need_version=no 2535fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2536fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2537fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2538eda3803bSmrg shlibpath_overrides_runpath=no 2539eda3803bSmrg hardcode_into_libs=yes 2540eda3803bSmrg dynamic_linker='ldqnx.so' 2541fe5e51b7Smrg ;; 2542fe5e51b7Smrg 2543fe5e51b7Smrgopenbsd*) 2544fe5e51b7Smrg version_type=sunos 2545fe5e51b7Smrg sys_lib_dlsearch_path_spec="/usr/lib" 2546fe5e51b7Smrg need_lib_prefix=no 2547fe5e51b7Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2548fe5e51b7Smrg case $host_os in 2549eda3803bSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2550eda3803bSmrg *) need_version=no ;; 2551fe5e51b7Smrg esac 2552fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2553fe5e51b7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2554fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2555eda3803bSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2556fe5e51b7Smrg case $host_os in 2557fe5e51b7Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 2558fe5e51b7Smrg shlibpath_overrides_runpath=no 2559fe5e51b7Smrg ;; 2560fe5e51b7Smrg *) 2561fe5e51b7Smrg shlibpath_overrides_runpath=yes 2562fe5e51b7Smrg ;; 2563fe5e51b7Smrg esac 2564fe5e51b7Smrg else 2565fe5e51b7Smrg shlibpath_overrides_runpath=yes 2566fe5e51b7Smrg fi 2567fe5e51b7Smrg ;; 2568fe5e51b7Smrg 2569fe5e51b7Smrgos2*) 2570fe5e51b7Smrg libname_spec='$name' 2571fe5e51b7Smrg shrext_cmds=".dll" 2572fe5e51b7Smrg need_lib_prefix=no 2573fe5e51b7Smrg library_names_spec='$libname${shared_ext} $libname.a' 2574fe5e51b7Smrg dynamic_linker='OS/2 ld.exe' 2575fe5e51b7Smrg shlibpath_var=LIBPATH 2576fe5e51b7Smrg ;; 2577fe5e51b7Smrg 2578fe5e51b7Smrgosf3* | osf4* | osf5*) 2579fe5e51b7Smrg version_type=osf 2580fe5e51b7Smrg need_lib_prefix=no 2581fe5e51b7Smrg need_version=no 2582fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2583fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2584fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2585fe5e51b7Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2586fe5e51b7Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2587fe5e51b7Smrg ;; 2588fe5e51b7Smrg 2589fe5e51b7Smrgrdos*) 2590fe5e51b7Smrg dynamic_linker=no 2591fe5e51b7Smrg ;; 2592fe5e51b7Smrg 2593fe5e51b7Smrgsolaris*) 2594fe5e51b7Smrg version_type=linux 2595fe5e51b7Smrg need_lib_prefix=no 2596fe5e51b7Smrg need_version=no 2597fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2598fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2599fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2600fe5e51b7Smrg shlibpath_overrides_runpath=yes 2601fe5e51b7Smrg hardcode_into_libs=yes 2602fe5e51b7Smrg # ldd complains unless libraries are executable 2603fe5e51b7Smrg postinstall_cmds='chmod +x $lib' 2604fe5e51b7Smrg ;; 2605fe5e51b7Smrg 2606fe5e51b7Smrgsunos4*) 2607fe5e51b7Smrg version_type=sunos 2608fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2609fe5e51b7Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2610fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2611fe5e51b7Smrg shlibpath_overrides_runpath=yes 2612fe5e51b7Smrg if test "$with_gnu_ld" = yes; then 2613fe5e51b7Smrg need_lib_prefix=no 2614fe5e51b7Smrg fi 2615fe5e51b7Smrg need_version=yes 2616fe5e51b7Smrg ;; 2617fe5e51b7Smrg 2618fe5e51b7Smrgsysv4 | sysv4.3*) 2619fe5e51b7Smrg version_type=linux 2620fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2621fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2622fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2623fe5e51b7Smrg case $host_vendor in 2624fe5e51b7Smrg sni) 2625fe5e51b7Smrg shlibpath_overrides_runpath=no 2626fe5e51b7Smrg need_lib_prefix=no 2627fe5e51b7Smrg runpath_var=LD_RUN_PATH 2628fe5e51b7Smrg ;; 2629fe5e51b7Smrg siemens) 2630fe5e51b7Smrg need_lib_prefix=no 2631fe5e51b7Smrg ;; 2632fe5e51b7Smrg motorola) 2633fe5e51b7Smrg need_lib_prefix=no 2634fe5e51b7Smrg need_version=no 2635fe5e51b7Smrg shlibpath_overrides_runpath=no 2636fe5e51b7Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2637fe5e51b7Smrg ;; 2638fe5e51b7Smrg esac 2639fe5e51b7Smrg ;; 2640fe5e51b7Smrg 2641fe5e51b7Smrgsysv4*MP*) 2642fe5e51b7Smrg if test -d /usr/nec ;then 2643fe5e51b7Smrg version_type=linux 2644fe5e51b7Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2645fe5e51b7Smrg soname_spec='$libname${shared_ext}.$major' 2646fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2647fe5e51b7Smrg fi 2648fe5e51b7Smrg ;; 2649fe5e51b7Smrg 2650fe5e51b7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2651fe5e51b7Smrg version_type=freebsd-elf 2652fe5e51b7Smrg need_lib_prefix=no 2653fe5e51b7Smrg need_version=no 2654fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2655fe5e51b7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2656fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2657eda3803bSmrg shlibpath_overrides_runpath=yes 2658fe5e51b7Smrg hardcode_into_libs=yes 2659fe5e51b7Smrg if test "$with_gnu_ld" = yes; then 2660fe5e51b7Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2661fe5e51b7Smrg else 2662fe5e51b7Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2663fe5e51b7Smrg case $host_os in 2664fe5e51b7Smrg sco3.2v5*) 2665fe5e51b7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2666fe5e51b7Smrg ;; 2667fe5e51b7Smrg esac 2668fe5e51b7Smrg fi 2669fe5e51b7Smrg sys_lib_dlsearch_path_spec='/usr/lib' 2670fe5e51b7Smrg ;; 2671fe5e51b7Smrg 2672eda3803bSmrgtpf*) 2673eda3803bSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2674fe5e51b7Smrg version_type=linux 2675eda3803bSmrg need_lib_prefix=no 2676eda3803bSmrg need_version=no 2677fe5e51b7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2678fe5e51b7Smrg shlibpath_var=LD_LIBRARY_PATH 2679eda3803bSmrg shlibpath_overrides_runpath=no 2680eda3803bSmrg hardcode_into_libs=yes 2681eda3803bSmrg ;; 2682eda3803bSmrg 2683eda3803bSmrguts4*) 2684eda3803bSmrg version_type=linux 2685eda3803bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2686eda3803bSmrg soname_spec='${libname}${release}${shared_ext}$major' 2687eda3803bSmrg shlibpath_var=LD_LIBRARY_PATH 2688eda3803bSmrg ;; 2689fe5e51b7Smrg 2690fe5e51b7Smrg*) 2691fe5e51b7Smrg dynamic_linker=no 2692fe5e51b7Smrg ;; 2693fe5e51b7Smrgesac 2694fe5e51b7SmrgAC_MSG_RESULT([$dynamic_linker]) 2695fe5e51b7Smrgtest "$dynamic_linker" = no && can_build_shared=no 2696fe5e51b7Smrg 2697fe5e51b7Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2698fe5e51b7Smrgif test "$GCC" = yes; then 2699fe5e51b7Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2700fe5e51b7Smrgfi 2701fe5e51b7Smrg 2702eda3803bSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2703eda3803bSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2704eda3803bSmrgfi 2705eda3803bSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2706eda3803bSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2707fe5e51b7Smrgfi 2708fe5e51b7Smrg 2709eda3803bSmrg_LT_DECL([], [variables_saved_for_relink], [1], 2710eda3803bSmrg [Variables whose values should be saved in libtool wrapper scripts and 2711eda3803bSmrg restored at link time]) 2712eda3803bSmrg_LT_DECL([], [need_lib_prefix], [0], 2713eda3803bSmrg [Do we need the "lib" prefix for modules?]) 2714eda3803bSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2715eda3803bSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2716eda3803bSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2717eda3803bSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2718eda3803bSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2719eda3803bSmrg [Is shlibpath searched before the hard-coded library search path?]) 2720eda3803bSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2721eda3803bSmrg_LT_DECL([], [library_names_spec], [1], 2722eda3803bSmrg [[List of archive names. First name is the real one, the rest are links. 2723eda3803bSmrg The last name is the one that the linker finds with -lNAME]]) 2724eda3803bSmrg_LT_DECL([], [soname_spec], [1], 2725eda3803bSmrg [[The coded name of the library, if different from the real name]]) 2726eda3803bSmrg_LT_DECL([], [postinstall_cmds], [2], 2727eda3803bSmrg [Command to use after installation of a shared archive]) 2728eda3803bSmrg_LT_DECL([], [postuninstall_cmds], [2], 2729eda3803bSmrg [Command to use after uninstallation of a shared archive]) 2730eda3803bSmrg_LT_DECL([], [finish_cmds], [2], 2731eda3803bSmrg [Commands used to finish a libtool library installation in a directory]) 2732eda3803bSmrg_LT_DECL([], [finish_eval], [1], 2733eda3803bSmrg [[As "finish_cmds", except a single script fragment to be evaled but 2734eda3803bSmrg not shown]]) 2735eda3803bSmrg_LT_DECL([], [hardcode_into_libs], [0], 2736eda3803bSmrg [Whether we should hardcode library paths into libraries]) 2737eda3803bSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2738eda3803bSmrg [Compile-time system search path for libraries]) 2739eda3803bSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2740eda3803bSmrg [Run-time system search path for libraries]) 2741eda3803bSmrg])# _LT_SYS_DYNAMIC_LINKER 2742eda3803bSmrg 2743eda3803bSmrg 2744eda3803bSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 2745fe5e51b7Smrg# -------------------------- 2746fe5e51b7Smrg# find a file program which can recognize shared library 2747eda3803bSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2748eda3803bSmrg[m4_require([_LT_DECL_EGREP])dnl 2749fe5e51b7SmrgAC_MSG_CHECKING([for $1]) 2750fe5e51b7SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2751fe5e51b7Smrg[case $MAGIC_CMD in 2752fe5e51b7Smrg[[\\/*] | ?:[\\/]*]) 2753fe5e51b7Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2754fe5e51b7Smrg ;; 2755fe5e51b7Smrg*) 2756fe5e51b7Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2757fe5e51b7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2758fe5e51b7Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2759fe5e51b7Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2760fe5e51b7Smrgdnl not every word. This closes a longstanding sh security hole. 2761eda3803bSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 2762fe5e51b7Smrg for ac_dir in $ac_dummy; do 2763fe5e51b7Smrg IFS="$lt_save_ifs" 2764fe5e51b7Smrg test -z "$ac_dir" && ac_dir=. 2765fe5e51b7Smrg if test -f $ac_dir/$1; then 2766fe5e51b7Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2767fe5e51b7Smrg if test -n "$file_magic_test_file"; then 2768fe5e51b7Smrg case $deplibs_check_method in 2769fe5e51b7Smrg "file_magic "*) 2770fe5e51b7Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2771fe5e51b7Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2772fe5e51b7Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2773fe5e51b7Smrg $EGREP "$file_magic_regex" > /dev/null; then 2774fe5e51b7Smrg : 2775fe5e51b7Smrg else 2776eda3803bSmrg cat <<_LT_EOF 1>&2 2777fe5e51b7Smrg 2778fe5e51b7Smrg*** Warning: the command libtool uses to detect shared libraries, 2779fe5e51b7Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2780fe5e51b7Smrg*** The result is that libtool may fail to recognize shared libraries 2781fe5e51b7Smrg*** as such. This will affect the creation of libtool libraries that 2782fe5e51b7Smrg*** depend on shared libraries, but programs linked with such libtool 2783fe5e51b7Smrg*** libraries will work regardless of this problem. Nevertheless, you 2784fe5e51b7Smrg*** may want to report the problem to your system manager and/or to 2785fe5e51b7Smrg*** bug-libtool@gnu.org 2786fe5e51b7Smrg 2787eda3803bSmrg_LT_EOF 2788fe5e51b7Smrg fi ;; 2789fe5e51b7Smrg esac 2790fe5e51b7Smrg fi 2791fe5e51b7Smrg break 2792fe5e51b7Smrg fi 2793fe5e51b7Smrg done 2794fe5e51b7Smrg IFS="$lt_save_ifs" 2795fe5e51b7Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 2796fe5e51b7Smrg ;; 2797fe5e51b7Smrgesac]) 2798fe5e51b7SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2799fe5e51b7Smrgif test -n "$MAGIC_CMD"; then 2800fe5e51b7Smrg AC_MSG_RESULT($MAGIC_CMD) 2801fe5e51b7Smrgelse 2802fe5e51b7Smrg AC_MSG_RESULT(no) 2803fe5e51b7Smrgfi 2804eda3803bSmrg_LT_DECL([], [MAGIC_CMD], [0], 2805eda3803bSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2806eda3803bSmrg])# _LT_PATH_TOOL_PREFIX 2807fe5e51b7Smrg 2808eda3803bSmrg# Old name: 2809eda3803bSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2810eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 2811eda3803bSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 2812fe5e51b7Smrg 2813eda3803bSmrg 2814eda3803bSmrg# _LT_PATH_MAGIC 2815eda3803bSmrg# -------------- 2816fe5e51b7Smrg# find a file program which can recognize a shared library 2817eda3803bSmrgm4_defun([_LT_PATH_MAGIC], 2818eda3803bSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2819fe5e51b7Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 2820fe5e51b7Smrg if test -n "$ac_tool_prefix"; then 2821eda3803bSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2822fe5e51b7Smrg else 2823fe5e51b7Smrg MAGIC_CMD=: 2824fe5e51b7Smrg fi 2825fe5e51b7Smrgfi 2826eda3803bSmrg])# _LT_PATH_MAGIC 2827fe5e51b7Smrg 2828fe5e51b7Smrg 2829eda3803bSmrg# LT_PATH_LD 2830fe5e51b7Smrg# ---------- 2831fe5e51b7Smrg# find the pathname to the GNU or non-GNU linker 2832eda3803bSmrgAC_DEFUN([LT_PATH_LD], 2833eda3803bSmrg[AC_REQUIRE([AC_PROG_CC])dnl 2834fe5e51b7SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2835fe5e51b7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2836eda3803bSmrgm4_require([_LT_DECL_SED])dnl 2837eda3803bSmrgm4_require([_LT_DECL_EGREP])dnl 2838eda3803bSmrg 2839eda3803bSmrgAC_ARG_WITH([gnu-ld], 2840eda3803bSmrg [AS_HELP_STRING([--with-gnu-ld], 2841eda3803bSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2842eda3803bSmrg [test "$withval" = no || with_gnu_ld=yes], 2843eda3803bSmrg [with_gnu_ld=no])dnl 2844eda3803bSmrg 2845fe5e51b7Smrgac_prog=ld 2846fe5e51b7Smrgif test "$GCC" = yes; then 2847fe5e51b7Smrg # Check if gcc -print-prog-name=ld gives a path. 2848fe5e51b7Smrg AC_MSG_CHECKING([for ld used by $CC]) 2849fe5e51b7Smrg case $host in 2850fe5e51b7Smrg *-*-mingw*) 2851fe5e51b7Smrg # gcc leaves a trailing carriage return which upsets mingw 2852fe5e51b7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2853fe5e51b7Smrg *) 2854fe5e51b7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2855fe5e51b7Smrg esac 2856fe5e51b7Smrg case $ac_prog in 2857fe5e51b7Smrg # Accept absolute paths. 2858fe5e51b7Smrg [[\\/]]* | ?:[[\\/]]*) 2859fe5e51b7Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 2860fe5e51b7Smrg # Canonicalize the pathname of ld 2861eda3803bSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 2862eda3803bSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 2863eda3803bSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 2864fe5e51b7Smrg done 2865fe5e51b7Smrg test -z "$LD" && LD="$ac_prog" 2866fe5e51b7Smrg ;; 2867fe5e51b7Smrg "") 2868fe5e51b7Smrg # If it fails, then pretend we aren't using GCC. 2869fe5e51b7Smrg ac_prog=ld 2870fe5e51b7Smrg ;; 2871fe5e51b7Smrg *) 2872fe5e51b7Smrg # If it is relative, then search for the first ld in PATH. 2873fe5e51b7Smrg with_gnu_ld=unknown 2874fe5e51b7Smrg ;; 2875fe5e51b7Smrg esac 2876fe5e51b7Smrgelif test "$with_gnu_ld" = yes; then 2877fe5e51b7Smrg AC_MSG_CHECKING([for GNU ld]) 2878fe5e51b7Smrgelse 2879fe5e51b7Smrg AC_MSG_CHECKING([for non-GNU ld]) 2880fe5e51b7Smrgfi 2881fe5e51b7SmrgAC_CACHE_VAL(lt_cv_path_LD, 2882fe5e51b7Smrg[if test -z "$LD"; then 2883fe5e51b7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2884fe5e51b7Smrg for ac_dir in $PATH; do 2885fe5e51b7Smrg IFS="$lt_save_ifs" 2886fe5e51b7Smrg test -z "$ac_dir" && ac_dir=. 2887fe5e51b7Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2888fe5e51b7Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 2889fe5e51b7Smrg # Check to see if the program is GNU ld. I'd rather use --version, 2890fe5e51b7Smrg # but apparently some variants of GNU ld only accept -v. 2891fe5e51b7Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 2892fe5e51b7Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2893fe5e51b7Smrg *GNU* | *'with BFD'*) 2894fe5e51b7Smrg test "$with_gnu_ld" != no && break 2895fe5e51b7Smrg ;; 2896fe5e51b7Smrg *) 2897fe5e51b7Smrg test "$with_gnu_ld" != yes && break 2898fe5e51b7Smrg ;; 2899fe5e51b7Smrg esac 2900fe5e51b7Smrg fi 2901fe5e51b7Smrg done 2902fe5e51b7Smrg IFS="$lt_save_ifs" 2903fe5e51b7Smrgelse 2904fe5e51b7Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 2905fe5e51b7Smrgfi]) 2906fe5e51b7SmrgLD="$lt_cv_path_LD" 2907fe5e51b7Smrgif test -n "$LD"; then 2908fe5e51b7Smrg AC_MSG_RESULT($LD) 2909fe5e51b7Smrgelse 2910fe5e51b7Smrg AC_MSG_RESULT(no) 2911fe5e51b7Smrgfi 2912fe5e51b7Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2913eda3803bSmrg_LT_PATH_LD_GNU 2914eda3803bSmrgAC_SUBST([LD]) 2915fe5e51b7Smrg 2916eda3803bSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 2917eda3803bSmrg])# LT_PATH_LD 2918fe5e51b7Smrg 2919eda3803bSmrg# Old names: 2920eda3803bSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 2921eda3803bSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 2922eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 2923eda3803bSmrgdnl AC_DEFUN([AM_PROG_LD], []) 2924eda3803bSmrgdnl AC_DEFUN([AC_PROG_LD], []) 2925eda3803bSmrg 2926eda3803bSmrg 2927eda3803bSmrg# _LT_PATH_LD_GNU 2928eda3803bSmrg#- -------------- 2929eda3803bSmrgm4_defun([_LT_PATH_LD_GNU], 2930eda3803bSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2931fe5e51b7Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2932fe5e51b7Smrgcase `$LD -v 2>&1 </dev/null` in 2933fe5e51b7Smrg*GNU* | *'with BFD'*) 2934fe5e51b7Smrg lt_cv_prog_gnu_ld=yes 2935fe5e51b7Smrg ;; 2936fe5e51b7Smrg*) 2937fe5e51b7Smrg lt_cv_prog_gnu_ld=no 2938fe5e51b7Smrg ;; 2939fe5e51b7Smrgesac]) 2940fe5e51b7Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2941eda3803bSmrg])# _LT_PATH_LD_GNU 2942fe5e51b7Smrg 2943fe5e51b7Smrg 2944eda3803bSmrg# _LT_CMD_RELOAD 2945eda3803bSmrg# -------------- 2946fe5e51b7Smrg# find reload flag for linker 2947fe5e51b7Smrg# -- PORTME Some linkers may need a different reload flag. 2948eda3803bSmrgm4_defun([_LT_CMD_RELOAD], 2949fe5e51b7Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 2950fe5e51b7Smrg lt_cv_ld_reload_flag, 2951fe5e51b7Smrg [lt_cv_ld_reload_flag='-r']) 2952fe5e51b7Smrgreload_flag=$lt_cv_ld_reload_flag 2953fe5e51b7Smrgcase $reload_flag in 2954fe5e51b7Smrg"" | " "*) ;; 2955fe5e51b7Smrg*) reload_flag=" $reload_flag" ;; 2956fe5e51b7Smrgesac 2957fe5e51b7Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 2958fe5e51b7Smrgcase $host_os in 2959fe5e51b7Smrg darwin*) 2960fe5e51b7Smrg if test "$GCC" = yes; then 2961fe5e51b7Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2962fe5e51b7Smrg else 2963fe5e51b7Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 2964fe5e51b7Smrg fi 2965fe5e51b7Smrg ;; 2966fe5e51b7Smrgesac 2967eda3803bSmrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl 2968eda3803bSmrg_LT_DECL([], [reload_cmds], [2])dnl 2969eda3803bSmrg])# _LT_CMD_RELOAD 2970fe5e51b7Smrg 2971fe5e51b7Smrg 2972eda3803bSmrg# _LT_CHECK_MAGIC_METHOD 2973eda3803bSmrg# ---------------------- 2974fe5e51b7Smrg# how to check for library dependencies 2975fe5e51b7Smrg# -- PORTME fill in with the dynamic library characteristics 2976eda3803bSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 2977eda3803bSmrg[m4_require([_LT_DECL_EGREP]) 2978eda3803bSmrgm4_require([_LT_DECL_OBJDUMP]) 2979eda3803bSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 2980fe5e51b7Smrglt_cv_deplibs_check_method, 2981fe5e51b7Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 2982fe5e51b7Smrglt_cv_file_magic_test_file= 2983fe5e51b7Smrglt_cv_deplibs_check_method='unknown' 2984fe5e51b7Smrg# Need to set the preceding variable on all platforms that support 2985fe5e51b7Smrg# interlibrary dependencies. 2986fe5e51b7Smrg# 'none' -- dependencies not supported. 2987fe5e51b7Smrg# `unknown' -- same as none, but documents that we really don't know. 2988fe5e51b7Smrg# 'pass_all' -- all dependencies passed with no checks. 2989fe5e51b7Smrg# 'test_compile' -- check by making test program. 2990fe5e51b7Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 2991fe5e51b7Smrg# which responds to the $file_magic_cmd with a given extended regex. 2992fe5e51b7Smrg# If you have `file' or equivalent on your system and you're not sure 2993fe5e51b7Smrg# whether `pass_all' will *always* work, you probably want this one. 2994fe5e51b7Smrg 2995fe5e51b7Smrgcase $host_os in 2996eda3803bSmrgaix[[4-9]]*) 2997fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 2998fe5e51b7Smrg ;; 2999fe5e51b7Smrg 3000fe5e51b7Smrgbeos*) 3001fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3002fe5e51b7Smrg ;; 3003fe5e51b7Smrg 3004fe5e51b7Smrgbsdi[[45]]*) 3005fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3006fe5e51b7Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3007fe5e51b7Smrg lt_cv_file_magic_test_file=/shlib/libc.so 3008fe5e51b7Smrg ;; 3009fe5e51b7Smrg 3010fe5e51b7Smrgcygwin*) 3011fe5e51b7Smrg # func_win32_libid is a shell function defined in ltmain.sh 3012fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3013fe5e51b7Smrg lt_cv_file_magic_cmd='func_win32_libid' 3014fe5e51b7Smrg ;; 3015fe5e51b7Smrg 3016fe5e51b7Smrgmingw* | pw32*) 3017fe5e51b7Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 3018fe5e51b7Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3019fe5e51b7Smrg # unless we find 'file', for example because we are cross-compiling. 3020fe5e51b7Smrg if ( file / ) >/dev/null 2>&1; then 3021fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3022fe5e51b7Smrg lt_cv_file_magic_cmd='func_win32_libid' 3023fe5e51b7Smrg else 3024fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 3025fe5e51b7Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3026fe5e51b7Smrg fi 3027fe5e51b7Smrg ;; 3028fe5e51b7Smrg 3029eda3803bSmrgcegcc) 3030eda3803bSmrg # use the weaker test based on 'objdump'. See mingw*. 3031eda3803bSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3032eda3803bSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3033eda3803bSmrg ;; 3034eda3803bSmrg 3035fe5e51b7Smrgdarwin* | rhapsody*) 3036fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3037fe5e51b7Smrg ;; 3038fe5e51b7Smrg 3039fe5e51b7Smrgfreebsd* | dragonfly*) 3040eda3803bSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3041fe5e51b7Smrg case $host_cpu in 3042fe5e51b7Smrg i*86 ) 3043fe5e51b7Smrg # Not sure whether the presence of OpenBSD here was a mistake. 3044fe5e51b7Smrg # Let's accept both of them until this is cleared up. 3045fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3046fe5e51b7Smrg lt_cv_file_magic_cmd=/usr/bin/file 3047fe5e51b7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3048fe5e51b7Smrg ;; 3049fe5e51b7Smrg esac 3050fe5e51b7Smrg else 3051fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3052fe5e51b7Smrg fi 3053fe5e51b7Smrg ;; 3054fe5e51b7Smrg 3055fe5e51b7Smrggnu*) 3056fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3057fe5e51b7Smrg ;; 3058fe5e51b7Smrg 3059fe5e51b7Smrghpux10.20* | hpux11*) 3060fe5e51b7Smrg lt_cv_file_magic_cmd=/usr/bin/file 3061fe5e51b7Smrg case $host_cpu in 3062fe5e51b7Smrg ia64*) 3063fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3064fe5e51b7Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3065fe5e51b7Smrg ;; 3066fe5e51b7Smrg hppa*64*) 3067fe5e51b7Smrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] 3068fe5e51b7Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3069fe5e51b7Smrg ;; 3070fe5e51b7Smrg *) 3071fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 3072fe5e51b7Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3073fe5e51b7Smrg ;; 3074fe5e51b7Smrg esac 3075fe5e51b7Smrg ;; 3076fe5e51b7Smrg 3077fe5e51b7Smrginterix[[3-9]]*) 3078fe5e51b7Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3079fe5e51b7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3080fe5e51b7Smrg ;; 3081fe5e51b7Smrg 3082fe5e51b7Smrgirix5* | irix6* | nonstopux*) 3083fe5e51b7Smrg case $LD in 3084fe5e51b7Smrg *-32|*"-32 ") libmagic=32-bit;; 3085fe5e51b7Smrg *-n32|*"-n32 ") libmagic=N32;; 3086fe5e51b7Smrg *-64|*"-64 ") libmagic=64-bit;; 3087fe5e51b7Smrg *) libmagic=never-match;; 3088fe5e51b7Smrg esac 3089fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3090fe5e51b7Smrg ;; 3091fe5e51b7Smrg 3092fe5e51b7Smrg# This must be Linux ELF. 3093fe5e51b7Smrglinux* | k*bsd*-gnu) 3094fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3095fe5e51b7Smrg ;; 3096fe5e51b7Smrg 3097fe5e51b7Smrgnetbsd*) 3098eda3803bSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3099fe5e51b7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3100fe5e51b7Smrg else 3101fe5e51b7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3102fe5e51b7Smrg fi 3103fe5e51b7Smrg ;; 3104fe5e51b7Smrg 3105fe5e51b7Smrgnewos6*) 3106fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3107fe5e51b7Smrg lt_cv_file_magic_cmd=/usr/bin/file 3108fe5e51b7Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3109fe5e51b7Smrg ;; 3110fe5e51b7Smrg 3111eda3803bSmrg*nto* | *qnx*) 3112eda3803bSmrg lt_cv_deplibs_check_method=pass_all 3113fe5e51b7Smrg ;; 3114fe5e51b7Smrg 3115fe5e51b7Smrgopenbsd*) 3116eda3803bSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3117fe5e51b7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3118fe5e51b7Smrg else 3119fe5e51b7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3120fe5e51b7Smrg fi 3121fe5e51b7Smrg ;; 3122fe5e51b7Smrg 3123fe5e51b7Smrgosf3* | osf4* | osf5*) 3124fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3125fe5e51b7Smrg ;; 3126fe5e51b7Smrg 3127fe5e51b7Smrgrdos*) 3128fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3129fe5e51b7Smrg ;; 3130fe5e51b7Smrg 3131fe5e51b7Smrgsolaris*) 3132fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3133fe5e51b7Smrg ;; 3134fe5e51b7Smrg 3135eda3803bSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3136eda3803bSmrg lt_cv_deplibs_check_method=pass_all 3137eda3803bSmrg ;; 3138eda3803bSmrg 3139fe5e51b7Smrgsysv4 | sysv4.3*) 3140fe5e51b7Smrg case $host_vendor in 3141fe5e51b7Smrg motorola) 3142fe5e51b7Smrg 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]]' 3143fe5e51b7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3144fe5e51b7Smrg ;; 3145fe5e51b7Smrg ncr) 3146fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3147fe5e51b7Smrg ;; 3148fe5e51b7Smrg sequent) 3149fe5e51b7Smrg lt_cv_file_magic_cmd='/bin/file' 3150fe5e51b7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3151fe5e51b7Smrg ;; 3152fe5e51b7Smrg sni) 3153fe5e51b7Smrg lt_cv_file_magic_cmd='/bin/file' 3154fe5e51b7Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3155fe5e51b7Smrg lt_cv_file_magic_test_file=/lib/libc.so 3156fe5e51b7Smrg ;; 3157fe5e51b7Smrg siemens) 3158fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3159fe5e51b7Smrg ;; 3160fe5e51b7Smrg pc) 3161fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3162fe5e51b7Smrg ;; 3163fe5e51b7Smrg esac 3164fe5e51b7Smrg ;; 3165fe5e51b7Smrg 3166eda3803bSmrgtpf*) 3167fe5e51b7Smrg lt_cv_deplibs_check_method=pass_all 3168fe5e51b7Smrg ;; 3169fe5e51b7Smrgesac 3170fe5e51b7Smrg]) 3171fe5e51b7Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 3172fe5e51b7Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 3173fe5e51b7Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3174eda3803bSmrg 3175eda3803bSmrg_LT_DECL([], [deplibs_check_method], [1], 3176eda3803bSmrg [Method to check whether dependent libraries are shared objects]) 3177eda3803bSmrg_LT_DECL([], [file_magic_cmd], [1], 3178eda3803bSmrg [Command to use when deplibs_check_method == "file_magic"]) 3179eda3803bSmrg])# _LT_CHECK_MAGIC_METHOD 3180fe5e51b7Smrg 3181fe5e51b7Smrg 3182eda3803bSmrg# LT_PATH_NM 3183fe5e51b7Smrg# ---------- 3184eda3803bSmrg# find the pathname to a BSD- or MS-compatible name lister 3185eda3803bSmrgAC_DEFUN([LT_PATH_NM], 3186eda3803bSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3187eda3803bSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3188fe5e51b7Smrg[if test -n "$NM"; then 3189fe5e51b7Smrg # Let the user override the test. 3190fe5e51b7Smrg lt_cv_path_NM="$NM" 3191fe5e51b7Smrgelse 3192fe5e51b7Smrg lt_nm_to_check="${ac_tool_prefix}nm" 3193fe5e51b7Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3194fe5e51b7Smrg lt_nm_to_check="$lt_nm_to_check nm" 3195fe5e51b7Smrg fi 3196fe5e51b7Smrg for lt_tmp_nm in $lt_nm_to_check; do 3197fe5e51b7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3198fe5e51b7Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3199fe5e51b7Smrg IFS="$lt_save_ifs" 3200fe5e51b7Smrg test -z "$ac_dir" && ac_dir=. 3201fe5e51b7Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 3202fe5e51b7Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3203fe5e51b7Smrg # Check to see if the nm accepts a BSD-compat flag. 3204fe5e51b7Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3205fe5e51b7Smrg # nm: unknown option "B" ignored 3206fe5e51b7Smrg # Tru64's nm complains that /dev/null is an invalid object file 3207fe5e51b7Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3208fe5e51b7Smrg */dev/null* | *'Invalid file or object type'*) 3209fe5e51b7Smrg lt_cv_path_NM="$tmp_nm -B" 3210fe5e51b7Smrg break 3211fe5e51b7Smrg ;; 3212fe5e51b7Smrg *) 3213fe5e51b7Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3214fe5e51b7Smrg */dev/null*) 3215fe5e51b7Smrg lt_cv_path_NM="$tmp_nm -p" 3216fe5e51b7Smrg break 3217fe5e51b7Smrg ;; 3218fe5e51b7Smrg *) 3219fe5e51b7Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3220fe5e51b7Smrg continue # so that we can try to find one that supports BSD flags 3221fe5e51b7Smrg ;; 3222fe5e51b7Smrg esac 3223fe5e51b7Smrg ;; 3224fe5e51b7Smrg esac 3225fe5e51b7Smrg fi 3226fe5e51b7Smrg done 3227fe5e51b7Smrg IFS="$lt_save_ifs" 3228fe5e51b7Smrg done 3229eda3803bSmrg : ${lt_cv_path_NM=no} 3230fe5e51b7Smrgfi]) 3231eda3803bSmrgif test "$lt_cv_path_NM" != "no"; then 3232eda3803bSmrg NM="$lt_cv_path_NM" 3233eda3803bSmrgelse 3234eda3803bSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 3235eda3803bSmrg AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 3236eda3803bSmrg AC_SUBST([DUMPBIN]) 3237eda3803bSmrg if test "$DUMPBIN" != ":"; then 3238eda3803bSmrg NM="$DUMPBIN" 3239eda3803bSmrg fi 3240eda3803bSmrgfi 3241eda3803bSmrgtest -z "$NM" && NM=nm 3242eda3803bSmrgAC_SUBST([NM]) 3243eda3803bSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3244eda3803bSmrg 3245eda3803bSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3246eda3803bSmrg [lt_cv_nm_interface="BSD nm" 3247eda3803bSmrg echo "int some_variable = 0;" > conftest.$ac_ext 3248eda3803bSmrg (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3249eda3803bSmrg (eval "$ac_compile" 2>conftest.err) 3250eda3803bSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3251eda3803bSmrg (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3252eda3803bSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3253eda3803bSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3254eda3803bSmrg (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) 3255eda3803bSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 3256eda3803bSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3257eda3803bSmrg lt_cv_nm_interface="MS dumpbin" 3258eda3803bSmrg fi 3259eda3803bSmrg rm -f conftest*]) 3260eda3803bSmrg])# LT_PATH_NM 3261fe5e51b7Smrg 3262eda3803bSmrg# Old names: 3263eda3803bSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3264eda3803bSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3265eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 3266eda3803bSmrgdnl AC_DEFUN([AM_PROG_NM], []) 3267eda3803bSmrgdnl AC_DEFUN([AC_PROG_NM], []) 3268fe5e51b7Smrg 3269eda3803bSmrg 3270eda3803bSmrg# LT_LIB_M 3271eda3803bSmrg# -------- 3272fe5e51b7Smrg# check for math library 3273eda3803bSmrgAC_DEFUN([LT_LIB_M], 3274fe5e51b7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3275fe5e51b7SmrgLIBM= 3276fe5e51b7Smrgcase $host in 3277fe5e51b7Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 3278fe5e51b7Smrg # These system don't have libm, or don't need it 3279fe5e51b7Smrg ;; 3280fe5e51b7Smrg*-ncr-sysv4.3*) 3281fe5e51b7Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3282fe5e51b7Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3283fe5e51b7Smrg ;; 3284fe5e51b7Smrg*) 3285fe5e51b7Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3286fe5e51b7Smrg ;; 3287fe5e51b7Smrgesac 3288eda3803bSmrgAC_SUBST([LIBM]) 3289eda3803bSmrg])# LT_LIB_M 3290fe5e51b7Smrg 3291eda3803bSmrg# Old name: 3292eda3803bSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3293eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 3294eda3803bSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3295fe5e51b7Smrg 3296fe5e51b7Smrg 3297eda3803bSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3298eda3803bSmrg# ------------------------------- 3299eda3803bSmrgm4_defun([_LT_COMPILER_NO_RTTI], 3300eda3803bSmrg[m4_require([_LT_TAG_COMPILER])dnl 3301fe5e51b7Smrg 3302eda3803bSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3303fe5e51b7Smrg 3304eda3803bSmrgif test "$GCC" = yes; then 3305eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 3306fe5e51b7Smrg 3307eda3803bSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3308eda3803bSmrg lt_cv_prog_compiler_rtti_exceptions, 3309eda3803bSmrg [-fno-rtti -fno-exceptions], [], 3310eda3803bSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3311eda3803bSmrgfi 3312eda3803bSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3313eda3803bSmrg [Compiler flag to turn off builtin functions]) 3314eda3803bSmrg])# _LT_COMPILER_NO_RTTI 3315fe5e51b7Smrg 3316fe5e51b7Smrg 3317eda3803bSmrg# _LT_CMD_GLOBAL_SYMBOLS 3318eda3803bSmrg# ---------------------- 3319eda3803bSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3320eda3803bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3321eda3803bSmrgAC_REQUIRE([AC_PROG_CC])dnl 3322eda3803bSmrgAC_REQUIRE([LT_PATH_NM])dnl 3323eda3803bSmrgAC_REQUIRE([LT_PATH_LD])dnl 3324eda3803bSmrgm4_require([_LT_DECL_SED])dnl 3325eda3803bSmrgm4_require([_LT_DECL_EGREP])dnl 3326eda3803bSmrgm4_require([_LT_TAG_COMPILER])dnl 3327fe5e51b7Smrg 3328eda3803bSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3329eda3803bSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3330eda3803bSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3331fe5e51b7Smrg[ 3332eda3803bSmrg# These are sane defaults that work on at least a few old systems. 3333eda3803bSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3334fe5e51b7Smrg 3335eda3803bSmrg# Character class describing NM global symbol codes. 3336eda3803bSmrgsymcode='[[BCDEGRST]]' 3337fe5e51b7Smrg 3338eda3803bSmrg# Regexp to match symbols that can be accessed directly from C. 3339eda3803bSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3340fe5e51b7Smrg 3341eda3803bSmrg# Define system-specific variables. 3342eda3803bSmrgcase $host_os in 3343eda3803bSmrgaix*) 3344eda3803bSmrg symcode='[[BCDT]]' 3345eda3803bSmrg ;; 3346eda3803bSmrgcygwin* | mingw* | pw32* | cegcc*) 3347eda3803bSmrg symcode='[[ABCDGISTW]]' 3348eda3803bSmrg ;; 3349eda3803bSmrghpux*) 3350eda3803bSmrg if test "$host_cpu" = ia64; then 3351eda3803bSmrg symcode='[[ABCDEGRST]]' 3352eda3803bSmrg fi 3353eda3803bSmrg ;; 3354eda3803bSmrgirix* | nonstopux*) 3355eda3803bSmrg symcode='[[BCDEGRST]]' 3356eda3803bSmrg ;; 3357eda3803bSmrgosf*) 3358eda3803bSmrg symcode='[[BCDEGQRST]]' 3359eda3803bSmrg ;; 3360eda3803bSmrgsolaris*) 3361eda3803bSmrg symcode='[[BDRT]]' 3362eda3803bSmrg ;; 3363eda3803bSmrgsco3.2v5*) 3364eda3803bSmrg symcode='[[DT]]' 3365eda3803bSmrg ;; 3366eda3803bSmrgsysv4.2uw2*) 3367eda3803bSmrg symcode='[[DT]]' 3368eda3803bSmrg ;; 3369eda3803bSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3370eda3803bSmrg symcode='[[ABDT]]' 3371eda3803bSmrg ;; 3372eda3803bSmrgsysv4) 3373eda3803bSmrg symcode='[[DFNSTU]]' 3374eda3803bSmrg ;; 3375eda3803bSmrgesac 3376fe5e51b7Smrg 3377eda3803bSmrg# If we're using GNU nm, then use its standard symbol codes. 3378eda3803bSmrgcase `$NM -V 2>&1` in 3379eda3803bSmrg*GNU* | *'with BFD'*) 3380eda3803bSmrg symcode='[[ABCDGIRSTW]]' ;; 3381eda3803bSmrgesac 3382fe5e51b7Smrg 3383eda3803bSmrg# Transform an extracted symbol line into a proper C declaration. 3384eda3803bSmrg# Some systems (esp. on ia64) link data and code symbols differently, 3385eda3803bSmrg# so use this general approach. 3386eda3803bSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3387fe5e51b7Smrg 3388eda3803bSmrg# Transform an extracted symbol line into symbol name and symbol address 3389eda3803bSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3390eda3803bSmrglt_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'" 3391fe5e51b7Smrg 3392eda3803bSmrg# Handle CRLF in mingw tool chain 3393eda3803bSmrgopt_cr= 3394eda3803bSmrgcase $build_os in 3395eda3803bSmrgmingw*) 3396eda3803bSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3397fe5e51b7Smrg ;; 3398fe5e51b7Smrgesac 3399fe5e51b7Smrg 3400eda3803bSmrg# Try without a prefix underscore, then with it. 3401eda3803bSmrgfor ac_symprfx in "" "_"; do 3402fe5e51b7Smrg 3403eda3803bSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3404eda3803bSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3405fe5e51b7Smrg 3406eda3803bSmrg # Write the raw and C identifiers. 3407eda3803bSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3408eda3803bSmrg # Fake it for dumpbin and say T for any non-static function 3409eda3803bSmrg # and D for any global variable. 3410eda3803bSmrg # Also find C++ and __fastcall symbols from MSVC++, 3411eda3803bSmrg # which start with @ or ?. 3412eda3803bSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3413eda3803bSmrg" {last_section=section; section=\$ 3};"\ 3414eda3803bSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3415eda3803bSmrg" \$ 0!~/External *\|/{next};"\ 3416eda3803bSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3417eda3803bSmrg" {if(hide[section]) next};"\ 3418eda3803bSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3419eda3803bSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3420eda3803bSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3421eda3803bSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3422eda3803bSmrg" ' prfx=^$ac_symprfx]" 3423eda3803bSmrg else 3424eda3803bSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3425eda3803bSmrg fi 3426fe5e51b7Smrg 3427eda3803bSmrg # Check to see that the pipe works correctly. 3428eda3803bSmrg pipe_works=no 3429fe5e51b7Smrg 3430eda3803bSmrg rm -f conftest* 3431eda3803bSmrg cat > conftest.$ac_ext <<_LT_EOF 3432eda3803bSmrg#ifdef __cplusplus 3433eda3803bSmrgextern "C" { 3434eda3803bSmrg#endif 3435eda3803bSmrgchar nm_test_var; 3436eda3803bSmrgvoid nm_test_func(void); 3437eda3803bSmrgvoid nm_test_func(void){} 3438eda3803bSmrg#ifdef __cplusplus 3439eda3803bSmrg} 3440eda3803bSmrg#endif 3441eda3803bSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 3442eda3803bSmrg_LT_EOF 3443fe5e51b7Smrg 3444eda3803bSmrg if AC_TRY_EVAL(ac_compile); then 3445eda3803bSmrg # Now try to grab the symbols. 3446eda3803bSmrg nlist=conftest.nm 3447eda3803bSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 3448eda3803bSmrg # Try sorting and uniquifying the output. 3449eda3803bSmrg if sort "$nlist" | uniq > "$nlist"T; then 3450eda3803bSmrg mv -f "$nlist"T "$nlist" 3451eda3803bSmrg else 3452eda3803bSmrg rm -f "$nlist"T 3453eda3803bSmrg fi 3454fe5e51b7Smrg 3455eda3803bSmrg # Make sure that we snagged all the symbols we need. 3456eda3803bSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3457eda3803bSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3458eda3803bSmrg cat <<_LT_EOF > conftest.$ac_ext 3459eda3803bSmrg#ifdef __cplusplus 3460eda3803bSmrgextern "C" { 3461eda3803bSmrg#endif 3462fe5e51b7Smrg 3463eda3803bSmrg_LT_EOF 3464eda3803bSmrg # Now generate the symbol file. 3465eda3803bSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3466fe5e51b7Smrg 3467eda3803bSmrg cat <<_LT_EOF >> conftest.$ac_ext 3468fe5e51b7Smrg 3469eda3803bSmrg/* The mapping between symbol names and symbols. */ 3470eda3803bSmrgconst struct { 3471eda3803bSmrg const char *name; 3472eda3803bSmrg void *address; 3473eda3803bSmrg} 3474eda3803bSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3475eda3803bSmrg{ 3476eda3803bSmrg { "@PROGRAM@", (void *) 0 }, 3477eda3803bSmrg_LT_EOF 3478eda3803bSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3479eda3803bSmrg cat <<\_LT_EOF >> conftest.$ac_ext 3480eda3803bSmrg {0, (void *) 0} 3481eda3803bSmrg}; 3482fe5e51b7Smrg 3483eda3803bSmrg/* This works around a problem in FreeBSD linker */ 3484eda3803bSmrg#ifdef FREEBSD_WORKAROUND 3485eda3803bSmrgstatic const void *lt_preloaded_setup() { 3486eda3803bSmrg return lt__PROGRAM__LTX_preloaded_symbols; 3487eda3803bSmrg} 3488eda3803bSmrg#endif 3489fe5e51b7Smrg 3490eda3803bSmrg#ifdef __cplusplus 3491eda3803bSmrg} 3492eda3803bSmrg#endif 3493eda3803bSmrg_LT_EOF 3494eda3803bSmrg # Now try linking the two files. 3495eda3803bSmrg mv conftest.$ac_objext conftstm.$ac_objext 3496eda3803bSmrg lt_save_LIBS="$LIBS" 3497eda3803bSmrg lt_save_CFLAGS="$CFLAGS" 3498eda3803bSmrg LIBS="conftstm.$ac_objext" 3499eda3803bSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3500eda3803bSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3501eda3803bSmrg pipe_works=yes 3502eda3803bSmrg fi 3503eda3803bSmrg LIBS="$lt_save_LIBS" 3504eda3803bSmrg CFLAGS="$lt_save_CFLAGS" 3505eda3803bSmrg else 3506eda3803bSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3507eda3803bSmrg fi 3508eda3803bSmrg else 3509eda3803bSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3510eda3803bSmrg fi 3511fe5e51b7Smrg else 3512eda3803bSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3513fe5e51b7Smrg fi 3514fe5e51b7Smrg else 3515eda3803bSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3516eda3803bSmrg cat conftest.$ac_ext >&5 3517fe5e51b7Smrg fi 3518eda3803bSmrg rm -rf conftest* conftst* 3519fe5e51b7Smrg 3520eda3803bSmrg # Do not use the global_symbol_pipe unless it works. 3521eda3803bSmrg if test "$pipe_works" = yes; then 3522eda3803bSmrg break 3523eda3803bSmrg else 3524eda3803bSmrg lt_cv_sys_global_symbol_pipe= 3525eda3803bSmrg fi 3526eda3803bSmrgdone 3527eda3803bSmrg]) 3528eda3803bSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3529eda3803bSmrg lt_cv_sys_global_symbol_to_cdecl= 3530eda3803bSmrgfi 3531eda3803bSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3532eda3803bSmrg AC_MSG_RESULT(failed) 3533fe5e51b7Smrgelse 3534eda3803bSmrg AC_MSG_RESULT(ok) 3535fe5e51b7Smrgfi 3536fe5e51b7Smrg 3537eda3803bSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3538eda3803bSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 3539eda3803bSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3540eda3803bSmrg [Transform the output of nm in a proper C declaration]) 3541eda3803bSmrg_LT_DECL([global_symbol_to_c_name_address], 3542eda3803bSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3543eda3803bSmrg [Transform the output of nm in a C name address pair]) 3544eda3803bSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3545eda3803bSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3546eda3803bSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3547eda3803bSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 3548fe5e51b7Smrg 3549fe5e51b7Smrg 3550eda3803bSmrg# _LT_COMPILER_PIC([TAGNAME]) 3551eda3803bSmrg# --------------------------- 3552eda3803bSmrgm4_defun([_LT_COMPILER_PIC], 3553eda3803bSmrg[m4_require([_LT_TAG_COMPILER])dnl 3554eda3803bSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3555eda3803bSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3556eda3803bSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3557fe5e51b7Smrg 3558eda3803bSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 3559eda3803bSmrgm4_if([$1], [CXX], [ 3560eda3803bSmrg # C++ specific cases for pic, static, wl, etc. 3561eda3803bSmrg if test "$GXX" = yes; then 3562eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3563eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3564fe5e51b7Smrg 3565eda3803bSmrg case $host_os in 3566eda3803bSmrg aix*) 3567eda3803bSmrg # All AIX code is PIC. 3568fe5e51b7Smrg if test "$host_cpu" = ia64; then 3569eda3803bSmrg # AIX 5 now supports IA64 processor 3570eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3571fe5e51b7Smrg fi 3572fe5e51b7Smrg ;; 3573fe5e51b7Smrg 3574eda3803bSmrg amigaos*) 3575fe5e51b7Smrg case $host_cpu in 3576eda3803bSmrg powerpc) 3577eda3803bSmrg # see comment about AmigaOS4 .so support 3578eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3579eda3803bSmrg ;; 3580eda3803bSmrg m68k) 3581eda3803bSmrg # FIXME: we need at least 68020 code to build shared libraries, but 3582eda3803bSmrg # adding the `-m68020' flag to GCC prevents building anything better, 3583eda3803bSmrg # like `-m68040'. 3584eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3585fe5e51b7Smrg ;; 3586fe5e51b7Smrg esac 3587eda3803bSmrg ;; 3588eda3803bSmrg 3589eda3803bSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3590eda3803bSmrg # PIC is the default for these OSes. 3591eda3803bSmrg ;; 3592eda3803bSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3593eda3803bSmrg # This hack is so that the source file can tell whether it is being 3594eda3803bSmrg # built for inclusion in a dll (and should export symbols for example). 3595eda3803bSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3596eda3803bSmrg # (--disable-auto-import) libraries 3597eda3803bSmrg m4_if([$1], [GCJ], [], 3598eda3803bSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3599eda3803bSmrg ;; 3600eda3803bSmrg darwin* | rhapsody*) 3601eda3803bSmrg # PIC is the default on this platform 3602eda3803bSmrg # Common symbols not allowed in MH_DYLIB files 3603eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3604eda3803bSmrg ;; 3605eda3803bSmrg *djgpp*) 3606eda3803bSmrg # DJGPP does not support shared libraries at all 3607eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3608eda3803bSmrg ;; 3609eda3803bSmrg interix[[3-9]]*) 3610eda3803bSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3611eda3803bSmrg # Instead, we relocate shared libraries at runtime. 3612eda3803bSmrg ;; 3613eda3803bSmrg sysv4*MP*) 3614eda3803bSmrg if test -d /usr/nec; then 3615eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3616eda3803bSmrg fi 3617eda3803bSmrg ;; 3618eda3803bSmrg hpux*) 3619eda3803bSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3620eda3803bSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3621eda3803bSmrg # sets the default TLS model and affects inlining. 3622eda3803bSmrg case $host_cpu in 3623eda3803bSmrg hppa*64*) 3624eda3803bSmrg ;; 3625eda3803bSmrg *) 3626eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3627eda3803bSmrg ;; 3628eda3803bSmrg esac 3629eda3803bSmrg ;; 3630eda3803bSmrg *qnx* | *nto*) 3631eda3803bSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3632eda3803bSmrg # it will coredump. 3633eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3634fe5e51b7Smrg ;; 3635fe5e51b7Smrg *) 3636eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3637fe5e51b7Smrg ;; 3638fe5e51b7Smrg esac 3639eda3803bSmrg else 3640eda3803bSmrg case $host_os in 3641eda3803bSmrg aix[[4-9]]*) 3642eda3803bSmrg # All AIX code is PIC. 3643eda3803bSmrg if test "$host_cpu" = ia64; then 3644eda3803bSmrg # AIX 5 now supports IA64 processor 3645eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3646eda3803bSmrg else 3647eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3648eda3803bSmrg fi 3649fe5e51b7Smrg ;; 3650eda3803bSmrg chorus*) 3651eda3803bSmrg case $cc_basename in 3652eda3803bSmrg cxch68*) 3653eda3803bSmrg # Green Hills C++ Compiler 3654eda3803bSmrg # _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" 3655fe5e51b7Smrg ;; 3656fe5e51b7Smrg esac 3657fe5e51b7Smrg ;; 3658eda3803bSmrg dgux*) 3659eda3803bSmrg case $cc_basename in 3660eda3803bSmrg ec++*) 3661eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3662eda3803bSmrg ;; 3663eda3803bSmrg ghcx*) 3664eda3803bSmrg # Green Hills C++ Compiler 3665eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3666eda3803bSmrg ;; 3667eda3803bSmrg *) 3668eda3803bSmrg ;; 3669eda3803bSmrg esac 3670eda3803bSmrg ;; 3671eda3803bSmrg freebsd* | dragonfly*) 3672eda3803bSmrg # FreeBSD uses GNU C++ 3673eda3803bSmrg ;; 3674eda3803bSmrg hpux9* | hpux10* | hpux11*) 3675eda3803bSmrg case $cc_basename in 3676eda3803bSmrg CC*) 3677eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3678eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3679eda3803bSmrg if test "$host_cpu" != ia64; then 3680eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3681eda3803bSmrg fi 3682eda3803bSmrg ;; 3683eda3803bSmrg aCC*) 3684eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3685eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3686fe5e51b7Smrg case $host_cpu in 3687eda3803bSmrg hppa*64*|ia64*) 3688eda3803bSmrg # +Z the default 3689fe5e51b7Smrg ;; 3690fe5e51b7Smrg *) 3691eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3692fe5e51b7Smrg ;; 3693fe5e51b7Smrg esac 3694eda3803bSmrg ;; 3695eda3803bSmrg *) 3696eda3803bSmrg ;; 3697fe5e51b7Smrg esac 3698fe5e51b7Smrg ;; 3699eda3803bSmrg interix*) 3700eda3803bSmrg # This is c89, which is MS Visual C++ (no shared libs) 3701eda3803bSmrg # Anyone wants to do a port? 3702fe5e51b7Smrg ;; 3703eda3803bSmrg irix5* | irix6* | nonstopux*) 3704eda3803bSmrg case $cc_basename in 3705eda3803bSmrg CC*) 3706eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3707eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3708eda3803bSmrg # CC pic flag -KPIC is the default. 3709eda3803bSmrg ;; 3710eda3803bSmrg *) 3711eda3803bSmrg ;; 3712fe5e51b7Smrg esac 3713fe5e51b7Smrg ;; 3714eda3803bSmrg linux* | k*bsd*-gnu) 3715eda3803bSmrg case $cc_basename in 3716eda3803bSmrg KCC*) 3717eda3803bSmrg # KAI C++ Compiler 3718eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3719eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3720eda3803bSmrg ;; 3721eda3803bSmrg ecpc* ) 3722eda3803bSmrg # old Intel C++ for x86_64 which still supported -KPIC. 3723eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3724eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3725eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3726eda3803bSmrg ;; 3727eda3803bSmrg icpc* ) 3728eda3803bSmrg # Intel C++, used to be incompatible with GCC. 3729eda3803bSmrg # ICC 10 doesn't accept -KPIC any more. 3730eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3731eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3732eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3733eda3803bSmrg ;; 3734eda3803bSmrg pgCC* | pgcpp*) 3735eda3803bSmrg # Portland Group C++ compiler 3736eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3737eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 3738eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3739eda3803bSmrg ;; 3740eda3803bSmrg cxx*) 3741eda3803bSmrg # Compaq C++ 3742eda3803bSmrg # Make sure the PIC flag is empty. It appears that all Alpha 3743eda3803bSmrg # Linux and Compaq Tru64 Unix objects are PIC. 3744eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3745eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3746eda3803bSmrg ;; 3747eda3803bSmrg xlc* | xlC*) 3748eda3803bSmrg # IBM XL 8.0 on PPC 3749eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3750eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 3751eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 3752eda3803bSmrg ;; 3753eda3803bSmrg *) 3754eda3803bSmrg case `$CC -V 2>&1 | sed 5q` in 3755eda3803bSmrg *Sun\ C*) 3756eda3803bSmrg # Sun C++ 5.9 3757eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3758eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3759eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3760eda3803bSmrg ;; 3761eda3803bSmrg esac 3762eda3803bSmrg ;; 3763eda3803bSmrg esac 3764fe5e51b7Smrg ;; 3765eda3803bSmrg lynxos*) 3766fe5e51b7Smrg ;; 3767eda3803bSmrg m88k*) 3768fe5e51b7Smrg ;; 3769eda3803bSmrg mvs*) 3770eda3803bSmrg case $cc_basename in 3771eda3803bSmrg cxx*) 3772eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 3773eda3803bSmrg ;; 3774eda3803bSmrg *) 3775eda3803bSmrg ;; 3776eda3803bSmrg esac 3777fe5e51b7Smrg ;; 3778eda3803bSmrg netbsd*) 3779fe5e51b7Smrg ;; 3780eda3803bSmrg *qnx* | *nto*) 3781eda3803bSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3782eda3803bSmrg # it will coredump. 3783eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3784eda3803bSmrg ;; 3785eda3803bSmrg osf3* | osf4* | osf5*) 3786eda3803bSmrg case $cc_basename in 3787eda3803bSmrg KCC*) 3788eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3789eda3803bSmrg ;; 3790eda3803bSmrg RCC*) 3791eda3803bSmrg # Rational C++ 2.4.1 3792eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3793eda3803bSmrg ;; 3794eda3803bSmrg cxx*) 3795eda3803bSmrg # Digital/Compaq C++ 3796eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3797eda3803bSmrg # Make sure the PIC flag is empty. It appears that all Alpha 3798eda3803bSmrg # Linux and Compaq Tru64 Unix objects are PIC. 3799eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3800eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3801eda3803bSmrg ;; 3802eda3803bSmrg *) 3803eda3803bSmrg ;; 3804eda3803bSmrg esac 3805fe5e51b7Smrg ;; 3806eda3803bSmrg psos*) 3807fe5e51b7Smrg ;; 3808eda3803bSmrg solaris*) 3809eda3803bSmrg case $cc_basename in 3810eda3803bSmrg CC*) 3811eda3803bSmrg # Sun C++ 4.2, 5.x and Centerline C++ 3812eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3813eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3814eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3815eda3803bSmrg ;; 3816eda3803bSmrg gcx*) 3817eda3803bSmrg # Green Hills C++ Compiler 3818eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 3819eda3803bSmrg ;; 3820eda3803bSmrg *) 3821eda3803bSmrg ;; 3822eda3803bSmrg esac 3823fe5e51b7Smrg ;; 3824eda3803bSmrg sunos4*) 3825eda3803bSmrg case $cc_basename in 3826eda3803bSmrg CC*) 3827eda3803bSmrg # Sun C++ 4.x 3828eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3829eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3830eda3803bSmrg ;; 3831eda3803bSmrg lcc*) 3832eda3803bSmrg # Lucid 3833eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3834eda3803bSmrg ;; 3835eda3803bSmrg *) 3836eda3803bSmrg ;; 3837eda3803bSmrg esac 3838fe5e51b7Smrg ;; 3839eda3803bSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 3840eda3803bSmrg case $cc_basename in 3841eda3803bSmrg CC*) 3842eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3843eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3844eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3845eda3803bSmrg ;; 3846eda3803bSmrg esac 3847fe5e51b7Smrg ;; 3848eda3803bSmrg tandem*) 3849eda3803bSmrg case $cc_basename in 3850eda3803bSmrg NCC*) 3851eda3803bSmrg # NonStop-UX NCC 3.20 3852eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3853eda3803bSmrg ;; 3854fe5e51b7Smrg *) 3855fe5e51b7Smrg ;; 3856fe5e51b7Smrg esac 3857fe5e51b7Smrg ;; 3858eda3803bSmrg vxworks*) 3859fe5e51b7Smrg ;; 3860fe5e51b7Smrg *) 3861eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 3862eda3803bSmrg ;; 3863eda3803bSmrg esac 3864eda3803bSmrg fi 3865eda3803bSmrg], 3866eda3803bSmrg[ 3867eda3803bSmrg if test "$GCC" = yes; then 3868eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3869eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3870fe5e51b7Smrg 3871eda3803bSmrg case $host_os in 3872eda3803bSmrg aix*) 3873eda3803bSmrg # All AIX code is PIC. 3874eda3803bSmrg if test "$host_cpu" = ia64; then 3875eda3803bSmrg # AIX 5 now supports IA64 processor 3876eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3877eda3803bSmrg fi 3878eda3803bSmrg ;; 3879fe5e51b7Smrg 3880eda3803bSmrg amigaos*) 3881eda3803bSmrg case $host_cpu in 3882eda3803bSmrg powerpc) 3883eda3803bSmrg # see comment about AmigaOS4 .so support 3884eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3885eda3803bSmrg ;; 3886eda3803bSmrg m68k) 3887eda3803bSmrg # FIXME: we need at least 68020 code to build shared libraries, but 3888eda3803bSmrg # adding the `-m68020' flag to GCC prevents building anything better, 3889eda3803bSmrg # like `-m68040'. 3890eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3891eda3803bSmrg ;; 3892eda3803bSmrg esac 3893eda3803bSmrg ;; 3894fe5e51b7Smrg 3895eda3803bSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3896eda3803bSmrg # PIC is the default for these OSes. 3897eda3803bSmrg ;; 3898eda3803bSmrg 3899eda3803bSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 3900eda3803bSmrg # This hack is so that the source file can tell whether it is being 3901eda3803bSmrg # built for inclusion in a dll (and should export symbols for example). 3902eda3803bSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3903eda3803bSmrg # (--disable-auto-import) libraries 3904eda3803bSmrg m4_if([$1], [GCJ], [], 3905eda3803bSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3906eda3803bSmrg ;; 3907eda3803bSmrg 3908eda3803bSmrg darwin* | rhapsody*) 3909eda3803bSmrg # PIC is the default on this platform 3910eda3803bSmrg # Common symbols not allowed in MH_DYLIB files 3911eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3912eda3803bSmrg ;; 3913eda3803bSmrg 3914eda3803bSmrg hpux*) 3915eda3803bSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3916eda3803bSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3917eda3803bSmrg # sets the default TLS model and affects inlining. 3918eda3803bSmrg case $host_cpu in 3919eda3803bSmrg hppa*64*) 3920eda3803bSmrg # +Z the default 3921fe5e51b7Smrg ;; 3922fe5e51b7Smrg *) 3923eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3924fe5e51b7Smrg ;; 3925eda3803bSmrg esac 3926eda3803bSmrg ;; 3927eda3803bSmrg 3928eda3803bSmrg interix[[3-9]]*) 3929eda3803bSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3930eda3803bSmrg # Instead, we relocate shared libraries at runtime. 3931eda3803bSmrg ;; 3932eda3803bSmrg 3933eda3803bSmrg msdosdjgpp*) 3934eda3803bSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 3935eda3803bSmrg # on systems that don't support them. 3936eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 3937eda3803bSmrg enable_shared=no 3938eda3803bSmrg ;; 3939eda3803bSmrg 3940eda3803bSmrg *nto* | *qnx*) 3941eda3803bSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3942eda3803bSmrg # it will coredump. 3943eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3944eda3803bSmrg ;; 3945eda3803bSmrg 3946eda3803bSmrg sysv4*MP*) 3947eda3803bSmrg if test -d /usr/nec; then 3948eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3949eda3803bSmrg fi 3950eda3803bSmrg ;; 3951eda3803bSmrg 3952eda3803bSmrg *) 3953eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3954eda3803bSmrg ;; 3955fe5e51b7Smrg esac 3956eda3803bSmrg else 3957eda3803bSmrg # PORTME Check for flag to pass linker flags through the system compiler. 3958eda3803bSmrg case $host_os in 3959eda3803bSmrg aix*) 3960eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3961eda3803bSmrg if test "$host_cpu" = ia64; then 3962eda3803bSmrg # AIX 5 now supports IA64 processor 3963eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3964eda3803bSmrg else 3965eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3966eda3803bSmrg fi 3967eda3803bSmrg ;; 3968eda3803bSmrg 3969eda3803bSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 3970eda3803bSmrg # This hack is so that the source file can tell whether it is being 3971eda3803bSmrg # built for inclusion in a dll (and should export symbols for example). 3972eda3803bSmrg m4_if([$1], [GCJ], [], 3973eda3803bSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3974eda3803bSmrg ;; 3975eda3803bSmrg 3976eda3803bSmrg hpux9* | hpux10* | hpux11*) 3977eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3978eda3803bSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 3979eda3803bSmrg # not for PA HP-UX. 3980eda3803bSmrg case $host_cpu in 3981eda3803bSmrg hppa*64*|ia64*) 3982eda3803bSmrg # +Z the default 3983fe5e51b7Smrg ;; 3984fe5e51b7Smrg *) 3985eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3986fe5e51b7Smrg ;; 3987eda3803bSmrg esac 3988eda3803bSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 3989eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3990eda3803bSmrg ;; 3991eda3803bSmrg 3992eda3803bSmrg irix5* | irix6* | nonstopux*) 3993eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3994eda3803bSmrg # PIC (with -KPIC) is the default. 3995eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3996eda3803bSmrg ;; 3997eda3803bSmrg 3998eda3803bSmrg linux* | k*bsd*-gnu) 3999eda3803bSmrg case $cc_basename in 4000eda3803bSmrg # old Intel for x86_64 which still supported -KPIC. 4001eda3803bSmrg ecc*) 4002eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4003eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4004eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4005eda3803bSmrg ;; 4006eda3803bSmrg # icc used to be incompatible with GCC. 4007eda3803bSmrg # ICC 10 doesn't accept -KPIC any more. 4008eda3803bSmrg icc* | ifort*) 4009eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4010eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4011eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4012eda3803bSmrg ;; 4013eda3803bSmrg # Lahey Fortran 8.1. 4014eda3803bSmrg lf95*) 4015eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4016eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4017eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4018eda3803bSmrg ;; 4019eda3803bSmrg pgcc* | pgf77* | pgf90* | pgf95*) 4020eda3803bSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 4021eda3803bSmrg # which looks to be a dead project) 4022eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4023eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4024eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4025eda3803bSmrg ;; 4026eda3803bSmrg ccc*) 4027eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4028eda3803bSmrg # All Alpha code is PIC. 4029eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4030eda3803bSmrg ;; 4031eda3803bSmrg xl*) 4032eda3803bSmrg # IBM XL C 8.0/Fortran 10.1 on PPC 4033eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4034eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4035eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4036fe5e51b7Smrg ;; 4037fe5e51b7Smrg *) 4038eda3803bSmrg case `$CC -V 2>&1 | sed 5q` in 4039eda3803bSmrg *Sun\ C*) 4040eda3803bSmrg # Sun C 5.9 4041eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4042eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4043eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4044eda3803bSmrg ;; 4045eda3803bSmrg *Sun\ F*) 4046eda3803bSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4047eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4048eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4049eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4050eda3803bSmrg ;; 4051eda3803bSmrg esac 4052fe5e51b7Smrg ;; 4053eda3803bSmrg esac 4054eda3803bSmrg ;; 4055fe5e51b7Smrg 4056eda3803bSmrg newsos6) 4057eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4058eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4059eda3803bSmrg ;; 4060fe5e51b7Smrg 4061eda3803bSmrg *nto* | *qnx*) 4062eda3803bSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4063eda3803bSmrg # it will coredump. 4064eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4065eda3803bSmrg ;; 4066fe5e51b7Smrg 4067eda3803bSmrg osf3* | osf4* | osf5*) 4068eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4069eda3803bSmrg # All OSF/1 code is PIC. 4070eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4071eda3803bSmrg ;; 4072fe5e51b7Smrg 4073eda3803bSmrg rdos*) 4074eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4075eda3803bSmrg ;; 4076fe5e51b7Smrg 4077eda3803bSmrg solaris*) 4078eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4079eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4080eda3803bSmrg case $cc_basename in 4081eda3803bSmrg f77* | f90* | f95*) 4082eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4083eda3803bSmrg *) 4084eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4085eda3803bSmrg esac 4086eda3803bSmrg ;; 4087fe5e51b7Smrg 4088eda3803bSmrg sunos4*) 4089eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4090eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4091eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4092eda3803bSmrg ;; 4093fe5e51b7Smrg 4094eda3803bSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 4095eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4096eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4097eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4098eda3803bSmrg ;; 4099fe5e51b7Smrg 4100eda3803bSmrg sysv4*MP*) 4101eda3803bSmrg if test -d /usr/nec ;then 4102eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4103eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4104eda3803bSmrg fi 4105eda3803bSmrg ;; 4106fe5e51b7Smrg 4107eda3803bSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4108eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4109eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4110eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4111eda3803bSmrg ;; 4112fe5e51b7Smrg 4113eda3803bSmrg unicos*) 4114eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4115eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4116eda3803bSmrg ;; 4117fe5e51b7Smrg 4118eda3803bSmrg uts4*) 4119eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4120eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4121eda3803bSmrg ;; 4122fe5e51b7Smrg 4123eda3803bSmrg *) 4124eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4125eda3803bSmrg ;; 4126fe5e51b7Smrg esac 4127eda3803bSmrg fi 4128eda3803bSmrg]) 4129eda3803bSmrgcase $host_os in 4130eda3803bSmrg # For platforms which do not support PIC, -DPIC is meaningless: 4131eda3803bSmrg *djgpp*) 4132eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4133eda3803bSmrg ;; 4134eda3803bSmrg *) 4135eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4136eda3803bSmrg ;; 4137eda3803bSmrgesac 4138eda3803bSmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4139eda3803bSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4140eda3803bSmrg [How to pass a linker flag through the compiler]) 4141fe5e51b7Smrg 4142eda3803bSmrg# 4143eda3803bSmrg# Check to make sure the PIC flag actually works. 4144eda3803bSmrg# 4145eda3803bSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4146eda3803bSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4147eda3803bSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4148eda3803bSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4149eda3803bSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4150eda3803bSmrg "" | " "*) ;; 4151eda3803bSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4152eda3803bSmrg esac], 4153eda3803bSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4154eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4155fe5e51b7Smrgfi 4156eda3803bSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4157eda3803bSmrg [Additional compiler flags for building library objects]) 4158fe5e51b7Smrg 4159eda3803bSmrg# 4160eda3803bSmrg# Check to make sure the static flag actually works. 4161eda3803bSmrg# 4162eda3803bSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4163eda3803bSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4164eda3803bSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4165eda3803bSmrg $lt_tmp_static_flag, 4166eda3803bSmrg [], 4167eda3803bSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4168eda3803bSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4169eda3803bSmrg [Compiler flag to prevent dynamic linking]) 4170eda3803bSmrg])# _LT_COMPILER_PIC 4171fe5e51b7Smrg 4172fe5e51b7Smrg 4173eda3803bSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 4174eda3803bSmrg# ---------------------------- 4175eda3803bSmrg# See if the linker supports building shared libraries. 4176eda3803bSmrgm4_defun([_LT_LINKER_SHLIBS], 4177eda3803bSmrg[AC_REQUIRE([LT_PATH_LD])dnl 4178eda3803bSmrgAC_REQUIRE([LT_PATH_NM])dnl 4179eda3803bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4180eda3803bSmrgm4_require([_LT_DECL_EGREP])dnl 4181eda3803bSmrgm4_require([_LT_DECL_SED])dnl 4182eda3803bSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4183eda3803bSmrgm4_require([_LT_TAG_COMPILER])dnl 4184eda3803bSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4185eda3803bSmrgm4_if([$1], [CXX], [ 4186eda3803bSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4187eda3803bSmrg case $host_os in 4188eda3803bSmrg aix[[4-9]]*) 4189eda3803bSmrg # If we're using GNU nm, then we don't want the "-C" option. 4190eda3803bSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4191eda3803bSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4192eda3803bSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4193eda3803bSmrg else 4194eda3803bSmrg _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' 4195fe5e51b7Smrg fi 4196fe5e51b7Smrg ;; 4197eda3803bSmrg pw32*) 4198eda3803bSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4199fe5e51b7Smrg ;; 4200eda3803bSmrg cygwin* | mingw* | cegcc*) 4201eda3803bSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 4202eda3803bSmrg ;; 4203eda3803bSmrg *) 4204eda3803bSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4205eda3803bSmrg ;; 4206eda3803bSmrg esac 4207eda3803bSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4208eda3803bSmrg], [ 4209eda3803bSmrg runpath_var= 4210eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 4211eda3803bSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4212eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)= 4213eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4214eda3803bSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 4215eda3803bSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4216eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4217eda3803bSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4218eda3803bSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 4219eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4220eda3803bSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4221eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4222eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4223eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4224eda3803bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4225eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4226eda3803bSmrg _LT_TAGVAR(inherit_rpath, $1)=no 4227eda3803bSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4228eda3803bSmrg _LT_TAGVAR(module_cmds, $1)= 4229eda3803bSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 4230eda3803bSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4231eda3803bSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4232eda3803bSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4233eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4234eda3803bSmrg # include_expsyms should be a list of space-separated symbols to be *always* 4235eda3803bSmrg # included in the symbol list 4236eda3803bSmrg _LT_TAGVAR(include_expsyms, $1)= 4237eda3803bSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 4238eda3803bSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4239eda3803bSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4240eda3803bSmrg # as well as any symbol that contains `d'. 4241eda3803bSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4242eda3803bSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4243eda3803bSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 4244eda3803bSmrg # the symbol is explicitly referenced. Since portable code cannot 4245eda3803bSmrg # rely on this symbol name, it's probably fine to never include it in 4246eda3803bSmrg # preloaded symbol tables. 4247eda3803bSmrg # Exclude shared library initialization/finalization symbols. 4248eda3803bSmrgdnl Note also adjust exclude_expsyms for C++ above. 4249eda3803bSmrg extract_expsyms_cmds= 4250fe5e51b7Smrg 4251eda3803bSmrg case $host_os in 4252eda3803bSmrg cygwin* | mingw* | pw32* | cegcc*) 4253eda3803bSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4254eda3803bSmrg # When not using gcc, we currently assume that we are using 4255eda3803bSmrg # Microsoft Visual C++. 4256eda3803bSmrg if test "$GCC" != yes; then 4257eda3803bSmrg with_gnu_ld=no 4258fe5e51b7Smrg fi 4259fe5e51b7Smrg ;; 4260eda3803bSmrg interix*) 4261eda3803bSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4262eda3803bSmrg with_gnu_ld=yes 4263eda3803bSmrg ;; 4264eda3803bSmrg openbsd*) 4265eda3803bSmrg with_gnu_ld=no 4266eda3803bSmrg ;; 4267fe5e51b7Smrg esac 4268fe5e51b7Smrg 4269eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 4270eda3803bSmrg if test "$with_gnu_ld" = yes; then 4271eda3803bSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 4272eda3803bSmrg wlarc='${wl}' 4273fe5e51b7Smrg 4274eda3803bSmrg # Set some defaults for GNU ld with shared library support. These 4275eda3803bSmrg # are reset later if shared libraries are not supported. Putting them 4276eda3803bSmrg # here allows them to be overridden if necessary. 4277eda3803bSmrg runpath_var=LD_RUN_PATH 4278eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4279eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4280eda3803bSmrg # ancient GNU ld didn't support --whole-archive et. al. 4281eda3803bSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4282eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4283eda3803bSmrg else 4284eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4285eda3803bSmrg fi 4286eda3803bSmrg supports_anon_versioning=no 4287eda3803bSmrg case `$LD -v 2>&1` in 4288eda3803bSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4289eda3803bSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4290eda3803bSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4291eda3803bSmrg *\ 2.11.*) ;; # other 2.11 versions 4292eda3803bSmrg *) supports_anon_versioning=yes ;; 4293eda3803bSmrg esac 4294fe5e51b7Smrg 4295eda3803bSmrg # See if GNU ld supports shared libraries. 4296eda3803bSmrg case $host_os in 4297eda3803bSmrg aix[[3-9]]*) 4298eda3803bSmrg # On AIX/PPC, the GNU linker is very broken 4299eda3803bSmrg if test "$host_cpu" != ia64; then 4300eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4301eda3803bSmrg cat <<_LT_EOF 1>&2 4302fe5e51b7Smrg 4303eda3803bSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 4304eda3803bSmrg*** to be unable to reliably create shared libraries on AIX. 4305eda3803bSmrg*** Therefore, libtool is disabling shared libraries support. If you 4306eda3803bSmrg*** really care for shared libraries, you may want to modify your PATH 4307eda3803bSmrg*** so that a non-GNU linker is found, and then restart. 4308fe5e51b7Smrg 4309eda3803bSmrg_LT_EOF 4310eda3803bSmrg fi 4311eda3803bSmrg ;; 4312fe5e51b7Smrg 4313eda3803bSmrg amigaos*) 4314eda3803bSmrg case $host_cpu in 4315eda3803bSmrg powerpc) 4316eda3803bSmrg # see comment about AmigaOS4 .so support 4317eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4318eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4319eda3803bSmrg ;; 4320eda3803bSmrg m68k) 4321eda3803bSmrg _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)' 4322eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4323eda3803bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4324eda3803bSmrg ;; 4325eda3803bSmrg esac 4326eda3803bSmrg ;; 4327fe5e51b7Smrg 4328eda3803bSmrg beos*) 4329eda3803bSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4330eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4331eda3803bSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4332eda3803bSmrg # support --undefined. This deserves some investigation. FIXME 4333eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4334eda3803bSmrg else 4335eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4336eda3803bSmrg fi 4337eda3803bSmrg ;; 4338fe5e51b7Smrg 4339eda3803bSmrg cygwin* | mingw* | pw32* | cegcc*) 4340eda3803bSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4341eda3803bSmrg # as there is no search path for DLLs. 4342eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4343eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4344eda3803bSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4345eda3803bSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4346eda3803bSmrg _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' 4347eda3803bSmrg 4348eda3803bSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4349eda3803bSmrg _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' 4350eda3803bSmrg # If the export-symbols file already is a .def file (1st line 4351eda3803bSmrg # is EXPORTS), use it as is; otherwise, prepend... 4352eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4353eda3803bSmrg cp $export_symbols $output_objdir/$soname.def; 4354eda3803bSmrg else 4355eda3803bSmrg echo EXPORTS > $output_objdir/$soname.def; 4356eda3803bSmrg cat $export_symbols >> $output_objdir/$soname.def; 4357eda3803bSmrg fi~ 4358eda3803bSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4359eda3803bSmrg else 4360eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4361eda3803bSmrg fi 4362eda3803bSmrg ;; 4363fe5e51b7Smrg 4364eda3803bSmrg interix[[3-9]]*) 4365eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4366eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4367eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4368eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4369eda3803bSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4370eda3803bSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4371eda3803bSmrg # default) and relocated if they conflict, which is a slow very memory 4372eda3803bSmrg # consuming and fragmenting process. To avoid this, we pick a random, 4373eda3803bSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4374eda3803bSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4375eda3803bSmrg _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' 4376eda3803bSmrg _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' 4377eda3803bSmrg ;; 4378fe5e51b7Smrg 4379eda3803bSmrg gnu* | linux* | tpf* | k*bsd*-gnu) 4380eda3803bSmrg tmp_diet=no 4381eda3803bSmrg if test "$host_os" = linux-dietlibc; then 4382eda3803bSmrg case $cc_basename in 4383eda3803bSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4384eda3803bSmrg esac 4385eda3803bSmrg fi 4386eda3803bSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4387eda3803bSmrg && test "$tmp_diet" = no 4388eda3803bSmrg then 4389eda3803bSmrg tmp_addflag= 4390eda3803bSmrg tmp_sharedflag='-shared' 4391eda3803bSmrg case $cc_basename,$host_cpu in 4392eda3803bSmrg pgcc*) # Portland Group C compiler 4393eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 4394eda3803bSmrg tmp_addflag=' $pic_flag' 4395eda3803bSmrg ;; 4396eda3803bSmrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 4397eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 4398eda3803bSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 4399eda3803bSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4400eda3803bSmrg tmp_addflag=' -i_dynamic' ;; 4401eda3803bSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4402eda3803bSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4403eda3803bSmrg ifc* | ifort*) # Intel Fortran compiler 4404eda3803bSmrg tmp_addflag=' -nofor_main' ;; 4405eda3803bSmrg lf95*) # Lahey Fortran 8.1 4406eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4407eda3803bSmrg tmp_sharedflag='--shared' ;; 4408eda3803bSmrg xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4409eda3803bSmrg tmp_sharedflag='-qmkshrobj' 4410eda3803bSmrg tmp_addflag= ;; 4411eda3803bSmrg esac 4412eda3803bSmrg case `$CC -V 2>&1 | sed 5q` in 4413eda3803bSmrg *Sun\ C*) # Sun C 5.9 4414eda3803bSmrg _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 4415eda3803bSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4416eda3803bSmrg tmp_sharedflag='-G' ;; 4417eda3803bSmrg *Sun\ F*) # Sun Fortran 8.3 4418eda3803bSmrg tmp_sharedflag='-G' ;; 4419eda3803bSmrg esac 4420eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4421fe5e51b7Smrg 4422eda3803bSmrg if test "x$supports_anon_versioning" = xyes; then 4423eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4424eda3803bSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4425eda3803bSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4426eda3803bSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4427eda3803bSmrg fi 4428fe5e51b7Smrg 4429eda3803bSmrg case $cc_basename in 4430eda3803bSmrg xlf*) 4431eda3803bSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4432eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4433eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4434eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 4435eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' 4436eda3803bSmrg if test "x$supports_anon_versioning" = xyes; then 4437eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4438eda3803bSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4439eda3803bSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4440eda3803bSmrg $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4441eda3803bSmrg fi 4442eda3803bSmrg ;; 4443eda3803bSmrg esac 4444eda3803bSmrg else 4445eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4446eda3803bSmrg fi 4447eda3803bSmrg ;; 4448fe5e51b7Smrg 4449eda3803bSmrg netbsd*) 4450eda3803bSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4451eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4452eda3803bSmrg wlarc= 4453eda3803bSmrg else 4454eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4455eda3803bSmrg _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' 4456eda3803bSmrg fi 4457eda3803bSmrg ;; 4458fe5e51b7Smrg 4459eda3803bSmrg solaris*) 4460eda3803bSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4461eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4462eda3803bSmrg cat <<_LT_EOF 1>&2 4463fe5e51b7Smrg 4464eda3803bSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4465eda3803bSmrg*** create shared libraries on Solaris systems. Therefore, libtool 4466eda3803bSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 4467eda3803bSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 4468eda3803bSmrg*** your PATH or compiler configuration so that the native linker is 4469eda3803bSmrg*** used, and then restart. 4470fe5e51b7Smrg 4471eda3803bSmrg_LT_EOF 4472eda3803bSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4473eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4474eda3803bSmrg _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' 4475eda3803bSmrg else 4476eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4477eda3803bSmrg fi 4478eda3803bSmrg ;; 4479fe5e51b7Smrg 4480eda3803bSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4481eda3803bSmrg case `$LD -v 2>&1` in 4482eda3803bSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4483eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4484eda3803bSmrg cat <<_LT_EOF 1>&2 4485fe5e51b7Smrg 4486eda3803bSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4487eda3803bSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4488eda3803bSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 4489eda3803bSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4490eda3803bSmrg*** your PATH or compiler configuration so that the native linker is 4491eda3803bSmrg*** used, and then restart. 4492fe5e51b7Smrg 4493eda3803bSmrg_LT_EOF 4494eda3803bSmrg ;; 4495eda3803bSmrg *) 4496eda3803bSmrg # For security reasons, it is highly recommended that you always 4497eda3803bSmrg # use absolute paths for naming shared libraries, and exclude the 4498eda3803bSmrg # DT_RUNPATH tag from executables and libraries. But doing so 4499eda3803bSmrg # requires that you compile everything twice, which is a pain. 4500eda3803bSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4501eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4502eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4503eda3803bSmrg _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' 4504eda3803bSmrg else 4505eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4506eda3803bSmrg fi 4507eda3803bSmrg ;; 4508eda3803bSmrg esac 4509eda3803bSmrg ;; 4510fe5e51b7Smrg 4511eda3803bSmrg sunos4*) 4512eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4513eda3803bSmrg wlarc= 4514eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4515eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4516eda3803bSmrg ;; 4517fe5e51b7Smrg 4518eda3803bSmrg *) 4519eda3803bSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4520eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4521eda3803bSmrg _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' 4522eda3803bSmrg else 4523eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4524eda3803bSmrg fi 4525eda3803bSmrg ;; 4526eda3803bSmrg esac 4527fe5e51b7Smrg 4528eda3803bSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4529eda3803bSmrg runpath_var= 4530eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4531eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4532eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4533eda3803bSmrg fi 4534eda3803bSmrg else 4535eda3803bSmrg # PORTME fill in a description of your system's linker (not GNU ld) 4536eda3803bSmrg case $host_os in 4537eda3803bSmrg aix3*) 4538eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4539eda3803bSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 4540eda3803bSmrg _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' 4541eda3803bSmrg # Note: this linker hardcodes the directories in LIBPATH if there 4542eda3803bSmrg # are no directories specified by -L. 4543eda3803bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4544eda3803bSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4545eda3803bSmrg # Neither direct hardcoding nor static linking is supported with a 4546eda3803bSmrg # broken collect2. 4547eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4548eda3803bSmrg fi 4549eda3803bSmrg ;; 4550fe5e51b7Smrg 4551eda3803bSmrg aix[[4-9]]*) 4552eda3803bSmrg if test "$host_cpu" = ia64; then 4553eda3803bSmrg # On IA64, the linker does run time linking by default, so we don't 4554eda3803bSmrg # have to do anything special. 4555eda3803bSmrg aix_use_runtimelinking=no 4556eda3803bSmrg exp_sym_flag='-Bexport' 4557eda3803bSmrg no_entry_flag="" 4558eda3803bSmrg else 4559eda3803bSmrg # If we're using GNU nm, then we don't want the "-C" option. 4560eda3803bSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4561eda3803bSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4562eda3803bSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4563eda3803bSmrg else 4564eda3803bSmrg _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' 4565eda3803bSmrg fi 4566eda3803bSmrg aix_use_runtimelinking=no 4567fe5e51b7Smrg 4568eda3803bSmrg # Test if we are trying to use run time linking or normal 4569eda3803bSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4570eda3803bSmrg # need to do runtime linking. 4571eda3803bSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4572eda3803bSmrg for ld_flag in $LDFLAGS; do 4573eda3803bSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4574eda3803bSmrg aix_use_runtimelinking=yes 4575eda3803bSmrg break 4576eda3803bSmrg fi 4577eda3803bSmrg done 4578eda3803bSmrg ;; 4579eda3803bSmrg esac 4580fe5e51b7Smrg 4581eda3803bSmrg exp_sym_flag='-bexport' 4582eda3803bSmrg no_entry_flag='-bnoentry' 4583eda3803bSmrg fi 4584fe5e51b7Smrg 4585eda3803bSmrg # When large executables or shared objects are built, AIX ld can 4586eda3803bSmrg # have problems creating the table of contents. If linking a library 4587eda3803bSmrg # or program results in "error TOC overflow" add -mminimal-toc to 4588eda3803bSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4589eda3803bSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4590fe5e51b7Smrg 4591eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='' 4592eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4593eda3803bSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4594eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 4595eda3803bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4596eda3803bSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 4597fe5e51b7Smrg 4598eda3803bSmrg if test "$GCC" = yes; then 4599eda3803bSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 4600eda3803bSmrg # We only want to do this on AIX 4.2 and lower, the check 4601eda3803bSmrg # below for broken collect2 doesn't work under 4.3+ 4602eda3803bSmrg collect2name=`${CC} -print-prog-name=collect2` 4603eda3803bSmrg if test -f "$collect2name" && 4604eda3803bSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 4605eda3803bSmrg then 4606eda3803bSmrg # We have reworked collect2 4607eda3803bSmrg : 4608eda3803bSmrg else 4609eda3803bSmrg # We have old collect2 4610eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4611eda3803bSmrg # It fails to find uninstalled libraries when the uninstalled 4612eda3803bSmrg # path is not listed in the libpath. Setting hardcode_minus_L 4613eda3803bSmrg # to unsupported forces relinking 4614eda3803bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4615eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4616eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4617eda3803bSmrg fi 4618eda3803bSmrg ;; 4619eda3803bSmrg esac 4620eda3803bSmrg shared_flag='-shared' 4621eda3803bSmrg if test "$aix_use_runtimelinking" = yes; then 4622eda3803bSmrg shared_flag="$shared_flag "'${wl}-G' 4623eda3803bSmrg fi 4624eda3803bSmrg else 4625eda3803bSmrg # not using gcc 4626eda3803bSmrg if test "$host_cpu" = ia64; then 4627eda3803bSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4628eda3803bSmrg # chokes on -Wl,-G. The following line is correct: 4629eda3803bSmrg shared_flag='-G' 4630eda3803bSmrg else 4631eda3803bSmrg if test "$aix_use_runtimelinking" = yes; then 4632eda3803bSmrg shared_flag='${wl}-G' 4633eda3803bSmrg else 4634eda3803bSmrg shared_flag='${wl}-bM:SRE' 4635eda3803bSmrg fi 4636eda3803bSmrg fi 4637eda3803bSmrg fi 4638fe5e51b7Smrg 4639eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 4640eda3803bSmrg # It seems that -bexpall does not export symbols beginning with 4641eda3803bSmrg # underscore (_), so it is better to generate a list of symbols to export. 4642eda3803bSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 4643eda3803bSmrg if test "$aix_use_runtimelinking" = yes; then 4644eda3803bSmrg # Warning - without using the other runtime loading flags (-brtl), 4645eda3803bSmrg # -berok will link without error, but may produce a broken library. 4646eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 4647eda3803bSmrg # Determine the default libpath from the value encoded in an 4648eda3803bSmrg # empty executable. 4649eda3803bSmrg _LT_SYS_MODULE_PATH_AIX 4650eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4651eda3803bSmrg _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 4652eda3803bSmrg else 4653eda3803bSmrg if test "$host_cpu" = ia64; then 4654eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 4655eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 4656eda3803bSmrg _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" 4657eda3803bSmrg else 4658eda3803bSmrg # Determine the default libpath from the value encoded in an 4659eda3803bSmrg # empty executable. 4660eda3803bSmrg _LT_SYS_MODULE_PATH_AIX 4661eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4662eda3803bSmrg # Warning - without using the other run time loading flags, 4663eda3803bSmrg # -berok will link without error, but may produce a broken library. 4664eda3803bSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 4665eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 4666eda3803bSmrg # Exported symbols can be pulled into shared objects from archives 4667eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 4668eda3803bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 4669eda3803bSmrg # This is similar to how AIX traditionally builds its shared libraries. 4670eda3803bSmrg _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' 4671eda3803bSmrg fi 4672eda3803bSmrg fi 4673eda3803bSmrg ;; 4674fe5e51b7Smrg 4675eda3803bSmrg amigaos*) 4676eda3803bSmrg case $host_cpu in 4677eda3803bSmrg powerpc) 4678eda3803bSmrg # see comment about AmigaOS4 .so support 4679eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4680eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4681eda3803bSmrg ;; 4682eda3803bSmrg m68k) 4683eda3803bSmrg _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)' 4684eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4685eda3803bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4686eda3803bSmrg ;; 4687eda3803bSmrg esac 4688eda3803bSmrg ;; 4689fe5e51b7Smrg 4690eda3803bSmrg bsdi[[45]]*) 4691eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 4692eda3803bSmrg ;; 4693fe5e51b7Smrg 4694eda3803bSmrg cygwin* | mingw* | pw32* | cegcc*) 4695eda3803bSmrg # When not using gcc, we currently assume that we are using 4696eda3803bSmrg # Microsoft Visual C++. 4697eda3803bSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 4698eda3803bSmrg # no search path for DLLs. 4699eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 4700eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4701eda3803bSmrg # Tell ltmain to make .lib files, not .a files. 4702eda3803bSmrg libext=lib 4703eda3803bSmrg # Tell ltmain to make .dll files, not .so files. 4704eda3803bSmrg shrext_cmds=".dll" 4705eda3803bSmrg # FIXME: Setting linknames here is a bad hack. 4706eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 4707eda3803bSmrg # The linker will automatically build a .lib file if we build a DLL. 4708eda3803bSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 4709eda3803bSmrg # FIXME: Should let the user specify the lib program. 4710eda3803bSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 4711eda3803bSmrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 4712eda3803bSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4713eda3803bSmrg ;; 4714fe5e51b7Smrg 4715eda3803bSmrg darwin* | rhapsody*) 4716eda3803bSmrg _LT_DARWIN_LINKER_FEATURES($1) 4717eda3803bSmrg ;; 4718fe5e51b7Smrg 4719eda3803bSmrg dgux*) 4720eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4721eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4722eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4723eda3803bSmrg ;; 4724fe5e51b7Smrg 4725eda3803bSmrg freebsd1*) 4726eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4727eda3803bSmrg ;; 4728fe5e51b7Smrg 4729eda3803bSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 4730eda3803bSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 4731eda3803bSmrg # does not break anything, and helps significantly (at the cost of a little 4732eda3803bSmrg # extra space). 4733eda3803bSmrg freebsd2.2*) 4734eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 4735eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4736eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4737eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4738eda3803bSmrg ;; 4739fe5e51b7Smrg 4740eda3803bSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 4741eda3803bSmrg freebsd2*) 4742eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4743eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4744eda3803bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4745eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4746eda3803bSmrg ;; 4747fe5e51b7Smrg 4748eda3803bSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 4749eda3803bSmrg freebsd* | dragonfly*) 4750eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 4751eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4752eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4753eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4754eda3803bSmrg ;; 4755fe5e51b7Smrg 4756eda3803bSmrg hpux9*) 4757eda3803bSmrg if test "$GCC" = yes; then 4758eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 4759eda3803bSmrg else 4760eda3803bSmrg _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' 4761eda3803bSmrg fi 4762eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4763eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4764eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4765fe5e51b7Smrg 4766eda3803bSmrg # hardcode_minus_L: Not really in the search PATH, 4767eda3803bSmrg # but as the default location of the library. 4768eda3803bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4769eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4770eda3803bSmrg ;; 4771fe5e51b7Smrg 4772eda3803bSmrg hpux10*) 4773eda3803bSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 4774eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4775eda3803bSmrg else 4776eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 4777eda3803bSmrg fi 4778eda3803bSmrg if test "$with_gnu_ld" = no; then 4779eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4780eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 4781eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4782eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4783eda3803bSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4784eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4785eda3803bSmrg # hardcode_minus_L: Not really in the search PATH, 4786eda3803bSmrg # but as the default location of the library. 4787eda3803bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4788eda3803bSmrg fi 4789eda3803bSmrg ;; 4790fe5e51b7Smrg 4791eda3803bSmrg hpux11*) 4792eda3803bSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 4793eda3803bSmrg case $host_cpu in 4794eda3803bSmrg hppa*64*) 4795eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4796eda3803bSmrg ;; 4797eda3803bSmrg ia64*) 4798eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4799eda3803bSmrg ;; 4800eda3803bSmrg *) 4801eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4802eda3803bSmrg ;; 4803eda3803bSmrg esac 4804eda3803bSmrg else 4805eda3803bSmrg case $host_cpu in 4806eda3803bSmrg hppa*64*) 4807eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4808eda3803bSmrg ;; 4809eda3803bSmrg ia64*) 4810eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4811eda3803bSmrg ;; 4812eda3803bSmrg *) 4813eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4814eda3803bSmrg ;; 4815eda3803bSmrg esac 4816eda3803bSmrg fi 4817eda3803bSmrg if test "$with_gnu_ld" = no; then 4818eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4819eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4820fe5e51b7Smrg 4821eda3803bSmrg case $host_cpu in 4822eda3803bSmrg hppa*64*|ia64*) 4823eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4824eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4825eda3803bSmrg ;; 4826eda3803bSmrg *) 4827eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4828eda3803bSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4829eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4830fe5e51b7Smrg 4831eda3803bSmrg # hardcode_minus_L: Not really in the search PATH, 4832eda3803bSmrg # but as the default location of the library. 4833eda3803bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4834eda3803bSmrg ;; 4835eda3803bSmrg esac 4836eda3803bSmrg fi 4837eda3803bSmrg ;; 4838fe5e51b7Smrg 4839eda3803bSmrg irix5* | irix6* | nonstopux*) 4840eda3803bSmrg if test "$GCC" = yes; then 4841eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 4842eda3803bSmrg # Try to use the -exported_symbol ld option, if it does not 4843eda3803bSmrg # work, assume that -exports_file does not work either and 4844eda3803bSmrg # implicitly export all symbols. 4845eda3803bSmrg save_LDFLAGS="$LDFLAGS" 4846eda3803bSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 4847eda3803bSmrg AC_LINK_IFELSE(int foo(void) {}, 4848eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 4849eda3803bSmrg ) 4850eda3803bSmrg LDFLAGS="$save_LDFLAGS" 4851eda3803bSmrg else 4852eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 4853eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 4854eda3803bSmrg fi 4855eda3803bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4856eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4857eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4858eda3803bSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 4859eda3803bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4860fe5e51b7Smrg ;; 4861eda3803bSmrg 4862eda3803bSmrg netbsd*) 4863eda3803bSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4864eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 4865eda3803bSmrg else 4866eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 4867eda3803bSmrg fi 4868eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4869eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4870eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4871fe5e51b7Smrg ;; 4872fe5e51b7Smrg 4873eda3803bSmrg newsos6) 4874eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4875eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4876eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4877eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4878eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4879eda3803bSmrg ;; 4880fe5e51b7Smrg 4881eda3803bSmrg *nto* | *qnx*) 4882eda3803bSmrg ;; 4883fe5e51b7Smrg 4884eda3803bSmrg openbsd*) 4885eda3803bSmrg if test -f /usr/libexec/ld.so; then 4886eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4887eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4888eda3803bSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4889eda3803bSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4890eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 4891eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 4892eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4893eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4894eda3803bSmrg else 4895eda3803bSmrg case $host_os in 4896eda3803bSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 4897eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4898eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4899eda3803bSmrg ;; 4900eda3803bSmrg *) 4901eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 4902eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4903eda3803bSmrg ;; 4904eda3803bSmrg esac 4905eda3803bSmrg fi 4906eda3803bSmrg else 4907eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4908eda3803bSmrg fi 4909eda3803bSmrg ;; 4910fe5e51b7Smrg 4911eda3803bSmrg os2*) 4912eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4913eda3803bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4914eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4915eda3803bSmrg _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' 4916eda3803bSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 4917eda3803bSmrg ;; 4918fe5e51b7Smrg 4919eda3803bSmrg osf3*) 4920eda3803bSmrg if test "$GCC" = yes; then 4921eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4922eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 4923eda3803bSmrg else 4924eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4925eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 4926eda3803bSmrg fi 4927eda3803bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4928eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4929eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4930eda3803bSmrg ;; 4931fe5e51b7Smrg 4932eda3803bSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 4933eda3803bSmrg if test "$GCC" = yes; then 4934eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4935eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 4936eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4937eda3803bSmrg else 4938eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4939eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 4940eda3803bSmrg _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~ 4941eda3803bSmrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 4942fe5e51b7Smrg 4943eda3803bSmrg # Both c and cxx compiler support -rpath directly 4944eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 4945eda3803bSmrg fi 4946eda3803bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4947eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4948eda3803bSmrg ;; 4949fe5e51b7Smrg 4950eda3803bSmrg solaris*) 4951eda3803bSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 4952eda3803bSmrg if test "$GCC" = yes; then 4953eda3803bSmrg wlarc='${wl}' 4954eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4955eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4956eda3803bSmrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 4957eda3803bSmrg else 4958eda3803bSmrg case `$CC -V 2>&1` in 4959eda3803bSmrg *"Compilers 5.0"*) 4960eda3803bSmrg wlarc='' 4961eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 4962eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4963eda3803bSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 4964eda3803bSmrg ;; 4965eda3803bSmrg *) 4966eda3803bSmrg wlarc='${wl}' 4967eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 4968eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4969eda3803bSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 4970eda3803bSmrg ;; 4971eda3803bSmrg esac 4972eda3803bSmrg fi 4973eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4974eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4975eda3803bSmrg case $host_os in 4976eda3803bSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 4977eda3803bSmrg *) 4978eda3803bSmrg # The compiler driver will combine and reorder linker options, 4979eda3803bSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 4980eda3803bSmrg # but is careful enough not to reorder. 4981eda3803bSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 4982eda3803bSmrg if test "$GCC" = yes; then 4983eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 4984eda3803bSmrg else 4985eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 4986eda3803bSmrg fi 4987eda3803bSmrg ;; 4988eda3803bSmrg esac 4989eda3803bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4990eda3803bSmrg ;; 4991fe5e51b7Smrg 4992eda3803bSmrg sunos4*) 4993eda3803bSmrg if test "x$host_vendor" = xsequent; then 4994eda3803bSmrg # Use $CC to link under sequent, because it throws in some extra .o 4995eda3803bSmrg # files that make .init and .fini sections work. 4996eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 4997eda3803bSmrg else 4998eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 4999eda3803bSmrg fi 5000eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5001eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5002eda3803bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5003eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5004eda3803bSmrg ;; 5005fe5e51b7Smrg 5006eda3803bSmrg sysv4) 5007eda3803bSmrg case $host_vendor in 5008eda3803bSmrg sni) 5009eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5010eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5011eda3803bSmrg ;; 5012eda3803bSmrg siemens) 5013eda3803bSmrg ## LD is ld it makes a PLAMLIB 5014eda3803bSmrg ## CC just makes a GrossModule. 5015eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5016eda3803bSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5017eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5018eda3803bSmrg ;; 5019eda3803bSmrg motorola) 5020eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5021eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5022eda3803bSmrg ;; 5023eda3803bSmrg esac 5024eda3803bSmrg runpath_var='LD_RUN_PATH' 5025eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5026eda3803bSmrg ;; 5027fe5e51b7Smrg 5028eda3803bSmrg sysv4.3*) 5029eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5030eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5031eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5032eda3803bSmrg ;; 5033fe5e51b7Smrg 5034eda3803bSmrg sysv4*MP*) 5035eda3803bSmrg if test -d /usr/nec; then 5036eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5037eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5038eda3803bSmrg runpath_var=LD_RUN_PATH 5039eda3803bSmrg hardcode_runpath_var=yes 5040eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5041eda3803bSmrg fi 5042eda3803bSmrg ;; 5043fe5e51b7Smrg 5044eda3803bSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5045eda3803bSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5046eda3803bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5047eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5048eda3803bSmrg runpath_var='LD_RUN_PATH' 5049fe5e51b7Smrg 5050eda3803bSmrg if test "$GCC" = yes; then 5051eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5052eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5053eda3803bSmrg else 5054eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5055eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5056eda3803bSmrg fi 5057eda3803bSmrg ;; 5058fe5e51b7Smrg 5059eda3803bSmrg sysv5* | sco3.2v5* | sco5v6*) 5060eda3803bSmrg # Note: We can NOT use -z defs as we might desire, because we do not 5061eda3803bSmrg # link with -lc, and that would cause any symbols used from libc to 5062eda3803bSmrg # always be unresolved, which means just about no library would 5063eda3803bSmrg # ever link correctly. If we're not using GNU ld we use -z text 5064eda3803bSmrg # though, which does catch some bad symbols but isn't as heavy-handed 5065eda3803bSmrg # as -z defs. 5066eda3803bSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5067eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5068eda3803bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5069eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5070eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5071eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5072eda3803bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5073eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5074eda3803bSmrg runpath_var='LD_RUN_PATH' 5075fe5e51b7Smrg 5076eda3803bSmrg if test "$GCC" = yes; then 5077eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5078eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5079eda3803bSmrg else 5080eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5081eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5082eda3803bSmrg fi 5083eda3803bSmrg ;; 5084fe5e51b7Smrg 5085eda3803bSmrg uts4*) 5086eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5087eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5088eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5089eda3803bSmrg ;; 5090fe5e51b7Smrg 5091eda3803bSmrg *) 5092eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5093eda3803bSmrg ;; 5094eda3803bSmrg esac 5095fe5e51b7Smrg 5096eda3803bSmrg if test x$host_vendor = xsni; then 5097eda3803bSmrg case $host in 5098eda3803bSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5099eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5100eda3803bSmrg ;; 5101eda3803bSmrg esac 5102eda3803bSmrg fi 5103eda3803bSmrg fi 5104eda3803bSmrg]) 5105eda3803bSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5106eda3803bSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5107fe5e51b7Smrg 5108eda3803bSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5109fe5e51b7Smrg 5110eda3803bSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5111eda3803bSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5112eda3803bSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 5113eda3803bSmrg [The commands to extract the exported symbol list from a shared archive]) 5114fe5e51b7Smrg 5115eda3803bSmrg# 5116eda3803bSmrg# Do we need to explicitly link libc? 5117eda3803bSmrg# 5118eda3803bSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5119eda3803bSmrgx|xyes) 5120eda3803bSmrg # Assume -lc should be added 5121eda3803bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5122fe5e51b7Smrg 5123eda3803bSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5124eda3803bSmrg case $_LT_TAGVAR(archive_cmds, $1) in 5125eda3803bSmrg *'~'*) 5126eda3803bSmrg # FIXME: we may have to deal with multi-command sequences. 5127eda3803bSmrg ;; 5128eda3803bSmrg '$CC '*) 5129eda3803bSmrg # Test whether the compiler implicitly links with -lc since on some 5130eda3803bSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5131eda3803bSmrg # to ld, don't add -lc before -lgcc. 5132eda3803bSmrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 5133eda3803bSmrg $RM conftest* 5134eda3803bSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5135fe5e51b7Smrg 5136eda3803bSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5137eda3803bSmrg soname=conftest 5138eda3803bSmrg lib=conftest 5139eda3803bSmrg libobjs=conftest.$ac_objext 5140eda3803bSmrg deplibs= 5141eda3803bSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5142eda3803bSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5143eda3803bSmrg compiler_flags=-v 5144eda3803bSmrg linker_flags=-v 5145eda3803bSmrg verstring= 5146eda3803bSmrg output_objdir=. 5147eda3803bSmrg libname=conftest 5148eda3803bSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5149eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 5150eda3803bSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5151eda3803bSmrg then 5152eda3803bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5153eda3803bSmrg else 5154eda3803bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5155eda3803bSmrg fi 5156eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5157eda3803bSmrg else 5158eda3803bSmrg cat conftest.err 1>&5 5159eda3803bSmrg fi 5160eda3803bSmrg $RM conftest* 5161eda3803bSmrg AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) 5162eda3803bSmrg ;; 5163eda3803bSmrg esac 5164eda3803bSmrg fi 5165eda3803bSmrg ;; 5166eda3803bSmrgesac 5167fe5e51b7Smrg 5168eda3803bSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5169eda3803bSmrg [Whether or not to add -lc for building shared libraries]) 5170eda3803bSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5171eda3803bSmrg [enable_shared_with_static_runtimes], [0], 5172eda3803bSmrg [Whether or not to disallow shared libs when runtime libs are static]) 5173eda3803bSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5174eda3803bSmrg [Compiler flag to allow reflexive dlopens]) 5175eda3803bSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5176eda3803bSmrg [Compiler flag to generate shared objects directly from archives]) 5177eda3803bSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 5178eda3803bSmrg [Whether the compiler copes with passing no objects directly]) 5179eda3803bSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5180eda3803bSmrg [Create an old-style archive from a shared archive]) 5181eda3803bSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5182eda3803bSmrg [Create a temporary old-style archive to link instead of a shared archive]) 5183eda3803bSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5184eda3803bSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5185eda3803bSmrg_LT_TAGDECL([], [module_cmds], [2], 5186eda3803bSmrg [Commands used to build a loadable module if different from building 5187eda3803bSmrg a shared archive.]) 5188eda3803bSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5189eda3803bSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 5190eda3803bSmrg [Whether we are building with GNU ld or not]) 5191eda3803bSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5192eda3803bSmrg [Flag that allows shared libraries with undefined symbols to be built]) 5193eda3803bSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 5194eda3803bSmrg [Flag that enforces no undefined symbols]) 5195eda3803bSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5196eda3803bSmrg [Flag to hardcode $libdir into a binary during linking. 5197eda3803bSmrg This must work even if $libdir does not exist]) 5198eda3803bSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 5199eda3803bSmrg [[If ld is used when linking, flag to hardcode $libdir into a binary 5200eda3803bSmrg during linking. This must work even if $libdir does not exist]]) 5201eda3803bSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5202eda3803bSmrg [Whether we need a single "-rpath" flag with a separated argument]) 5203eda3803bSmrg_LT_TAGDECL([], [hardcode_direct], [0], 5204eda3803bSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5205eda3803bSmrg DIR into the resulting binary]) 5206eda3803bSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5207eda3803bSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5208eda3803bSmrg DIR into the resulting binary and the resulting library dependency is 5209eda3803bSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5210eda3803bSmrg library is relocated]) 5211eda3803bSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5212eda3803bSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5213eda3803bSmrg into the resulting binary]) 5214eda3803bSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5215eda3803bSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5216eda3803bSmrg into the resulting binary]) 5217eda3803bSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 5218eda3803bSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 5219eda3803bSmrg into the library and all subsequent libraries and executables linked 5220eda3803bSmrg against it]) 5221eda3803bSmrg_LT_TAGDECL([], [inherit_rpath], [0], 5222eda3803bSmrg [Set to yes if linker adds runtime paths of dependent libraries 5223eda3803bSmrg to runtime path list]) 5224eda3803bSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 5225eda3803bSmrg [Whether libtool must link a program against all its dependency libraries]) 5226eda3803bSmrg_LT_TAGDECL([], [fix_srcfile_path], [1], 5227eda3803bSmrg [Fix the shell variable $srcfile for the compiler]) 5228eda3803bSmrg_LT_TAGDECL([], [always_export_symbols], [0], 5229eda3803bSmrg [Set to "yes" if exported symbols are required]) 5230eda3803bSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5231eda3803bSmrg [The commands to list exported symbols]) 5232eda3803bSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 5233eda3803bSmrg [Symbols that should not be listed in the preloaded symbols]) 5234eda3803bSmrg_LT_TAGDECL([], [include_expsyms], [1], 5235eda3803bSmrg [Symbols that must always be exported]) 5236eda3803bSmrg_LT_TAGDECL([], [prelink_cmds], [2], 5237eda3803bSmrg [Commands necessary for linking programs (against libraries) with templates]) 5238eda3803bSmrg_LT_TAGDECL([], [file_list_spec], [1], 5239eda3803bSmrg [Specify filename containing input files]) 5240eda3803bSmrgdnl FIXME: Not yet implemented 5241eda3803bSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5242eda3803bSmrgdnl [Compiler flag to generate thread safe objects]) 5243eda3803bSmrg])# _LT_LINKER_SHLIBS 5244eda3803bSmrg 5245eda3803bSmrg 5246eda3803bSmrg# _LT_LANG_C_CONFIG([TAG]) 5247eda3803bSmrg# ------------------------ 5248eda3803bSmrg# Ensure that the configuration variables for a C compiler are suitably 5249eda3803bSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 5250eda3803bSmrg# the compiler configuration to `libtool'. 5251eda3803bSmrgm4_defun([_LT_LANG_C_CONFIG], 5252eda3803bSmrg[m4_require([_LT_DECL_EGREP])dnl 5253eda3803bSmrglt_save_CC="$CC" 5254eda3803bSmrgAC_LANG_PUSH(C) 5255fe5e51b7Smrg 5256eda3803bSmrg# Source file extension for C test sources. 5257eda3803bSmrgac_ext=c 5258fe5e51b7Smrg 5259eda3803bSmrg# Object file extension for compiled C test sources. 5260eda3803bSmrgobjext=o 5261eda3803bSmrg_LT_TAGVAR(objext, $1)=$objext 5262fe5e51b7Smrg 5263eda3803bSmrg# Code to be used in simple compile tests 5264eda3803bSmrglt_simple_compile_test_code="int some_variable = 0;" 5265fe5e51b7Smrg 5266eda3803bSmrg# Code to be used in simple link tests 5267eda3803bSmrglt_simple_link_test_code='int main(){return(0);}' 5268fe5e51b7Smrg 5269eda3803bSmrg_LT_TAG_COMPILER 5270eda3803bSmrg# Save the default compiler, since it gets overwritten when the other 5271eda3803bSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5272eda3803bSmrgcompiler_DEFAULT=$CC 5273fe5e51b7Smrg 5274eda3803bSmrg# save warnings/boilerplate of simple test code 5275eda3803bSmrg_LT_COMPILER_BOILERPLATE 5276eda3803bSmrg_LT_LINKER_BOILERPLATE 5277fe5e51b7Smrg 5278eda3803bSmrgif test -n "$compiler"; then 5279eda3803bSmrg _LT_COMPILER_NO_RTTI($1) 5280eda3803bSmrg _LT_COMPILER_PIC($1) 5281eda3803bSmrg _LT_COMPILER_C_O($1) 5282eda3803bSmrg _LT_COMPILER_FILE_LOCKS($1) 5283eda3803bSmrg _LT_LINKER_SHLIBS($1) 5284eda3803bSmrg _LT_SYS_DYNAMIC_LINKER($1) 5285eda3803bSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 5286eda3803bSmrg LT_SYS_DLOPEN_SELF 5287eda3803bSmrg _LT_CMD_STRIPLIB 5288eda3803bSmrg 5289eda3803bSmrg # Report which library types will actually be built 5290eda3803bSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5291eda3803bSmrg AC_MSG_RESULT([$can_build_shared]) 5292eda3803bSmrg 5293eda3803bSmrg AC_MSG_CHECKING([whether to build shared libraries]) 5294eda3803bSmrg test "$can_build_shared" = "no" && enable_shared=no 5295eda3803bSmrg 5296eda3803bSmrg # On AIX, shared libraries and static libraries use the same namespace, and 5297eda3803bSmrg # are all built from PIC. 5298eda3803bSmrg case $host_os in 5299eda3803bSmrg aix3*) 5300eda3803bSmrg test "$enable_shared" = yes && enable_static=no 5301eda3803bSmrg if test -n "$RANLIB"; then 5302eda3803bSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5303eda3803bSmrg postinstall_cmds='$RANLIB $lib' 5304eda3803bSmrg fi 5305eda3803bSmrg ;; 5306fe5e51b7Smrg 5307eda3803bSmrg aix[[4-9]]*) 5308eda3803bSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5309eda3803bSmrg test "$enable_shared" = yes && enable_static=no 5310eda3803bSmrg fi 5311eda3803bSmrg ;; 5312eda3803bSmrg esac 5313eda3803bSmrg AC_MSG_RESULT([$enable_shared]) 5314fe5e51b7Smrg 5315eda3803bSmrg AC_MSG_CHECKING([whether to build static libraries]) 5316eda3803bSmrg # Make sure either enable_shared or enable_static is yes. 5317eda3803bSmrg test "$enable_shared" = yes || enable_static=yes 5318eda3803bSmrg AC_MSG_RESULT([$enable_static]) 5319fe5e51b7Smrg 5320eda3803bSmrg _LT_CONFIG($1) 5321eda3803bSmrgfi 5322eda3803bSmrgAC_LANG_POP 5323eda3803bSmrgCC="$lt_save_CC" 5324eda3803bSmrg])# _LT_LANG_C_CONFIG 5325fe5e51b7Smrg 5326fe5e51b7Smrg 5327eda3803bSmrg# _LT_PROG_CXX 5328eda3803bSmrg# ------------ 5329eda3803bSmrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ 5330eda3803bSmrg# compiler, we have our own version here. 5331eda3803bSmrgm4_defun([_LT_PROG_CXX], 5332eda3803bSmrg[ 5333eda3803bSmrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) 5334eda3803bSmrgAC_PROG_CXX 5335eda3803bSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5336eda3803bSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5337eda3803bSmrg (test "X$CXX" != "Xg++"))) ; then 5338eda3803bSmrg AC_PROG_CXXCPP 5339eda3803bSmrgelse 5340eda3803bSmrg _lt_caught_CXX_error=yes 5341eda3803bSmrgfi 5342eda3803bSmrgpopdef([AC_MSG_ERROR]) 5343eda3803bSmrg])# _LT_PROG_CXX 5344fe5e51b7Smrg 5345eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 5346eda3803bSmrgdnl AC_DEFUN([_LT_PROG_CXX], []) 5347fe5e51b7Smrg 5348fe5e51b7Smrg 5349eda3803bSmrg# _LT_LANG_CXX_CONFIG([TAG]) 5350eda3803bSmrg# -------------------------- 5351eda3803bSmrg# Ensure that the configuration variables for a C++ compiler are suitably 5352eda3803bSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 5353eda3803bSmrg# the compiler configuration to `libtool'. 5354eda3803bSmrgm4_defun([_LT_LANG_CXX_CONFIG], 5355eda3803bSmrg[AC_REQUIRE([_LT_PROG_CXX])dnl 5356eda3803bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5357eda3803bSmrgm4_require([_LT_DECL_EGREP])dnl 5358eda3803bSmrg 5359eda3803bSmrgAC_LANG_PUSH(C++) 5360eda3803bSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5361eda3803bSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 5362eda3803bSmrg_LT_TAGVAR(always_export_symbols, $1)=no 5363eda3803bSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5364eda3803bSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 5365eda3803bSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5366eda3803bSmrg_LT_TAGVAR(hardcode_direct, $1)=no 5367eda3803bSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5368eda3803bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5369eda3803bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5370eda3803bSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5371eda3803bSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5372eda3803bSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5373eda3803bSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 5374eda3803bSmrg_LT_TAGVAR(inherit_rpath, $1)=no 5375eda3803bSmrg_LT_TAGVAR(module_cmds, $1)= 5376eda3803bSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 5377eda3803bSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5378eda3803bSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5379eda3803bSmrg_LT_TAGVAR(no_undefined_flag, $1)= 5380eda3803bSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5381eda3803bSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5382fe5e51b7Smrg 5383eda3803bSmrg# Source file extension for C++ test sources. 5384eda3803bSmrgac_ext=cpp 5385fe5e51b7Smrg 5386eda3803bSmrg# Object file extension for compiled C++ test sources. 5387eda3803bSmrgobjext=o 5388eda3803bSmrg_LT_TAGVAR(objext, $1)=$objext 5389eda3803bSmrg 5390eda3803bSmrg# No sense in running all these tests if we already determined that 5391eda3803bSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 5392eda3803bSmrg# are currently assumed to apply to all compilers on this platform, 5393eda3803bSmrg# and will be corrupted by setting them based on a non-working compiler. 5394eda3803bSmrgif test "$_lt_caught_CXX_error" != yes; then 5395eda3803bSmrg # Code to be used in simple compile tests 5396eda3803bSmrg lt_simple_compile_test_code="int some_variable = 0;" 5397eda3803bSmrg 5398eda3803bSmrg # Code to be used in simple link tests 5399eda3803bSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5400eda3803bSmrg 5401eda3803bSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5402eda3803bSmrg _LT_TAG_COMPILER 5403eda3803bSmrg 5404eda3803bSmrg # save warnings/boilerplate of simple test code 5405eda3803bSmrg _LT_COMPILER_BOILERPLATE 5406eda3803bSmrg _LT_LINKER_BOILERPLATE 5407eda3803bSmrg 5408eda3803bSmrg # Allow CC to be a program name with arguments. 5409eda3803bSmrg lt_save_CC=$CC 5410eda3803bSmrg lt_save_LD=$LD 5411eda3803bSmrg lt_save_GCC=$GCC 5412eda3803bSmrg GCC=$GXX 5413eda3803bSmrg lt_save_with_gnu_ld=$with_gnu_ld 5414eda3803bSmrg lt_save_path_LD=$lt_cv_path_LD 5415eda3803bSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5416eda3803bSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5417eda3803bSmrg else 5418eda3803bSmrg $as_unset lt_cv_prog_gnu_ld 5419eda3803bSmrg fi 5420eda3803bSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 5421eda3803bSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 5422eda3803bSmrg else 5423eda3803bSmrg $as_unset lt_cv_path_LD 5424eda3803bSmrg fi 5425eda3803bSmrg test -z "${LDCXX+set}" || LD=$LDCXX 5426eda3803bSmrg CC=${CXX-"c++"} 5427eda3803bSmrg compiler=$CC 5428eda3803bSmrg _LT_TAGVAR(compiler, $1)=$CC 5429eda3803bSmrg _LT_CC_BASENAME([$compiler]) 5430fe5e51b7Smrg 5431eda3803bSmrg if test -n "$compiler"; then 5432eda3803bSmrg # We don't want -fno-exception when compiling C++ code, so set the 5433eda3803bSmrg # no_builtin_flag separately 5434eda3803bSmrg if test "$GXX" = yes; then 5435eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5436eda3803bSmrg else 5437eda3803bSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5438eda3803bSmrg fi 5439fe5e51b7Smrg 5440eda3803bSmrg if test "$GXX" = yes; then 5441eda3803bSmrg # Set up default GNU C++ configuration 5442fe5e51b7Smrg 5443eda3803bSmrg LT_PATH_LD 5444fe5e51b7Smrg 5445eda3803bSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5446eda3803bSmrg # archiving commands below assume that GNU ld is being used. 5447eda3803bSmrg if test "$with_gnu_ld" = yes; then 5448eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5449eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 5450fe5e51b7Smrg 5451eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5452eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5453fe5e51b7Smrg 5454eda3803bSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5455eda3803bSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5456eda3803bSmrg # investigate it a little bit more. (MM) 5457eda3803bSmrg wlarc='${wl}' 5458fe5e51b7Smrg 5459eda3803bSmrg # ancient GNU ld didn't support --whole-archive et. al. 5460eda3803bSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5461eda3803bSmrg $GREP 'no-whole-archive' > /dev/null; then 5462eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5463eda3803bSmrg else 5464eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5465eda3803bSmrg fi 5466eda3803bSmrg else 5467eda3803bSmrg with_gnu_ld=no 5468eda3803bSmrg wlarc= 5469eda3803bSmrg 5470eda3803bSmrg # A generic and very simple default shared library creation 5471eda3803bSmrg # command for GNU C++ for the case where it uses the native 5472eda3803bSmrg # linker, instead of GNU ld. If possible, this setting should 5473eda3803bSmrg # overridden to take advantage of the native linker features on 5474eda3803bSmrg # the platform it is being used on. 5475eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5476eda3803bSmrg fi 5477fe5e51b7Smrg 5478eda3803bSmrg # Commands to make compiler produce verbose output that lists 5479eda3803bSmrg # what "hidden" libraries, object files and flags are used when 5480eda3803bSmrg # linking a shared library. 5481eda3803bSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 5482fe5e51b7Smrg 5483eda3803bSmrg else 5484eda3803bSmrg GXX=no 5485eda3803bSmrg with_gnu_ld=no 5486eda3803bSmrg wlarc= 5487eda3803bSmrg fi 5488fe5e51b7Smrg 5489eda3803bSmrg # PORTME: fill in a description of your system's C++ link characteristics 5490eda3803bSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5491eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5492eda3803bSmrg case $host_os in 5493eda3803bSmrg aix3*) 5494eda3803bSmrg # FIXME: insert proper C++ library support 5495eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5496eda3803bSmrg ;; 5497eda3803bSmrg aix[[4-9]]*) 5498eda3803bSmrg if test "$host_cpu" = ia64; then 5499eda3803bSmrg # On IA64, the linker does run time linking by default, so we don't 5500eda3803bSmrg # have to do anything special. 5501eda3803bSmrg aix_use_runtimelinking=no 5502eda3803bSmrg exp_sym_flag='-Bexport' 5503eda3803bSmrg no_entry_flag="" 5504eda3803bSmrg else 5505eda3803bSmrg aix_use_runtimelinking=no 5506eda3803bSmrg 5507eda3803bSmrg # Test if we are trying to use run time linking or normal 5508eda3803bSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5509eda3803bSmrg # need to do runtime linking. 5510eda3803bSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5511eda3803bSmrg for ld_flag in $LDFLAGS; do 5512eda3803bSmrg case $ld_flag in 5513eda3803bSmrg *-brtl*) 5514eda3803bSmrg aix_use_runtimelinking=yes 5515eda3803bSmrg break 5516eda3803bSmrg ;; 5517eda3803bSmrg esac 5518eda3803bSmrg done 5519eda3803bSmrg ;; 5520eda3803bSmrg esac 5521fe5e51b7Smrg 5522eda3803bSmrg exp_sym_flag='-bexport' 5523eda3803bSmrg no_entry_flag='-bnoentry' 5524eda3803bSmrg fi 5525fe5e51b7Smrg 5526eda3803bSmrg # When large executables or shared objects are built, AIX ld can 5527eda3803bSmrg # have problems creating the table of contents. If linking a library 5528eda3803bSmrg # or program results in "error TOC overflow" add -mminimal-toc to 5529eda3803bSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5530eda3803bSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5531eda3803bSmrg 5532eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='' 5533eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5534eda3803bSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5535eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5536eda3803bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5537eda3803bSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5538eda3803bSmrg 5539eda3803bSmrg if test "$GXX" = yes; then 5540eda3803bSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5541eda3803bSmrg # We only want to do this on AIX 4.2 and lower, the check 5542eda3803bSmrg # below for broken collect2 doesn't work under 4.3+ 5543eda3803bSmrg collect2name=`${CC} -print-prog-name=collect2` 5544eda3803bSmrg if test -f "$collect2name" && 5545eda3803bSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5546eda3803bSmrg then 5547eda3803bSmrg # We have reworked collect2 5548eda3803bSmrg : 5549eda3803bSmrg else 5550eda3803bSmrg # We have old collect2 5551eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5552eda3803bSmrg # It fails to find uninstalled libraries when the uninstalled 5553eda3803bSmrg # path is not listed in the libpath. Setting hardcode_minus_L 5554eda3803bSmrg # to unsupported forces relinking 5555eda3803bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5556eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5557eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5558eda3803bSmrg fi 5559eda3803bSmrg esac 5560eda3803bSmrg shared_flag='-shared' 5561eda3803bSmrg if test "$aix_use_runtimelinking" = yes; then 5562eda3803bSmrg shared_flag="$shared_flag "'${wl}-G' 5563eda3803bSmrg fi 5564eda3803bSmrg else 5565eda3803bSmrg # not using gcc 5566eda3803bSmrg if test "$host_cpu" = ia64; then 5567eda3803bSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5568eda3803bSmrg # chokes on -Wl,-G. The following line is correct: 5569eda3803bSmrg shared_flag='-G' 5570eda3803bSmrg else 5571eda3803bSmrg if test "$aix_use_runtimelinking" = yes; then 5572eda3803bSmrg shared_flag='${wl}-G' 5573eda3803bSmrg else 5574eda3803bSmrg shared_flag='${wl}-bM:SRE' 5575eda3803bSmrg fi 5576eda3803bSmrg fi 5577eda3803bSmrg fi 5578fe5e51b7Smrg 5579eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5580eda3803bSmrg # It seems that -bexpall does not export symbols beginning with 5581eda3803bSmrg # underscore (_), so it is better to generate a list of symbols to 5582eda3803bSmrg # export. 5583eda3803bSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5584eda3803bSmrg if test "$aix_use_runtimelinking" = yes; then 5585eda3803bSmrg # Warning - without using the other runtime loading flags (-brtl), 5586eda3803bSmrg # -berok will link without error, but may produce a broken library. 5587eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5588eda3803bSmrg # Determine the default libpath from the value encoded in an empty 5589eda3803bSmrg # executable. 5590eda3803bSmrg _LT_SYS_MODULE_PATH_AIX 5591eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5592eda3803bSmrg 5593eda3803bSmrg _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5594eda3803bSmrg else 5595eda3803bSmrg if test "$host_cpu" = ia64; then 5596eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5597eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5598eda3803bSmrg _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" 5599eda3803bSmrg else 5600eda3803bSmrg # Determine the default libpath from the value encoded in an 5601eda3803bSmrg # empty executable. 5602eda3803bSmrg _LT_SYS_MODULE_PATH_AIX 5603eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5604eda3803bSmrg # Warning - without using the other run time loading flags, 5605eda3803bSmrg # -berok will link without error, but may produce a broken library. 5606eda3803bSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5607eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5608eda3803bSmrg # Exported symbols can be pulled into shared objects from archives 5609eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5610eda3803bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5611eda3803bSmrg # This is similar to how AIX traditionally builds its shared 5612eda3803bSmrg # libraries. 5613eda3803bSmrg _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' 5614eda3803bSmrg fi 5615eda3803bSmrg fi 5616eda3803bSmrg ;; 5617fe5e51b7Smrg 5618eda3803bSmrg beos*) 5619eda3803bSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5620eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5621eda3803bSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5622eda3803bSmrg # support --undefined. This deserves some investigation. FIXME 5623eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5624eda3803bSmrg else 5625eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5626eda3803bSmrg fi 5627eda3803bSmrg ;; 5628fe5e51b7Smrg 5629eda3803bSmrg chorus*) 5630eda3803bSmrg case $cc_basename in 5631eda3803bSmrg *) 5632eda3803bSmrg # FIXME: insert proper C++ library support 5633eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5634eda3803bSmrg ;; 5635eda3803bSmrg esac 5636eda3803bSmrg ;; 5637fe5e51b7Smrg 5638eda3803bSmrg cygwin* | mingw* | pw32* | cegcc*) 5639eda3803bSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5640eda3803bSmrg # as there is no search path for DLLs. 5641eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5642eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5643eda3803bSmrg _LT_TAGVAR(always_export_symbols, $1)=no 5644eda3803bSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5645eda3803bSmrg 5646eda3803bSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5647eda3803bSmrg _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' 5648eda3803bSmrg # If the export-symbols file already is a .def file (1st line 5649eda3803bSmrg # is EXPORTS), use it as is; otherwise, prepend... 5650eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5651eda3803bSmrg cp $export_symbols $output_objdir/$soname.def; 5652eda3803bSmrg else 5653eda3803bSmrg echo EXPORTS > $output_objdir/$soname.def; 5654eda3803bSmrg cat $export_symbols >> $output_objdir/$soname.def; 5655eda3803bSmrg fi~ 5656eda3803bSmrg $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' 5657eda3803bSmrg else 5658eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5659eda3803bSmrg fi 5660eda3803bSmrg ;; 5661eda3803bSmrg darwin* | rhapsody*) 5662eda3803bSmrg _LT_DARWIN_LINKER_FEATURES($1) 5663eda3803bSmrg ;; 5664fe5e51b7Smrg 5665eda3803bSmrg dgux*) 5666eda3803bSmrg case $cc_basename in 5667eda3803bSmrg ec++*) 5668eda3803bSmrg # FIXME: insert proper C++ library support 5669eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5670eda3803bSmrg ;; 5671eda3803bSmrg ghcx*) 5672eda3803bSmrg # Green Hills C++ Compiler 5673eda3803bSmrg # FIXME: insert proper C++ library support 5674eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5675eda3803bSmrg ;; 5676eda3803bSmrg *) 5677eda3803bSmrg # FIXME: insert proper C++ library support 5678eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5679eda3803bSmrg ;; 5680eda3803bSmrg esac 5681eda3803bSmrg ;; 5682fe5e51b7Smrg 5683eda3803bSmrg freebsd[[12]]*) 5684eda3803bSmrg # C++ shared libraries reported to be fairly broken before 5685eda3803bSmrg # switch to ELF 5686eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5687eda3803bSmrg ;; 5688fe5e51b7Smrg 5689eda3803bSmrg freebsd-elf*) 5690eda3803bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5691eda3803bSmrg ;; 5692fe5e51b7Smrg 5693eda3803bSmrg freebsd* | dragonfly*) 5694eda3803bSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 5695eda3803bSmrg # conventions 5696eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5697eda3803bSmrg ;; 5698fe5e51b7Smrg 5699eda3803bSmrg gnu*) 5700eda3803bSmrg ;; 5701fe5e51b7Smrg 5702eda3803bSmrg hpux9*) 5703eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5704eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5705eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5706eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5707eda3803bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5708eda3803bSmrg # but as the default 5709eda3803bSmrg # location of the library. 5710eda3803bSmrg 5711eda3803bSmrg case $cc_basename in 5712eda3803bSmrg CC*) 5713eda3803bSmrg # FIXME: insert proper C++ library support 5714eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5715eda3803bSmrg ;; 5716eda3803bSmrg aCC*) 5717eda3803bSmrg _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' 5718eda3803bSmrg # Commands to make compiler produce verbose output that lists 5719eda3803bSmrg # what "hidden" libraries, object files and flags are used when 5720eda3803bSmrg # linking a shared library. 5721eda3803bSmrg # 5722eda3803bSmrg # There doesn't appear to be a way to prevent this compiler from 5723eda3803bSmrg # explicitly linking system object files so we need to strip them 5724eda3803bSmrg # from the output so that they don't get included in the library 5725eda3803bSmrg # dependencies. 5726eda3803bSmrg 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; $ECHO "X$list" | $Xsed' 5727eda3803bSmrg ;; 5728eda3803bSmrg *) 5729eda3803bSmrg if test "$GXX" = yes; then 5730eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5731eda3803bSmrg else 5732eda3803bSmrg # FIXME: insert proper C++ library support 5733eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5734eda3803bSmrg fi 5735eda3803bSmrg ;; 5736eda3803bSmrg esac 5737eda3803bSmrg ;; 5738fe5e51b7Smrg 5739eda3803bSmrg hpux10*|hpux11*) 5740eda3803bSmrg if test $with_gnu_ld = no; then 5741eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5742eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5743eda3803bSmrg 5744eda3803bSmrg case $host_cpu in 5745eda3803bSmrg hppa*64*|ia64*) 5746eda3803bSmrg ;; 5747eda3803bSmrg *) 5748eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5749eda3803bSmrg ;; 5750eda3803bSmrg esac 5751eda3803bSmrg fi 5752eda3803bSmrg case $host_cpu in 5753eda3803bSmrg hppa*64*|ia64*) 5754eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5755eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5756eda3803bSmrg ;; 5757eda3803bSmrg *) 5758eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5759eda3803bSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5760eda3803bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5761eda3803bSmrg # but as the default 5762eda3803bSmrg # location of the library. 5763eda3803bSmrg ;; 5764eda3803bSmrg esac 5765fe5e51b7Smrg 5766eda3803bSmrg case $cc_basename in 5767eda3803bSmrg CC*) 5768eda3803bSmrg # FIXME: insert proper C++ library support 5769eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5770eda3803bSmrg ;; 5771eda3803bSmrg aCC*) 5772eda3803bSmrg case $host_cpu in 5773eda3803bSmrg hppa*64*) 5774eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5775eda3803bSmrg ;; 5776eda3803bSmrg ia64*) 5777eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5778eda3803bSmrg ;; 5779eda3803bSmrg *) 5780eda3803bSmrg _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' 5781eda3803bSmrg ;; 5782eda3803bSmrg esac 5783eda3803bSmrg # Commands to make compiler produce verbose output that lists 5784eda3803bSmrg # what "hidden" libraries, object files and flags are used when 5785eda3803bSmrg # linking a shared library. 5786eda3803bSmrg # 5787eda3803bSmrg # There doesn't appear to be a way to prevent this compiler from 5788eda3803bSmrg # explicitly linking system object files so we need to strip them 5789eda3803bSmrg # from the output so that they don't get included in the library 5790eda3803bSmrg # dependencies. 5791eda3803bSmrg 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; $ECHO "X$list" | $Xsed' 5792eda3803bSmrg ;; 5793eda3803bSmrg *) 5794eda3803bSmrg if test "$GXX" = yes; then 5795eda3803bSmrg if test $with_gnu_ld = no; then 5796eda3803bSmrg case $host_cpu in 5797eda3803bSmrg hppa*64*) 5798eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5799eda3803bSmrg ;; 5800eda3803bSmrg ia64*) 5801eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5802eda3803bSmrg ;; 5803eda3803bSmrg *) 5804eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5805eda3803bSmrg ;; 5806eda3803bSmrg esac 5807eda3803bSmrg fi 5808eda3803bSmrg else 5809eda3803bSmrg # FIXME: insert proper C++ library support 5810eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5811eda3803bSmrg fi 5812eda3803bSmrg ;; 5813eda3803bSmrg esac 5814eda3803bSmrg ;; 5815fe5e51b7Smrg 5816eda3803bSmrg interix[[3-9]]*) 5817eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5818eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5819eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5820eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5821eda3803bSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5822eda3803bSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5823eda3803bSmrg # default) and relocated if they conflict, which is a slow very memory 5824eda3803bSmrg # consuming and fragmenting process. To avoid this, we pick a random, 5825eda3803bSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5826eda3803bSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5827eda3803bSmrg _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' 5828eda3803bSmrg _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' 5829eda3803bSmrg ;; 5830eda3803bSmrg irix5* | irix6*) 5831eda3803bSmrg case $cc_basename in 5832eda3803bSmrg CC*) 5833eda3803bSmrg # SGI C++ 5834eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 5835eda3803bSmrg 5836eda3803bSmrg # Archives containing C++ object files must be created using 5837eda3803bSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 5838eda3803bSmrg # necessary to make sure instantiated templates are included 5839eda3803bSmrg # in the archive. 5840eda3803bSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 5841eda3803bSmrg ;; 5842eda3803bSmrg *) 5843eda3803bSmrg if test "$GXX" = yes; then 5844eda3803bSmrg if test "$with_gnu_ld" = no; then 5845eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 5846eda3803bSmrg else 5847eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' 5848eda3803bSmrg fi 5849eda3803bSmrg fi 5850eda3803bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5851eda3803bSmrg ;; 5852eda3803bSmrg esac 5853eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5854eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5855eda3803bSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 5856eda3803bSmrg ;; 5857fe5e51b7Smrg 5858eda3803bSmrg linux* | k*bsd*-gnu) 5859eda3803bSmrg case $cc_basename in 5860eda3803bSmrg KCC*) 5861eda3803bSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 5862eda3803bSmrg 5863eda3803bSmrg # KCC will only create a shared library if the output file 5864eda3803bSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 5865eda3803bSmrg # to its proper name (with version) after linking. 5866eda3803bSmrg _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' 5867eda3803bSmrg _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' 5868eda3803bSmrg # Commands to make compiler produce verbose output that lists 5869eda3803bSmrg # what "hidden" libraries, object files and flags are used when 5870eda3803bSmrg # linking a shared library. 5871eda3803bSmrg # 5872eda3803bSmrg # There doesn't appear to be a way to prevent this compiler from 5873eda3803bSmrg # explicitly linking system object files so we need to strip them 5874eda3803bSmrg # from the output so that they don't get included in the library 5875eda3803bSmrg # dependencies. 5876eda3803bSmrg 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; $ECHO "X$list" | $Xsed' 5877eda3803bSmrg 5878eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5879eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5880eda3803bSmrg 5881eda3803bSmrg # Archives containing C++ object files must be created using 5882eda3803bSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 5883eda3803bSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 5884eda3803bSmrg ;; 5885eda3803bSmrg icpc* | ecpc* ) 5886eda3803bSmrg # Intel C++ 5887eda3803bSmrg with_gnu_ld=yes 5888eda3803bSmrg # version 8.0 and above of icpc choke on multiply defined symbols 5889eda3803bSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 5890eda3803bSmrg # earlier do not add the objects themselves. 5891eda3803bSmrg case `$CC -V 2>&1` in 5892eda3803bSmrg *"Version 7."*) 5893eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5894eda3803bSmrg _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' 5895eda3803bSmrg ;; 5896eda3803bSmrg *) # Version 8.0 or newer 5897eda3803bSmrg tmp_idyn= 5898eda3803bSmrg case $host_cpu in 5899eda3803bSmrg ia64*) tmp_idyn=' -i_dynamic';; 5900eda3803bSmrg esac 5901eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5902eda3803bSmrg _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' 5903eda3803bSmrg ;; 5904eda3803bSmrg esac 5905eda3803bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5906eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5907eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5908eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5909eda3803bSmrg ;; 5910eda3803bSmrg pgCC* | pgcpp*) 5911eda3803bSmrg # Portland Group C++ compiler 5912eda3803bSmrg case `$CC -V` in 5913eda3803bSmrg *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) 5914eda3803bSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 5915eda3803bSmrg rm -rf $tpldir~ 5916eda3803bSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 5917eda3803bSmrg compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' 5918eda3803bSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 5919eda3803bSmrg rm -rf $tpldir~ 5920eda3803bSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 5921eda3803bSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ 5922eda3803bSmrg $RANLIB $oldlib' 5923eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 5924eda3803bSmrg rm -rf $tpldir~ 5925eda3803bSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 5926eda3803bSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 5927eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 5928eda3803bSmrg rm -rf $tpldir~ 5929eda3803bSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 5930eda3803bSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 5931eda3803bSmrg ;; 5932eda3803bSmrg *) # Version 6 will use weak symbols 5933eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 5934eda3803bSmrg _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' 5935eda3803bSmrg ;; 5936eda3803bSmrg esac 5937fe5e51b7Smrg 5938eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5939eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5940eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 5941eda3803bSmrg ;; 5942eda3803bSmrg cxx*) 5943eda3803bSmrg # Compaq C++ 5944eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5945eda3803bSmrg _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' 5946fe5e51b7Smrg 5947eda3803bSmrg runpath_var=LD_RUN_PATH 5948eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5949eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5950fe5e51b7Smrg 5951eda3803bSmrg # Commands to make compiler produce verbose output that lists 5952eda3803bSmrg # what "hidden" libraries, object files and flags are used when 5953eda3803bSmrg # linking a shared library. 5954eda3803bSmrg # 5955eda3803bSmrg # There doesn't appear to be a way to prevent this compiler from 5956eda3803bSmrg # explicitly linking system object files so we need to strip them 5957eda3803bSmrg # from the output so that they don't get included in the library 5958eda3803bSmrg # dependencies. 5959eda3803bSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 5960eda3803bSmrg ;; 5961eda3803bSmrg xl*) 5962eda3803bSmrg # IBM XL 8.0 on PPC, with GNU ld 5963eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5964eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5965eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5966eda3803bSmrg if test "x$supports_anon_versioning" = xyes; then 5967eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5968eda3803bSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5969eda3803bSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5970eda3803bSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5971eda3803bSmrg fi 5972eda3803bSmrg ;; 5973eda3803bSmrg *) 5974eda3803bSmrg case `$CC -V 2>&1 | sed 5q` in 5975eda3803bSmrg *Sun\ C*) 5976eda3803bSmrg # Sun C++ 5.9 5977eda3803bSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 5978eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5979eda3803bSmrg _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' 5980eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5981eda3803bSmrg _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 5982eda3803bSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5983eda3803bSmrg 5984eda3803bSmrg # Not sure whether something based on 5985eda3803bSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 5986eda3803bSmrg # would be better. 5987eda3803bSmrg output_verbose_link_cmd='echo' 5988eda3803bSmrg 5989eda3803bSmrg # Archives containing C++ object files must be created using 5990eda3803bSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 5991eda3803bSmrg # necessary to make sure instantiated templates are included 5992eda3803bSmrg # in the archive. 5993eda3803bSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 5994eda3803bSmrg ;; 5995eda3803bSmrg esac 5996eda3803bSmrg ;; 5997eda3803bSmrg esac 5998eda3803bSmrg ;; 5999fe5e51b7Smrg 6000eda3803bSmrg lynxos*) 6001eda3803bSmrg # FIXME: insert proper C++ library support 6002eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6003eda3803bSmrg ;; 6004fe5e51b7Smrg 6005eda3803bSmrg m88k*) 6006eda3803bSmrg # FIXME: insert proper C++ library support 6007eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6008eda3803bSmrg ;; 6009fe5e51b7Smrg 6010eda3803bSmrg mvs*) 6011eda3803bSmrg case $cc_basename in 6012eda3803bSmrg cxx*) 6013eda3803bSmrg # FIXME: insert proper C++ library support 6014eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6015eda3803bSmrg ;; 6016eda3803bSmrg *) 6017eda3803bSmrg # FIXME: insert proper C++ library support 6018eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6019eda3803bSmrg ;; 6020eda3803bSmrg esac 6021eda3803bSmrg ;; 6022fe5e51b7Smrg 6023eda3803bSmrg netbsd*) 6024eda3803bSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6025eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6026eda3803bSmrg wlarc= 6027eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6028eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6029eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6030eda3803bSmrg fi 6031eda3803bSmrg # Workaround some broken pre-1.5 toolchains 6032eda3803bSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6033eda3803bSmrg ;; 6034fe5e51b7Smrg 6035eda3803bSmrg *nto* | *qnx*) 6036eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6037eda3803bSmrg ;; 6038fe5e51b7Smrg 6039eda3803bSmrg openbsd2*) 6040eda3803bSmrg # C++ shared libraries are fairly broken 6041eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6042eda3803bSmrg ;; 6043fe5e51b7Smrg 6044eda3803bSmrg openbsd*) 6045eda3803bSmrg if test -f /usr/libexec/ld.so; then 6046eda3803bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6047eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6048eda3803bSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6049eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6050eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6051eda3803bSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6052eda3803bSmrg _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' 6053eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6054eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6055eda3803bSmrg fi 6056eda3803bSmrg output_verbose_link_cmd=echo 6057eda3803bSmrg else 6058eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6059eda3803bSmrg fi 6060eda3803bSmrg ;; 6061fe5e51b7Smrg 6062eda3803bSmrg osf3* | osf4* | osf5*) 6063eda3803bSmrg case $cc_basename in 6064eda3803bSmrg KCC*) 6065eda3803bSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6066eda3803bSmrg 6067eda3803bSmrg # KCC will only create a shared library if the output file 6068eda3803bSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6069eda3803bSmrg # to its proper name (with version) after linking. 6070eda3803bSmrg _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' 6071eda3803bSmrg 6072eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6073eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6074eda3803bSmrg 6075eda3803bSmrg # Archives containing C++ object files must be created using 6076eda3803bSmrg # the KAI C++ compiler. 6077eda3803bSmrg case $host in 6078eda3803bSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6079eda3803bSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6080eda3803bSmrg esac 6081eda3803bSmrg ;; 6082eda3803bSmrg RCC*) 6083eda3803bSmrg # Rational C++ 2.4.1 6084eda3803bSmrg # FIXME: insert proper C++ library support 6085eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6086eda3803bSmrg ;; 6087eda3803bSmrg cxx*) 6088eda3803bSmrg case $host in 6089eda3803bSmrg osf3*) 6090eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6091eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 6092eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6093eda3803bSmrg ;; 6094eda3803bSmrg *) 6095eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6096eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 6097eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6098eda3803bSmrg echo "-hidden">> $lib.exp~ 6099eda3803bSmrg $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ 6100eda3803bSmrg $RM $lib.exp' 6101eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6102eda3803bSmrg ;; 6103eda3803bSmrg esac 6104fe5e51b7Smrg 6105eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6106fe5e51b7Smrg 6107eda3803bSmrg # Commands to make compiler produce verbose output that lists 6108eda3803bSmrg # what "hidden" libraries, object files and flags are used when 6109eda3803bSmrg # linking a shared library. 6110eda3803bSmrg # 6111eda3803bSmrg # There doesn't appear to be a way to prevent this compiler from 6112eda3803bSmrg # explicitly linking system object files so we need to strip them 6113eda3803bSmrg # from the output so that they don't get included in the library 6114eda3803bSmrg # dependencies. 6115eda3803bSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 6116eda3803bSmrg ;; 6117eda3803bSmrg *) 6118eda3803bSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6119eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6120eda3803bSmrg case $host in 6121eda3803bSmrg osf3*) 6122eda3803bSmrg _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6123eda3803bSmrg ;; 6124eda3803bSmrg *) 6125eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6126eda3803bSmrg ;; 6127eda3803bSmrg esac 6128eda3803bSmrg 6129eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6130eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6131eda3803bSmrg 6132eda3803bSmrg # Commands to make compiler produce verbose output that lists 6133eda3803bSmrg # what "hidden" libraries, object files and flags are used when 6134eda3803bSmrg # linking a shared library. 6135eda3803bSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6136eda3803bSmrg 6137eda3803bSmrg else 6138eda3803bSmrg # FIXME: insert proper C++ library support 6139eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6140eda3803bSmrg fi 6141eda3803bSmrg ;; 6142eda3803bSmrg esac 6143eda3803bSmrg ;; 6144fe5e51b7Smrg 6145eda3803bSmrg psos*) 6146eda3803bSmrg # FIXME: insert proper C++ library support 6147eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6148eda3803bSmrg ;; 6149fe5e51b7Smrg 6150eda3803bSmrg sunos4*) 6151eda3803bSmrg case $cc_basename in 6152eda3803bSmrg CC*) 6153eda3803bSmrg # Sun C++ 4.x 6154eda3803bSmrg # FIXME: insert proper C++ library support 6155eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6156eda3803bSmrg ;; 6157eda3803bSmrg lcc*) 6158eda3803bSmrg # Lucid 6159eda3803bSmrg # FIXME: insert proper C++ library support 6160eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6161eda3803bSmrg ;; 6162eda3803bSmrg *) 6163eda3803bSmrg # FIXME: insert proper C++ library support 6164eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6165eda3803bSmrg ;; 6166eda3803bSmrg esac 6167eda3803bSmrg ;; 6168fe5e51b7Smrg 6169eda3803bSmrg solaris*) 6170eda3803bSmrg case $cc_basename in 6171eda3803bSmrg CC*) 6172eda3803bSmrg # Sun C++ 4.2, 5.x and Centerline C++ 6173eda3803bSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6174eda3803bSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6175eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6176eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6177eda3803bSmrg $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' 6178eda3803bSmrg 6179eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6180eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6181eda3803bSmrg case $host_os in 6182eda3803bSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6183eda3803bSmrg *) 6184eda3803bSmrg # The compiler driver will combine and reorder linker options, 6185eda3803bSmrg # but understands `-z linker_flag'. 6186eda3803bSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6187eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6188eda3803bSmrg ;; 6189eda3803bSmrg esac 6190eda3803bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6191fe5e51b7Smrg 6192eda3803bSmrg output_verbose_link_cmd='echo' 6193fe5e51b7Smrg 6194eda3803bSmrg # Archives containing C++ object files must be created using 6195eda3803bSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6196eda3803bSmrg # necessary to make sure instantiated templates are included 6197eda3803bSmrg # in the archive. 6198eda3803bSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6199eda3803bSmrg ;; 6200eda3803bSmrg gcx*) 6201eda3803bSmrg # Green Hills C++ Compiler 6202eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6203fe5e51b7Smrg 6204eda3803bSmrg # The C++ compiler must be used to create the archive. 6205eda3803bSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6206eda3803bSmrg ;; 6207eda3803bSmrg *) 6208eda3803bSmrg # GNU C++ compiler with Solaris linker 6209eda3803bSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6210eda3803bSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6211eda3803bSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6212eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6213eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6214eda3803bSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6215eda3803bSmrg 6216eda3803bSmrg # Commands to make compiler produce verbose output that lists 6217eda3803bSmrg # what "hidden" libraries, object files and flags are used when 6218eda3803bSmrg # linking a shared library. 6219eda3803bSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6220eda3803bSmrg else 6221eda3803bSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6222eda3803bSmrg # platform. 6223eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6224eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6225eda3803bSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6226eda3803bSmrg 6227eda3803bSmrg # Commands to make compiler produce verbose output that lists 6228eda3803bSmrg # what "hidden" libraries, object files and flags are used when 6229eda3803bSmrg # linking a shared library. 6230eda3803bSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6231eda3803bSmrg fi 6232eda3803bSmrg 6233eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6234eda3803bSmrg case $host_os in 6235eda3803bSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6236eda3803bSmrg *) 6237eda3803bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6238eda3803bSmrg ;; 6239eda3803bSmrg esac 6240eda3803bSmrg fi 6241eda3803bSmrg ;; 6242eda3803bSmrg esac 6243eda3803bSmrg ;; 6244fe5e51b7Smrg 6245eda3803bSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6246eda3803bSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6247eda3803bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6248eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6249eda3803bSmrg runpath_var='LD_RUN_PATH' 6250fe5e51b7Smrg 6251eda3803bSmrg case $cc_basename in 6252eda3803bSmrg CC*) 6253eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6254eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6255eda3803bSmrg ;; 6256eda3803bSmrg *) 6257eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6258eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6259eda3803bSmrg ;; 6260eda3803bSmrg esac 6261eda3803bSmrg ;; 6262fe5e51b7Smrg 6263eda3803bSmrg sysv5* | sco3.2v5* | sco5v6*) 6264eda3803bSmrg # Note: We can NOT use -z defs as we might desire, because we do not 6265eda3803bSmrg # link with -lc, and that would cause any symbols used from libc to 6266eda3803bSmrg # always be unresolved, which means just about no library would 6267eda3803bSmrg # ever link correctly. If we're not using GNU ld we use -z text 6268eda3803bSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6269eda3803bSmrg # as -z defs. 6270eda3803bSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6271eda3803bSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6272eda3803bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6273eda3803bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6274eda3803bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6275eda3803bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6276eda3803bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6277eda3803bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6278eda3803bSmrg runpath_var='LD_RUN_PATH' 6279fe5e51b7Smrg 6280eda3803bSmrg case $cc_basename in 6281eda3803bSmrg CC*) 6282eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6283eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6284eda3803bSmrg ;; 6285eda3803bSmrg *) 6286eda3803bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6287eda3803bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6288eda3803bSmrg ;; 6289eda3803bSmrg esac 6290eda3803bSmrg ;; 6291fe5e51b7Smrg 6292eda3803bSmrg tandem*) 6293eda3803bSmrg case $cc_basename in 6294eda3803bSmrg NCC*) 6295eda3803bSmrg # NonStop-UX NCC 3.20 6296eda3803bSmrg # FIXME: insert proper C++ library support 6297eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6298eda3803bSmrg ;; 6299eda3803bSmrg *) 6300eda3803bSmrg # FIXME: insert proper C++ library support 6301eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6302eda3803bSmrg ;; 6303eda3803bSmrg esac 6304eda3803bSmrg ;; 6305fe5e51b7Smrg 6306eda3803bSmrg vxworks*) 6307eda3803bSmrg # FIXME: insert proper C++ library support 6308eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6309eda3803bSmrg ;; 6310fe5e51b7Smrg 6311eda3803bSmrg *) 6312eda3803bSmrg # FIXME: insert proper C++ library support 6313eda3803bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6314eda3803bSmrg ;; 6315eda3803bSmrg esac 6316fe5e51b7Smrg 6317eda3803bSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6318eda3803bSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6319eda3803bSmrg 6320eda3803bSmrg _LT_TAGVAR(GCC, $1)="$GXX" 6321eda3803bSmrg _LT_TAGVAR(LD, $1)="$LD" 6322eda3803bSmrg 6323eda3803bSmrg ## CAVEAT EMPTOR: 6324eda3803bSmrg ## There is no encapsulation within the following macros, do not change 6325eda3803bSmrg ## the running order or otherwise move them around unless you know exactly 6326eda3803bSmrg ## what you are doing... 6327eda3803bSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 6328eda3803bSmrg _LT_COMPILER_PIC($1) 6329eda3803bSmrg _LT_COMPILER_C_O($1) 6330eda3803bSmrg _LT_COMPILER_FILE_LOCKS($1) 6331eda3803bSmrg _LT_LINKER_SHLIBS($1) 6332eda3803bSmrg _LT_SYS_DYNAMIC_LINKER($1) 6333eda3803bSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6334eda3803bSmrg 6335eda3803bSmrg _LT_CONFIG($1) 6336eda3803bSmrg fi # test -n "$compiler" 6337eda3803bSmrg 6338eda3803bSmrg CC=$lt_save_CC 6339eda3803bSmrg LDCXX=$LD 6340eda3803bSmrg LD=$lt_save_LD 6341eda3803bSmrg GCC=$lt_save_GCC 6342eda3803bSmrg with_gnu_ld=$lt_save_with_gnu_ld 6343eda3803bSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 6344eda3803bSmrg lt_cv_path_LD=$lt_save_path_LD 6345eda3803bSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6346eda3803bSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6347eda3803bSmrgfi # test "$_lt_caught_CXX_error" != yes 6348fe5e51b7Smrg 6349eda3803bSmrgAC_LANG_POP 6350eda3803bSmrg])# _LT_LANG_CXX_CONFIG 6351fe5e51b7Smrg 6352fe5e51b7Smrg 6353eda3803bSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6354eda3803bSmrg# --------------------------------- 6355eda3803bSmrg# Figure out "hidden" library dependencies from verbose 6356eda3803bSmrg# compiler output when linking a shared library. 6357eda3803bSmrg# Parse the compiler output and extract the necessary 6358eda3803bSmrg# objects, libraries and library flags. 6359eda3803bSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6360eda3803bSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6361eda3803bSmrg# Dependencies to place before and after the object being linked: 6362eda3803bSmrg_LT_TAGVAR(predep_objects, $1)= 6363eda3803bSmrg_LT_TAGVAR(postdep_objects, $1)= 6364eda3803bSmrg_LT_TAGVAR(predeps, $1)= 6365eda3803bSmrg_LT_TAGVAR(postdeps, $1)= 6366eda3803bSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6367fe5e51b7Smrg 6368eda3803bSmrgdnl we can't use the lt_simple_compile_test_code here, 6369eda3803bSmrgdnl because it contains code intended for an executable, 6370eda3803bSmrgdnl not a library. It's possible we should let each 6371eda3803bSmrgdnl tag define a new lt_????_link_test_code variable, 6372eda3803bSmrgdnl but it's only used here... 6373eda3803bSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6374eda3803bSmrgint a; 6375eda3803bSmrgvoid foo (void) { a = 0; } 6376eda3803bSmrg_LT_EOF 6377eda3803bSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6378eda3803bSmrgclass Foo 6379eda3803bSmrg{ 6380eda3803bSmrgpublic: 6381eda3803bSmrg Foo (void) { a = 0; } 6382eda3803bSmrgprivate: 6383eda3803bSmrg int a; 6384eda3803bSmrg}; 6385eda3803bSmrg_LT_EOF 6386eda3803bSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6387eda3803bSmrg subroutine foo 6388eda3803bSmrg implicit none 6389eda3803bSmrg integer*4 a 6390eda3803bSmrg a=0 6391eda3803bSmrg return 6392eda3803bSmrg end 6393eda3803bSmrg_LT_EOF 6394eda3803bSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6395eda3803bSmrg subroutine foo 6396eda3803bSmrg implicit none 6397eda3803bSmrg integer a 6398eda3803bSmrg a=0 6399eda3803bSmrg return 6400eda3803bSmrg end 6401eda3803bSmrg_LT_EOF 6402eda3803bSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6403eda3803bSmrgpublic class foo { 6404eda3803bSmrg private int a; 6405eda3803bSmrg public void bar (void) { 6406eda3803bSmrg a = 0; 6407eda3803bSmrg } 6408eda3803bSmrg}; 6409eda3803bSmrg_LT_EOF 6410eda3803bSmrg]) 6411eda3803bSmrgdnl Parse the compiler output and extract the necessary 6412eda3803bSmrgdnl objects, libraries and library flags. 6413eda3803bSmrgif AC_TRY_EVAL(ac_compile); then 6414eda3803bSmrg # Parse the compiler output and extract the necessary 6415eda3803bSmrg # objects, libraries and library flags. 6416fe5e51b7Smrg 6417eda3803bSmrg # Sentinel used to keep track of whether or not we are before 6418eda3803bSmrg # the conftest object file. 6419eda3803bSmrg pre_test_object_deps_done=no 6420fe5e51b7Smrg 6421eda3803bSmrg for p in `eval "$output_verbose_link_cmd"`; do 6422eda3803bSmrg case $p in 6423fe5e51b7Smrg 6424eda3803bSmrg -L* | -R* | -l*) 6425eda3803bSmrg # Some compilers place space between "-{L,R}" and the path. 6426eda3803bSmrg # Remove the space. 6427eda3803bSmrg if test $p = "-L" || 6428eda3803bSmrg test $p = "-R"; then 6429eda3803bSmrg prev=$p 6430eda3803bSmrg continue 6431eda3803bSmrg else 6432eda3803bSmrg prev= 6433eda3803bSmrg fi 6434fe5e51b7Smrg 6435eda3803bSmrg if test "$pre_test_object_deps_done" = no; then 6436eda3803bSmrg case $p in 6437eda3803bSmrg -L* | -R*) 6438eda3803bSmrg # Internal compiler library paths should come after those 6439eda3803bSmrg # provided the user. The postdeps already come after the 6440eda3803bSmrg # user supplied libs so there is no need to process them. 6441eda3803bSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 6442eda3803bSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 6443eda3803bSmrg else 6444eda3803bSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 6445eda3803bSmrg fi 6446eda3803bSmrg ;; 6447eda3803bSmrg # The "-l" case would never come before the object being 6448eda3803bSmrg # linked, so don't bother handling this case. 6449eda3803bSmrg esac 6450eda3803bSmrg else 6451eda3803bSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 6452eda3803bSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 6453eda3803bSmrg else 6454eda3803bSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 6455eda3803bSmrg fi 6456eda3803bSmrg fi 6457eda3803bSmrg ;; 6458fe5e51b7Smrg 6459eda3803bSmrg *.$objext) 6460eda3803bSmrg # This assumes that the test object file only shows up 6461eda3803bSmrg # once in the compiler output. 6462eda3803bSmrg if test "$p" = "conftest.$objext"; then 6463eda3803bSmrg pre_test_object_deps_done=yes 6464eda3803bSmrg continue 6465eda3803bSmrg fi 6466fe5e51b7Smrg 6467eda3803bSmrg if test "$pre_test_object_deps_done" = no; then 6468eda3803bSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 6469eda3803bSmrg _LT_TAGVAR(predep_objects, $1)="$p" 6470eda3803bSmrg else 6471eda3803bSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 6472eda3803bSmrg fi 6473eda3803bSmrg else 6474eda3803bSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 6475eda3803bSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 6476eda3803bSmrg else 6477eda3803bSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 6478eda3803bSmrg fi 6479eda3803bSmrg fi 6480eda3803bSmrg ;; 6481fe5e51b7Smrg 6482eda3803bSmrg *) ;; # Ignore the rest. 6483fe5e51b7Smrg 6484eda3803bSmrg esac 6485eda3803bSmrg done 6486fe5e51b7Smrg 6487eda3803bSmrg # Clean up. 6488eda3803bSmrg rm -f a.out a.exe 6489eda3803bSmrgelse 6490eda3803bSmrg echo "libtool.m4: error: problem compiling $1 test program" 6491fe5e51b7Smrgfi 6492fe5e51b7Smrg 6493eda3803bSmrg$RM -f confest.$objext 6494fe5e51b7Smrg 6495eda3803bSmrg# PORTME: override above test on systems where it is broken 6496eda3803bSmrgm4_if([$1], [CXX], 6497eda3803bSmrg[case $host_os in 6498eda3803bSmrginterix[[3-9]]*) 6499eda3803bSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 6500eda3803bSmrg # hack all around it, let's just trust "g++" to DTRT. 6501eda3803bSmrg _LT_TAGVAR(predep_objects,$1)= 6502eda3803bSmrg _LT_TAGVAR(postdep_objects,$1)= 6503eda3803bSmrg _LT_TAGVAR(postdeps,$1)= 6504eda3803bSmrg ;; 6505fe5e51b7Smrg 6506eda3803bSmrglinux*) 6507eda3803bSmrg case `$CC -V 2>&1 | sed 5q` in 6508eda3803bSmrg *Sun\ C*) 6509eda3803bSmrg # Sun C++ 5.9 6510fe5e51b7Smrg 6511eda3803bSmrg # The more standards-conforming stlport4 library is 6512eda3803bSmrg # incompatible with the Cstd library. Avoid specifying 6513eda3803bSmrg # it if it's in CXXFLAGS. Ignore libCrun as 6514eda3803bSmrg # -library=stlport4 depends on it. 6515eda3803bSmrg case " $CXX $CXXFLAGS " in 6516eda3803bSmrg *" -library=stlport4 "*) 6517eda3803bSmrg solaris_use_stlport4=yes 6518eda3803bSmrg ;; 6519eda3803bSmrg esac 6520fe5e51b7Smrg 6521eda3803bSmrg if test "$solaris_use_stlport4" != yes; then 6522eda3803bSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6523eda3803bSmrg fi 6524eda3803bSmrg ;; 6525eda3803bSmrg esac 6526fe5e51b7Smrg ;; 6527eda3803bSmrg 6528fe5e51b7Smrgsolaris*) 6529eda3803bSmrg case $cc_basename in 6530eda3803bSmrg CC*) 6531eda3803bSmrg # The more standards-conforming stlport4 library is 6532eda3803bSmrg # incompatible with the Cstd library. Avoid specifying 6533eda3803bSmrg # it if it's in CXXFLAGS. Ignore libCrun as 6534eda3803bSmrg # -library=stlport4 depends on it. 6535eda3803bSmrg case " $CXX $CXXFLAGS " in 6536eda3803bSmrg *" -library=stlport4 "*) 6537eda3803bSmrg solaris_use_stlport4=yes 6538eda3803bSmrg ;; 6539eda3803bSmrg esac 6540fe5e51b7Smrg 6541eda3803bSmrg # Adding this requires a known-good setup of shared libraries for 6542eda3803bSmrg # Sun compiler versions before 5.6, else PIC objects from an old 6543eda3803bSmrg # archive will be linked into the output, leading to subtle bugs. 6544eda3803bSmrg if test "$solaris_use_stlport4" != yes; then 6545eda3803bSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6546eda3803bSmrg fi 6547eda3803bSmrg ;; 6548eda3803bSmrg esac 6549fe5e51b7Smrg ;; 6550fe5e51b7Smrgesac 6551eda3803bSmrg]) 6552fe5e51b7Smrg 6553eda3803bSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 6554eda3803bSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 6555fe5e51b7Smrgesac 6556eda3803bSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 6557eda3803bSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 6558eda3803bSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 6559eda3803bSmrgfi 6560eda3803bSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 6561eda3803bSmrg [The directories searched by this compiler when creating a shared library]) 6562eda3803bSmrg_LT_TAGDECL([], [predep_objects], [1], 6563eda3803bSmrg [Dependencies to place before and after the objects being linked to 6564eda3803bSmrg create a shared library]) 6565eda3803bSmrg_LT_TAGDECL([], [postdep_objects], [1]) 6566eda3803bSmrg_LT_TAGDECL([], [predeps], [1]) 6567eda3803bSmrg_LT_TAGDECL([], [postdeps], [1]) 6568eda3803bSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 6569eda3803bSmrg [The library search path used internally by the compiler when linking 6570eda3803bSmrg a shared library]) 6571eda3803bSmrg])# _LT_SYS_HIDDEN_LIBDEPS 6572eda3803bSmrg 6573eda3803bSmrg 6574eda3803bSmrg# _LT_PROG_F77 6575eda3803bSmrg# ------------ 6576eda3803bSmrg# Since AC_PROG_F77 is broken, in that it returns the empty string 6577eda3803bSmrg# if there is no fortran compiler, we have our own version here. 6578eda3803bSmrgm4_defun([_LT_PROG_F77], 6579eda3803bSmrg[ 6580eda3803bSmrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) 6581eda3803bSmrgAC_PROG_F77 6582eda3803bSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 6583eda3803bSmrg _lt_disable_F77=yes 6584eda3803bSmrgfi 6585eda3803bSmrgpopdef([AC_MSG_ERROR]) 6586eda3803bSmrg])# _LT_PROG_F77 6587fe5e51b7Smrg 6588eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 6589eda3803bSmrgdnl AC_DEFUN([_LT_PROG_F77], []) 6590fe5e51b7Smrg 6591fe5e51b7Smrg 6592eda3803bSmrg# _LT_LANG_F77_CONFIG([TAG]) 6593eda3803bSmrg# -------------------------- 6594eda3803bSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 6595eda3803bSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6596eda3803bSmrg# to write the compiler configuration to `libtool'. 6597eda3803bSmrgm4_defun([_LT_LANG_F77_CONFIG], 6598eda3803bSmrg[AC_REQUIRE([_LT_PROG_F77])dnl 6599eda3803bSmrgAC_LANG_PUSH(Fortran 77) 6600fe5e51b7Smrg 6601eda3803bSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6602eda3803bSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6603eda3803bSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6604eda3803bSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6605eda3803bSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6606eda3803bSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6607eda3803bSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6608eda3803bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6609eda3803bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6610eda3803bSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6611eda3803bSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6612eda3803bSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6613eda3803bSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6614eda3803bSmrg_LT_TAGVAR(module_cmds, $1)= 6615eda3803bSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6616eda3803bSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6617eda3803bSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6618eda3803bSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6619eda3803bSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6620eda3803bSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6621fe5e51b7Smrg 6622eda3803bSmrg# Source file extension for f77 test sources. 6623eda3803bSmrgac_ext=f 6624fe5e51b7Smrg 6625eda3803bSmrg# Object file extension for compiled f77 test sources. 6626eda3803bSmrgobjext=o 6627eda3803bSmrg_LT_TAGVAR(objext, $1)=$objext 6628eda3803bSmrg 6629eda3803bSmrg# No sense in running all these tests if we already determined that 6630eda3803bSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 6631eda3803bSmrg# are currently assumed to apply to all compilers on this platform, 6632eda3803bSmrg# and will be corrupted by setting them based on a non-working compiler. 6633eda3803bSmrgif test "$_lt_disable_F77" != yes; then 6634eda3803bSmrg # Code to be used in simple compile tests 6635eda3803bSmrg lt_simple_compile_test_code="\ 6636eda3803bSmrg subroutine t 6637eda3803bSmrg return 6638eda3803bSmrg end 6639eda3803bSmrg" 6640fe5e51b7Smrg 6641eda3803bSmrg # Code to be used in simple link tests 6642eda3803bSmrg lt_simple_link_test_code="\ 6643eda3803bSmrg program t 6644eda3803bSmrg end 6645eda3803bSmrg" 6646fe5e51b7Smrg 6647eda3803bSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6648eda3803bSmrg _LT_TAG_COMPILER 6649fe5e51b7Smrg 6650eda3803bSmrg # save warnings/boilerplate of simple test code 6651eda3803bSmrg _LT_COMPILER_BOILERPLATE 6652eda3803bSmrg _LT_LINKER_BOILERPLATE 6653fe5e51b7Smrg 6654eda3803bSmrg # Allow CC to be a program name with arguments. 6655eda3803bSmrg lt_save_CC="$CC" 6656eda3803bSmrg lt_save_GCC=$GCC 6657eda3803bSmrg CC=${F77-"f77"} 6658eda3803bSmrg compiler=$CC 6659eda3803bSmrg _LT_TAGVAR(compiler, $1)=$CC 6660eda3803bSmrg _LT_CC_BASENAME([$compiler]) 6661eda3803bSmrg GCC=$G77 6662eda3803bSmrg if test -n "$compiler"; then 6663eda3803bSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6664eda3803bSmrg AC_MSG_RESULT([$can_build_shared]) 6665fe5e51b7Smrg 6666eda3803bSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6667eda3803bSmrg test "$can_build_shared" = "no" && enable_shared=no 6668eda3803bSmrg 6669eda3803bSmrg # On AIX, shared libraries and static libraries use the same namespace, and 6670eda3803bSmrg # are all built from PIC. 6671eda3803bSmrg case $host_os in 6672eda3803bSmrg aix3*) 6673eda3803bSmrg test "$enable_shared" = yes && enable_static=no 6674eda3803bSmrg if test -n "$RANLIB"; then 6675eda3803bSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6676eda3803bSmrg postinstall_cmds='$RANLIB $lib' 6677eda3803bSmrg fi 6678eda3803bSmrg ;; 6679eda3803bSmrg aix[[4-9]]*) 6680eda3803bSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6681eda3803bSmrg test "$enable_shared" = yes && enable_static=no 6682fe5e51b7Smrg fi 6683eda3803bSmrg ;; 6684eda3803bSmrg esac 6685eda3803bSmrg AC_MSG_RESULT([$enable_shared]) 6686eda3803bSmrg 6687eda3803bSmrg AC_MSG_CHECKING([whether to build static libraries]) 6688eda3803bSmrg # Make sure either enable_shared or enable_static is yes. 6689eda3803bSmrg test "$enable_shared" = yes || enable_static=yes 6690eda3803bSmrg AC_MSG_RESULT([$enable_static]) 6691eda3803bSmrg 6692eda3803bSmrg _LT_TAGVAR(GCC, $1)="$G77" 6693eda3803bSmrg _LT_TAGVAR(LD, $1)="$LD" 6694eda3803bSmrg 6695eda3803bSmrg ## CAVEAT EMPTOR: 6696eda3803bSmrg ## There is no encapsulation within the following macros, do not change 6697eda3803bSmrg ## the running order or otherwise move them around unless you know exactly 6698eda3803bSmrg ## what you are doing... 6699eda3803bSmrg _LT_COMPILER_PIC($1) 6700eda3803bSmrg _LT_COMPILER_C_O($1) 6701eda3803bSmrg _LT_COMPILER_FILE_LOCKS($1) 6702eda3803bSmrg _LT_LINKER_SHLIBS($1) 6703eda3803bSmrg _LT_SYS_DYNAMIC_LINKER($1) 6704eda3803bSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6705eda3803bSmrg 6706eda3803bSmrg _LT_CONFIG($1) 6707eda3803bSmrg fi # test -n "$compiler" 6708eda3803bSmrg 6709eda3803bSmrg GCC=$lt_save_GCC 6710eda3803bSmrg CC="$lt_save_CC" 6711eda3803bSmrgfi # test "$_lt_disable_F77" != yes 6712fe5e51b7Smrg 6713eda3803bSmrgAC_LANG_POP 6714eda3803bSmrg])# _LT_LANG_F77_CONFIG 6715eda3803bSmrg 6716eda3803bSmrg 6717eda3803bSmrg# _LT_PROG_FC 6718eda3803bSmrg# ----------- 6719eda3803bSmrg# Since AC_PROG_FC is broken, in that it returns the empty string 6720eda3803bSmrg# if there is no fortran compiler, we have our own version here. 6721eda3803bSmrgm4_defun([_LT_PROG_FC], 6722eda3803bSmrg[ 6723eda3803bSmrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) 6724eda3803bSmrgAC_PROG_FC 6725eda3803bSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 6726eda3803bSmrg _lt_disable_FC=yes 6727fe5e51b7Smrgfi 6728eda3803bSmrgpopdef([AC_MSG_ERROR]) 6729eda3803bSmrg])# _LT_PROG_FC 6730fe5e51b7Smrg 6731eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 6732eda3803bSmrgdnl AC_DEFUN([_LT_PROG_FC], []) 6733fe5e51b7Smrg 6734fe5e51b7Smrg 6735eda3803bSmrg# _LT_LANG_FC_CONFIG([TAG]) 6736eda3803bSmrg# ------------------------- 6737eda3803bSmrg# Ensure that the configuration variables for a Fortran compiler are 6738eda3803bSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6739eda3803bSmrg# to write the compiler configuration to `libtool'. 6740eda3803bSmrgm4_defun([_LT_LANG_FC_CONFIG], 6741eda3803bSmrg[AC_REQUIRE([_LT_PROG_FC])dnl 6742eda3803bSmrgAC_LANG_PUSH(Fortran) 6743eda3803bSmrg 6744eda3803bSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6745eda3803bSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6746eda3803bSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6747eda3803bSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6748eda3803bSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6749eda3803bSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6750eda3803bSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6751eda3803bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6752eda3803bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6753eda3803bSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6754eda3803bSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6755eda3803bSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6756eda3803bSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6757eda3803bSmrg_LT_TAGVAR(module_cmds, $1)= 6758eda3803bSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6759eda3803bSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6760eda3803bSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6761eda3803bSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6762eda3803bSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6763eda3803bSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6764eda3803bSmrg 6765eda3803bSmrg# Source file extension for fc test sources. 6766eda3803bSmrgac_ext=${ac_fc_srcext-f} 6767eda3803bSmrg 6768eda3803bSmrg# Object file extension for compiled fc test sources. 6769eda3803bSmrgobjext=o 6770eda3803bSmrg_LT_TAGVAR(objext, $1)=$objext 6771eda3803bSmrg 6772eda3803bSmrg# No sense in running all these tests if we already determined that 6773eda3803bSmrg# the FC compiler isn't working. Some variables (like enable_shared) 6774eda3803bSmrg# are currently assumed to apply to all compilers on this platform, 6775eda3803bSmrg# and will be corrupted by setting them based on a non-working compiler. 6776eda3803bSmrgif test "$_lt_disable_FC" != yes; then 6777eda3803bSmrg # Code to be used in simple compile tests 6778eda3803bSmrg lt_simple_compile_test_code="\ 6779eda3803bSmrg subroutine t 6780eda3803bSmrg return 6781eda3803bSmrg end 6782eda3803bSmrg" 6783eda3803bSmrg 6784eda3803bSmrg # Code to be used in simple link tests 6785eda3803bSmrg lt_simple_link_test_code="\ 6786eda3803bSmrg program t 6787eda3803bSmrg end 6788eda3803bSmrg" 6789eda3803bSmrg 6790eda3803bSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6791eda3803bSmrg _LT_TAG_COMPILER 6792eda3803bSmrg 6793eda3803bSmrg # save warnings/boilerplate of simple test code 6794eda3803bSmrg _LT_COMPILER_BOILERPLATE 6795eda3803bSmrg _LT_LINKER_BOILERPLATE 6796eda3803bSmrg 6797eda3803bSmrg # Allow CC to be a program name with arguments. 6798eda3803bSmrg lt_save_CC="$CC" 6799eda3803bSmrg lt_save_GCC=$GCC 6800eda3803bSmrg CC=${FC-"f95"} 6801eda3803bSmrg compiler=$CC 6802eda3803bSmrg GCC=$ac_cv_fc_compiler_gnu 6803fe5e51b7Smrg 6804eda3803bSmrg _LT_TAGVAR(compiler, $1)=$CC 6805eda3803bSmrg _LT_CC_BASENAME([$compiler]) 6806eda3803bSmrg 6807eda3803bSmrg if test -n "$compiler"; then 6808eda3803bSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6809eda3803bSmrg AC_MSG_RESULT([$can_build_shared]) 6810eda3803bSmrg 6811eda3803bSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6812eda3803bSmrg test "$can_build_shared" = "no" && enable_shared=no 6813eda3803bSmrg 6814eda3803bSmrg # On AIX, shared libraries and static libraries use the same namespace, and 6815eda3803bSmrg # are all built from PIC. 6816fe5e51b7Smrg case $host_os in 6817eda3803bSmrg aix3*) 6818eda3803bSmrg test "$enable_shared" = yes && enable_static=no 6819eda3803bSmrg if test -n "$RANLIB"; then 6820eda3803bSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6821eda3803bSmrg postinstall_cmds='$RANLIB $lib' 6822eda3803bSmrg fi 6823eda3803bSmrg ;; 6824eda3803bSmrg aix[[4-9]]*) 6825eda3803bSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6826eda3803bSmrg test "$enable_shared" = yes && enable_static=no 6827fe5e51b7Smrg fi 6828eda3803bSmrg ;; 6829fe5e51b7Smrg esac 6830eda3803bSmrg AC_MSG_RESULT([$enable_shared]) 6831eda3803bSmrg 6832eda3803bSmrg AC_MSG_CHECKING([whether to build static libraries]) 6833eda3803bSmrg # Make sure either enable_shared or enable_static is yes. 6834eda3803bSmrg test "$enable_shared" = yes || enable_static=yes 6835eda3803bSmrg AC_MSG_RESULT([$enable_static]) 6836eda3803bSmrg 6837eda3803bSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 6838eda3803bSmrg _LT_TAGVAR(LD, $1)="$LD" 6839eda3803bSmrg 6840eda3803bSmrg ## CAVEAT EMPTOR: 6841eda3803bSmrg ## There is no encapsulation within the following macros, do not change 6842eda3803bSmrg ## the running order or otherwise move them around unless you know exactly 6843eda3803bSmrg ## what you are doing... 6844eda3803bSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 6845eda3803bSmrg _LT_COMPILER_PIC($1) 6846eda3803bSmrg _LT_COMPILER_C_O($1) 6847eda3803bSmrg _LT_COMPILER_FILE_LOCKS($1) 6848eda3803bSmrg _LT_LINKER_SHLIBS($1) 6849eda3803bSmrg _LT_SYS_DYNAMIC_LINKER($1) 6850eda3803bSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6851eda3803bSmrg 6852eda3803bSmrg _LT_CONFIG($1) 6853eda3803bSmrg fi # test -n "$compiler" 6854eda3803bSmrg 6855eda3803bSmrg GCC=$lt_save_GCC 6856eda3803bSmrg CC="$lt_save_CC" 6857eda3803bSmrgfi # test "$_lt_disable_FC" != yes 6858fe5e51b7Smrg 6859eda3803bSmrgAC_LANG_POP 6860eda3803bSmrg])# _LT_LANG_FC_CONFIG 6861fe5e51b7Smrg 6862fe5e51b7Smrg 6863eda3803bSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 6864eda3803bSmrg# -------------------------- 6865eda3803bSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 6866eda3803bSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 6867eda3803bSmrg# to write the compiler configuration to `libtool'. 6868eda3803bSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 6869eda3803bSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 6870eda3803bSmrgAC_LANG_SAVE 6871fe5e51b7Smrg 6872eda3803bSmrg# Source file extension for Java test sources. 6873eda3803bSmrgac_ext=java 6874fe5e51b7Smrg 6875eda3803bSmrg# Object file extension for compiled Java test sources. 6876eda3803bSmrgobjext=o 6877eda3803bSmrg_LT_TAGVAR(objext, $1)=$objext 6878fe5e51b7Smrg 6879eda3803bSmrg# Code to be used in simple compile tests 6880eda3803bSmrglt_simple_compile_test_code="class foo {}" 6881fe5e51b7Smrg 6882eda3803bSmrg# Code to be used in simple link tests 6883eda3803bSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 6884fe5e51b7Smrg 6885eda3803bSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6886eda3803bSmrg_LT_TAG_COMPILER 6887fe5e51b7Smrg 6888eda3803bSmrg# save warnings/boilerplate of simple test code 6889eda3803bSmrg_LT_COMPILER_BOILERPLATE 6890eda3803bSmrg_LT_LINKER_BOILERPLATE 6891fe5e51b7Smrg 6892eda3803bSmrg# Allow CC to be a program name with arguments. 6893eda3803bSmrglt_save_CC="$CC" 6894eda3803bSmrglt_save_GCC=$GCC 6895eda3803bSmrgGCC=yes 6896eda3803bSmrgCC=${GCJ-"gcj"} 6897eda3803bSmrgcompiler=$CC 6898eda3803bSmrg_LT_TAGVAR(compiler, $1)=$CC 6899eda3803bSmrg_LT_TAGVAR(LD, $1)="$LD" 6900eda3803bSmrg_LT_CC_BASENAME([$compiler]) 6901eda3803bSmrg 6902eda3803bSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 6903eda3803bSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6904eda3803bSmrg 6905eda3803bSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6906eda3803bSmrg 6907eda3803bSmrgif test -n "$compiler"; then 6908eda3803bSmrg _LT_COMPILER_NO_RTTI($1) 6909eda3803bSmrg _LT_COMPILER_PIC($1) 6910eda3803bSmrg _LT_COMPILER_C_O($1) 6911eda3803bSmrg _LT_COMPILER_FILE_LOCKS($1) 6912eda3803bSmrg _LT_LINKER_SHLIBS($1) 6913eda3803bSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6914eda3803bSmrg 6915eda3803bSmrg _LT_CONFIG($1) 6916eda3803bSmrgfi 6917eda3803bSmrg 6918eda3803bSmrgAC_LANG_RESTORE 6919eda3803bSmrg 6920eda3803bSmrgGCC=$lt_save_GCC 6921eda3803bSmrgCC="$lt_save_CC" 6922eda3803bSmrg])# _LT_LANG_GCJ_CONFIG 6923eda3803bSmrg 6924eda3803bSmrg 6925eda3803bSmrg# _LT_LANG_RC_CONFIG([TAG]) 6926eda3803bSmrg# ------------------------- 6927eda3803bSmrg# Ensure that the configuration variables for the Windows resource compiler 6928eda3803bSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 6929eda3803bSmrg# to write the compiler configuration to `libtool'. 6930eda3803bSmrgm4_defun([_LT_LANG_RC_CONFIG], 6931eda3803bSmrg[AC_REQUIRE([LT_PROG_RC])dnl 6932eda3803bSmrgAC_LANG_SAVE 6933eda3803bSmrg 6934eda3803bSmrg# Source file extension for RC test sources. 6935eda3803bSmrgac_ext=rc 6936eda3803bSmrg 6937eda3803bSmrg# Object file extension for compiled RC test sources. 6938eda3803bSmrgobjext=o 6939eda3803bSmrg_LT_TAGVAR(objext, $1)=$objext 6940eda3803bSmrg 6941eda3803bSmrg# Code to be used in simple compile tests 6942eda3803bSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 6943eda3803bSmrg 6944eda3803bSmrg# Code to be used in simple link tests 6945eda3803bSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 6946eda3803bSmrg 6947eda3803bSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6948eda3803bSmrg_LT_TAG_COMPILER 6949fe5e51b7Smrg 6950eda3803bSmrg# save warnings/boilerplate of simple test code 6951eda3803bSmrg_LT_COMPILER_BOILERPLATE 6952eda3803bSmrg_LT_LINKER_BOILERPLATE 6953fe5e51b7Smrg 6954eda3803bSmrg# Allow CC to be a program name with arguments. 6955eda3803bSmrglt_save_CC="$CC" 6956eda3803bSmrglt_save_GCC=$GCC 6957eda3803bSmrgGCC= 6958eda3803bSmrgCC=${RC-"windres"} 6959eda3803bSmrgcompiler=$CC 6960eda3803bSmrg_LT_TAGVAR(compiler, $1)=$CC 6961eda3803bSmrg_LT_CC_BASENAME([$compiler]) 6962eda3803bSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 6963fe5e51b7Smrg 6964eda3803bSmrgif test -n "$compiler"; then 6965eda3803bSmrg : 6966eda3803bSmrg _LT_CONFIG($1) 6967eda3803bSmrgfi 6968fe5e51b7Smrg 6969eda3803bSmrgGCC=$lt_save_GCC 6970eda3803bSmrgAC_LANG_RESTORE 6971eda3803bSmrgCC="$lt_save_CC" 6972eda3803bSmrg])# _LT_LANG_RC_CONFIG 6973fe5e51b7Smrg 6974fe5e51b7Smrg 6975eda3803bSmrg# LT_PROG_GCJ 6976eda3803bSmrg# ----------- 6977eda3803bSmrgAC_DEFUN([LT_PROG_GCJ], 6978eda3803bSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 6979eda3803bSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 6980eda3803bSmrg [AC_CHECK_TOOL(GCJ, gcj,) 6981eda3803bSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6982eda3803bSmrg AC_SUBST(GCJFLAGS)])])[]dnl 6983eda3803bSmrg]) 6984fe5e51b7Smrg 6985eda3803bSmrg# Old name: 6986eda3803bSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 6987eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 6988eda3803bSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 6989fe5e51b7Smrg 6990fe5e51b7Smrg 6991eda3803bSmrg# LT_PROG_RC 6992eda3803bSmrg# ---------- 6993eda3803bSmrgAC_DEFUN([LT_PROG_RC], 6994eda3803bSmrg[AC_CHECK_TOOL(RC, windres,) 6995eda3803bSmrg]) 6996fe5e51b7Smrg 6997eda3803bSmrg# Old name: 6998eda3803bSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 6999eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 7000eda3803bSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 7001fe5e51b7Smrg 7002fe5e51b7Smrg 7003eda3803bSmrg# _LT_DECL_EGREP 7004eda3803bSmrg# -------------- 7005eda3803bSmrg# If we don't have a new enough Autoconf to choose the best grep 7006eda3803bSmrg# available, choose the one first in the user's PATH. 7007eda3803bSmrgm4_defun([_LT_DECL_EGREP], 7008eda3803bSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7009eda3803bSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7010eda3803bSmrgtest -z "$GREP" && GREP=grep 7011eda3803bSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7012eda3803bSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7013eda3803bSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7014eda3803bSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7015eda3803bSmrgAC_SUBST([GREP]) 7016eda3803bSmrg]) 7017fe5e51b7Smrg 7018fe5e51b7Smrg 7019eda3803bSmrg# _LT_DECL_OBJDUMP 7020eda3803bSmrg# -------------- 7021eda3803bSmrg# If we don't have a new enough Autoconf to choose the best objdump 7022eda3803bSmrg# available, choose the one first in the user's PATH. 7023eda3803bSmrgm4_defun([_LT_DECL_OBJDUMP], 7024eda3803bSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7025eda3803bSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7026eda3803bSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7027eda3803bSmrgAC_SUBST([OBJDUMP]) 7028eda3803bSmrg]) 7029fe5e51b7Smrg 7030eda3803bSmrg 7031eda3803bSmrg# _LT_DECL_SED 7032eda3803bSmrg# ------------ 7033eda3803bSmrg# Check for a fully-functional sed program, that truncates 7034eda3803bSmrg# as few characters as possible. Prefer GNU sed if found. 7035eda3803bSmrgm4_defun([_LT_DECL_SED], 7036eda3803bSmrg[AC_PROG_SED 7037eda3803bSmrgtest -z "$SED" && SED=sed 7038eda3803bSmrgXsed="$SED -e 1s/^X//" 7039eda3803bSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7040eda3803bSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7041eda3803bSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7042eda3803bSmrg])# _LT_DECL_SED 7043eda3803bSmrg 7044eda3803bSmrgm4_ifndef([AC_PROG_SED], [ 7045eda3803bSmrg# NOTE: This macro has been submitted for inclusion into # 7046eda3803bSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7047eda3803bSmrg# a released version of Autoconf we should remove this # 7048eda3803bSmrg# macro and use it instead. # 7049eda3803bSmrg 7050eda3803bSmrgm4_defun([AC_PROG_SED], 7051eda3803bSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7052eda3803bSmrgAC_CACHE_VAL(lt_cv_path_SED, 7053eda3803bSmrg[# Loop through the user's path and test for sed and gsed. 7054eda3803bSmrg# Then use that list of sed's as ones to test for truncation. 7055eda3803bSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7056eda3803bSmrgfor as_dir in $PATH 7057eda3803bSmrgdo 7058eda3803bSmrg IFS=$as_save_IFS 7059eda3803bSmrg test -z "$as_dir" && as_dir=. 7060eda3803bSmrg for lt_ac_prog in sed gsed; do 7061eda3803bSmrg for ac_exec_ext in '' $ac_executable_extensions; do 7062eda3803bSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7063eda3803bSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7064eda3803bSmrg fi 7065eda3803bSmrg done 7066eda3803bSmrg done 7067eda3803bSmrgdone 7068eda3803bSmrgIFS=$as_save_IFS 7069eda3803bSmrglt_ac_max=0 7070eda3803bSmrglt_ac_count=0 7071eda3803bSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7072eda3803bSmrg# along with /bin/sed that truncates output. 7073eda3803bSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7074eda3803bSmrg test ! -f $lt_ac_sed && continue 7075eda3803bSmrg cat /dev/null > conftest.in 7076eda3803bSmrg lt_ac_count=0 7077eda3803bSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7078eda3803bSmrg # Check for GNU sed and select it if it is found. 7079eda3803bSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7080eda3803bSmrg lt_cv_path_SED=$lt_ac_sed 7081eda3803bSmrg break 7082fe5e51b7Smrg fi 7083eda3803bSmrg while true; do 7084eda3803bSmrg cat conftest.in conftest.in >conftest.tmp 7085eda3803bSmrg mv conftest.tmp conftest.in 7086eda3803bSmrg cp conftest.in conftest.nl 7087eda3803bSmrg echo >>conftest.nl 7088eda3803bSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7089eda3803bSmrg cmp -s conftest.out conftest.nl || break 7090eda3803bSmrg # 10000 chars as input seems more than enough 7091eda3803bSmrg test $lt_ac_count -gt 10 && break 7092eda3803bSmrg lt_ac_count=`expr $lt_ac_count + 1` 7093eda3803bSmrg if test $lt_ac_count -gt $lt_ac_max; then 7094eda3803bSmrg lt_ac_max=$lt_ac_count 7095eda3803bSmrg lt_cv_path_SED=$lt_ac_sed 7096eda3803bSmrg fi 7097eda3803bSmrg done 7098eda3803bSmrgdone 7099fe5e51b7Smrg]) 7100eda3803bSmrgSED=$lt_cv_path_SED 7101eda3803bSmrgAC_SUBST([SED]) 7102eda3803bSmrgAC_MSG_RESULT([$SED]) 7103eda3803bSmrg])#AC_PROG_SED 7104eda3803bSmrg])#m4_ifndef 7105fe5e51b7Smrg 7106eda3803bSmrg# Old name: 7107eda3803bSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7108eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 7109eda3803bSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7110eda3803bSmrg 7111eda3803bSmrg 7112eda3803bSmrg# _LT_CHECK_SHELL_FEATURES 7113eda3803bSmrg# ------------------------ 7114eda3803bSmrg# Find out whether the shell is Bourne or XSI compatible, 7115eda3803bSmrg# or has some other useful features. 7116eda3803bSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7117eda3803bSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7118eda3803bSmrg# Try some XSI features 7119eda3803bSmrgxsi_shell=no 7120eda3803bSmrg( _lt_dummy="a/b/c" 7121eda3803bSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 7122eda3803bSmrg = c,a/b,, \ 7123eda3803bSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7124eda3803bSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7125eda3803bSmrg && xsi_shell=yes 7126eda3803bSmrgAC_MSG_RESULT([$xsi_shell]) 7127eda3803bSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7128eda3803bSmrg 7129eda3803bSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7130eda3803bSmrglt_shell_append=no 7131eda3803bSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7132eda3803bSmrg >/dev/null 2>&1 \ 7133eda3803bSmrg && lt_shell_append=yes 7134eda3803bSmrgAC_MSG_RESULT([$lt_shell_append]) 7135eda3803bSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7136eda3803bSmrg 7137eda3803bSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7138eda3803bSmrg lt_unset=unset 7139eda3803bSmrgelse 7140eda3803bSmrg lt_unset=false 7141fe5e51b7Smrgfi 7142eda3803bSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7143eda3803bSmrg 7144eda3803bSmrg# test EBCDIC or ASCII 7145eda3803bSmrgcase `echo X|tr X '\101'` in 7146eda3803bSmrg A) # ASCII based system 7147eda3803bSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7148eda3803bSmrg lt_SP2NL='tr \040 \012' 7149eda3803bSmrg lt_NL2SP='tr \015\012 \040\040' 7150eda3803bSmrg ;; 7151eda3803bSmrg *) # EBCDIC based system 7152eda3803bSmrg lt_SP2NL='tr \100 \n' 7153eda3803bSmrg lt_NL2SP='tr \r\n \100\100' 7154eda3803bSmrg ;; 7155fe5e51b7Smrgesac 7156eda3803bSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7157eda3803bSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7158eda3803bSmrg])# _LT_CHECK_SHELL_FEATURES 7159fe5e51b7Smrg 7160fe5e51b7Smrg 7161eda3803bSmrg# _LT_PROG_XSI_SHELLFNS 7162eda3803bSmrg# --------------------- 7163eda3803bSmrg# Bourne and XSI compatible variants of some useful shell functions. 7164eda3803bSmrgm4_defun([_LT_PROG_XSI_SHELLFNS], 7165eda3803bSmrg[case $xsi_shell in 7166eda3803bSmrg yes) 7167eda3803bSmrg cat << \_LT_EOF >> "$cfgfile" 7168eda3803bSmrg 7169eda3803bSmrg# func_dirname file append nondir_replacement 7170eda3803bSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7171eda3803bSmrg# otherwise set result to NONDIR_REPLACEMENT. 7172eda3803bSmrgfunc_dirname () 7173eda3803bSmrg{ 7174eda3803bSmrg case ${1} in 7175eda3803bSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7176eda3803bSmrg * ) func_dirname_result="${3}" ;; 7177eda3803bSmrg esac 7178eda3803bSmrg} 7179fe5e51b7Smrg 7180eda3803bSmrg# func_basename file 7181eda3803bSmrgfunc_basename () 7182eda3803bSmrg{ 7183eda3803bSmrg func_basename_result="${1##*/}" 7184eda3803bSmrg} 7185eda3803bSmrg 7186eda3803bSmrg# func_dirname_and_basename file append nondir_replacement 7187eda3803bSmrg# perform func_basename and func_dirname in a single function 7188eda3803bSmrg# call: 7189eda3803bSmrg# dirname: Compute the dirname of FILE. If nonempty, 7190eda3803bSmrg# add APPEND to the result, otherwise set result 7191eda3803bSmrg# to NONDIR_REPLACEMENT. 7192eda3803bSmrg# value returned in "$func_dirname_result" 7193eda3803bSmrg# basename: Compute filename of FILE. 7194eda3803bSmrg# value retuned in "$func_basename_result" 7195eda3803bSmrg# Implementation must be kept synchronized with func_dirname 7196eda3803bSmrg# and func_basename. For efficiency, we do not delegate to 7197eda3803bSmrg# those functions but instead duplicate the functionality here. 7198eda3803bSmrgfunc_dirname_and_basename () 7199eda3803bSmrg{ 7200eda3803bSmrg case ${1} in 7201eda3803bSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7202eda3803bSmrg * ) func_dirname_result="${3}" ;; 7203fe5e51b7Smrg esac 7204eda3803bSmrg func_basename_result="${1##*/}" 7205eda3803bSmrg} 7206eda3803bSmrg 7207eda3803bSmrg# func_stripname prefix suffix name 7208eda3803bSmrg# strip PREFIX and SUFFIX off of NAME. 7209eda3803bSmrg# PREFIX and SUFFIX must not contain globbing or regex special 7210eda3803bSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7211eda3803bSmrg# dot (in which case that matches only a dot). 7212eda3803bSmrgfunc_stripname () 7213eda3803bSmrg{ 7214eda3803bSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7215eda3803bSmrg # positional parameters, so assign one to ordinary parameter first. 7216eda3803bSmrg func_stripname_result=${3} 7217eda3803bSmrg func_stripname_result=${func_stripname_result#"${1}"} 7218eda3803bSmrg func_stripname_result=${func_stripname_result%"${2}"} 7219eda3803bSmrg} 7220eda3803bSmrg 7221eda3803bSmrg# func_opt_split 7222eda3803bSmrgfunc_opt_split () 7223eda3803bSmrg{ 7224eda3803bSmrg func_opt_split_opt=${1%%=*} 7225eda3803bSmrg func_opt_split_arg=${1#*=} 7226eda3803bSmrg} 7227eda3803bSmrg 7228eda3803bSmrg# func_lo2o object 7229eda3803bSmrgfunc_lo2o () 7230eda3803bSmrg{ 7231eda3803bSmrg case ${1} in 7232eda3803bSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7233eda3803bSmrg *) func_lo2o_result=${1} ;; 7234eda3803bSmrg esac 7235eda3803bSmrg} 7236eda3803bSmrg 7237eda3803bSmrg# func_xform libobj-or-source 7238eda3803bSmrgfunc_xform () 7239eda3803bSmrg{ 7240eda3803bSmrg func_xform_result=${1%.*}.lo 7241eda3803bSmrg} 7242eda3803bSmrg 7243eda3803bSmrg# func_arith arithmetic-term... 7244eda3803bSmrgfunc_arith () 7245eda3803bSmrg{ 7246eda3803bSmrg func_arith_result=$(( $[*] )) 7247eda3803bSmrg} 7248eda3803bSmrg 7249eda3803bSmrg# func_len string 7250eda3803bSmrg# STRING may not start with a hyphen. 7251eda3803bSmrgfunc_len () 7252eda3803bSmrg{ 7253eda3803bSmrg func_len_result=${#1} 7254eda3803bSmrg} 7255eda3803bSmrg 7256eda3803bSmrg_LT_EOF 7257fe5e51b7Smrg ;; 7258eda3803bSmrg *) # Bourne compatible functions. 7259eda3803bSmrg cat << \_LT_EOF >> "$cfgfile" 7260eda3803bSmrg 7261eda3803bSmrg# func_dirname file append nondir_replacement 7262eda3803bSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7263eda3803bSmrg# otherwise set result to NONDIR_REPLACEMENT. 7264eda3803bSmrgfunc_dirname () 7265eda3803bSmrg{ 7266eda3803bSmrg # Extract subdirectory from the argument. 7267eda3803bSmrg func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` 7268eda3803bSmrg if test "X$func_dirname_result" = "X${1}"; then 7269eda3803bSmrg func_dirname_result="${3}" 7270eda3803bSmrg else 7271eda3803bSmrg func_dirname_result="$func_dirname_result${2}" 7272eda3803bSmrg fi 7273eda3803bSmrg} 7274eda3803bSmrg 7275eda3803bSmrg# func_basename file 7276eda3803bSmrgfunc_basename () 7277eda3803bSmrg{ 7278eda3803bSmrg func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` 7279eda3803bSmrg} 7280eda3803bSmrg 7281eda3803bSmrgdnl func_dirname_and_basename 7282eda3803bSmrgdnl A portable version of this function is already defined in general.m4sh 7283eda3803bSmrgdnl so there is no need for it here. 7284eda3803bSmrg 7285eda3803bSmrg# func_stripname prefix suffix name 7286eda3803bSmrg# strip PREFIX and SUFFIX off of NAME. 7287eda3803bSmrg# PREFIX and SUFFIX must not contain globbing or regex special 7288eda3803bSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7289eda3803bSmrg# dot (in which case that matches only a dot). 7290eda3803bSmrg# func_strip_suffix prefix name 7291eda3803bSmrgfunc_stripname () 7292eda3803bSmrg{ 7293eda3803bSmrg case ${2} in 7294eda3803bSmrg .*) func_stripname_result=`$ECHO "X${3}" \ 7295eda3803bSmrg | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; 7296eda3803bSmrg *) func_stripname_result=`$ECHO "X${3}" \ 7297eda3803bSmrg | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; 7298fe5e51b7Smrg esac 7299eda3803bSmrg} 7300fe5e51b7Smrg 7301eda3803bSmrg# sed scripts: 7302eda3803bSmrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 7303eda3803bSmrgmy_sed_long_arg='1s/^-[[^=]]*=//' 7304fe5e51b7Smrg 7305eda3803bSmrg# func_opt_split 7306eda3803bSmrgfunc_opt_split () 7307eda3803bSmrg{ 7308eda3803bSmrg func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` 7309eda3803bSmrg func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` 7310eda3803bSmrg} 7311fe5e51b7Smrg 7312eda3803bSmrg# func_lo2o object 7313eda3803bSmrgfunc_lo2o () 7314eda3803bSmrg{ 7315eda3803bSmrg func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` 7316eda3803bSmrg} 7317fe5e51b7Smrg 7318eda3803bSmrg# func_xform libobj-or-source 7319eda3803bSmrgfunc_xform () 7320eda3803bSmrg{ 7321eda3803bSmrg func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` 7322eda3803bSmrg} 7323fe5e51b7Smrg 7324eda3803bSmrg# func_arith arithmetic-term... 7325eda3803bSmrgfunc_arith () 7326eda3803bSmrg{ 7327eda3803bSmrg func_arith_result=`expr "$[@]"` 7328eda3803bSmrg} 7329fe5e51b7Smrg 7330eda3803bSmrg# func_len string 7331eda3803bSmrg# STRING may not start with a hyphen. 7332eda3803bSmrgfunc_len () 7333eda3803bSmrg{ 7334eda3803bSmrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 7335eda3803bSmrg} 7336fe5e51b7Smrg 7337eda3803bSmrg_LT_EOF 7338eda3803bSmrgesac 7339fe5e51b7Smrg 7340eda3803bSmrgcase $lt_shell_append in 7341eda3803bSmrg yes) 7342eda3803bSmrg cat << \_LT_EOF >> "$cfgfile" 7343fe5e51b7Smrg 7344eda3803bSmrg# func_append var value 7345eda3803bSmrg# Append VALUE to the end of shell variable VAR. 7346eda3803bSmrgfunc_append () 7347eda3803bSmrg{ 7348eda3803bSmrg eval "$[1]+=\$[2]" 7349eda3803bSmrg} 7350eda3803bSmrg_LT_EOF 7351eda3803bSmrg ;; 7352eda3803bSmrg *) 7353eda3803bSmrg cat << \_LT_EOF >> "$cfgfile" 7354fe5e51b7Smrg 7355eda3803bSmrg# func_append var value 7356eda3803bSmrg# Append VALUE to the end of shell variable VAR. 7357eda3803bSmrgfunc_append () 7358eda3803bSmrg{ 7359eda3803bSmrg eval "$[1]=\$$[1]\$[2]" 7360eda3803bSmrg} 7361fe5e51b7Smrg 7362eda3803bSmrg_LT_EOF 7363eda3803bSmrg ;; 7364eda3803bSmrg esac 7365eda3803bSmrg]) 7366fe5e51b7Smrg 7367eda3803bSmrg# Helper functions for option handling. -*- Autoconf -*- 7368eda3803bSmrg# 7369eda3803bSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 7370eda3803bSmrg# Written by Gary V. Vaughan, 2004 7371eda3803bSmrg# 7372eda3803bSmrg# This file is free software; the Free Software Foundation gives 7373eda3803bSmrg# unlimited permission to copy and/or distribute it, with or without 7374eda3803bSmrg# modifications, as long as this notice is preserved. 7375fe5e51b7Smrg 7376eda3803bSmrg# serial 6 ltoptions.m4 7377fe5e51b7Smrg 7378eda3803bSmrg# This is to help aclocal find these macros, as it can't see m4_define. 7379eda3803bSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 7380fe5e51b7Smrg 7381fe5e51b7Smrg 7382eda3803bSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 7383eda3803bSmrg# ------------------------------------------ 7384eda3803bSmrgm4_define([_LT_MANGLE_OPTION], 7385eda3803bSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 7386fe5e51b7Smrg 7387fe5e51b7Smrg 7388eda3803bSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 7389eda3803bSmrg# --------------------------------------- 7390eda3803bSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 7391eda3803bSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 7392eda3803bSmrg# saved as a flag. 7393eda3803bSmrgm4_define([_LT_SET_OPTION], 7394eda3803bSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 7395eda3803bSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 7396eda3803bSmrg _LT_MANGLE_DEFUN([$1], [$2]), 7397eda3803bSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 7398eda3803bSmrg]) 7399fe5e51b7Smrg 7400fe5e51b7Smrg 7401eda3803bSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 7402eda3803bSmrg# ------------------------------------------------------------ 7403eda3803bSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7404eda3803bSmrgm4_define([_LT_IF_OPTION], 7405eda3803bSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 7406eda3803bSmrg 7407eda3803bSmrg 7408eda3803bSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 7409eda3803bSmrg# ------------------------------------------------------- 7410eda3803bSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 7411eda3803bSmrg# are set. 7412eda3803bSmrgm4_define([_LT_UNLESS_OPTIONS], 7413eda3803bSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7414eda3803bSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 7415eda3803bSmrg [m4_define([$0_found])])])[]dnl 7416eda3803bSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 7417eda3803bSmrg])[]dnl 7418eda3803bSmrg]) 7419fe5e51b7Smrg 7420fe5e51b7Smrg 7421eda3803bSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 7422eda3803bSmrg# ---------------------------------------- 7423eda3803bSmrg# OPTION-LIST is a space-separated list of Libtool options associated 7424eda3803bSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 7425eda3803bSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 7426eda3803bSmrg# the unknown option and exit. 7427eda3803bSmrgm4_defun([_LT_SET_OPTIONS], 7428eda3803bSmrg[# Set options 7429eda3803bSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7430eda3803bSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 7431eda3803bSmrg 7432eda3803bSmrgm4_if([$1],[LT_INIT],[ 7433eda3803bSmrg dnl 7434eda3803bSmrg dnl Simply set some default values (i.e off) if boolean options were not 7435eda3803bSmrg dnl specified: 7436eda3803bSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 7437eda3803bSmrg ]) 7438eda3803bSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 7439eda3803bSmrg ]) 7440eda3803bSmrg dnl 7441eda3803bSmrg dnl If no reference was made to various pairs of opposing options, then 7442eda3803bSmrg dnl we run the default mode handler for the pair. For example, if neither 7443eda3803bSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 7444eda3803bSmrg dnl archives by default: 7445eda3803bSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 7446eda3803bSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 7447eda3803bSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 7448eda3803bSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 7449eda3803bSmrg [_LT_ENABLE_FAST_INSTALL]) 7450eda3803bSmrg ]) 7451eda3803bSmrg])# _LT_SET_OPTIONS 7452fe5e51b7Smrg 7453fe5e51b7Smrg 7454fe5e51b7Smrg 7455eda3803bSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 7456eda3803bSmrg# ----------------------------------------- 7457eda3803bSmrgm4_define([_LT_MANGLE_DEFUN], 7458eda3803bSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 7459fe5e51b7Smrg 7460fe5e51b7Smrg 7461eda3803bSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 7462eda3803bSmrg# ----------------------------------------------- 7463eda3803bSmrgm4_define([LT_OPTION_DEFINE], 7464eda3803bSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 7465eda3803bSmrg])# LT_OPTION_DEFINE 7466fe5e51b7Smrg 7467fe5e51b7Smrg 7468eda3803bSmrg# dlopen 7469eda3803bSmrg# ------ 7470eda3803bSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 7471eda3803bSmrg]) 7472fe5e51b7Smrg 7473eda3803bSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 7474eda3803bSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 7475eda3803bSmrgAC_DIAGNOSE([obsolete], 7476eda3803bSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7477eda3803bSmrgput the `dlopen' option into LT_INIT's first parameter.]) 7478eda3803bSmrg]) 7479eda3803bSmrg 7480eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 7481eda3803bSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 7482eda3803bSmrg 7483eda3803bSmrg 7484eda3803bSmrg# win32-dll 7485eda3803bSmrg# --------- 7486eda3803bSmrg# Declare package support for building win32 dll's. 7487eda3803bSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 7488eda3803bSmrg[enable_win32_dll=yes 7489eda3803bSmrg 7490eda3803bSmrgcase $host in 7491eda3803bSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) 7492eda3803bSmrg AC_CHECK_TOOL(AS, as, false) 7493eda3803bSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7494eda3803bSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7495eda3803bSmrg ;; 7496eda3803bSmrgesac 7497fe5e51b7Smrg 7498eda3803bSmrgtest -z "$AS" && AS=as 7499eda3803bSmrg_LT_DECL([], [AS], [0], [Assembler program])dnl 7500fe5e51b7Smrg 7501eda3803bSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7502eda3803bSmrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl 7503fe5e51b7Smrg 7504eda3803bSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7505eda3803bSmrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl 7506eda3803bSmrg])# win32-dll 7507fe5e51b7Smrg 7508eda3803bSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 7509eda3803bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7510eda3803bSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 7511eda3803bSmrgAC_DIAGNOSE([obsolete], 7512eda3803bSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7513eda3803bSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 7514eda3803bSmrg]) 7515fe5e51b7Smrg 7516eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 7517eda3803bSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 7518fe5e51b7Smrg 7519fe5e51b7Smrg 7520eda3803bSmrg# _LT_ENABLE_SHARED([DEFAULT]) 7521eda3803bSmrg# ---------------------------- 7522eda3803bSmrg# implement the --enable-shared flag, and supports the `shared' and 7523eda3803bSmrg# `disable-shared' LT_INIT options. 7524eda3803bSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7525eda3803bSmrgm4_define([_LT_ENABLE_SHARED], 7526eda3803bSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 7527eda3803bSmrgAC_ARG_ENABLE([shared], 7528eda3803bSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 7529eda3803bSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 7530eda3803bSmrg [p=${PACKAGE-default} 7531eda3803bSmrg case $enableval in 7532eda3803bSmrg yes) enable_shared=yes ;; 7533eda3803bSmrg no) enable_shared=no ;; 7534eda3803bSmrg *) 7535eda3803bSmrg enable_shared=no 7536eda3803bSmrg # Look at the argument we got. We use all the common list separators. 7537eda3803bSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7538eda3803bSmrg for pkg in $enableval; do 7539eda3803bSmrg IFS="$lt_save_ifs" 7540eda3803bSmrg if test "X$pkg" = "X$p"; then 7541eda3803bSmrg enable_shared=yes 7542eda3803bSmrg fi 7543eda3803bSmrg done 7544eda3803bSmrg IFS="$lt_save_ifs" 7545fe5e51b7Smrg ;; 7546eda3803bSmrg esac], 7547eda3803bSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 7548fe5e51b7Smrg 7549eda3803bSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 7550eda3803bSmrg [Whether or not to build shared libraries]) 7551eda3803bSmrg])# _LT_ENABLE_SHARED 7552fe5e51b7Smrg 7553eda3803bSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 7554eda3803bSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 7555fe5e51b7Smrg 7556eda3803bSmrg# Old names: 7557eda3803bSmrgAC_DEFUN([AC_ENABLE_SHARED], 7558eda3803bSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 7559eda3803bSmrg]) 7560fe5e51b7Smrg 7561eda3803bSmrgAC_DEFUN([AC_DISABLE_SHARED], 7562eda3803bSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 7563eda3803bSmrg]) 7564fe5e51b7Smrg 7565eda3803bSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 7566eda3803bSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 7567fe5e51b7Smrg 7568eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 7569eda3803bSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 7570eda3803bSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 7571fe5e51b7Smrg 7572fe5e51b7Smrg 7573fe5e51b7Smrg 7574eda3803bSmrg# _LT_ENABLE_STATIC([DEFAULT]) 7575eda3803bSmrg# ---------------------------- 7576eda3803bSmrg# implement the --enable-static flag, and support the `static' and 7577eda3803bSmrg# `disable-static' LT_INIT options. 7578eda3803bSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7579eda3803bSmrgm4_define([_LT_ENABLE_STATIC], 7580eda3803bSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 7581eda3803bSmrgAC_ARG_ENABLE([static], 7582eda3803bSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 7583eda3803bSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 7584eda3803bSmrg [p=${PACKAGE-default} 7585eda3803bSmrg case $enableval in 7586eda3803bSmrg yes) enable_static=yes ;; 7587eda3803bSmrg no) enable_static=no ;; 7588eda3803bSmrg *) 7589eda3803bSmrg enable_static=no 7590eda3803bSmrg # Look at the argument we got. We use all the common list separators. 7591eda3803bSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7592eda3803bSmrg for pkg in $enableval; do 7593eda3803bSmrg IFS="$lt_save_ifs" 7594eda3803bSmrg if test "X$pkg" = "X$p"; then 7595eda3803bSmrg enable_static=yes 7596eda3803bSmrg fi 7597eda3803bSmrg done 7598eda3803bSmrg IFS="$lt_save_ifs" 7599fe5e51b7Smrg ;; 7600eda3803bSmrg esac], 7601eda3803bSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 7602fe5e51b7Smrg 7603eda3803bSmrg _LT_DECL([build_old_libs], [enable_static], [0], 7604eda3803bSmrg [Whether or not to build static libraries]) 7605eda3803bSmrg])# _LT_ENABLE_STATIC 7606fe5e51b7Smrg 7607eda3803bSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 7608eda3803bSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 7609fe5e51b7Smrg 7610eda3803bSmrg# Old names: 7611eda3803bSmrgAC_DEFUN([AC_ENABLE_STATIC], 7612eda3803bSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 7613eda3803bSmrg]) 7614fe5e51b7Smrg 7615eda3803bSmrgAC_DEFUN([AC_DISABLE_STATIC], 7616eda3803bSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 7617eda3803bSmrg]) 7618fe5e51b7Smrg 7619eda3803bSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 7620eda3803bSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 7621fe5e51b7Smrg 7622eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 7623eda3803bSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 7624eda3803bSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 7625fe5e51b7Smrg 7626fe5e51b7Smrg 7627fe5e51b7Smrg 7628eda3803bSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 7629eda3803bSmrg# ---------------------------------- 7630eda3803bSmrg# implement the --enable-fast-install flag, and support the `fast-install' 7631eda3803bSmrg# and `disable-fast-install' LT_INIT options. 7632eda3803bSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7633eda3803bSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 7634eda3803bSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 7635eda3803bSmrgAC_ARG_ENABLE([fast-install], 7636eda3803bSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 7637eda3803bSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 7638eda3803bSmrg [p=${PACKAGE-default} 7639eda3803bSmrg case $enableval in 7640eda3803bSmrg yes) enable_fast_install=yes ;; 7641eda3803bSmrg no) enable_fast_install=no ;; 7642eda3803bSmrg *) 7643eda3803bSmrg enable_fast_install=no 7644eda3803bSmrg # Look at the argument we got. We use all the common list separators. 7645eda3803bSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7646eda3803bSmrg for pkg in $enableval; do 7647eda3803bSmrg IFS="$lt_save_ifs" 7648eda3803bSmrg if test "X$pkg" = "X$p"; then 7649eda3803bSmrg enable_fast_install=yes 7650eda3803bSmrg fi 7651eda3803bSmrg done 7652eda3803bSmrg IFS="$lt_save_ifs" 7653fe5e51b7Smrg ;; 7654eda3803bSmrg esac], 7655eda3803bSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 7656fe5e51b7Smrg 7657eda3803bSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 7658eda3803bSmrg [Whether or not to optimize for fast installation])dnl 7659eda3803bSmrg])# _LT_ENABLE_FAST_INSTALL 7660fe5e51b7Smrg 7661eda3803bSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 7662eda3803bSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 7663fe5e51b7Smrg 7664eda3803bSmrg# Old names: 7665eda3803bSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 7666eda3803bSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 7667eda3803bSmrgAC_DIAGNOSE([obsolete], 7668eda3803bSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7669eda3803bSmrgthe `fast-install' option into LT_INIT's first parameter.]) 7670eda3803bSmrg]) 7671fe5e51b7Smrg 7672eda3803bSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 7673eda3803bSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 7674eda3803bSmrgAC_DIAGNOSE([obsolete], 7675eda3803bSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7676eda3803bSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 7677eda3803bSmrg]) 7678fe5e51b7Smrg 7679eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 7680eda3803bSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 7681eda3803bSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 7682fe5e51b7Smrg 7683fe5e51b7Smrg 7684eda3803bSmrg# _LT_WITH_PIC([MODE]) 7685eda3803bSmrg# -------------------- 7686eda3803bSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 7687eda3803bSmrg# LT_INIT options. 7688eda3803bSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 7689eda3803bSmrgm4_define([_LT_WITH_PIC], 7690eda3803bSmrg[AC_ARG_WITH([pic], 7691eda3803bSmrg [AS_HELP_STRING([--with-pic], 7692eda3803bSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 7693eda3803bSmrg [pic_mode="$withval"], 7694eda3803bSmrg [pic_mode=default]) 7695fe5e51b7Smrg 7696eda3803bSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 7697fe5e51b7Smrg 7698eda3803bSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 7699eda3803bSmrg])# _LT_WITH_PIC 7700eda3803bSmrg 7701eda3803bSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 7702eda3803bSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 7703eda3803bSmrg 7704eda3803bSmrg# Old name: 7705eda3803bSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 7706eda3803bSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 7707eda3803bSmrgAC_DIAGNOSE([obsolete], 7708eda3803bSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7709eda3803bSmrgput the `pic-only' option into LT_INIT's first parameter.]) 7710fe5e51b7Smrg]) 7711fe5e51b7Smrg 7712eda3803bSmrgdnl aclocal-1.4 backwards compatibility: 7713eda3803bSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 7714fe5e51b7Smrg 7715fe5e51b7Smrg 7716eda3803bSmrgm4_define([_LTDL_MODE], []) 7717eda3803bSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 7718eda3803bSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 7719eda3803bSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 7720eda3803bSmrg [m4_define([_LTDL_MODE], [recursive])]) 7721eda3803bSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 7722eda3803bSmrg [m4_define([_LTDL_MODE], [subproject])]) 7723fe5e51b7Smrg 7724eda3803bSmrgm4_define([_LTDL_TYPE], []) 7725eda3803bSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 7726eda3803bSmrg [m4_define([_LTDL_TYPE], [installable])]) 7727eda3803bSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 7728eda3803bSmrg [m4_define([_LTDL_TYPE], [convenience])]) 7729fe5e51b7Smrg 7730eda3803bSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 7731fe5e51b7Smrg# 7732eda3803bSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 7733eda3803bSmrg# Written by Gary V. Vaughan, 2004 7734fe5e51b7Smrg# 7735eda3803bSmrg# This file is free software; the Free Software Foundation gives 7736eda3803bSmrg# unlimited permission to copy and/or distribute it, with or without 7737eda3803bSmrg# modifications, as long as this notice is preserved. 7738eda3803bSmrg 7739eda3803bSmrg# serial 6 ltsugar.m4 7740eda3803bSmrg 7741eda3803bSmrg# This is to help aclocal find these macros, as it can't see m4_define. 7742eda3803bSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 7743eda3803bSmrg 7744eda3803bSmrg 7745eda3803bSmrg# lt_join(SEP, ARG1, [ARG2...]) 7746eda3803bSmrg# ----------------------------- 7747eda3803bSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 7748eda3803bSmrg# associated separator. 7749eda3803bSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 7750eda3803bSmrg# versions in m4sugar had bugs. 7751eda3803bSmrgm4_define([lt_join], 7752eda3803bSmrg[m4_if([$#], [1], [], 7753eda3803bSmrg [$#], [2], [[$2]], 7754eda3803bSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 7755eda3803bSmrgm4_define([_lt_join], 7756eda3803bSmrg[m4_if([$#$2], [2], [], 7757eda3803bSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 7758eda3803bSmrg 7759eda3803bSmrg 7760eda3803bSmrg# lt_car(LIST) 7761eda3803bSmrg# lt_cdr(LIST) 7762eda3803bSmrg# ------------ 7763eda3803bSmrg# Manipulate m4 lists. 7764eda3803bSmrg# These macros are necessary as long as will still need to support 7765eda3803bSmrg# Autoconf-2.59 which quotes differently. 7766eda3803bSmrgm4_define([lt_car], [[$1]]) 7767eda3803bSmrgm4_define([lt_cdr], 7768eda3803bSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 7769eda3803bSmrg [$#], 1, [], 7770eda3803bSmrg [m4_dquote(m4_shift($@))])]) 7771eda3803bSmrgm4_define([lt_unquote], $1) 7772eda3803bSmrg 7773eda3803bSmrg 7774eda3803bSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 7775eda3803bSmrg# ------------------------------------------ 7776eda3803bSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 7777eda3803bSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 7778eda3803bSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 7779eda3803bSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 7780eda3803bSmrg# than defined and empty). 7781fe5e51b7Smrg# 7782eda3803bSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 7783eda3803bSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 7784eda3803bSmrgm4_define([lt_append], 7785eda3803bSmrg[m4_define([$1], 7786eda3803bSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 7787eda3803bSmrg 7788eda3803bSmrg 7789eda3803bSmrg 7790eda3803bSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 7791eda3803bSmrg# ---------------------------------------------------------- 7792eda3803bSmrg# Produce a SEP delimited list of all paired combinations of elements of 7793eda3803bSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 7794eda3803bSmrg# has the form PREFIXmINFIXSUFFIXn. 7795eda3803bSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 7796eda3803bSmrgm4_define([lt_combine], 7797eda3803bSmrg[m4_if(m4_eval([$# > 3]), [1], 7798eda3803bSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 7799eda3803bSmrg[[m4_foreach([_Lt_prefix], [$2], 7800eda3803bSmrg [m4_foreach([_Lt_suffix], 7801eda3803bSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 7802eda3803bSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 7803eda3803bSmrg 7804eda3803bSmrg 7805eda3803bSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 7806eda3803bSmrg# ----------------------------------------------------------------------- 7807eda3803bSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 7808eda3803bSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 7809eda3803bSmrgm4_define([lt_if_append_uniq], 7810eda3803bSmrg[m4_ifdef([$1], 7811eda3803bSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 7812eda3803bSmrg [lt_append([$1], [$2], [$3])$4], 7813eda3803bSmrg [$5])], 7814eda3803bSmrg [lt_append([$1], [$2], [$3])$4])]) 7815eda3803bSmrg 7816eda3803bSmrg 7817eda3803bSmrg# lt_dict_add(DICT, KEY, VALUE) 7818eda3803bSmrg# ----------------------------- 7819eda3803bSmrgm4_define([lt_dict_add], 7820eda3803bSmrg[m4_define([$1($2)], [$3])]) 7821fe5e51b7Smrg 7822fe5e51b7Smrg 7823eda3803bSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 7824eda3803bSmrg# -------------------------------------------- 7825eda3803bSmrgm4_define([lt_dict_add_subkey], 7826eda3803bSmrg[m4_define([$1($2:$3)], [$4])]) 7827eda3803bSmrg 7828fe5e51b7Smrg 7829eda3803bSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 7830eda3803bSmrg# ---------------------------------- 7831eda3803bSmrgm4_define([lt_dict_fetch], 7832eda3803bSmrg[m4_ifval([$3], 7833eda3803bSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 7834eda3803bSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 7835fe5e51b7Smrg 7836fe5e51b7Smrg 7837eda3803bSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 7838eda3803bSmrg# ----------------------------------------------------------------- 7839eda3803bSmrgm4_define([lt_if_dict_fetch], 7840eda3803bSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 7841eda3803bSmrg [$5], 7842eda3803bSmrg [$6])]) 7843fe5e51b7Smrg 7844fe5e51b7Smrg 7845eda3803bSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 7846eda3803bSmrg# -------------------------------------------------------------- 7847eda3803bSmrgm4_define([lt_dict_filter], 7848eda3803bSmrg[m4_if([$5], [], [], 7849eda3803bSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 7850eda3803bSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 7851eda3803bSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 7852fe5e51b7Smrg]) 7853fe5e51b7Smrg 7854eda3803bSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 7855eda3803bSmrg# 7856eda3803bSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 7857eda3803bSmrg# Written by Scott James Remnant, 2004 7858eda3803bSmrg# 7859eda3803bSmrg# This file is free software; the Free Software Foundation gives 7860eda3803bSmrg# unlimited permission to copy and/or distribute it, with or without 7861eda3803bSmrg# modifications, as long as this notice is preserved. 7862fe5e51b7Smrg 7863eda3803bSmrg# Generated from ltversion.in. 7864fe5e51b7Smrg 7865eda3803bSmrg# serial 3012 ltversion.m4 7866eda3803bSmrg# This file is part of GNU Libtool 7867fe5e51b7Smrg 7868eda3803bSmrgm4_define([LT_PACKAGE_VERSION], [2.2.6]) 7869eda3803bSmrgm4_define([LT_PACKAGE_REVISION], [1.3012]) 7870fe5e51b7Smrg 7871eda3803bSmrgAC_DEFUN([LTVERSION_VERSION], 7872eda3803bSmrg[macro_version='2.2.6' 7873eda3803bSmrgmacro_revision='1.3012' 7874eda3803bSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 7875eda3803bSmrg_LT_DECL(, macro_revision, 0) 7876fe5e51b7Smrg]) 7877fe5e51b7Smrg 7878eda3803bSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 7879eda3803bSmrg# 7880eda3803bSmrg# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. 7881eda3803bSmrg# Written by Scott James Remnant, 2004. 7882eda3803bSmrg# 7883eda3803bSmrg# This file is free software; the Free Software Foundation gives 7884eda3803bSmrg# unlimited permission to copy and/or distribute it, with or without 7885eda3803bSmrg# modifications, as long as this notice is preserved. 7886eda3803bSmrg 7887eda3803bSmrg# serial 4 lt~obsolete.m4 7888eda3803bSmrg 7889eda3803bSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 7890eda3803bSmrg# 7891eda3803bSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 7892eda3803bSmrg# which have later been changed to m4_define as they aren't part of the 7893eda3803bSmrg# exported API, or moved to Autoconf or Automake where they belong. 7894eda3803bSmrg# 7895eda3803bSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 7896eda3803bSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 7897eda3803bSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 7898eda3803bSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 7899eda3803bSmrg# and doesn't know about Autoconf macros at all.) 7900eda3803bSmrg# 7901eda3803bSmrg# So we provide this file, which has a silly filename so it's always 7902eda3803bSmrg# included after everything else. This provides aclocal with the 7903eda3803bSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 7904eda3803bSmrg# because those macros already exist, or will be overwritten later. 7905eda3803bSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 7906eda3803bSmrg# 7907eda3803bSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 7908eda3803bSmrg# Yes, that means every name once taken will need to remain here until 7909eda3803bSmrg# we give up compatibility with versions before 1.7, at which point 7910eda3803bSmrg# we need to keep only those names which we still refer to. 7911eda3803bSmrg 7912eda3803bSmrg# This is to help aclocal find these macros, as it can't see m4_define. 7913eda3803bSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 7914eda3803bSmrg 7915eda3803bSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 7916eda3803bSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 7917eda3803bSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 7918eda3803bSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 7919eda3803bSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 7920eda3803bSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 7921eda3803bSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 7922eda3803bSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 7923eda3803bSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 7924eda3803bSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 7925eda3803bSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 7926eda3803bSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 7927eda3803bSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 7928eda3803bSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 7929eda3803bSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 7930eda3803bSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 7931eda3803bSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 7932eda3803bSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 7933eda3803bSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 7934eda3803bSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 7935eda3803bSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 7936eda3803bSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 7937eda3803bSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 7938eda3803bSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 7939eda3803bSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 7940eda3803bSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 7941eda3803bSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 7942eda3803bSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 7943eda3803bSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 7944eda3803bSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 7945eda3803bSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 7946eda3803bSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 7947eda3803bSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 7948eda3803bSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 7949eda3803bSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 7950eda3803bSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 7951eda3803bSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 7952eda3803bSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 7953eda3803bSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 7954eda3803bSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 7955eda3803bSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 7956eda3803bSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 7957eda3803bSmrgm4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 7958eda3803bSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 7959eda3803bSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 7960eda3803bSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 7961eda3803bSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 7962eda3803bSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 7963eda3803bSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 7964eda3803bSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 7965eda3803bSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 7966eda3803bSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 7967eda3803bSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 7968eda3803bSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 7969eda3803bSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 7970eda3803bSmrg 7971fe5e51b7Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 7972fe5e51b7Smrg# 7973fe5e51b7Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 7974fe5e51b7Smrg# 7975fe5e51b7Smrg# This program is free software; you can redistribute it and/or modify 7976fe5e51b7Smrg# it under the terms of the GNU General Public License as published by 7977fe5e51b7Smrg# the Free Software Foundation; either version 2 of the License, or 7978fe5e51b7Smrg# (at your option) any later version. 7979fe5e51b7Smrg# 7980fe5e51b7Smrg# This program is distributed in the hope that it will be useful, but 7981fe5e51b7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 7982fe5e51b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 7983fe5e51b7Smrg# General Public License for more details. 7984fe5e51b7Smrg# 7985fe5e51b7Smrg# You should have received a copy of the GNU General Public License 7986fe5e51b7Smrg# along with this program; if not, write to the Free Software 7987fe5e51b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 7988fe5e51b7Smrg# 7989fe5e51b7Smrg# As a special exception to the GNU General Public License, if you 7990fe5e51b7Smrg# distribute this file as part of a program that contains a 7991fe5e51b7Smrg# configuration script generated by Autoconf, you may include it under 7992fe5e51b7Smrg# the same distribution terms that you use for the rest of that program. 7993fe5e51b7Smrg 7994fe5e51b7Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 7995fe5e51b7Smrg# ---------------------------------- 7996fe5e51b7SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 7997fe5e51b7Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 7998fe5e51b7Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 7999fe5e51b7SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 8000fe5e51b7Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8001fe5e51b7Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8002fe5e51b7Smrgfi 8003fe5e51b7Smrgif test -n "$PKG_CONFIG"; then 8004fe5e51b7Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 8005fe5e51b7Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8006fe5e51b7Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8007fe5e51b7Smrg AC_MSG_RESULT([yes]) 8008fe5e51b7Smrg else 8009fe5e51b7Smrg AC_MSG_RESULT([no]) 8010fe5e51b7Smrg PKG_CONFIG="" 8011fe5e51b7Smrg fi 8012fe5e51b7Smrg 8013fe5e51b7Smrgfi[]dnl 8014fe5e51b7Smrg])# PKG_PROG_PKG_CONFIG 8015fe5e51b7Smrg 8016fe5e51b7Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8017fe5e51b7Smrg# 8018fe5e51b7Smrg# Check to see whether a particular set of modules exists. Similar 8019fe5e51b7Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8020fe5e51b7Smrg# 8021fe5e51b7Smrg# 8022fe5e51b7Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 8023fe5e51b7Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 8024fe5e51b7Smrg# PKG_CHECK_EXISTS manually 8025fe5e51b7Smrg# -------------------------------------------------------------- 8026fe5e51b7SmrgAC_DEFUN([PKG_CHECK_EXISTS], 8027fe5e51b7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8028fe5e51b7Smrgif test -n "$PKG_CONFIG" && \ 8029fe5e51b7Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8030fe5e51b7Smrg m4_ifval([$2], [$2], [:]) 8031fe5e51b7Smrgm4_ifvaln([$3], [else 8032fe5e51b7Smrg $3])dnl 8033fe5e51b7Smrgfi]) 8034fe5e51b7Smrg 8035fe5e51b7Smrg 8036fe5e51b7Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8037fe5e51b7Smrg# --------------------------------------------- 8038fe5e51b7Smrgm4_define([_PKG_CONFIG], 8039eda3803bSmrg[if test -n "$$1"; then 8040eda3803bSmrg pkg_cv_[]$1="$$1" 8041eda3803bSmrg elif test -n "$PKG_CONFIG"; then 8042eda3803bSmrg PKG_CHECK_EXISTS([$3], 8043eda3803bSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 8044eda3803bSmrg [pkg_failed=yes]) 8045eda3803bSmrg else 8046eda3803bSmrg pkg_failed=untried 8047fe5e51b7Smrgfi[]dnl 8048fe5e51b7Smrg])# _PKG_CONFIG 8049fe5e51b7Smrg 8050fe5e51b7Smrg# _PKG_SHORT_ERRORS_SUPPORTED 8051fe5e51b7Smrg# ----------------------------- 8052fe5e51b7SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8053fe5e51b7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8054fe5e51b7Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8055fe5e51b7Smrg _pkg_short_errors_supported=yes 8056fe5e51b7Smrgelse 8057fe5e51b7Smrg _pkg_short_errors_supported=no 8058fe5e51b7Smrgfi[]dnl 8059fe5e51b7Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 8060fe5e51b7Smrg 8061fe5e51b7Smrg 8062fe5e51b7Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8063fe5e51b7Smrg# [ACTION-IF-NOT-FOUND]) 8064fe5e51b7Smrg# 8065fe5e51b7Smrg# 8066fe5e51b7Smrg# Note that if there is a possibility the first call to 8067fe5e51b7Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8068fe5e51b7Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8069fe5e51b7Smrg# 8070fe5e51b7Smrg# 8071fe5e51b7Smrg# -------------------------------------------------------------- 8072fe5e51b7SmrgAC_DEFUN([PKG_CHECK_MODULES], 8073fe5e51b7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8074fe5e51b7SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8075fe5e51b7SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8076fe5e51b7Smrg 8077fe5e51b7Smrgpkg_failed=no 8078fe5e51b7SmrgAC_MSG_CHECKING([for $1]) 8079fe5e51b7Smrg 8080fe5e51b7Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8081fe5e51b7Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8082fe5e51b7Smrg 8083fe5e51b7Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8084fe5e51b7Smrgand $1[]_LIBS to avoid the need to call pkg-config. 8085fe5e51b7SmrgSee the pkg-config man page for more details.]) 8086fe5e51b7Smrg 8087fe5e51b7Smrgif test $pkg_failed = yes; then 8088fe5e51b7Smrg _PKG_SHORT_ERRORS_SUPPORTED 8089fe5e51b7Smrg if test $_pkg_short_errors_supported = yes; then 8090eda3803bSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 8091fe5e51b7Smrg else 8092eda3803bSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 8093fe5e51b7Smrg fi 8094fe5e51b7Smrg # Put the nasty error message in config.log where it belongs 8095fe5e51b7Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8096fe5e51b7Smrg 8097fe5e51b7Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 8098fe5e51b7Smrg[Package requirements ($2) were not met: 8099fe5e51b7Smrg 8100fe5e51b7Smrg$$1_PKG_ERRORS 8101fe5e51b7Smrg 8102fe5e51b7SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8103fe5e51b7Smrginstalled software in a non-standard prefix. 8104fe5e51b7Smrg 8105fe5e51b7Smrg_PKG_TEXT 8106fe5e51b7Smrg])], 8107fe5e51b7Smrg [AC_MSG_RESULT([no]) 8108fe5e51b7Smrg $4]) 8109fe5e51b7Smrgelif test $pkg_failed = untried; then 8110fe5e51b7Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 8111fe5e51b7Smrg[The pkg-config script could not be found or is too old. Make sure it 8112fe5e51b7Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 8113fe5e51b7Smrgpath to pkg-config. 8114fe5e51b7Smrg 8115fe5e51b7Smrg_PKG_TEXT 8116fe5e51b7Smrg 8117fe5e51b7SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 8118fe5e51b7Smrg [$4]) 8119fe5e51b7Smrgelse 8120fe5e51b7Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8121fe5e51b7Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8122fe5e51b7Smrg AC_MSG_RESULT([yes]) 8123fe5e51b7Smrg ifelse([$3], , :, [$3]) 8124fe5e51b7Smrgfi[]dnl 8125fe5e51b7Smrg])# PKG_CHECK_MODULES 8126fe5e51b7Smrg 8127eda3803bSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 8128fe5e51b7Smrgdnl 8129fe5e51b7Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 8130fe5e51b7Smrgdnl 8131fe5e51b7Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 8132fe5e51b7Smrgdnl copy of this software and associated documentation files (the 8133fe5e51b7Smrgdnl "Software"), to deal in the Software without restriction, including 8134fe5e51b7Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 8135fe5e51b7Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 8136fe5e51b7Smrgdnl to whom the Software is furnished to do so, provided that the above 8137fe5e51b7Smrgdnl copyright notice(s) and this permission notice appear in all copies of 8138fe5e51b7Smrgdnl the Software and that both the above copyright notice(s) and this 8139fe5e51b7Smrgdnl permission notice appear in supporting documentation. 8140fe5e51b7Smrgdnl 8141fe5e51b7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 8142fe5e51b7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 8143fe5e51b7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 8144fe5e51b7Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 8145fe5e51b7Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 8146fe5e51b7Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 8147fe5e51b7Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 8148fe5e51b7Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 8149fe5e51b7Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 8150fe5e51b7Smrgdnl 8151fe5e51b7Smrgdnl Except as contained in this notice, the name of a copyright holder 8152fe5e51b7Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 8153fe5e51b7Smrgdnl or other dealings in this Software without prior written authorization 8154fe5e51b7Smrgdnl of the copyright holder. 8155fe5e51b7Smrg 8156fe5e51b7Smrg# XORG_MACROS_VERSION(required-version) 8157fe5e51b7Smrg# ------------------------------------- 8158fe5e51b7Smrg# Minimum version: 1.1.0 8159fe5e51b7Smrg# 8160fe5e51b7Smrg# If you're using a macro added in Version 1.1 or newer, include this in 8161fe5e51b7Smrg# your configure.ac with the minimum required version, such as: 8162fe5e51b7Smrg# XORG_MACROS_VERSION(1.1) 8163fe5e51b7Smrg# 8164fe5e51b7Smrg# To force at least a version with this macro defined, also add: 8165fe5e51b7Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 8166fe5e51b7Smrg# 8167fe5e51b7Smrg# 8168fe5e51b7Smrg# See the "minimum version" comment for each macro you use to see what 8169fe5e51b7Smrg# version you require. 8170fe5e51b7SmrgAC_DEFUN([XORG_MACROS_VERSION],[ 8171fe5e51b7Smrg [XORG_MACROS_needed_version=$1 8172fe5e51b7Smrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 8173fe5e51b7Smrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 8174fe5e51b7Smrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 8175eda3803bSmrg [XORG_MACROS_version=1.2.1 8176fe5e51b7Smrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 8177fe5e51b7Smrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 8178fe5e51b7Smrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 8179fe5e51b7Smrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 8180fe5e51b7Smrg fi 8181fe5e51b7Smrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 8182fe5e51b7Smrg AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) 8183fe5e51b7Smrg fi 8184fe5e51b7Smrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 8185fe5e51b7Smrg]) # XORG_MACROS_VERSION 8186fe5e51b7Smrg 8187fe5e51b7Smrg# XORG_PROG_RAWCPP() 8188fe5e51b7Smrg# ------------------ 8189fe5e51b7Smrg# Minimum version: 1.0.0 8190fe5e51b7Smrg# 8191fe5e51b7Smrg# Find cpp program and necessary flags for use in pre-processing text files 8192fe5e51b7Smrg# such as man pages and config files 8193fe5e51b7SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 8194fe5e51b7SmrgAC_REQUIRE([AC_PROG_CPP]) 8195fe5e51b7SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 8196fe5e51b7Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 8197fe5e51b7Smrg 8198fe5e51b7Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 8199fe5e51b7Smrg# which is not the best choice for supporting other OS'es, but covers most 8200fe5e51b7Smrg# of the ones we need for now. 8201fe5e51b7SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 8202fe5e51b7SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 8203fe5e51b7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8204fe5e51b7Smrg AC_MSG_RESULT([no]) 8205fe5e51b7Smrgelse 8206fe5e51b7Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8207fe5e51b7Smrg RAWCPPFLAGS=-undef 8208fe5e51b7Smrg AC_MSG_RESULT([yes]) 8209eda3803bSmrg # under Cygwin unix is still defined even with -undef 8210eda3803bSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8211eda3803bSmrg RAWCPPFLAGS="-undef -ansi" 8212eda3803bSmrg AC_MSG_RESULT([yes, with -ansi]) 8213fe5e51b7Smrg else 8214fe5e51b7Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 8215fe5e51b7Smrg fi 8216fe5e51b7Smrgfi 8217fe5e51b7Smrgrm -f conftest.$ac_ext 8218fe5e51b7Smrg 8219fe5e51b7SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 8220fe5e51b7SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 8221fe5e51b7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8222fe5e51b7Smrg AC_MSG_RESULT([no]) 8223fe5e51b7Smrgelse 8224fe5e51b7Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8225fe5e51b7Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 8226fe5e51b7Smrg AC_MSG_RESULT([yes]) 8227fe5e51b7Smrg else 8228fe5e51b7Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 8229fe5e51b7Smrg fi 8230fe5e51b7Smrgfi 8231fe5e51b7Smrgrm -f conftest.$ac_ext 8232fe5e51b7SmrgAC_SUBST(RAWCPPFLAGS) 8233fe5e51b7Smrg]) # XORG_PROG_RAWCPP 8234fe5e51b7Smrg 8235fe5e51b7Smrg# XORG_MANPAGE_SECTIONS() 8236fe5e51b7Smrg# ----------------------- 8237fe5e51b7Smrg# Minimum version: 1.0.0 8238fe5e51b7Smrg# 8239fe5e51b7Smrg# Determine which sections man pages go in for the different man page types 8240fe5e51b7Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 8241fe5e51b7Smrg# Not sure if there's any better way than just hardcoding by OS name. 8242fe5e51b7Smrg# Override default settings by setting environment variables 8243fe5e51b7Smrg 8244fe5e51b7SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 8245fe5e51b7SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 8246fe5e51b7Smrg 8247fe5e51b7Smrgif test x$APP_MAN_SUFFIX = x ; then 8248fe5e51b7Smrg APP_MAN_SUFFIX=1 8249fe5e51b7Smrgfi 8250fe5e51b7Smrgif test x$APP_MAN_DIR = x ; then 8251fe5e51b7Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 8252fe5e51b7Smrgfi 8253fe5e51b7Smrg 8254fe5e51b7Smrgif test x$LIB_MAN_SUFFIX = x ; then 8255fe5e51b7Smrg LIB_MAN_SUFFIX=3 8256fe5e51b7Smrgfi 8257fe5e51b7Smrgif test x$LIB_MAN_DIR = x ; then 8258fe5e51b7Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 8259fe5e51b7Smrgfi 8260fe5e51b7Smrg 8261fe5e51b7Smrgif test x$FILE_MAN_SUFFIX = x ; then 8262fe5e51b7Smrg case $host_os in 8263fe5e51b7Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 8264fe5e51b7Smrg *) FILE_MAN_SUFFIX=5 ;; 8265fe5e51b7Smrg esac 8266fe5e51b7Smrgfi 8267fe5e51b7Smrgif test x$FILE_MAN_DIR = x ; then 8268fe5e51b7Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 8269fe5e51b7Smrgfi 8270fe5e51b7Smrg 8271fe5e51b7Smrgif test x$MISC_MAN_SUFFIX = x ; then 8272fe5e51b7Smrg case $host_os in 8273fe5e51b7Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 8274fe5e51b7Smrg *) MISC_MAN_SUFFIX=7 ;; 8275fe5e51b7Smrg esac 8276fe5e51b7Smrgfi 8277fe5e51b7Smrgif test x$MISC_MAN_DIR = x ; then 8278fe5e51b7Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 8279fe5e51b7Smrgfi 8280fe5e51b7Smrg 8281fe5e51b7Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 8282fe5e51b7Smrg case $host_os in 8283fe5e51b7Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 8284fe5e51b7Smrg *) DRIVER_MAN_SUFFIX=4 ;; 8285fe5e51b7Smrg esac 8286fe5e51b7Smrgfi 8287fe5e51b7Smrgif test x$DRIVER_MAN_DIR = x ; then 8288fe5e51b7Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 8289fe5e51b7Smrgfi 8290fe5e51b7Smrg 8291fe5e51b7Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 8292fe5e51b7Smrg case $host_os in 8293fe5e51b7Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 8294fe5e51b7Smrg *) ADMIN_MAN_SUFFIX=8 ;; 8295fe5e51b7Smrg esac 8296fe5e51b7Smrgfi 8297fe5e51b7Smrgif test x$ADMIN_MAN_DIR = x ; then 8298fe5e51b7Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 8299fe5e51b7Smrgfi 8300fe5e51b7Smrg 8301fe5e51b7Smrg 8302fe5e51b7SmrgAC_SUBST([APP_MAN_SUFFIX]) 8303fe5e51b7SmrgAC_SUBST([LIB_MAN_SUFFIX]) 8304fe5e51b7SmrgAC_SUBST([FILE_MAN_SUFFIX]) 8305fe5e51b7SmrgAC_SUBST([MISC_MAN_SUFFIX]) 8306fe5e51b7SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 8307fe5e51b7SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 8308fe5e51b7SmrgAC_SUBST([APP_MAN_DIR]) 8309fe5e51b7SmrgAC_SUBST([LIB_MAN_DIR]) 8310fe5e51b7SmrgAC_SUBST([FILE_MAN_DIR]) 8311fe5e51b7SmrgAC_SUBST([MISC_MAN_DIR]) 8312fe5e51b7SmrgAC_SUBST([DRIVER_MAN_DIR]) 8313fe5e51b7SmrgAC_SUBST([ADMIN_MAN_DIR]) 8314fe5e51b7Smrg]) # XORG_MANPAGE_SECTIONS 8315fe5e51b7Smrg 8316fe5e51b7Smrg# XORG_CHECK_LINUXDOC 8317fe5e51b7Smrg# ------------------- 8318fe5e51b7Smrg# Minimum version: 1.0.0 8319fe5e51b7Smrg# 8320fe5e51b7Smrg# Defines the variable MAKE_TEXT if the necessary tools and 8321fe5e51b7Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 8322fe5e51b7Smrg# Whether or not the necessary tools and files are found can be checked 8323fe5e51b7Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 8324fe5e51b7SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 8325eda3803bSmrgif test x$XORG_SGML_PATH = x ; then 8326eda3803bSmrg XORG_SGML_PATH=$prefix/share/sgml 8327eda3803bSmrgfi 8328fe5e51b7SmrgHAVE_DEFS_ENT= 8329fe5e51b7Smrg 8330eda3803bSmrgif test x"$cross_compiling" = x"yes" ; then 8331eda3803bSmrg HAVE_DEFS_ENT=no 8332eda3803bSmrgelse 8333eda3803bSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 8334eda3803bSmrgfi 8335fe5e51b7Smrg 8336fe5e51b7SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 8337fe5e51b7SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 8338fe5e51b7Smrg 8339fe5e51b7SmrgAC_MSG_CHECKING([Whether to build documentation]) 8340fe5e51b7Smrg 8341fe5e51b7Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 8342fe5e51b7Smrg BUILDDOC=yes 8343fe5e51b7Smrgelse 8344fe5e51b7Smrg BUILDDOC=no 8345fe5e51b7Smrgfi 8346fe5e51b7Smrg 8347fe5e51b7SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 8348fe5e51b7Smrg 8349fe5e51b7SmrgAC_MSG_RESULT([$BUILDDOC]) 8350fe5e51b7Smrg 8351fe5e51b7SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 8352fe5e51b7Smrg 8353fe5e51b7Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 8354fe5e51b7Smrg BUILDPDFDOC=yes 8355fe5e51b7Smrgelse 8356fe5e51b7Smrg BUILDPDFDOC=no 8357fe5e51b7Smrgfi 8358fe5e51b7Smrg 8359fe5e51b7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 8360fe5e51b7Smrg 8361fe5e51b7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 8362fe5e51b7Smrg 8363fe5e51b7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 8364fe5e51b7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 8365fe5e51b7SmrgMAKE_PDF="$PS2PDF" 8366fe5e51b7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 8367fe5e51b7Smrg 8368fe5e51b7SmrgAC_SUBST(MAKE_TEXT) 8369fe5e51b7SmrgAC_SUBST(MAKE_PS) 8370fe5e51b7SmrgAC_SUBST(MAKE_PDF) 8371fe5e51b7SmrgAC_SUBST(MAKE_HTML) 8372fe5e51b7Smrg]) # XORG_CHECK_LINUXDOC 8373fe5e51b7Smrg 8374fe5e51b7Smrg# XORG_CHECK_DOCBOOK 8375fe5e51b7Smrg# ------------------- 8376fe5e51b7Smrg# Minimum version: 1.0.0 8377fe5e51b7Smrg# 8378fe5e51b7Smrg# Checks for the ability to build output formats from SGML DocBook source. 8379fe5e51b7Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 8380fe5e51b7Smrg# indicates whether the necessary tools and files are found and, if set, 8381fe5e51b7Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 8382fe5e51b7SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 8383eda3803bSmrgif test x$XORG_SGML_PATH = x ; then 8384eda3803bSmrg XORG_SGML_PATH=$prefix/share/sgml 8385eda3803bSmrgfi 8386fe5e51b7SmrgHAVE_DEFS_ENT= 8387fe5e51b7SmrgBUILDTXTDOC=no 8388fe5e51b7SmrgBUILDPDFDOC=no 8389fe5e51b7SmrgBUILDPSDOC=no 8390fe5e51b7SmrgBUILDHTMLDOC=no 8391fe5e51b7Smrg 8392fe5e51b7SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 8393fe5e51b7Smrg 8394fe5e51b7SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 8395fe5e51b7SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 8396fe5e51b7SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 8397fe5e51b7SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 8398fe5e51b7Smrg 8399fe5e51b7SmrgAC_MSG_CHECKING([Whether to build text documentation]) 8400fe5e51b7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 8401fe5e51b7Smrg test x$BUILD_TXTDOC != xno; then 8402fe5e51b7Smrg BUILDTXTDOC=yes 8403fe5e51b7Smrgfi 8404fe5e51b7SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 8405fe5e51b7SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 8406fe5e51b7Smrg 8407fe5e51b7SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 8408fe5e51b7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 8409fe5e51b7Smrg test x$BUILD_PDFDOC != xno; then 8410fe5e51b7Smrg BUILDPDFDOC=yes 8411fe5e51b7Smrgfi 8412fe5e51b7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 8413fe5e51b7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 8414fe5e51b7Smrg 8415fe5e51b7SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 8416fe5e51b7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 8417fe5e51b7Smrg test x$BUILD_PSDOC != xno; then 8418fe5e51b7Smrg BUILDPSDOC=yes 8419fe5e51b7Smrgfi 8420fe5e51b7SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 8421fe5e51b7SmrgAC_MSG_RESULT([$BUILDPSDOC]) 8422fe5e51b7Smrg 8423fe5e51b7SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 8424fe5e51b7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 8425fe5e51b7Smrg test x$BUILD_HTMLDOC != xno; then 8426fe5e51b7Smrg BUILDHTMLDOC=yes 8427fe5e51b7Smrgfi 8428fe5e51b7SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 8429fe5e51b7SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 8430fe5e51b7Smrg 8431fe5e51b7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 8432fe5e51b7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 8433fe5e51b7SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 8434fe5e51b7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 8435fe5e51b7Smrg 8436fe5e51b7SmrgAC_SUBST(MAKE_TEXT) 8437fe5e51b7SmrgAC_SUBST(MAKE_PS) 8438fe5e51b7SmrgAC_SUBST(MAKE_PDF) 8439fe5e51b7SmrgAC_SUBST(MAKE_HTML) 8440fe5e51b7Smrg]) # XORG_CHECK_DOCBOOK 8441fe5e51b7Smrg 8442fe5e51b7Smrg# XORG_CHECK_MALLOC_ZERO 8443fe5e51b7Smrg# ---------------------- 8444fe5e51b7Smrg# Minimum version: 1.0.0 8445fe5e51b7Smrg# 8446fe5e51b7Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 8447fe5e51b7Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 8448fe5e51b7Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 8449fe5e51b7SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 8450fe5e51b7SmrgAC_ARG_ENABLE(malloc0returnsnull, 8451fe5e51b7Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 8452fe5e51b7Smrg [malloc(0) returns NULL (default: auto)]), 8453fe5e51b7Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 8454fe5e51b7Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 8455fe5e51b7Smrg 8456fe5e51b7SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 8457fe5e51b7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 8458fe5e51b7Smrg AC_RUN_IFELSE([ 8459fe5e51b7Smrgchar *malloc(); 8460fe5e51b7Smrgchar *realloc(); 8461fe5e51b7Smrgchar *calloc(); 8462fe5e51b7Smrgmain() { 8463fe5e51b7Smrg char *m0, *r0, *c0, *p; 8464fe5e51b7Smrg m0 = malloc(0); 8465fe5e51b7Smrg p = malloc(10); 8466fe5e51b7Smrg r0 = realloc(p,0); 8467fe5e51b7Smrg c0 = calloc(0); 8468fe5e51b7Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 8469fe5e51b7Smrg}], 8470fe5e51b7Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 8471fe5e51b7Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 8472fe5e51b7Smrgfi 8473fe5e51b7SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 8474fe5e51b7Smrg 8475fe5e51b7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 8476fe5e51b7Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 8477fe5e51b7Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 8478fe5e51b7Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 8479fe5e51b7Smrgelse 8480fe5e51b7Smrg MALLOC_ZERO_CFLAGS="" 8481fe5e51b7Smrg XMALLOC_ZERO_CFLAGS="" 8482fe5e51b7Smrg XTMALLOC_ZERO_CFLAGS="" 8483fe5e51b7Smrgfi 8484fe5e51b7Smrg 8485fe5e51b7SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 8486fe5e51b7SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 8487fe5e51b7SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 8488fe5e51b7Smrg]) # XORG_CHECK_MALLOC_ZERO 8489fe5e51b7Smrg 8490fe5e51b7Smrg# XORG_WITH_LINT() 8491fe5e51b7Smrg# ---------------- 8492fe5e51b7Smrg# Minimum version: 1.1.0 8493fe5e51b7Smrg# 8494fe5e51b7Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 8495fe5e51b7Smrg# is specified. (Use --with-lint=sparse for sparse.) 8496fe5e51b7Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 8497fe5e51b7Smrg# Sets $LINT_FLAGS to flags to pass to source checker 8498fe5e51b7Smrg# Sets LINT automake conditional if enabled (default: disabled) 8499fe5e51b7Smrg# 8500fe5e51b7SmrgAC_DEFUN([XORG_WITH_LINT],[ 8501fe5e51b7Smrg 8502fe5e51b7Smrg# Allow checking code with lint, sparse, etc. 8503fe5e51b7SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 8504fe5e51b7Smrg [Use a lint-style source code checker (default: disabled)])], 8505fe5e51b7Smrg [use_lint=$withval], [use_lint=no]) 8506fe5e51b7Smrgif test "x$use_lint" = "xyes" ; then 8507fe5e51b7Smrg LINT="lint" 8508fe5e51b7Smrgelse 8509fe5e51b7Smrg LINT="$use_lint" 8510fe5e51b7Smrgfi 8511fe5e51b7Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 8512fe5e51b7Smrg case $LINT in 8513fe5e51b7Smrg lint|*/lint) 8514fe5e51b7Smrg case $host_os in 8515fe5e51b7Smrg solaris*) 8516fe5e51b7Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 8517fe5e51b7Smrg ;; 8518fe5e51b7Smrg esac 8519fe5e51b7Smrg ;; 8520fe5e51b7Smrg esac 8521fe5e51b7Smrgfi 8522fe5e51b7Smrg 8523fe5e51b7SmrgAC_SUBST(LINT) 8524fe5e51b7SmrgAC_SUBST(LINT_FLAGS) 8525fe5e51b7SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 8526fe5e51b7Smrg 8527fe5e51b7Smrg]) # XORG_WITH_LINT 8528fe5e51b7Smrg 8529fe5e51b7Smrg# XORG_LINT_LIBRARY(LIBNAME) 8530fe5e51b7Smrg# -------------------------- 8531fe5e51b7Smrg# Minimum version: 1.1.0 8532fe5e51b7Smrg# 8533fe5e51b7Smrg# Sets up flags for building lint libraries for checking programs that call 8534fe5e51b7Smrg# functions in the library. 8535fe5e51b7Smrg# Disabled by default, enable with --enable-lint-library 8536fe5e51b7Smrg# Sets: 8537fe5e51b7Smrg# @LINTLIB@ - name of lint library file to make 8538fe5e51b7Smrg# MAKE_LINT_LIB - automake conditional 8539fe5e51b7Smrg# 8540fe5e51b7Smrg 8541fe5e51b7SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 8542fe5e51b7SmrgAC_REQUIRE([XORG_WITH_LINT]) 8543fe5e51b7Smrg# Build lint "library" for more indepth checks of programs calling this library 8544fe5e51b7SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 8545fe5e51b7Smrg [Create lint library (default: disabled)])], 8546fe5e51b7Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 8547fe5e51b7Smrgif test "x$make_lint_lib" != "xno" ; then 8548fe5e51b7Smrg if test "x$LINT" = "xno" ; then 8549fe5e51b7Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 8550fe5e51b7Smrg fi 8551fe5e51b7Smrg if test "x$make_lint_lib" = "xyes" ; then 8552fe5e51b7Smrg LINTLIB=llib-l$1.ln 8553fe5e51b7Smrg else 8554fe5e51b7Smrg LINTLIB=$make_lint_lib 8555fe5e51b7Smrg fi 8556fe5e51b7Smrgfi 8557fe5e51b7SmrgAC_SUBST(LINTLIB) 8558fe5e51b7SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 8559fe5e51b7Smrg 8560fe5e51b7Smrg]) # XORG_LINT_LIBRARY 8561fe5e51b7Smrg 8562eda3803bSmrg# XORG_CWARNFLAGS 8563eda3803bSmrg# --------------- 8564eda3803bSmrg# Minimum version: 1.2.0 8565eda3803bSmrg# 8566eda3803bSmrg# Defines CWARNFLAGS to enable C compiler warnings. 8567eda3803bSmrg# 8568eda3803bSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 8569eda3803bSmrgAC_REQUIRE([AC_PROG_CC]) 8570eda3803bSmrgif test "x$GCC" = xyes ; then 8571eda3803bSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 8572eda3803bSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 8573eda3803bSmrg-Wbad-function-cast" 8574eda3803bSmrg case `gcc -dumpversion` in 8575eda3803bSmrg 3.4.* | 4.*) 8576eda3803bSmrg CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 8577eda3803bSmrg ;; 8578eda3803bSmrg esac 8579eda3803bSmrgelse 8580eda3803bSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 8581eda3803bSmrg if test "x$SUNCC" = "xyes"; then 8582eda3803bSmrg CWARNFLAGS="-v" 8583eda3803bSmrg fi 8584eda3803bSmrgfi 8585eda3803bSmrgAC_SUBST(CWARNFLAGS) 8586eda3803bSmrg]) # XORG_CWARNFLAGS 8587fe5e51b7Smrgdnl Copyright 2005 Red Hat, Inc 8588fe5e51b7Smrgdnl 8589fe5e51b7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 8590fe5e51b7Smrgdnl documentation for any purpose is hereby granted without fee, provided that 8591fe5e51b7Smrgdnl the above copyright notice appear in all copies and that both that 8592fe5e51b7Smrgdnl copyright notice and this permission notice appear in supporting 8593fe5e51b7Smrgdnl documentation. 8594fe5e51b7Smrgdnl 8595fe5e51b7Smrgdnl The above copyright notice and this permission notice shall be included 8596fe5e51b7Smrgdnl in all copies or substantial portions of the Software. 8597fe5e51b7Smrgdnl 8598fe5e51b7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 8599fe5e51b7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 8600fe5e51b7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 8601fe5e51b7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 8602fe5e51b7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 8603fe5e51b7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 8604fe5e51b7Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 8605fe5e51b7Smrgdnl 8606fe5e51b7Smrgdnl Except as contained in this notice, the name of the copyright holders shall 8607fe5e51b7Smrgdnl not be used in advertising or otherwise to promote the sale, use or 8608fe5e51b7Smrgdnl other dealings in this Software without prior written authorization 8609fe5e51b7Smrgdnl from the copyright holders. 8610fe5e51b7Smrgdnl 8611fe5e51b7Smrg 8612fe5e51b7Smrg# XORG_RELEASE_VERSION 8613fe5e51b7Smrg# -------------------- 8614fe5e51b7Smrg# Adds --with/without-release-string and changes the PACKAGE and 8615fe5e51b7Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 8616fe5e51b7Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 8617fe5e51b7Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 8618fe5e51b7Smrg 8619fe5e51b7SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 8620fe5e51b7Smrg AC_ARG_WITH(release-version, 8621fe5e51b7Smrg AC_HELP_STRING([--with-release-version=STRING], 8622fe5e51b7Smrg [Use release version string in package name]), 8623fe5e51b7Smrg [RELEASE_VERSION="$withval"], 8624fe5e51b7Smrg [RELEASE_VERSION=""]) 8625fe5e51b7Smrg if test "x$RELEASE_VERSION" != "x"; then 8626fe5e51b7Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 8627fe5e51b7Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 8628fe5e51b7Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 8629fe5e51b7Smrg fi 8630fe5e51b7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 8631fe5e51b7Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 8632fe5e51b7Smrg [Major version of this package]) 8633eda3803bSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 8634fe5e51b7Smrg if test "x$PVM" = "x"; then 8635fe5e51b7Smrg PVM="0" 8636fe5e51b7Smrg fi 8637fe5e51b7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 8638fe5e51b7Smrg [$PVM], 8639fe5e51b7Smrg [Minor version of this package]) 8640eda3803bSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 8641fe5e51b7Smrg if test "x$PVP" = "x"; then 8642fe5e51b7Smrg PVP="0" 8643fe5e51b7Smrg fi 8644fe5e51b7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 8645fe5e51b7Smrg [$PVP], 8646fe5e51b7Smrg [Patch version of this package]) 8647fe5e51b7Smrg]) 8648fe5e51b7Smrg 8649eda3803bSmrg# XORG_CHANGELOG() 8650eda3803bSmrg# ---------------- 8651eda3803bSmrg# Minimum version: 1.2.0 8652eda3803bSmrg# 8653eda3803bSmrg# Defines the variable CHANGELOG_CMD as the command to generate 8654eda3803bSmrg# ChangeLog from git. 8655eda3803bSmrg# 8656eda3803bSmrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 8657eda3803bSmrg# 8658eda3803bSmrgAC_DEFUN([XORG_CHANGELOG], [ 8659eda3803bSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 8660eda3803bSmrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 8661eda3803bSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 8662eda3803bSmrgAC_SUBST([CHANGELOG_CMD]) 8663eda3803bSmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 8664eda3803bSmrg]) # XORG_CHANGELOG 8665eda3803bSmrg 8666eda3803bSmrgdnl Copyright 2005 Red Hat, Inc 8667eda3803bSmrgdnl 8668eda3803bSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 8669eda3803bSmrgdnl documentation for any purpose is hereby granted without fee, provided that 8670eda3803bSmrgdnl the above copyright notice appear in all copies and that both that 8671eda3803bSmrgdnl copyright notice and this permission notice appear in supporting 8672eda3803bSmrgdnl documentation. 8673eda3803bSmrgdnl 8674eda3803bSmrgdnl The above copyright notice and this permission notice shall be included 8675eda3803bSmrgdnl in all copies or substantial portions of the Software. 8676eda3803bSmrgdnl 8677eda3803bSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 8678eda3803bSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 8679eda3803bSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 8680eda3803bSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 8681eda3803bSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 8682eda3803bSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 8683eda3803bSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 8684eda3803bSmrgdnl 8685eda3803bSmrgdnl Except as contained in this notice, the name of the copyright holders shall 8686eda3803bSmrgdnl not be used in advertising or otherwise to promote the sale, use or 8687eda3803bSmrgdnl other dealings in this Software without prior written authorization 8688eda3803bSmrgdnl from the copyright holders. 8689eda3803bSmrgdnl 8690eda3803bSmrg 8691eda3803bSmrg# XORG_DRIVER_CHECK_EXT() 8692eda3803bSmrg# -------------------------- 8693eda3803bSmrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 8694eda3803bSmrg# is defined, then add $1 to $REQUIRED_MODULES. 8695eda3803bSmrg 8696eda3803bSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 8697eda3803bSmrg SAVE_CFLAGS="$CFLAGS" 8698eda3803bSmrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 8699eda3803bSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 8700eda3803bSmrg#include "xorg-server.h" 8701eda3803bSmrg#if !defined $1 8702eda3803bSmrg#error $1 not defined 8703eda3803bSmrg#endif 8704eda3803bSmrg ]])], 8705eda3803bSmrg [_EXT_CHECK=yes], 8706eda3803bSmrg [_EXT_CHECK=no]) 8707eda3803bSmrg CFLAGS="$SAVE_CFLAGS" 8708eda3803bSmrg AC_MSG_CHECKING([if $1 is defined]) 8709eda3803bSmrg AC_MSG_RESULT([$_EXT_CHECK]) 8710eda3803bSmrg if test "$_EXT_CHECK" != no; then 8711eda3803bSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 8712eda3803bSmrg fi 8713eda3803bSmrg]) 8714eda3803bSmrg 8715eda3803bSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 8716fe5e51b7Smrg# 8717fe5e51b7Smrg# This file is free software; the Free Software Foundation 8718fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 8719fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 8720fe5e51b7Smrg 8721fe5e51b7Smrg# AM_AUTOMAKE_VERSION(VERSION) 8722fe5e51b7Smrg# ---------------------------- 8723fe5e51b7Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 8724fe5e51b7Smrg# generated from the m4 files accompanying Automake X.Y. 8725fe5e51b7Smrg# (This private macro should not be called outside this file.) 8726fe5e51b7SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 8727fe5e51b7Smrg[am__api_version='1.10' 8728fe5e51b7Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 8729fe5e51b7Smrgdnl require some minimum version. Point them to the right macro. 8730eda3803bSmrgm4_if([$1], [1.10.2], [], 8731fe5e51b7Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 8732fe5e51b7Smrg]) 8733fe5e51b7Smrg 8734fe5e51b7Smrg# _AM_AUTOCONF_VERSION(VERSION) 8735fe5e51b7Smrg# ----------------------------- 8736fe5e51b7Smrg# aclocal traces this macro to find the Autoconf version. 8737fe5e51b7Smrg# This is a private macro too. Using m4_define simplifies 8738fe5e51b7Smrg# the logic in aclocal, which can simply ignore this definition. 8739fe5e51b7Smrgm4_define([_AM_AUTOCONF_VERSION], []) 8740fe5e51b7Smrg 8741fe5e51b7Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 8742fe5e51b7Smrg# ------------------------------- 8743fe5e51b7Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 8744eda3803bSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 8745fe5e51b7SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 8746eda3803bSmrg[AM_AUTOMAKE_VERSION([1.10.2])dnl 8747eda3803bSmrgm4_ifndef([AC_AUTOCONF_VERSION], 8748eda3803bSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 8749eda3803bSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 8750fe5e51b7Smrg 8751fe5e51b7Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 8752fe5e51b7Smrg 8753fe5e51b7Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8754fe5e51b7Smrg# 8755fe5e51b7Smrg# This file is free software; the Free Software Foundation 8756fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 8757fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 8758fe5e51b7Smrg 8759fe5e51b7Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 8760fe5e51b7Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 8761fe5e51b7Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 8762fe5e51b7Smrg# 8763fe5e51b7Smrg# Of course, Automake must honor this variable whenever it calls a 8764fe5e51b7Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 8765fe5e51b7Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 8766fe5e51b7Smrg# depending on how configure is run. This is pretty annoying, since 8767fe5e51b7Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 8768fe5e51b7Smrg# source directory, any form will work fine, but in subdirectories a 8769fe5e51b7Smrg# relative path needs to be adjusted first. 8770fe5e51b7Smrg# 8771fe5e51b7Smrg# $ac_aux_dir/missing 8772fe5e51b7Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8773fe5e51b7Smrg# $top_srcdir/$ac_aux_dir/missing 8774fe5e51b7Smrg# fails if $ac_aux_dir is absolute, 8775fe5e51b7Smrg# fails when called from a subdirectory in a VPATH build with 8776fe5e51b7Smrg# a relative $ac_aux_dir 8777fe5e51b7Smrg# 8778fe5e51b7Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8779fe5e51b7Smrg# are both prefixed by $srcdir. In an in-source build this is usually 8780fe5e51b7Smrg# harmless because $srcdir is `.', but things will broke when you 8781fe5e51b7Smrg# start a VPATH build or use an absolute $srcdir. 8782fe5e51b7Smrg# 8783fe5e51b7Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 8784fe5e51b7Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 8785fe5e51b7Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 8786fe5e51b7Smrg# and then we would define $MISSING as 8787fe5e51b7Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 8788fe5e51b7Smrg# This will work as long as MISSING is not called from configure, because 8789fe5e51b7Smrg# unfortunately $(top_srcdir) has no meaning in configure. 8790fe5e51b7Smrg# However there are other variables, like CC, which are often used in 8791fe5e51b7Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 8792fe5e51b7Smrg# 8793fe5e51b7Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 8794fe5e51b7Smrg# absolute PATH. The drawback is that using absolute paths prevent a 8795fe5e51b7Smrg# configured tree to be moved without reconfiguration. 8796fe5e51b7Smrg 8797fe5e51b7SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 8798fe5e51b7Smrg[dnl Rely on autoconf to set up CDPATH properly. 8799fe5e51b7SmrgAC_PREREQ([2.50])dnl 8800fe5e51b7Smrg# expand $ac_aux_dir to an absolute path 8801fe5e51b7Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 8802fe5e51b7Smrg]) 8803fe5e51b7Smrg 8804fe5e51b7Smrg# AM_CONDITIONAL -*- Autoconf -*- 8805fe5e51b7Smrg 8806fe5e51b7Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 8807fe5e51b7Smrg# Free Software Foundation, Inc. 8808fe5e51b7Smrg# 8809fe5e51b7Smrg# This file is free software; the Free Software Foundation 8810fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 8811fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 8812fe5e51b7Smrg 8813fe5e51b7Smrg# serial 8 8814fe5e51b7Smrg 8815fe5e51b7Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 8816fe5e51b7Smrg# ------------------------------------- 8817fe5e51b7Smrg# Define a conditional. 8818fe5e51b7SmrgAC_DEFUN([AM_CONDITIONAL], 8819fe5e51b7Smrg[AC_PREREQ(2.52)dnl 8820fe5e51b7Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 8821fe5e51b7Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 8822fe5e51b7SmrgAC_SUBST([$1_TRUE])dnl 8823fe5e51b7SmrgAC_SUBST([$1_FALSE])dnl 8824fe5e51b7Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 8825fe5e51b7Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 8826fe5e51b7Smrgif $2; then 8827fe5e51b7Smrg $1_TRUE= 8828fe5e51b7Smrg $1_FALSE='#' 8829fe5e51b7Smrgelse 8830fe5e51b7Smrg $1_TRUE='#' 8831fe5e51b7Smrg $1_FALSE= 8832fe5e51b7Smrgfi 8833fe5e51b7SmrgAC_CONFIG_COMMANDS_PRE( 8834fe5e51b7Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 8835fe5e51b7Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 8836fe5e51b7SmrgUsually this means the macro was only invoked conditionally.]]) 8837fe5e51b7Smrgfi])]) 8838fe5e51b7Smrg 8839fe5e51b7Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 8840fe5e51b7Smrg# Free Software Foundation, Inc. 8841fe5e51b7Smrg# 8842fe5e51b7Smrg# This file is free software; the Free Software Foundation 8843fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 8844fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 8845fe5e51b7Smrg 8846fe5e51b7Smrg# serial 9 8847fe5e51b7Smrg 8848fe5e51b7Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 8849fe5e51b7Smrg# written in clear, in which case automake, when reading aclocal.m4, 8850fe5e51b7Smrg# will think it sees a *use*, and therefore will trigger all it's 8851fe5e51b7Smrg# C support machinery. Also note that it means that autoscan, seeing 8852fe5e51b7Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 8853fe5e51b7Smrg 8854fe5e51b7Smrg 8855fe5e51b7Smrg# _AM_DEPENDENCIES(NAME) 8856fe5e51b7Smrg# ---------------------- 8857fe5e51b7Smrg# See how the compiler implements dependency checking. 8858fe5e51b7Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 8859fe5e51b7Smrg# We try a few techniques and use that to set a single cache variable. 8860fe5e51b7Smrg# 8861fe5e51b7Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 8862fe5e51b7Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 8863fe5e51b7Smrg# dependency, and given that the user is not expected to run this macro, 8864fe5e51b7Smrg# just rely on AC_PROG_CC. 8865fe5e51b7SmrgAC_DEFUN([_AM_DEPENDENCIES], 8866fe5e51b7Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 8867fe5e51b7SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 8868fe5e51b7SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 8869fe5e51b7SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 8870fe5e51b7Smrg 8871fe5e51b7Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 8872fe5e51b7Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 8873fe5e51b7Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 8874fe5e51b7Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 8875fe5e51b7Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 8876fe5e51b7Smrg [depcc="$$1" am_compiler_list=]) 8877fe5e51b7Smrg 8878fe5e51b7SmrgAC_CACHE_CHECK([dependency style of $depcc], 8879fe5e51b7Smrg [am_cv_$1_dependencies_compiler_type], 8880fe5e51b7Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 8881fe5e51b7Smrg # We make a subdir and do the tests there. Otherwise we can end up 8882fe5e51b7Smrg # making bogus files that we don't know about and never remove. For 8883fe5e51b7Smrg # instance it was reported that on HP-UX the gcc test will end up 8884fe5e51b7Smrg # making a dummy file named `D' -- because `-MD' means `put the output 8885fe5e51b7Smrg # in D'. 8886fe5e51b7Smrg mkdir conftest.dir 8887fe5e51b7Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 8888fe5e51b7Smrg # using a relative directory. 8889fe5e51b7Smrg cp "$am_depcomp" conftest.dir 8890fe5e51b7Smrg cd conftest.dir 8891fe5e51b7Smrg # We will build objects and dependencies in a subdirectory because 8892fe5e51b7Smrg # it helps to detect inapplicable dependency modes. For instance 8893fe5e51b7Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 8894fe5e51b7Smrg # side effect of compilation, but ICC will put the dependencies in 8895fe5e51b7Smrg # the current directory while Tru64 will put them in the object 8896fe5e51b7Smrg # directory. 8897fe5e51b7Smrg mkdir sub 8898fe5e51b7Smrg 8899fe5e51b7Smrg am_cv_$1_dependencies_compiler_type=none 8900fe5e51b7Smrg if test "$am_compiler_list" = ""; then 8901fe5e51b7Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 8902fe5e51b7Smrg fi 8903fe5e51b7Smrg for depmode in $am_compiler_list; do 8904fe5e51b7Smrg # Setup a source with many dependencies, because some compilers 8905fe5e51b7Smrg # like to wrap large dependency lists on column 80 (with \), and 8906fe5e51b7Smrg # we should not choose a depcomp mode which is confused by this. 8907fe5e51b7Smrg # 8908fe5e51b7Smrg # We need to recreate these files for each test, as the compiler may 8909fe5e51b7Smrg # overwrite some of them when testing with obscure command lines. 8910fe5e51b7Smrg # This happens at least with the AIX C compiler. 8911fe5e51b7Smrg : > sub/conftest.c 8912fe5e51b7Smrg for i in 1 2 3 4 5 6; do 8913fe5e51b7Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 8914fe5e51b7Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 8915fe5e51b7Smrg # Solaris 8's {/usr,}/bin/sh. 8916fe5e51b7Smrg touch sub/conftst$i.h 8917fe5e51b7Smrg done 8918fe5e51b7Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 8919fe5e51b7Smrg 8920fe5e51b7Smrg case $depmode in 8921fe5e51b7Smrg nosideeffect) 8922fe5e51b7Smrg # after this tag, mechanisms are not by side-effect, so they'll 8923fe5e51b7Smrg # only be used when explicitly requested 8924fe5e51b7Smrg if test "x$enable_dependency_tracking" = xyes; then 8925fe5e51b7Smrg continue 8926fe5e51b7Smrg else 8927fe5e51b7Smrg break 8928fe5e51b7Smrg fi 8929fe5e51b7Smrg ;; 8930fe5e51b7Smrg none) break ;; 8931fe5e51b7Smrg esac 8932fe5e51b7Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 8933fe5e51b7Smrg # mode. It turns out that the SunPro C++ compiler does not properly 8934fe5e51b7Smrg # handle `-M -o', and we need to detect this. 8935fe5e51b7Smrg if depmode=$depmode \ 8936fe5e51b7Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 8937fe5e51b7Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 8938fe5e51b7Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 8939fe5e51b7Smrg >/dev/null 2>conftest.err && 8940fe5e51b7Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 8941fe5e51b7Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 8942fe5e51b7Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 8943fe5e51b7Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 8944fe5e51b7Smrg # icc doesn't choke on unknown options, it will just issue warnings 8945fe5e51b7Smrg # or remarks (even with -Werror). So we grep stderr for any message 8946fe5e51b7Smrg # that says an option was ignored or not supported. 8947fe5e51b7Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 8948fe5e51b7Smrg # icc: Command line warning: ignoring option '-M'; no argument required 8949fe5e51b7Smrg # The diagnosis changed in icc 8.0: 8950fe5e51b7Smrg # icc: Command line remark: option '-MP' not supported 8951fe5e51b7Smrg if (grep 'ignoring option' conftest.err || 8952fe5e51b7Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 8953fe5e51b7Smrg am_cv_$1_dependencies_compiler_type=$depmode 8954fe5e51b7Smrg break 8955fe5e51b7Smrg fi 8956fe5e51b7Smrg fi 8957fe5e51b7Smrg done 8958fe5e51b7Smrg 8959fe5e51b7Smrg cd .. 8960fe5e51b7Smrg rm -rf conftest.dir 8961fe5e51b7Smrgelse 8962fe5e51b7Smrg am_cv_$1_dependencies_compiler_type=none 8963fe5e51b7Smrgfi 8964fe5e51b7Smrg]) 8965fe5e51b7SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 8966fe5e51b7SmrgAM_CONDITIONAL([am__fastdep$1], [ 8967fe5e51b7Smrg test "x$enable_dependency_tracking" != xno \ 8968fe5e51b7Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 8969fe5e51b7Smrg]) 8970fe5e51b7Smrg 8971fe5e51b7Smrg 8972fe5e51b7Smrg# AM_SET_DEPDIR 8973fe5e51b7Smrg# ------------- 8974fe5e51b7Smrg# Choose a directory name for dependency files. 8975fe5e51b7Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 8976fe5e51b7SmrgAC_DEFUN([AM_SET_DEPDIR], 8977fe5e51b7Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 8978fe5e51b7SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 8979fe5e51b7Smrg]) 8980fe5e51b7Smrg 8981fe5e51b7Smrg 8982fe5e51b7Smrg# AM_DEP_TRACK 8983fe5e51b7Smrg# ------------ 8984fe5e51b7SmrgAC_DEFUN([AM_DEP_TRACK], 8985fe5e51b7Smrg[AC_ARG_ENABLE(dependency-tracking, 8986fe5e51b7Smrg[ --disable-dependency-tracking speeds up one-time build 8987fe5e51b7Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 8988fe5e51b7Smrgif test "x$enable_dependency_tracking" != xno; then 8989fe5e51b7Smrg am_depcomp="$ac_aux_dir/depcomp" 8990fe5e51b7Smrg AMDEPBACKSLASH='\' 8991fe5e51b7Smrgfi 8992fe5e51b7SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 8993fe5e51b7SmrgAC_SUBST([AMDEPBACKSLASH])dnl 8994fe5e51b7Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 8995fe5e51b7Smrg]) 8996fe5e51b7Smrg 8997fe5e51b7Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 8998fe5e51b7Smrg 8999eda3803bSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 9000fe5e51b7Smrg# Free Software Foundation, Inc. 9001fe5e51b7Smrg# 9002fe5e51b7Smrg# This file is free software; the Free Software Foundation 9003fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 9004fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 9005fe5e51b7Smrg 9006eda3803bSmrg#serial 4 9007fe5e51b7Smrg 9008fe5e51b7Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 9009fe5e51b7Smrg# ------------------------------ 9010fe5e51b7SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 9011eda3803bSmrg[# Autoconf 2.62 quotes --file arguments for eval, but not when files 9012eda3803bSmrg# are listed without --file. Let's play safe and only enable the eval 9013eda3803bSmrg# if we detect the quoting. 9014eda3803bSmrgcase $CONFIG_FILES in 9015eda3803bSmrg*\'*) eval set x "$CONFIG_FILES" ;; 9016eda3803bSmrg*) set x $CONFIG_FILES ;; 9017eda3803bSmrgesac 9018eda3803bSmrgshift 9019eda3803bSmrgfor mf 9020eda3803bSmrgdo 9021fe5e51b7Smrg # Strip MF so we end up with the name of the file. 9022fe5e51b7Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 9023fe5e51b7Smrg # Check whether this is an Automake generated Makefile or not. 9024fe5e51b7Smrg # We used to match only the files named `Makefile.in', but 9025fe5e51b7Smrg # some people rename them; so instead we look at the file content. 9026fe5e51b7Smrg # Grep'ing the first line is not enough: some people post-process 9027fe5e51b7Smrg # each Makefile.in and add a new line on top of each file to say so. 9028fe5e51b7Smrg # Grep'ing the whole file is not good either: AIX grep has a line 9029fe5e51b7Smrg # limit of 2048, but all sed's we know have understand at least 4000. 9030eda3803bSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 9031fe5e51b7Smrg dirpart=`AS_DIRNAME("$mf")` 9032fe5e51b7Smrg else 9033fe5e51b7Smrg continue 9034fe5e51b7Smrg fi 9035fe5e51b7Smrg # Extract the definition of DEPDIR, am__include, and am__quote 9036fe5e51b7Smrg # from the Makefile without running `make'. 9037fe5e51b7Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 9038fe5e51b7Smrg test -z "$DEPDIR" && continue 9039fe5e51b7Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 9040fe5e51b7Smrg test -z "am__include" && continue 9041fe5e51b7Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 9042fe5e51b7Smrg # When using ansi2knr, U may be empty or an underscore; expand it 9043fe5e51b7Smrg U=`sed -n 's/^U = //p' < "$mf"` 9044fe5e51b7Smrg # Find all dependency output files, they are included files with 9045fe5e51b7Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 9046fe5e51b7Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 9047fe5e51b7Smrg # expansion. 9048fe5e51b7Smrg for file in `sed -n " 9049fe5e51b7Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 9050fe5e51b7Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 9051fe5e51b7Smrg # Make sure the directory exists. 9052fe5e51b7Smrg test -f "$dirpart/$file" && continue 9053fe5e51b7Smrg fdir=`AS_DIRNAME(["$file"])` 9054fe5e51b7Smrg AS_MKDIR_P([$dirpart/$fdir]) 9055fe5e51b7Smrg # echo "creating $dirpart/$file" 9056fe5e51b7Smrg echo '# dummy' > "$dirpart/$file" 9057fe5e51b7Smrg done 9058fe5e51b7Smrgdone 9059fe5e51b7Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 9060fe5e51b7Smrg 9061fe5e51b7Smrg 9062fe5e51b7Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 9063fe5e51b7Smrg# ----------------------------- 9064fe5e51b7Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 9065fe5e51b7Smrg# 9066fe5e51b7Smrg# This code is only required when automatic dependency tracking 9067fe5e51b7Smrg# is enabled. FIXME. This creates each `.P' file that we will 9068fe5e51b7Smrg# need in order to bootstrap the dependency handling code. 9069fe5e51b7SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 9070fe5e51b7Smrg[AC_CONFIG_COMMANDS([depfiles], 9071fe5e51b7Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 9072fe5e51b7Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 9073fe5e51b7Smrg]) 9074fe5e51b7Smrg 9075fe5e51b7Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 9076fe5e51b7Smrg# Free Software Foundation, Inc. 9077fe5e51b7Smrg# 9078fe5e51b7Smrg# This file is free software; the Free Software Foundation 9079fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 9080fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 9081fe5e51b7Smrg 9082fe5e51b7Smrg# serial 8 9083fe5e51b7Smrg 9084fe5e51b7Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 9085fe5e51b7SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 9086fe5e51b7Smrg 9087fe5e51b7Smrg# Do all the work for Automake. -*- Autoconf -*- 9088fe5e51b7Smrg 9089fe5e51b7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 9090eda3803bSmrg# 2005, 2006, 2008 Free Software Foundation, Inc. 9091fe5e51b7Smrg# 9092fe5e51b7Smrg# This file is free software; the Free Software Foundation 9093fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 9094fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 9095fe5e51b7Smrg 9096eda3803bSmrg# serial 13 9097fe5e51b7Smrg 9098fe5e51b7Smrg# This macro actually does too much. Some checks are only needed if 9099fe5e51b7Smrg# your package does certain things. But this isn't really a big deal. 9100fe5e51b7Smrg 9101fe5e51b7Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 9102fe5e51b7Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 9103fe5e51b7Smrg# ----------------------------------------------- 9104fe5e51b7Smrg# The call with PACKAGE and VERSION arguments is the old style 9105fe5e51b7Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 9106fe5e51b7Smrg# and VERSION should now be passed to AC_INIT and removed from 9107fe5e51b7Smrg# the call to AM_INIT_AUTOMAKE. 9108fe5e51b7Smrg# We support both call styles for the transition. After 9109fe5e51b7Smrg# the next Automake release, Autoconf can make the AC_INIT 9110fe5e51b7Smrg# arguments mandatory, and then we can depend on a new Autoconf 9111fe5e51b7Smrg# release and drop the old call support. 9112fe5e51b7SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 9113fe5e51b7Smrg[AC_PREREQ([2.60])dnl 9114fe5e51b7Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 9115fe5e51b7Smrgdnl the ones we care about. 9116fe5e51b7Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 9117fe5e51b7SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 9118fe5e51b7SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 9119fe5e51b7Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 9120fe5e51b7Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 9121fe5e51b7Smrg # is not polluted with repeated "-I." 9122fe5e51b7Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 9123fe5e51b7Smrg # test to see if srcdir already configured 9124fe5e51b7Smrg if test -f $srcdir/config.status; then 9125fe5e51b7Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 9126fe5e51b7Smrg fi 9127fe5e51b7Smrgfi 9128fe5e51b7Smrg 9129fe5e51b7Smrg# test whether we have cygpath 9130fe5e51b7Smrgif test -z "$CYGPATH_W"; then 9131fe5e51b7Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 9132fe5e51b7Smrg CYGPATH_W='cygpath -w' 9133fe5e51b7Smrg else 9134fe5e51b7Smrg CYGPATH_W=echo 9135fe5e51b7Smrg fi 9136fe5e51b7Smrgfi 9137fe5e51b7SmrgAC_SUBST([CYGPATH_W]) 9138fe5e51b7Smrg 9139fe5e51b7Smrg# Define the identity of the package. 9140fe5e51b7Smrgdnl Distinguish between old-style and new-style calls. 9141fe5e51b7Smrgm4_ifval([$2], 9142fe5e51b7Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 9143fe5e51b7Smrg AC_SUBST([PACKAGE], [$1])dnl 9144fe5e51b7Smrg AC_SUBST([VERSION], [$2])], 9145fe5e51b7Smrg[_AM_SET_OPTIONS([$1])dnl 9146fe5e51b7Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 9147fe5e51b7Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 9148fe5e51b7Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 9149fe5e51b7Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 9150fe5e51b7Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 9151fe5e51b7Smrg 9152fe5e51b7Smrg_AM_IF_OPTION([no-define],, 9153fe5e51b7Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 9154fe5e51b7Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 9155fe5e51b7Smrg 9156fe5e51b7Smrg# Some tools Automake needs. 9157fe5e51b7SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 9158fe5e51b7SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 9159fe5e51b7SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 9160fe5e51b7SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 9161fe5e51b7SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 9162fe5e51b7SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 9163fe5e51b7SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 9164fe5e51b7SmrgAM_PROG_INSTALL_SH 9165fe5e51b7SmrgAM_PROG_INSTALL_STRIP 9166fe5e51b7SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 9167fe5e51b7Smrg# We need awk for the "check" target. The system "awk" is bad on 9168fe5e51b7Smrg# some platforms. 9169fe5e51b7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 9170fe5e51b7SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 9171fe5e51b7SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 9172fe5e51b7Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 9173fe5e51b7Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 9174fe5e51b7Smrg [_AM_PROG_TAR([v7])])]) 9175fe5e51b7Smrg_AM_IF_OPTION([no-dependencies],, 9176fe5e51b7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 9177fe5e51b7Smrg [_AM_DEPENDENCIES(CC)], 9178fe5e51b7Smrg [define([AC_PROG_CC], 9179fe5e51b7Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 9180fe5e51b7SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 9181fe5e51b7Smrg [_AM_DEPENDENCIES(CXX)], 9182fe5e51b7Smrg [define([AC_PROG_CXX], 9183fe5e51b7Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 9184fe5e51b7SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 9185fe5e51b7Smrg [_AM_DEPENDENCIES(OBJC)], 9186fe5e51b7Smrg [define([AC_PROG_OBJC], 9187fe5e51b7Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 9188fe5e51b7Smrg]) 9189fe5e51b7Smrg]) 9190fe5e51b7Smrg 9191fe5e51b7Smrg 9192fe5e51b7Smrg# When config.status generates a header, we must update the stamp-h file. 9193fe5e51b7Smrg# This file resides in the same directory as the config header 9194fe5e51b7Smrg# that is generated. The stamp files are numbered to have different names. 9195fe5e51b7Smrg 9196fe5e51b7Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 9197fe5e51b7Smrg# loop where config.status creates the headers, so we can generate 9198fe5e51b7Smrg# our stamp files there. 9199fe5e51b7SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 9200fe5e51b7Smrg[# Compute $1's index in $config_headers. 9201eda3803bSmrg_am_arg=$1 9202fe5e51b7Smrg_am_stamp_count=1 9203fe5e51b7Smrgfor _am_header in $config_headers :; do 9204fe5e51b7Smrg case $_am_header in 9205eda3803bSmrg $_am_arg | $_am_arg:* ) 9206fe5e51b7Smrg break ;; 9207fe5e51b7Smrg * ) 9208fe5e51b7Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 9209fe5e51b7Smrg esac 9210fe5e51b7Smrgdone 9211eda3803bSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 9212fe5e51b7Smrg 9213fe5e51b7Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 9214fe5e51b7Smrg# 9215fe5e51b7Smrg# This file is free software; the Free Software Foundation 9216fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 9217fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 9218fe5e51b7Smrg 9219fe5e51b7Smrg# AM_PROG_INSTALL_SH 9220fe5e51b7Smrg# ------------------ 9221fe5e51b7Smrg# Define $install_sh. 9222fe5e51b7SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 9223fe5e51b7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9224fe5e51b7Smrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 9225fe5e51b7SmrgAC_SUBST(install_sh)]) 9226fe5e51b7Smrg 9227fe5e51b7Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 9228fe5e51b7Smrg# 9229fe5e51b7Smrg# This file is free software; the Free Software Foundation 9230fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 9231fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 9232fe5e51b7Smrg 9233fe5e51b7Smrg# serial 2 9234fe5e51b7Smrg 9235fe5e51b7Smrg# Check whether the underlying file-system supports filenames 9236fe5e51b7Smrg# with a leading dot. For instance MS-DOS doesn't. 9237fe5e51b7SmrgAC_DEFUN([AM_SET_LEADING_DOT], 9238fe5e51b7Smrg[rm -rf .tst 2>/dev/null 9239fe5e51b7Smrgmkdir .tst 2>/dev/null 9240fe5e51b7Smrgif test -d .tst; then 9241fe5e51b7Smrg am__leading_dot=. 9242fe5e51b7Smrgelse 9243fe5e51b7Smrg am__leading_dot=_ 9244fe5e51b7Smrgfi 9245fe5e51b7Smrgrmdir .tst 2>/dev/null 9246fe5e51b7SmrgAC_SUBST([am__leading_dot])]) 9247fe5e51b7Smrg 9248fe5e51b7Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 9249fe5e51b7Smrg# From Jim Meyering 9250fe5e51b7Smrg 9251fe5e51b7Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 9252fe5e51b7Smrg# Free Software Foundation, Inc. 9253fe5e51b7Smrg# 9254fe5e51b7Smrg# This file is free software; the Free Software Foundation 9255fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 9256fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 9257fe5e51b7Smrg 9258fe5e51b7Smrg# serial 4 9259fe5e51b7Smrg 9260fe5e51b7SmrgAC_DEFUN([AM_MAINTAINER_MODE], 9261fe5e51b7Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 9262fe5e51b7Smrg dnl maintainer-mode is disabled by default 9263fe5e51b7Smrg AC_ARG_ENABLE(maintainer-mode, 9264fe5e51b7Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 9265fe5e51b7Smrg (and sometimes confusing) to the casual installer], 9266fe5e51b7Smrg USE_MAINTAINER_MODE=$enableval, 9267fe5e51b7Smrg USE_MAINTAINER_MODE=no) 9268fe5e51b7Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 9269fe5e51b7Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 9270fe5e51b7Smrg MAINT=$MAINTAINER_MODE_TRUE 9271fe5e51b7Smrg AC_SUBST(MAINT)dnl 9272fe5e51b7Smrg] 9273fe5e51b7Smrg) 9274fe5e51b7Smrg 9275fe5e51b7SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 9276fe5e51b7Smrg 9277fe5e51b7Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 9278fe5e51b7Smrg 9279fe5e51b7Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 9280fe5e51b7Smrg# 9281fe5e51b7Smrg# This file is free software; the Free Software Foundation 9282fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 9283fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 9284fe5e51b7Smrg 9285fe5e51b7Smrg# serial 3 9286fe5e51b7Smrg 9287fe5e51b7Smrg# AM_MAKE_INCLUDE() 9288fe5e51b7Smrg# ----------------- 9289fe5e51b7Smrg# Check to see how make treats includes. 9290fe5e51b7SmrgAC_DEFUN([AM_MAKE_INCLUDE], 9291fe5e51b7Smrg[am_make=${MAKE-make} 9292fe5e51b7Smrgcat > confinc << 'END' 9293fe5e51b7Smrgam__doit: 9294fe5e51b7Smrg @echo done 9295fe5e51b7Smrg.PHONY: am__doit 9296fe5e51b7SmrgEND 9297fe5e51b7Smrg# If we don't find an include directive, just comment out the code. 9298fe5e51b7SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 9299fe5e51b7Smrgam__include="#" 9300fe5e51b7Smrgam__quote= 9301fe5e51b7Smrg_am_result=none 9302fe5e51b7Smrg# First try GNU make style include. 9303fe5e51b7Smrgecho "include confinc" > confmf 9304fe5e51b7Smrg# We grep out `Entering directory' and `Leaving directory' 9305fe5e51b7Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 9306fe5e51b7Smrg# In particular we don't look at `^make:' because GNU make might 9307fe5e51b7Smrg# be invoked under some other name (usually "gmake"), in which 9308fe5e51b7Smrg# case it prints its new name instead of `make'. 9309fe5e51b7Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 9310fe5e51b7Smrg am__include=include 9311fe5e51b7Smrg am__quote= 9312fe5e51b7Smrg _am_result=GNU 9313fe5e51b7Smrgfi 9314fe5e51b7Smrg# Now try BSD make style include. 9315fe5e51b7Smrgif test "$am__include" = "#"; then 9316fe5e51b7Smrg echo '.include "confinc"' > confmf 9317fe5e51b7Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 9318fe5e51b7Smrg am__include=.include 9319fe5e51b7Smrg am__quote="\"" 9320fe5e51b7Smrg _am_result=BSD 9321fe5e51b7Smrg fi 9322fe5e51b7Smrgfi 9323fe5e51b7SmrgAC_SUBST([am__include]) 9324fe5e51b7SmrgAC_SUBST([am__quote]) 9325fe5e51b7SmrgAC_MSG_RESULT([$_am_result]) 9326fe5e51b7Smrgrm -f confinc confmf 9327fe5e51b7Smrg]) 9328fe5e51b7Smrg 9329fe5e51b7Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 9330fe5e51b7Smrg 9331fe5e51b7Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 9332fe5e51b7Smrg# Free Software Foundation, Inc. 9333fe5e51b7Smrg# 9334fe5e51b7Smrg# This file is free software; the Free Software Foundation 9335fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 9336fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 9337fe5e51b7Smrg 9338fe5e51b7Smrg# serial 5 9339fe5e51b7Smrg 9340fe5e51b7Smrg# AM_MISSING_PROG(NAME, PROGRAM) 9341fe5e51b7Smrg# ------------------------------ 9342fe5e51b7SmrgAC_DEFUN([AM_MISSING_PROG], 9343fe5e51b7Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 9344fe5e51b7Smrg$1=${$1-"${am_missing_run}$2"} 9345fe5e51b7SmrgAC_SUBST($1)]) 9346fe5e51b7Smrg 9347fe5e51b7Smrg 9348fe5e51b7Smrg# AM_MISSING_HAS_RUN 9349fe5e51b7Smrg# ------------------ 9350fe5e51b7Smrg# Define MISSING if not defined so far and test if it supports --run. 9351fe5e51b7Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 9352fe5e51b7SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 9353fe5e51b7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9354fe5e51b7SmrgAC_REQUIRE_AUX_FILE([missing])dnl 9355fe5e51b7Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 9356fe5e51b7Smrg# Use eval to expand $SHELL 9357fe5e51b7Smrgif eval "$MISSING --run true"; then 9358fe5e51b7Smrg am_missing_run="$MISSING --run " 9359fe5e51b7Smrgelse 9360fe5e51b7Smrg am_missing_run= 9361fe5e51b7Smrg AC_MSG_WARN([`missing' script is too old or missing]) 9362fe5e51b7Smrgfi 9363fe5e51b7Smrg]) 9364fe5e51b7Smrg 9365fe5e51b7Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 9366fe5e51b7Smrg# 9367fe5e51b7Smrg# This file is free software; the Free Software Foundation 9368fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 9369fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 9370fe5e51b7Smrg 9371fe5e51b7Smrg# AM_PROG_MKDIR_P 9372fe5e51b7Smrg# --------------- 9373fe5e51b7Smrg# Check for `mkdir -p'. 9374fe5e51b7SmrgAC_DEFUN([AM_PROG_MKDIR_P], 9375fe5e51b7Smrg[AC_PREREQ([2.60])dnl 9376fe5e51b7SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 9377fe5e51b7Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 9378fe5e51b7Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 9379fe5e51b7Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 9380fe5e51b7Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 9381fe5e51b7Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 9382fe5e51b7Smrgdnl adjustment using top_builddir (which is defined more often than 9383fe5e51b7Smrgdnl MKDIR_P). 9384fe5e51b7SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 9385fe5e51b7Smrgcase $mkdir_p in 9386fe5e51b7Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 9387fe5e51b7Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 9388fe5e51b7Smrgesac 9389fe5e51b7Smrg]) 9390fe5e51b7Smrg 9391fe5e51b7Smrg# Helper functions for option handling. -*- Autoconf -*- 9392fe5e51b7Smrg 9393eda3803bSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 9394fe5e51b7Smrg# 9395fe5e51b7Smrg# This file is free software; the Free Software Foundation 9396fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 9397fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 9398fe5e51b7Smrg 9399eda3803bSmrg# serial 4 9400fe5e51b7Smrg 9401fe5e51b7Smrg# _AM_MANGLE_OPTION(NAME) 9402fe5e51b7Smrg# ----------------------- 9403fe5e51b7SmrgAC_DEFUN([_AM_MANGLE_OPTION], 9404fe5e51b7Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 9405fe5e51b7Smrg 9406fe5e51b7Smrg# _AM_SET_OPTION(NAME) 9407fe5e51b7Smrg# ------------------------------ 9408fe5e51b7Smrg# Set option NAME. Presently that only means defining a flag for this option. 9409fe5e51b7SmrgAC_DEFUN([_AM_SET_OPTION], 9410fe5e51b7Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 9411fe5e51b7Smrg 9412fe5e51b7Smrg# _AM_SET_OPTIONS(OPTIONS) 9413fe5e51b7Smrg# ---------------------------------- 9414fe5e51b7Smrg# OPTIONS is a space-separated list of Automake options. 9415fe5e51b7SmrgAC_DEFUN([_AM_SET_OPTIONS], 9416eda3803bSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 9417fe5e51b7Smrg 9418fe5e51b7Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 9419fe5e51b7Smrg# ------------------------------------------- 9420fe5e51b7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9421fe5e51b7SmrgAC_DEFUN([_AM_IF_OPTION], 9422fe5e51b7Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 9423fe5e51b7Smrg 9424fe5e51b7Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 9425fe5e51b7Smrg 9426fe5e51b7Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 9427fe5e51b7Smrg# Free Software Foundation, Inc. 9428fe5e51b7Smrg# 9429fe5e51b7Smrg# This file is free software; the Free Software Foundation 9430fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 9431fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 9432fe5e51b7Smrg 9433fe5e51b7Smrg# serial 4 9434fe5e51b7Smrg 9435fe5e51b7Smrg# AM_SANITY_CHECK 9436fe5e51b7Smrg# --------------- 9437fe5e51b7SmrgAC_DEFUN([AM_SANITY_CHECK], 9438fe5e51b7Smrg[AC_MSG_CHECKING([whether build environment is sane]) 9439fe5e51b7Smrg# Just in case 9440fe5e51b7Smrgsleep 1 9441fe5e51b7Smrgecho timestamp > conftest.file 9442fe5e51b7Smrg# Do `set' in a subshell so we don't clobber the current shell's 9443fe5e51b7Smrg# arguments. Must try -L first in case configure is actually a 9444fe5e51b7Smrg# symlink; some systems play weird games with the mod time of symlinks 9445fe5e51b7Smrg# (eg FreeBSD returns the mod time of the symlink's containing 9446fe5e51b7Smrg# directory). 9447fe5e51b7Smrgif ( 9448fe5e51b7Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 9449fe5e51b7Smrg if test "$[*]" = "X"; then 9450fe5e51b7Smrg # -L didn't work. 9451fe5e51b7Smrg set X `ls -t $srcdir/configure conftest.file` 9452fe5e51b7Smrg fi 9453fe5e51b7Smrg rm -f conftest.file 9454fe5e51b7Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 9455fe5e51b7Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 9456fe5e51b7Smrg 9457fe5e51b7Smrg # If neither matched, then we have a broken ls. This can happen 9458fe5e51b7Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 9459fe5e51b7Smrg # broken ls alias from the environment. This has actually 9460fe5e51b7Smrg # happened. Such a system could not be considered "sane". 9461fe5e51b7Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 9462fe5e51b7Smrgalias in your environment]) 9463fe5e51b7Smrg fi 9464fe5e51b7Smrg 9465fe5e51b7Smrg test "$[2]" = conftest.file 9466fe5e51b7Smrg ) 9467fe5e51b7Smrgthen 9468fe5e51b7Smrg # Ok. 9469fe5e51b7Smrg : 9470fe5e51b7Smrgelse 9471fe5e51b7Smrg AC_MSG_ERROR([newly created file is older than distributed files! 9472fe5e51b7SmrgCheck your system clock]) 9473fe5e51b7Smrgfi 9474fe5e51b7SmrgAC_MSG_RESULT(yes)]) 9475fe5e51b7Smrg 9476fe5e51b7Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 9477fe5e51b7Smrg# 9478fe5e51b7Smrg# This file is free software; the Free Software Foundation 9479fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 9480fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 9481fe5e51b7Smrg 9482fe5e51b7Smrg# AM_PROG_INSTALL_STRIP 9483fe5e51b7Smrg# --------------------- 9484fe5e51b7Smrg# One issue with vendor `install' (even GNU) is that you can't 9485fe5e51b7Smrg# specify the program used to strip binaries. This is especially 9486fe5e51b7Smrg# annoying in cross-compiling environments, where the build's strip 9487fe5e51b7Smrg# is unlikely to handle the host's binaries. 9488fe5e51b7Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9489fe5e51b7Smrg# always use install-sh in `make install-strip', and initialize 9490fe5e51b7Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 9491fe5e51b7SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9492fe5e51b7Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9493fe5e51b7Smrg# Installed binaries are usually stripped using `strip' when the user 9494fe5e51b7Smrg# run `make install-strip'. However `strip' might not be the right 9495fe5e51b7Smrg# tool to use in cross-compilation environments, therefore Automake 9496fe5e51b7Smrg# will honor the `STRIP' environment variable to overrule this program. 9497fe5e51b7Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 9498fe5e51b7Smrgif test "$cross_compiling" != no; then 9499fe5e51b7Smrg AC_CHECK_TOOL([STRIP], [strip], :) 9500fe5e51b7Smrgfi 9501fe5e51b7SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9502fe5e51b7SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9503fe5e51b7Smrg 9504fe5e51b7Smrg# Copyright (C) 2006 Free Software Foundation, Inc. 9505fe5e51b7Smrg# 9506fe5e51b7Smrg# This file is free software; the Free Software Foundation 9507fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 9508fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 9509fe5e51b7Smrg 9510fe5e51b7Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 9511fe5e51b7Smrg# --------------------------- 9512eda3803bSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9513fe5e51b7Smrg# This macro is traced by Automake. 9514fe5e51b7SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9515fe5e51b7Smrg 9516fe5e51b7Smrg# Check how to create a tarball. -*- Autoconf -*- 9517fe5e51b7Smrg 9518fe5e51b7Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 9519fe5e51b7Smrg# 9520fe5e51b7Smrg# This file is free software; the Free Software Foundation 9521fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 9522fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 9523fe5e51b7Smrg 9524fe5e51b7Smrg# serial 2 9525fe5e51b7Smrg 9526fe5e51b7Smrg# _AM_PROG_TAR(FORMAT) 9527fe5e51b7Smrg# -------------------- 9528fe5e51b7Smrg# Check how to create a tarball in format FORMAT. 9529fe5e51b7Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 9530fe5e51b7Smrg# 9531fe5e51b7Smrg# Substitute a variable $(am__tar) that is a command 9532fe5e51b7Smrg# writing to stdout a FORMAT-tarball containing the directory 9533fe5e51b7Smrg# $tardir. 9534fe5e51b7Smrg# tardir=directory && $(am__tar) > result.tar 9535fe5e51b7Smrg# 9536fe5e51b7Smrg# Substitute a variable $(am__untar) that extract such 9537fe5e51b7Smrg# a tarball read from stdin. 9538fe5e51b7Smrg# $(am__untar) < result.tar 9539fe5e51b7SmrgAC_DEFUN([_AM_PROG_TAR], 9540fe5e51b7Smrg[# Always define AMTAR for backward compatibility. 9541fe5e51b7SmrgAM_MISSING_PROG([AMTAR], [tar]) 9542fe5e51b7Smrgm4_if([$1], [v7], 9543fe5e51b7Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 9544fe5e51b7Smrg [m4_case([$1], [ustar],, [pax],, 9545fe5e51b7Smrg [m4_fatal([Unknown tar format])]) 9546fe5e51b7SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 9547fe5e51b7Smrg# Loop over all known methods to create a tar archive until one works. 9548fe5e51b7Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9549fe5e51b7Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9550fe5e51b7Smrg# Do not fold the above two line into one, because Tru64 sh and 9551fe5e51b7Smrg# Solaris sh will not grok spaces in the rhs of `-'. 9552fe5e51b7Smrgfor _am_tool in $_am_tools 9553fe5e51b7Smrgdo 9554fe5e51b7Smrg case $_am_tool in 9555fe5e51b7Smrg gnutar) 9556fe5e51b7Smrg for _am_tar in tar gnutar gtar; 9557fe5e51b7Smrg do 9558fe5e51b7Smrg AM_RUN_LOG([$_am_tar --version]) && break 9559fe5e51b7Smrg done 9560fe5e51b7Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9561fe5e51b7Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9562fe5e51b7Smrg am__untar="$_am_tar -xf -" 9563fe5e51b7Smrg ;; 9564fe5e51b7Smrg plaintar) 9565fe5e51b7Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 9566fe5e51b7Smrg # ustar tarball either. 9567fe5e51b7Smrg (tar --version) >/dev/null 2>&1 && continue 9568fe5e51b7Smrg am__tar='tar chf - "$$tardir"' 9569fe5e51b7Smrg am__tar_='tar chf - "$tardir"' 9570fe5e51b7Smrg am__untar='tar xf -' 9571fe5e51b7Smrg ;; 9572fe5e51b7Smrg pax) 9573fe5e51b7Smrg am__tar='pax -L -x $1 -w "$$tardir"' 9574fe5e51b7Smrg am__tar_='pax -L -x $1 -w "$tardir"' 9575fe5e51b7Smrg am__untar='pax -r' 9576fe5e51b7Smrg ;; 9577fe5e51b7Smrg cpio) 9578fe5e51b7Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9579fe5e51b7Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9580fe5e51b7Smrg am__untar='cpio -i -H $1 -d' 9581fe5e51b7Smrg ;; 9582fe5e51b7Smrg none) 9583fe5e51b7Smrg am__tar=false 9584fe5e51b7Smrg am__tar_=false 9585fe5e51b7Smrg am__untar=false 9586fe5e51b7Smrg ;; 9587fe5e51b7Smrg esac 9588fe5e51b7Smrg 9589fe5e51b7Smrg # If the value was cached, stop now. We just wanted to have am__tar 9590fe5e51b7Smrg # and am__untar set. 9591fe5e51b7Smrg test -n "${am_cv_prog_tar_$1}" && break 9592fe5e51b7Smrg 9593fe5e51b7Smrg # tar/untar a dummy directory, and stop if the command works 9594fe5e51b7Smrg rm -rf conftest.dir 9595fe5e51b7Smrg mkdir conftest.dir 9596fe5e51b7Smrg echo GrepMe > conftest.dir/file 9597fe5e51b7Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 9598fe5e51b7Smrg rm -rf conftest.dir 9599fe5e51b7Smrg if test -s conftest.tar; then 9600fe5e51b7Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 9601fe5e51b7Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 9602fe5e51b7Smrg fi 9603fe5e51b7Smrgdone 9604fe5e51b7Smrgrm -rf conftest.dir 9605fe5e51b7Smrg 9606fe5e51b7SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 9607fe5e51b7SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 9608fe5e51b7SmrgAC_SUBST([am__tar]) 9609fe5e51b7SmrgAC_SUBST([am__untar]) 9610fe5e51b7Smrg]) # _AM_PROG_TAR 9611fe5e51b7Smrg 9612