aclocal.m4 revision b290cf36
1b290cf36Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 2191cded7Smrg 3191cded7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4b290cf36Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5191cded7Smrg# This file is free software; the Free Software Foundation 6191cded7Smrg# gives unlimited permission to copy and/or distribute it, 7191cded7Smrg# with or without modifications, as long as this notice is preserved. 8191cded7Smrg 9191cded7Smrg# This program is distributed in the hope that it will be useful, 10191cded7Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11191cded7Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12191cded7Smrg# PARTICULAR PURPOSE. 13191cded7Smrg 14b290cf36Smrgm4_ifndef([AC_AUTOCONF_VERSION], 15b290cf36Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16b290cf36Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 17b290cf36Smrg[m4_warning([this file was generated for autoconf 2.63. 18b290cf36SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19b290cf36SmrgIf you have problems, you may need to regenerate the build system entirely. 20b290cf36SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21b290cf36Smrg 22191cded7Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23b290cf36Smrg# 24b290cf36Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 25b290cf36Smrg# 2006, 2007, 2008 Free Software Foundation, Inc. 26b290cf36Smrg# Written by Gordon Matzigkeit, 1996 27b290cf36Smrg# 28b290cf36Smrg# This file is free software; the Free Software Foundation gives 29b290cf36Smrg# unlimited permission to copy and/or distribute it, with or without 30b290cf36Smrg# modifications, as long as this notice is preserved. 31b290cf36Smrg 32b290cf36Smrgm4_define([_LT_COPYING], [dnl 33b290cf36Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 34b290cf36Smrg# 2006, 2007, 2008 Free Software Foundation, Inc. 35b290cf36Smrg# Written by Gordon Matzigkeit, 1996 36b290cf36Smrg# 37b290cf36Smrg# This file is part of GNU Libtool. 38b290cf36Smrg# 39b290cf36Smrg# GNU Libtool is free software; you can redistribute it and/or 40b290cf36Smrg# modify it under the terms of the GNU General Public License as 41b290cf36Smrg# published by the Free Software Foundation; either version 2 of 42b290cf36Smrg# the License, or (at your option) any later version. 43b290cf36Smrg# 44b290cf36Smrg# As a special exception to the GNU General Public License, 45b290cf36Smrg# if you distribute this file as part of a program or library that 46b290cf36Smrg# is built using GNU Libtool, you may include this file under the 47b290cf36Smrg# same distribution terms that you use for the rest of that program. 48b290cf36Smrg# 49b290cf36Smrg# GNU Libtool is distributed in the hope that it will be useful, 50b290cf36Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 51b290cf36Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 52b290cf36Smrg# GNU General Public License for more details. 53b290cf36Smrg# 54b290cf36Smrg# You should have received a copy of the GNU General Public License 55b290cf36Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 56b290cf36Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 57b290cf36Smrg# obtained by writing to the Free Software Foundation, Inc., 58b290cf36Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 59b290cf36Smrg]) 60191cded7Smrg 61b290cf36Smrg# serial 56 LT_INIT 62191cded7Smrg 63191cded7Smrg 64b290cf36Smrg# LT_PREREQ(VERSION) 65b290cf36Smrg# ------------------ 66b290cf36Smrg# Complain and exit if this libtool version is less that VERSION. 67b290cf36Smrgm4_defun([LT_PREREQ], 68b290cf36Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 69b290cf36Smrg [m4_default([$3], 70b290cf36Smrg [m4_fatal([Libtool version $1 or higher is required], 71b290cf36Smrg 63)])], 72b290cf36Smrg [$2])]) 73191cded7Smrg 74191cded7Smrg 75b290cf36Smrg# _LT_CHECK_BUILDDIR 76b290cf36Smrg# ------------------ 77b290cf36Smrg# Complain if the absolute build directory name contains unusual characters 78b290cf36Smrgm4_defun([_LT_CHECK_BUILDDIR], 79b290cf36Smrg[case `pwd` in 80b290cf36Smrg *\ * | *\ *) 81b290cf36Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 82b290cf36Smrgesac 83b290cf36Smrg]) 84b290cf36Smrg 85b290cf36Smrg 86b290cf36Smrg# LT_INIT([OPTIONS]) 87b290cf36Smrg# ------------------ 88b290cf36SmrgAC_DEFUN([LT_INIT], 89b290cf36Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 90b290cf36SmrgAC_BEFORE([$0], [LT_LANG])dnl 91b290cf36SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 92b290cf36SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 93b290cf36Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 94b290cf36Smrg 95b290cf36Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 96b290cf36Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 97b290cf36Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 98b290cf36Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 99b290cf36Smrgdnl unless we require an AC_DEFUNed macro: 100b290cf36SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 101b290cf36SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 102b290cf36SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 103b290cf36SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 104b290cf36Smrgm4_require([_LT_PROG_LTMAIN])dnl 105b290cf36Smrg 106b290cf36Smrgdnl Parse OPTIONS 107b290cf36Smrg_LT_SET_OPTIONS([$0], [$1]) 108191cded7Smrg 109191cded7Smrg# This can be used to rebuild libtool when needed 110b290cf36SmrgLIBTOOL_DEPS="$ltmain" 111191cded7Smrg 112191cded7Smrg# Always use our own libtool. 113191cded7SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 114191cded7SmrgAC_SUBST(LIBTOOL)dnl 115191cded7Smrg 116b290cf36Smrg_LT_SETUP 117191cded7Smrg 118b290cf36Smrg# Only expand once: 119b290cf36Smrgm4_define([LT_INIT]) 120b290cf36Smrg])# LT_INIT 121191cded7Smrg 122b290cf36Smrg# Old names: 123b290cf36SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 124b290cf36SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 125b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 126b290cf36Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 127b290cf36Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 128b290cf36Smrg 129b290cf36Smrg 130b290cf36Smrg# _LT_CC_BASENAME(CC) 131b290cf36Smrg# ------------------- 132b290cf36Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 133b290cf36Smrgm4_defun([_LT_CC_BASENAME], 134b290cf36Smrg[for cc_temp in $1""; do 135b290cf36Smrg case $cc_temp in 136b290cf36Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137b290cf36Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138b290cf36Smrg \-*) ;; 139b290cf36Smrg *) break;; 140b290cf36Smrg esac 141b290cf36Smrgdone 142b290cf36Smrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 143b290cf36Smrg]) 144b290cf36Smrg 145b290cf36Smrg 146b290cf36Smrg# _LT_FILEUTILS_DEFAULTS 147b290cf36Smrg# ---------------------- 148b290cf36Smrg# It is okay to use these file commands and assume they have been set 149b290cf36Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 150b290cf36Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 151b290cf36Smrg[: ${CP="cp -f"} 152b290cf36Smrg: ${MV="mv -f"} 153b290cf36Smrg: ${RM="rm -f"} 154b290cf36Smrg])# _LT_FILEUTILS_DEFAULTS 155b290cf36Smrg 156b290cf36Smrg 157b290cf36Smrg# _LT_SETUP 158b290cf36Smrg# --------- 159b290cf36Smrgm4_defun([_LT_SETUP], 160b290cf36Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 161191cded7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 162b290cf36Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 163b290cf36Smrg_LT_DECL([], [host], [0])dnl 164b290cf36Smrg_LT_DECL([], [host_os], [0])dnl 165b290cf36Smrgdnl 166b290cf36Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 167b290cf36Smrg_LT_DECL([], [build], [0])dnl 168b290cf36Smrg_LT_DECL([], [build_os], [0])dnl 169b290cf36Smrgdnl 170191cded7SmrgAC_REQUIRE([AC_PROG_CC])dnl 171b290cf36SmrgAC_REQUIRE([LT_PATH_LD])dnl 172b290cf36SmrgAC_REQUIRE([LT_PATH_NM])dnl 173b290cf36Smrgdnl 174191cded7SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 175b290cf36Smrgtest -z "$LN_S" && LN_S="ln -s" 176b290cf36Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 177191cded7Smrgdnl 178b290cf36SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 179b290cf36Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 180b290cf36Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 181b290cf36Smrgdnl 182b290cf36Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 183b290cf36Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 184b290cf36Smrgm4_require([_LT_CMD_RELOAD])dnl 185b290cf36Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 186b290cf36Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 187b290cf36Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 188b290cf36Smrg 189b290cf36Smrg_LT_CONFIG_LIBTOOL_INIT([ 190b290cf36Smrg# See if we are running on zsh, and set the options which allow our 191b290cf36Smrg# commands through without removal of \ escapes INIT. 192b290cf36Smrgif test -n "\${ZSH_VERSION+set}" ; then 193b290cf36Smrg setopt NO_GLOB_SUBST 194b290cf36Smrgfi 195b290cf36Smrg]) 196b290cf36Smrgif test -n "${ZSH_VERSION+set}" ; then 197b290cf36Smrg setopt NO_GLOB_SUBST 198b290cf36Smrgfi 199191cded7Smrg 200b290cf36Smrg_LT_CHECK_OBJDIR 201191cded7Smrg 202b290cf36Smrgm4_require([_LT_TAG_COMPILER])dnl 203b290cf36Smrg_LT_PROG_ECHO_BACKSLASH 204191cded7Smrg 205191cded7Smrgcase $host_os in 206191cded7Smrgaix3*) 207191cded7Smrg # AIX sometimes has problems with the GCC collect2 program. For some 208191cded7Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 209191cded7Smrg # vanish in a puff of smoke. 210191cded7Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 211191cded7Smrg COLLECT_NAMES= 212191cded7Smrg export COLLECT_NAMES 213191cded7Smrg fi 214191cded7Smrg ;; 215191cded7Smrgesac 216191cded7Smrg 217191cded7Smrg# Sed substitution that helps us do robust quoting. It backslashifies 218191cded7Smrg# metacharacters that are still active within double-quoted strings. 219b290cf36Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 220191cded7Smrg 221191cded7Smrg# Same as above, but do not quote variable references. 222b290cf36Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 223191cded7Smrg 224191cded7Smrg# Sed substitution to delay expansion of an escaped shell variable in a 225191cded7Smrg# double_quote_subst'ed string. 226191cded7Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 227191cded7Smrg 228b290cf36Smrg# Sed substitution to delay expansion of an escaped single quote. 229b290cf36Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 230b290cf36Smrg 231191cded7Smrg# Sed substitution to avoid accidental globbing in evaled expressions 232191cded7Smrgno_glob_subst='s/\*/\\\*/g' 233191cded7Smrg 234191cded7Smrg# Global variables: 235b290cf36Smrgofile=libtool 236191cded7Smrgcan_build_shared=yes 237191cded7Smrg 238191cded7Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 239191cded7Smrg# which needs '.lib'). 240191cded7Smrglibext=a 241191cded7Smrg 242b290cf36Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 243191cded7Smrg 244191cded7Smrgold_CC="$CC" 245191cded7Smrgold_CFLAGS="$CFLAGS" 246191cded7Smrg 247191cded7Smrg# Set sane defaults for various variables 248191cded7Smrgtest -z "$CC" && CC=cc 249191cded7Smrgtest -z "$LTCC" && LTCC=$CC 250191cded7Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 251191cded7Smrgtest -z "$LD" && LD=ld 252191cded7Smrgtest -z "$ac_objext" && ac_objext=o 253191cded7Smrg 254191cded7Smrg_LT_CC_BASENAME([$compiler]) 255191cded7Smrg 256191cded7Smrg# Only perform the check for file, if the check method requires it 257b290cf36Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 258191cded7Smrgcase $deplibs_check_method in 259191cded7Smrgfile_magic*) 260191cded7Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 261b290cf36Smrg _LT_PATH_MAGIC 262191cded7Smrg fi 263191cded7Smrg ;; 264191cded7Smrgesac 265191cded7Smrg 266b290cf36Smrg# Use C for the default configuration in the libtool script 267b290cf36SmrgLT_SUPPORTED_TAG([CC]) 268b290cf36Smrg_LT_LANG_C_CONFIG 269b290cf36Smrg_LT_LANG_DEFAULT_CONFIG 270b290cf36Smrg_LT_CONFIG_COMMANDS 271b290cf36Smrg])# _LT_SETUP 272191cded7Smrg 273191cded7Smrg 274b290cf36Smrg# _LT_PROG_LTMAIN 275b290cf36Smrg# --------------- 276b290cf36Smrg# Note that this code is called both from `configure', and `config.status' 277b290cf36Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 278b290cf36Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 279b290cf36Smrg# so we pass a copy along to make sure it has a sensible value anyway. 280b290cf36Smrgm4_defun([_LT_PROG_LTMAIN], 281b290cf36Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 282b290cf36Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 283b290cf36Smrgltmain="$ac_aux_dir/ltmain.sh" 284b290cf36Smrg])# _LT_PROG_LTMAIN 285191cded7Smrg 286191cded7Smrg 287191cded7Smrg 288b290cf36Smrg# So that we can recreate a full libtool script including additional 289b290cf36Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 290b290cf36Smrg# in macros and then make a single call at the end using the `libtool' 291b290cf36Smrg# label. 292191cded7Smrg 293191cded7Smrg 294b290cf36Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 295b290cf36Smrg# ---------------------------------------- 296b290cf36Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 297b290cf36Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 298b290cf36Smrg[m4_ifval([$1], 299b290cf36Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 300b290cf36Smrg [$1 301b290cf36Smrg])])]) 302191cded7Smrg 303b290cf36Smrg# Initialize. 304b290cf36Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 305191cded7Smrg 306191cded7Smrg 307b290cf36Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 308b290cf36Smrg# ------------------------------ 309b290cf36Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 310b290cf36Smrgm4_define([_LT_CONFIG_LIBTOOL], 311b290cf36Smrg[m4_ifval([$1], 312b290cf36Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 313b290cf36Smrg [$1 314b290cf36Smrg])])]) 315b290cf36Smrg 316b290cf36Smrg# Initialize. 317b290cf36Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 318b290cf36Smrg 319b290cf36Smrg 320b290cf36Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 321b290cf36Smrg# ----------------------------------------------------- 322b290cf36Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 323b290cf36Smrg[_LT_CONFIG_LIBTOOL([$1]) 324b290cf36Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 325191cded7Smrg]) 326191cded7Smrg 327191cded7Smrg 328b290cf36Smrg# _LT_FORMAT_COMMENT([COMMENT]) 329b290cf36Smrg# ----------------------------- 330b290cf36Smrg# Add leading comment marks to the start of each line, and a trailing 331b290cf36Smrg# full-stop to the whole comment if one is not present already. 332b290cf36Smrgm4_define([_LT_FORMAT_COMMENT], 333b290cf36Smrg[m4_ifval([$1], [ 334b290cf36Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 335b290cf36Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 336b290cf36Smrg)]) 337b290cf36Smrg 338b290cf36Smrg 339b290cf36Smrg 340b290cf36Smrg 341b290cf36Smrg 342b290cf36Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 343b290cf36Smrg# ------------------------------------------------------------------- 344b290cf36Smrg# CONFIGNAME is the name given to the value in the libtool script. 345b290cf36Smrg# VARNAME is the (base) name used in the configure script. 346b290cf36Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 347b290cf36Smrg# VARNAME. Any other value will be used directly. 348b290cf36Smrgm4_define([_LT_DECL], 349b290cf36Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 350b290cf36Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 351b290cf36Smrg [m4_ifval([$1], [$1], [$2])]) 352b290cf36Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 353b290cf36Smrg m4_ifval([$4], 354b290cf36Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 355b290cf36Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 356b290cf36Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 357b290cf36Smrg]) 358191cded7Smrg 359191cded7Smrg 360b290cf36Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 361b290cf36Smrg# -------------------------------------------------------- 362b290cf36Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 363191cded7Smrg 364191cded7Smrg 365b290cf36Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 366b290cf36Smrg# ------------------------------------------------ 367b290cf36Smrgm4_define([lt_decl_tag_varnames], 368b290cf36Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 369191cded7Smrg 370191cded7Smrg 371b290cf36Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 372b290cf36Smrg# --------------------------------------------------------- 373b290cf36Smrgm4_define([_lt_decl_filter], 374b290cf36Smrg[m4_case([$#], 375b290cf36Smrg [0], [m4_fatal([$0: too few arguments: $#])], 376b290cf36Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 377b290cf36Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 378b290cf36Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 379b290cf36Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 380b290cf36Smrg]) 381191cded7Smrg 382191cded7Smrg 383b290cf36Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 384b290cf36Smrg# -------------------------------------------------- 385b290cf36Smrgm4_define([lt_decl_quote_varnames], 386b290cf36Smrg[_lt_decl_filter([value], [1], $@)]) 387191cded7Smrg 388191cded7Smrg 389b290cf36Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 390b290cf36Smrg# --------------------------------------------------- 391b290cf36Smrgm4_define([lt_decl_dquote_varnames], 392b290cf36Smrg[_lt_decl_filter([value], [2], $@)]) 393191cded7Smrg 394191cded7Smrg 395b290cf36Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 396b290cf36Smrg# --------------------------------------------------- 397b290cf36Smrgm4_define([lt_decl_varnames_tagged], 398b290cf36Smrg[m4_assert([$# <= 2])dnl 399b290cf36Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 400b290cf36Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 401b290cf36Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 402b290cf36Smrgm4_define([_lt_decl_varnames_tagged], 403b290cf36Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 404191cded7Smrg 405191cded7Smrg 406b290cf36Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 407b290cf36Smrg# ------------------------------------------------ 408b290cf36Smrgm4_define([lt_decl_all_varnames], 409b290cf36Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 410b290cf36Smrg m4_if([$2], [], 411b290cf36Smrg m4_quote(lt_decl_varnames), 412b290cf36Smrg m4_quote(m4_shift($@))))[]dnl 413b290cf36Smrg]) 414b290cf36Smrgm4_define([_lt_decl_all_varnames], 415b290cf36Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 416b290cf36Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 417b290cf36Smrg]) 418191cded7Smrg 419191cded7Smrg 420b290cf36Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 421b290cf36Smrg# ------------------------------------ 422b290cf36Smrg# Quote a variable value, and forward it to `config.status' so that its 423b290cf36Smrg# declaration there will have the same value as in `configure'. VARNAME 424b290cf36Smrg# must have a single quote delimited value for this to work. 425b290cf36Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 426b290cf36Smrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) 427191cded7Smrg 428191cded7Smrg 429b290cf36Smrg# _LT_CONFIG_STATUS_DECLARATIONS 430b290cf36Smrg# ------------------------------ 431b290cf36Smrg# We delimit libtool config variables with single quotes, so when 432b290cf36Smrg# we write them to config.status, we have to be sure to quote all 433b290cf36Smrg# embedded single quotes properly. In configure, this macro expands 434b290cf36Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 435b290cf36Smrg# 436b290cf36Smrg# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' 437b290cf36Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 438b290cf36Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 439b290cf36Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 440191cded7Smrg 441191cded7Smrg 442b290cf36Smrg# _LT_LIBTOOL_TAGS 443b290cf36Smrg# ---------------- 444b290cf36Smrg# Output comment and list of tags supported by the script 445b290cf36Smrgm4_defun([_LT_LIBTOOL_TAGS], 446b290cf36Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 447b290cf36Smrgavailable_tags="_LT_TAGS"dnl 448b290cf36Smrg]) 449191cded7Smrg 450191cded7Smrg 451b290cf36Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 452b290cf36Smrg# ----------------------------------- 453b290cf36Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 454b290cf36Smrg# expand to a commented shell variable setting: 455b290cf36Smrg# 456b290cf36Smrg# # Some comment about what VAR is for. 457b290cf36Smrg# visible_name=$lt_internal_name 458b290cf36Smrgm4_define([_LT_LIBTOOL_DECLARE], 459b290cf36Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 460b290cf36Smrg [description])))[]dnl 461b290cf36Smrgm4_pushdef([_libtool_name], 462b290cf36Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 463b290cf36Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 464b290cf36Smrg [0], [_libtool_name=[$]$1], 465b290cf36Smrg [1], [_libtool_name=$lt_[]$1], 466b290cf36Smrg [2], [_libtool_name=$lt_[]$1], 467b290cf36Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 468b290cf36Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 469b290cf36Smrg]) 470191cded7Smrg 471b290cf36Smrg 472b290cf36Smrg# _LT_LIBTOOL_CONFIG_VARS 473b290cf36Smrg# ----------------------- 474b290cf36Smrg# Produce commented declarations of non-tagged libtool config variables 475b290cf36Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 476b290cf36Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 477b290cf36Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 478b290cf36Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 479b290cf36Smrg[m4_foreach([_lt_var], 480b290cf36Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 481b290cf36Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 482b290cf36Smrg 483b290cf36Smrg 484b290cf36Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 485b290cf36Smrg# ------------------------- 486b290cf36Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 487b290cf36Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 488b290cf36Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 489b290cf36Smrg 490b290cf36Smrg 491b290cf36Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 492b290cf36Smrg# ------------------------------ 493b290cf36Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 494b290cf36Smrg 495b290cf36Smrg 496b290cf36Smrg# _LT_CONFIG_COMMANDS 497b290cf36Smrg# ------------------- 498b290cf36Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 499b290cf36Smrg# variables for single and double quote escaping we saved from calls 500b290cf36Smrg# to _LT_DECL, we can put quote escaped variables declarations 501b290cf36Smrg# into `config.status', and then the shell code to quote escape them in 502b290cf36Smrg# for loops in `config.status'. Finally, any additional code accumulated 503b290cf36Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 504b290cf36Smrgm4_defun([_LT_CONFIG_COMMANDS], 505b290cf36Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 506b290cf36Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 507b290cf36Smrg dnl instead of duplicating it all over again into config.status, 508b290cf36Smrg dnl then we will have config.status run $CONFIG_LT later, so it 509b290cf36Smrg dnl needs to know what name is stored there: 510b290cf36Smrg [AC_CONFIG_COMMANDS([libtool], 511b290cf36Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 512b290cf36Smrg dnl If the libtool generation code is destined for config.status, 513b290cf36Smrg dnl expand the accumulated commands and init code now: 514b290cf36Smrg [AC_CONFIG_COMMANDS([libtool], 515b290cf36Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 516b290cf36Smrg])#_LT_CONFIG_COMMANDS 517b290cf36Smrg 518b290cf36Smrg 519b290cf36Smrg# Initialize. 520b290cf36Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 521b290cf36Smrg[ 522b290cf36Smrg 523b290cf36Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 524b290cf36Smrg# if CDPATH is set. 525b290cf36Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 526b290cf36Smrg 527b290cf36Smrgsed_quote_subst='$sed_quote_subst' 528b290cf36Smrgdouble_quote_subst='$double_quote_subst' 529b290cf36Smrgdelay_variable_subst='$delay_variable_subst' 530b290cf36Smrg_LT_CONFIG_STATUS_DECLARATIONS 531b290cf36SmrgLTCC='$LTCC' 532b290cf36SmrgLTCFLAGS='$LTCFLAGS' 533b290cf36Smrgcompiler='$compiler_DEFAULT' 534b290cf36Smrg 535b290cf36Smrg# Quote evaled strings. 536b290cf36Smrgfor var in lt_decl_all_varnames([[ \ 537b290cf36Smrg]], lt_decl_quote_varnames); do 538b290cf36Smrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 539b290cf36Smrg *[[\\\\\\\`\\"\\\$]]*) 540b290cf36Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 541191cded7Smrg ;; 542b290cf36Smrg *) 543b290cf36Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 544191cded7Smrg ;; 545191cded7Smrg esac 546b290cf36Smrgdone 547b290cf36Smrg 548b290cf36Smrg# Double-quote double-evaled strings. 549b290cf36Smrgfor var in lt_decl_all_varnames([[ \ 550b290cf36Smrg]], lt_decl_dquote_varnames); do 551b290cf36Smrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 552b290cf36Smrg *[[\\\\\\\`\\"\\\$]]*) 553b290cf36Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 554191cded7Smrg ;; 555b290cf36Smrg *) 556b290cf36Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 557191cded7Smrg ;; 558191cded7Smrg esac 559b290cf36Smrgdone 560191cded7Smrg 561b290cf36Smrg# Fix-up fallback echo if it was mangled by the above quoting rules. 562b290cf36Smrgcase \$lt_ECHO in 563b290cf36Smrg*'\\\[$]0 --fallback-echo"')dnl " 564b290cf36Smrg lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` 565191cded7Smrg ;; 566b290cf36Smrgesac 567191cded7Smrg 568b290cf36Smrg_LT_OUTPUT_LIBTOOL_INIT 569b290cf36Smrg]) 570191cded7Smrg 571191cded7Smrg 572b290cf36Smrg# LT_OUTPUT 573b290cf36Smrg# --------- 574b290cf36Smrg# This macro allows early generation of the libtool script (before 575b290cf36Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 576b290cf36Smrg# tests. 577b290cf36SmrgAC_DEFUN([LT_OUTPUT], 578b290cf36Smrg[: ${CONFIG_LT=./config.lt} 579b290cf36SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 580b290cf36Smrgcat >"$CONFIG_LT" <<_LTEOF 581b290cf36Smrg#! $SHELL 582b290cf36Smrg# Generated by $as_me. 583b290cf36Smrg# Run this file to recreate a libtool stub with the current configuration. 584b290cf36Smrg 585b290cf36Smrglt_cl_silent=false 586b290cf36SmrgSHELL=\${CONFIG_SHELL-$SHELL} 587b290cf36Smrg_LTEOF 588b290cf36Smrg 589b290cf36Smrgcat >>"$CONFIG_LT" <<\_LTEOF 590b290cf36SmrgAS_SHELL_SANITIZE 591b290cf36Smrg_AS_PREPARE 592b290cf36Smrg 593b290cf36Smrgexec AS_MESSAGE_FD>&1 594b290cf36Smrgexec AS_MESSAGE_LOG_FD>>config.log 595b290cf36Smrg{ 596b290cf36Smrg echo 597b290cf36Smrg AS_BOX([Running $as_me.]) 598b290cf36Smrg} >&AS_MESSAGE_LOG_FD 599191cded7Smrg 600b290cf36Smrglt_cl_help="\ 601b290cf36Smrg\`$as_me' creates a local libtool stub from the current configuration, 602b290cf36Smrgfor use in further configure time tests before the real libtool is 603b290cf36Smrggenerated. 604191cded7Smrg 605b290cf36SmrgUsage: $[0] [[OPTIONS]] 606191cded7Smrg 607b290cf36Smrg -h, --help print this help, then exit 608b290cf36Smrg -V, --version print version number, then exit 609b290cf36Smrg -q, --quiet do not print progress messages 610b290cf36Smrg -d, --debug don't remove temporary files 611191cded7Smrg 612b290cf36SmrgReport bugs to <bug-libtool@gnu.org>." 613191cded7Smrg 614b290cf36Smrglt_cl_version="\ 615b290cf36Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 616b290cf36Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 617b290cf36Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 618191cded7Smrg 619b290cf36SmrgCopyright (C) 2008 Free Software Foundation, Inc. 620b290cf36SmrgThis config.lt script is free software; the Free Software Foundation 621b290cf36Smrggives unlimited permision to copy, distribute and modify it." 622191cded7Smrg 623b290cf36Smrgwhile test $[#] != 0 624b290cf36Smrgdo 625b290cf36Smrg case $[1] in 626b290cf36Smrg --version | --v* | -V ) 627b290cf36Smrg echo "$lt_cl_version"; exit 0 ;; 628b290cf36Smrg --help | --h* | -h ) 629b290cf36Smrg echo "$lt_cl_help"; exit 0 ;; 630b290cf36Smrg --debug | --d* | -d ) 631b290cf36Smrg debug=: ;; 632b290cf36Smrg --quiet | --q* | --silent | --s* | -q ) 633b290cf36Smrg lt_cl_silent=: ;; 634b290cf36Smrg 635b290cf36Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 636b290cf36SmrgTry \`$[0] --help' for more information.]) ;; 637b290cf36Smrg 638b290cf36Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 639b290cf36SmrgTry \`$[0] --help' for more information.]) ;; 640b290cf36Smrg esac 641b290cf36Smrg shift 642b290cf36Smrgdone 643191cded7Smrg 644b290cf36Smrgif $lt_cl_silent; then 645b290cf36Smrg exec AS_MESSAGE_FD>/dev/null 646b290cf36Smrgfi 647b290cf36Smrg_LTEOF 648b290cf36Smrg 649b290cf36Smrgcat >>"$CONFIG_LT" <<_LTEOF 650b290cf36Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 651b290cf36Smrg_LTEOF 652b290cf36Smrg 653b290cf36Smrgcat >>"$CONFIG_LT" <<\_LTEOF 654b290cf36SmrgAC_MSG_NOTICE([creating $ofile]) 655b290cf36Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 656b290cf36SmrgAS_EXIT(0) 657b290cf36Smrg_LTEOF 658b290cf36Smrgchmod +x "$CONFIG_LT" 659b290cf36Smrg 660b290cf36Smrg# configure is writing to config.log, but config.lt does its own redirection, 661b290cf36Smrg# appending to config.log, which fails on DOS, as config.log is still kept 662b290cf36Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 663b290cf36Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 664b290cf36Smrgif test "$no_create" != yes; then 665b290cf36Smrg lt_cl_success=: 666b290cf36Smrg test "$silent" = yes && 667b290cf36Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 668b290cf36Smrg exec AS_MESSAGE_LOG_FD>/dev/null 669b290cf36Smrg $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 670b290cf36Smrg exec AS_MESSAGE_LOG_FD>>config.log 671b290cf36Smrg $lt_cl_success || AS_EXIT(1) 672b290cf36Smrgfi 673b290cf36Smrg])# LT_OUTPUT 674191cded7Smrg 675191cded7Smrg 676b290cf36Smrg# _LT_CONFIG(TAG) 677b290cf36Smrg# --------------- 678b290cf36Smrg# If TAG is the built-in tag, create an initial libtool script with a 679b290cf36Smrg# default configuration from the untagged config vars. Otherwise add code 680b290cf36Smrg# to config.status for appending the configuration named by TAG from the 681b290cf36Smrg# matching tagged config vars. 682b290cf36Smrgm4_defun([_LT_CONFIG], 683b290cf36Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 684b290cf36Smrg_LT_CONFIG_SAVE_COMMANDS([ 685b290cf36Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 686b290cf36Smrg m4_if(_LT_TAG, [C], [ 687b290cf36Smrg # See if we are running on zsh, and set the options which allow our 688b290cf36Smrg # commands through without removal of \ escapes. 689b290cf36Smrg if test -n "${ZSH_VERSION+set}" ; then 690b290cf36Smrg setopt NO_GLOB_SUBST 691b290cf36Smrg fi 692191cded7Smrg 693b290cf36Smrg cfgfile="${ofile}T" 694b290cf36Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 695b290cf36Smrg $RM "$cfgfile" 696191cded7Smrg 697b290cf36Smrg cat <<_LT_EOF >> "$cfgfile" 698b290cf36Smrg#! $SHELL 699191cded7Smrg 700b290cf36Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 701b290cf36Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 702b290cf36Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 703b290cf36Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 704b290cf36Smrg# 705b290cf36Smrg_LT_COPYING 706b290cf36Smrg_LT_LIBTOOL_TAGS 707191cded7Smrg 708b290cf36Smrg# ### BEGIN LIBTOOL CONFIG 709b290cf36Smrg_LT_LIBTOOL_CONFIG_VARS 710b290cf36Smrg_LT_LIBTOOL_TAG_VARS 711b290cf36Smrg# ### END LIBTOOL CONFIG 712191cded7Smrg 713b290cf36Smrg_LT_EOF 714191cded7Smrg 715b290cf36Smrg case $host_os in 716b290cf36Smrg aix3*) 717b290cf36Smrg cat <<\_LT_EOF >> "$cfgfile" 718b290cf36Smrg# AIX sometimes has problems with the GCC collect2 program. For some 719b290cf36Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 720b290cf36Smrg# vanish in a puff of smoke. 721b290cf36Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 722b290cf36Smrg COLLECT_NAMES= 723b290cf36Smrg export COLLECT_NAMES 724b290cf36Smrgfi 725b290cf36Smrg_LT_EOF 726191cded7Smrg ;; 727191cded7Smrg esac 728191cded7Smrg 729b290cf36Smrg _LT_PROG_LTMAIN 730191cded7Smrg 731b290cf36Smrg # We use sed instead of cat because bash on DJGPP gets confused if 732b290cf36Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 733b290cf36Smrg # text mode, it properly converts lines to CR/LF. This bash problem 734b290cf36Smrg # is reportedly fixed, but why not run on old versions too? 735b290cf36Smrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 736b290cf36Smrg || (rm -f "$cfgfile"; exit 1) 737191cded7Smrg 738b290cf36Smrg _LT_PROG_XSI_SHELLFNS 739191cded7Smrg 740b290cf36Smrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 741b290cf36Smrg || (rm -f "$cfgfile"; exit 1) 742191cded7Smrg 743b290cf36Smrg mv -f "$cfgfile" "$ofile" || 744b290cf36Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 745b290cf36Smrg chmod +x "$ofile" 746b290cf36Smrg], 747b290cf36Smrg[cat <<_LT_EOF >> "$ofile" 748191cded7Smrg 749b290cf36Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 750b290cf36Smrgdnl in a comment (ie after a #). 751b290cf36Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 752b290cf36Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 753b290cf36Smrg# ### END LIBTOOL TAG CONFIG: $1 754b290cf36Smrg_LT_EOF 755b290cf36Smrg])dnl /m4_if 756b290cf36Smrg], 757b290cf36Smrg[m4_if([$1], [], [ 758b290cf36Smrg PACKAGE='$PACKAGE' 759b290cf36Smrg VERSION='$VERSION' 760b290cf36Smrg TIMESTAMP='$TIMESTAMP' 761b290cf36Smrg RM='$RM' 762b290cf36Smrg ofile='$ofile'], []) 763b290cf36Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 764b290cf36Smrg])# _LT_CONFIG 765191cded7Smrg 766191cded7Smrg 767b290cf36Smrg# LT_SUPPORTED_TAG(TAG) 768b290cf36Smrg# --------------------- 769b290cf36Smrg# Trace this macro to discover what tags are supported by the libtool 770b290cf36Smrg# --tag option, using: 771b290cf36Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 772b290cf36SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 773191cded7Smrg 774191cded7Smrg 775b290cf36Smrg# C support is built-in for now 776b290cf36Smrgm4_define([_LT_LANG_C_enabled], []) 777b290cf36Smrgm4_define([_LT_TAGS], []) 778191cded7Smrg 779191cded7Smrg 780b290cf36Smrg# LT_LANG(LANG) 781b290cf36Smrg# ------------- 782b290cf36Smrg# Enable libtool support for the given language if not already enabled. 783b290cf36SmrgAC_DEFUN([LT_LANG], 784b290cf36Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 785b290cf36Smrgm4_case([$1], 786b290cf36Smrg [C], [_LT_LANG(C)], 787b290cf36Smrg [C++], [_LT_LANG(CXX)], 788b290cf36Smrg [Java], [_LT_LANG(GCJ)], 789b290cf36Smrg [Fortran 77], [_LT_LANG(F77)], 790b290cf36Smrg [Fortran], [_LT_LANG(FC)], 791b290cf36Smrg [Windows Resource], [_LT_LANG(RC)], 792b290cf36Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 793b290cf36Smrg [_LT_LANG($1)], 794b290cf36Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 795b290cf36Smrg])# LT_LANG 796b290cf36Smrg 797b290cf36Smrg 798b290cf36Smrg# _LT_LANG(LANGNAME) 799b290cf36Smrg# ------------------ 800b290cf36Smrgm4_defun([_LT_LANG], 801b290cf36Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 802b290cf36Smrg [LT_SUPPORTED_TAG([$1])dnl 803b290cf36Smrg m4_append([_LT_TAGS], [$1 ])dnl 804b290cf36Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 805b290cf36Smrg _LT_LANG_$1_CONFIG($1)])dnl 806b290cf36Smrg])# _LT_LANG 807191cded7Smrg 808191cded7Smrg 809b290cf36Smrg# _LT_LANG_DEFAULT_CONFIG 810b290cf36Smrg# ----------------------- 811b290cf36Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 812b290cf36Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 813b290cf36Smrg [LT_LANG(CXX)], 814b290cf36Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 815b290cf36Smrg 816b290cf36SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 817b290cf36Smrg [LT_LANG(F77)], 818b290cf36Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 819b290cf36Smrg 820b290cf36SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 821b290cf36Smrg [LT_LANG(FC)], 822b290cf36Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 823b290cf36Smrg 824b290cf36Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 825b290cf36Smrgdnl pulling things in needlessly. 826b290cf36SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 827b290cf36Smrg [LT_LANG(GCJ)], 828b290cf36Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 829b290cf36Smrg [LT_LANG(GCJ)], 830b290cf36Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 831b290cf36Smrg [LT_LANG(GCJ)], 832b290cf36Smrg [m4_ifdef([AC_PROG_GCJ], 833b290cf36Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 834b290cf36Smrg m4_ifdef([A][M_PROG_GCJ], 835b290cf36Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 836b290cf36Smrg m4_ifdef([LT_PROG_GCJ], 837b290cf36Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 838b290cf36Smrg 839b290cf36SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 840b290cf36Smrg [LT_LANG(RC)], 841b290cf36Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 842b290cf36Smrg])# _LT_LANG_DEFAULT_CONFIG 843b290cf36Smrg 844b290cf36Smrg# Obsolete macros: 845b290cf36SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 846b290cf36SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 847b290cf36SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 848b290cf36SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 849b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 850b290cf36Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 851b290cf36Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 852b290cf36Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 853b290cf36Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 854b290cf36Smrg 855b290cf36Smrg 856b290cf36Smrg# _LT_TAG_COMPILER 857b290cf36Smrg# ---------------- 858b290cf36Smrgm4_defun([_LT_TAG_COMPILER], 859b290cf36Smrg[AC_REQUIRE([AC_PROG_CC])dnl 860191cded7Smrg 861b290cf36Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 862b290cf36Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 863b290cf36Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 864b290cf36Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 865191cded7Smrg 866b290cf36Smrg# If no C compiler was specified, use CC. 867b290cf36SmrgLTCC=${LTCC-"$CC"} 868191cded7Smrg 869b290cf36Smrg# If no C compiler flags were specified, use CFLAGS. 870b290cf36SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 871191cded7Smrg 872b290cf36Smrg# Allow CC to be a program name with arguments. 873b290cf36Smrgcompiler=$CC 874b290cf36Smrg])# _LT_TAG_COMPILER 875191cded7Smrg 876191cded7Smrg 877b290cf36Smrg# _LT_COMPILER_BOILERPLATE 878b290cf36Smrg# ------------------------ 879b290cf36Smrg# Check for compiler boilerplate output or warnings with 880b290cf36Smrg# the simple compiler test code. 881b290cf36Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 882b290cf36Smrg[m4_require([_LT_DECL_SED])dnl 883b290cf36Smrgac_outfile=conftest.$ac_objext 884b290cf36Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 885b290cf36Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 886b290cf36Smrg_lt_compiler_boilerplate=`cat conftest.err` 887b290cf36Smrg$RM conftest* 888b290cf36Smrg])# _LT_COMPILER_BOILERPLATE 889191cded7Smrg 890191cded7Smrg 891b290cf36Smrg# _LT_LINKER_BOILERPLATE 892b290cf36Smrg# ---------------------- 893b290cf36Smrg# Check for linker boilerplate output or warnings with 894b290cf36Smrg# the simple link test code. 895b290cf36Smrgm4_defun([_LT_LINKER_BOILERPLATE], 896b290cf36Smrg[m4_require([_LT_DECL_SED])dnl 897b290cf36Smrgac_outfile=conftest.$ac_objext 898b290cf36Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 899b290cf36Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 900b290cf36Smrg_lt_linker_boilerplate=`cat conftest.err` 901b290cf36Smrg$RM -r conftest* 902b290cf36Smrg])# _LT_LINKER_BOILERPLATE 903191cded7Smrg 904b290cf36Smrg# _LT_REQUIRED_DARWIN_CHECKS 905b290cf36Smrg# ------------------------- 906b290cf36Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 907b290cf36Smrg case $host_os in 908b290cf36Smrg rhapsody* | darwin*) 909b290cf36Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 910b290cf36Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 911b290cf36Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 912b290cf36Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 913b290cf36Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 914b290cf36Smrg _LT_DECL([], [DSYMUTIL], [1], 915b290cf36Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 916b290cf36Smrg _LT_DECL([], [NMEDIT], [1], 917b290cf36Smrg [Tool to change global to local symbols on Mac OS X]) 918b290cf36Smrg _LT_DECL([], [LIPO], [1], 919b290cf36Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 920b290cf36Smrg _LT_DECL([], [OTOOL], [1], 921b290cf36Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 922b290cf36Smrg _LT_DECL([], [OTOOL64], [1], 923b290cf36Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 924b290cf36Smrg 925b290cf36Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 926b290cf36Smrg [lt_cv_apple_cc_single_mod=no 927b290cf36Smrg if test -z "${LT_MULTI_MODULE}"; then 928b290cf36Smrg # By default we will add the -single_module flag. You can override 929b290cf36Smrg # by either setting the environment variable LT_MULTI_MODULE 930b290cf36Smrg # non-empty at configure time, or by adding -multi_module to the 931b290cf36Smrg # link flags. 932b290cf36Smrg rm -rf libconftest.dylib* 933b290cf36Smrg echo "int foo(void){return 1;}" > conftest.c 934b290cf36Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 935b290cf36Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 936b290cf36Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 937b290cf36Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 938b290cf36Smrg _lt_result=$? 939b290cf36Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 940b290cf36Smrg lt_cv_apple_cc_single_mod=yes 941b290cf36Smrg else 942b290cf36Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 943b290cf36Smrg fi 944b290cf36Smrg rm -rf libconftest.dylib* 945b290cf36Smrg rm -f conftest.* 946b290cf36Smrg fi]) 947b290cf36Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 948b290cf36Smrg [lt_cv_ld_exported_symbols_list], 949b290cf36Smrg [lt_cv_ld_exported_symbols_list=no 950b290cf36Smrg save_LDFLAGS=$LDFLAGS 951b290cf36Smrg echo "_main" > conftest.sym 952b290cf36Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 953b290cf36Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 954b290cf36Smrg [lt_cv_ld_exported_symbols_list=yes], 955b290cf36Smrg [lt_cv_ld_exported_symbols_list=no]) 956b290cf36Smrg LDFLAGS="$save_LDFLAGS" 957191cded7Smrg ]) 958b290cf36Smrg case $host_os in 959b290cf36Smrg rhapsody* | darwin1.[[012]]) 960b290cf36Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 961b290cf36Smrg darwin1.*) 962b290cf36Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 963b290cf36Smrg darwin*) # darwin 5.x on 964b290cf36Smrg # if running on 10.5 or later, the deployment target defaults 965b290cf36Smrg # to the OS version, if on x86, and 10.4, the deployment 966b290cf36Smrg # target defaults to 10.4. Don't you love it? 967b290cf36Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 968b290cf36Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 969b290cf36Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 970b290cf36Smrg 10.[[012]]*) 971b290cf36Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 972b290cf36Smrg 10.*) 973b290cf36Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 974b290cf36Smrg esac 975b290cf36Smrg ;; 976b290cf36Smrg esac 977b290cf36Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 978b290cf36Smrg _lt_dar_single_mod='$single_module' 979b290cf36Smrg fi 980b290cf36Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 981b290cf36Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 982b290cf36Smrg else 983b290cf36Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 984b290cf36Smrg fi 985b290cf36Smrg if test "$DSYMUTIL" != ":"; then 986b290cf36Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 987b290cf36Smrg else 988b290cf36Smrg _lt_dsymutil= 989191cded7Smrg fi 990191cded7Smrg ;; 991191cded7Smrg esac 992b290cf36Smrg]) 993191cded7Smrg 994191cded7Smrg 995b290cf36Smrg# _LT_DARWIN_LINKER_FEATURES 996b290cf36Smrg# -------------------------- 997b290cf36Smrg# Checks for linker and compiler features on darwin 998b290cf36Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 999b290cf36Smrg[ 1000b290cf36Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1001b290cf36Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1002b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1003b290cf36Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1004b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1005b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1006b290cf36Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1007b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1008b290cf36Smrg case $cc_basename in 1009b290cf36Smrg ifort*) _lt_dar_can_shared=yes ;; 1010b290cf36Smrg *) _lt_dar_can_shared=$GCC ;; 1011191cded7Smrg esac 1012b290cf36Smrg if test "$_lt_dar_can_shared" = "yes"; then 1013b290cf36Smrg output_verbose_link_cmd=echo 1014b290cf36Smrg _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}" 1015b290cf36Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1016b290cf36Smrg _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}" 1017b290cf36Smrg _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}" 1018b290cf36Smrg m4_if([$1], [CXX], 1019b290cf36Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1020b290cf36Smrg _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}" 1021b290cf36Smrg _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}" 1022b290cf36Smrg fi 1023b290cf36Smrg],[]) 1024b290cf36Smrg else 1025b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1026b290cf36Smrg fi 1027b290cf36Smrg]) 1028191cded7Smrg 1029b290cf36Smrg# _LT_SYS_MODULE_PATH_AIX 1030b290cf36Smrg# ----------------------- 1031b290cf36Smrg# Links a minimal program and checks the executable 1032b290cf36Smrg# for the system default hardcoded library path. In most cases, 1033b290cf36Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 1034b290cf36Smrg# the location of the communication and MPI libs are included too. 1035b290cf36Smrg# If we don't find anything, use the default library path according 1036b290cf36Smrg# to the aix ld manual. 1037b290cf36Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1038b290cf36Smrg[m4_require([_LT_DECL_SED])dnl 1039b290cf36SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 1040b290cf36Smrglt_aix_libpath_sed=' 1041b290cf36Smrg /Import File Strings/,/^$/ { 1042b290cf36Smrg /^0/ { 1043b290cf36Smrg s/^0 *\(.*\)$/\1/ 1044b290cf36Smrg p 1045b290cf36Smrg } 1046b290cf36Smrg }' 1047b290cf36Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1048b290cf36Smrg# Check for a 64-bit object if we didn't find anything. 1049b290cf36Smrgif test -z "$aix_libpath"; then 1050b290cf36Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1051b290cf36Smrgfi],[]) 1052b290cf36Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 1053b290cf36Smrg])# _LT_SYS_MODULE_PATH_AIX 1054191cded7Smrg 1055191cded7Smrg 1056b290cf36Smrg# _LT_SHELL_INIT(ARG) 1057b290cf36Smrg# ------------------- 1058b290cf36Smrgm4_define([_LT_SHELL_INIT], 1059b290cf36Smrg[ifdef([AC_DIVERSION_NOTICE], 1060b290cf36Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 1061b290cf36Smrg [AC_DIVERT_PUSH(NOTICE)]) 1062b290cf36Smrg$1 1063b290cf36SmrgAC_DIVERT_POP 1064b290cf36Smrg])# _LT_SHELL_INIT 1065191cded7Smrg 1066191cded7Smrg 1067b290cf36Smrg# _LT_PROG_ECHO_BACKSLASH 1068b290cf36Smrg# ----------------------- 1069b290cf36Smrg# Add some code to the start of the generated configure script which 1070b290cf36Smrg# will find an echo command which doesn't interpret backslashes. 1071b290cf36Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1072b290cf36Smrg[_LT_SHELL_INIT([ 1073b290cf36Smrg# Check that we are running under the correct shell. 1074b290cf36SmrgSHELL=${CONFIG_SHELL-/bin/sh} 1075191cded7Smrg 1076b290cf36Smrgcase X$lt_ECHO in 1077b290cf36SmrgX*--fallback-echo) 1078b290cf36Smrg # Remove one level of quotation (which was required for Make). 1079b290cf36Smrg ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 1080b290cf36Smrg ;; 1081b290cf36Smrgesac 1082b290cf36Smrg 1083b290cf36SmrgECHO=${lt_ECHO-echo} 1084b290cf36Smrgif test "X[$]1" = X--no-reexec; then 1085b290cf36Smrg # Discard the --no-reexec flag, and continue. 1086b290cf36Smrg shift 1087b290cf36Smrgelif test "X[$]1" = X--fallback-echo; then 1088b290cf36Smrg # Avoid inline document here, it may be left over 1089b290cf36Smrg : 1090b290cf36Smrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then 1091b290cf36Smrg # Yippee, $ECHO works! 1092b290cf36Smrg : 1093191cded7Smrgelse 1094b290cf36Smrg # Restart under the correct shell. 1095b290cf36Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 1096191cded7Smrgfi 1097191cded7Smrg 1098b290cf36Smrgif test "X[$]1" = X--fallback-echo; then 1099b290cf36Smrg # used as fallback echo 1100b290cf36Smrg shift 1101b290cf36Smrg cat <<_LT_EOF 1102b290cf36Smrg[$]* 1103b290cf36Smrg_LT_EOF 1104b290cf36Smrg exit 0 1105191cded7Smrgfi 1106191cded7Smrg 1107b290cf36Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 1108b290cf36Smrg# if CDPATH is set. 1109b290cf36Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1110191cded7Smrg 1111b290cf36Smrgif test -z "$lt_ECHO"; then 1112b290cf36Smrg if test "X${echo_test_string+set}" != Xset; then 1113b290cf36Smrg # find a string as large as possible, as long as the shell can cope with it 1114b290cf36Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 1115b290cf36Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 1116b290cf36Smrg if { echo_test_string=`eval $cmd`; } 2>/dev/null && 1117b290cf36Smrg { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null 1118b290cf36Smrg then 1119b290cf36Smrg break 1120b290cf36Smrg fi 1121b290cf36Smrg done 1122191cded7Smrg fi 1123191cded7Smrg 1124b290cf36Smrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 1125b290cf36Smrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 1126b290cf36Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1127b290cf36Smrg : 1128b290cf36Smrg else 1129b290cf36Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 1130b290cf36Smrg # backslashes. This makes it impossible to quote backslashes using 1131b290cf36Smrg # echo "$something" | sed 's/\\/\\\\/g' 1132b290cf36Smrg # 1133b290cf36Smrg # So, first we look for a working echo in the user's PATH. 1134191cded7Smrg 1135b290cf36Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 1136b290cf36Smrg for dir in $PATH /usr/ucb; do 1137b290cf36Smrg IFS="$lt_save_ifs" 1138b290cf36Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 1139b290cf36Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 1140b290cf36Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 1141b290cf36Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1142b290cf36Smrg ECHO="$dir/echo" 1143b290cf36Smrg break 1144b290cf36Smrg fi 1145b290cf36Smrg done 1146b290cf36Smrg IFS="$lt_save_ifs" 1147191cded7Smrg 1148b290cf36Smrg if test "X$ECHO" = Xecho; then 1149b290cf36Smrg # We didn't find a better echo, so look for alternatives. 1150b290cf36Smrg if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && 1151b290cf36Smrg echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && 1152b290cf36Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1153b290cf36Smrg # This shell has a builtin print -r that does the trick. 1154b290cf36Smrg ECHO='print -r' 1155b290cf36Smrg elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && 1156b290cf36Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 1157b290cf36Smrg # If we have ksh, try running configure again with it. 1158b290cf36Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 1159b290cf36Smrg export ORIGINAL_CONFIG_SHELL 1160b290cf36Smrg CONFIG_SHELL=/bin/ksh 1161b290cf36Smrg export CONFIG_SHELL 1162b290cf36Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 1163b290cf36Smrg else 1164b290cf36Smrg # Try using printf. 1165b290cf36Smrg ECHO='printf %s\n' 1166b290cf36Smrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 1167b290cf36Smrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 1168b290cf36Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1169b290cf36Smrg # Cool, printf works 1170b290cf36Smrg : 1171b290cf36Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1172b290cf36Smrg test "X$echo_testing_string" = 'X\t' && 1173b290cf36Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1174b290cf36Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1175b290cf36Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 1176b290cf36Smrg export CONFIG_SHELL 1177b290cf36Smrg SHELL="$CONFIG_SHELL" 1178b290cf36Smrg export SHELL 1179b290cf36Smrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 1180b290cf36Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1181b290cf36Smrg test "X$echo_testing_string" = 'X\t' && 1182b290cf36Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1183b290cf36Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1184b290cf36Smrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 1185b290cf36Smrg else 1186b290cf36Smrg # maybe with a smaller string... 1187b290cf36Smrg prev=: 1188191cded7Smrg 1189b290cf36Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 1190b290cf36Smrg if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null 1191b290cf36Smrg then 1192b290cf36Smrg break 1193b290cf36Smrg fi 1194b290cf36Smrg prev="$cmd" 1195b290cf36Smrg done 1196191cded7Smrg 1197b290cf36Smrg if test "$prev" != 'sed 50q "[$]0"'; then 1198b290cf36Smrg echo_test_string=`eval $prev` 1199b290cf36Smrg export echo_test_string 1200b290cf36Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 1201b290cf36Smrg else 1202b290cf36Smrg # Oops. We lost completely, so just stick with echo. 1203b290cf36Smrg ECHO=echo 1204b290cf36Smrg fi 1205b290cf36Smrg fi 1206b290cf36Smrg fi 1207b290cf36Smrg fi 1208191cded7Smrg fi 1209191cded7Smrgfi 1210191cded7Smrg 1211b290cf36Smrg# Copy echo and quote the copy suitably for passing to libtool from 1212b290cf36Smrg# the Makefile, instead of quoting the original, which is used later. 1213b290cf36Smrglt_ECHO=$ECHO 1214b290cf36Smrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 1215b290cf36Smrg lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 1216b290cf36Smrgfi 1217191cded7Smrg 1218b290cf36SmrgAC_SUBST(lt_ECHO) 1219b290cf36Smrg]) 1220b290cf36Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1221b290cf36Smrg_LT_DECL([], [ECHO], [1], 1222b290cf36Smrg [An echo program that does not interpret backslashes]) 1223b290cf36Smrg])# _LT_PROG_ECHO_BACKSLASH 1224191cded7Smrg 1225191cded7Smrg 1226b290cf36Smrg# _LT_ENABLE_LOCK 1227b290cf36Smrg# --------------- 1228b290cf36Smrgm4_defun([_LT_ENABLE_LOCK], 1229b290cf36Smrg[AC_ARG_ENABLE([libtool-lock], 1230b290cf36Smrg [AS_HELP_STRING([--disable-libtool-lock], 1231b290cf36Smrg [avoid locking (might break parallel builds)])]) 1232b290cf36Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1233b290cf36Smrg 1234b290cf36Smrg# Some flags need to be propagated to the compiler or linker for good 1235b290cf36Smrg# libtool support. 1236b290cf36Smrgcase $host in 1237b290cf36Smrgia64-*-hpux*) 1238b290cf36Smrg # Find out which ABI we are using. 1239b290cf36Smrg echo 'int i;' > conftest.$ac_ext 1240b290cf36Smrg if AC_TRY_EVAL(ac_compile); then 1241b290cf36Smrg case `/usr/bin/file conftest.$ac_objext` in 1242b290cf36Smrg *ELF-32*) 1243b290cf36Smrg HPUX_IA64_MODE="32" 1244b290cf36Smrg ;; 1245b290cf36Smrg *ELF-64*) 1246b290cf36Smrg HPUX_IA64_MODE="64" 1247b290cf36Smrg ;; 1248191cded7Smrg esac 1249b290cf36Smrg fi 1250b290cf36Smrg rm -rf conftest* 1251b290cf36Smrg ;; 1252b290cf36Smrg*-*-irix6*) 1253b290cf36Smrg # Find out which ABI we are using. 1254b290cf36Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 1255b290cf36Smrg if AC_TRY_EVAL(ac_compile); then 1256b290cf36Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 1257b290cf36Smrg case `/usr/bin/file conftest.$ac_objext` in 1258b290cf36Smrg *32-bit*) 1259b290cf36Smrg LD="${LD-ld} -melf32bsmip" 1260b290cf36Smrg ;; 1261b290cf36Smrg *N32*) 1262b290cf36Smrg LD="${LD-ld} -melf32bmipn32" 1263b290cf36Smrg ;; 1264b290cf36Smrg *64-bit*) 1265b290cf36Smrg LD="${LD-ld} -melf64bmip" 1266b290cf36Smrg ;; 1267b290cf36Smrg esac 1268191cded7Smrg else 1269b290cf36Smrg case `/usr/bin/file conftest.$ac_objext` in 1270b290cf36Smrg *32-bit*) 1271b290cf36Smrg LD="${LD-ld} -32" 1272b290cf36Smrg ;; 1273b290cf36Smrg *N32*) 1274b290cf36Smrg LD="${LD-ld} -n32" 1275b290cf36Smrg ;; 1276b290cf36Smrg *64-bit*) 1277b290cf36Smrg LD="${LD-ld} -64" 1278b290cf36Smrg ;; 1279b290cf36Smrg esac 1280191cded7Smrg fi 1281191cded7Smrg fi 1282b290cf36Smrg rm -rf conftest* 1283191cded7Smrg ;; 1284191cded7Smrg 1285b290cf36Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1286b290cf36Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1287b290cf36Smrg # Find out which ABI we are using. 1288b290cf36Smrg echo 'int i;' > conftest.$ac_ext 1289b290cf36Smrg if AC_TRY_EVAL(ac_compile); then 1290b290cf36Smrg case `/usr/bin/file conftest.o` in 1291b290cf36Smrg *32-bit*) 1292b290cf36Smrg case $host in 1293b290cf36Smrg x86_64-*kfreebsd*-gnu) 1294b290cf36Smrg LD="${LD-ld} -m elf_i386_fbsd" 1295b290cf36Smrg ;; 1296b290cf36Smrg x86_64-*linux*) 1297b290cf36Smrg LD="${LD-ld} -m elf_i386" 1298b290cf36Smrg ;; 1299b290cf36Smrg ppc64-*linux*|powerpc64-*linux*) 1300b290cf36Smrg LD="${LD-ld} -m elf32ppclinux" 1301b290cf36Smrg ;; 1302b290cf36Smrg s390x-*linux*) 1303b290cf36Smrg LD="${LD-ld} -m elf_s390" 1304b290cf36Smrg ;; 1305b290cf36Smrg sparc64-*linux*) 1306b290cf36Smrg LD="${LD-ld} -m elf32_sparc" 1307b290cf36Smrg ;; 1308b290cf36Smrg esac 1309b290cf36Smrg ;; 1310b290cf36Smrg *64-bit*) 1311b290cf36Smrg case $host in 1312b290cf36Smrg x86_64-*kfreebsd*-gnu) 1313b290cf36Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1314b290cf36Smrg ;; 1315b290cf36Smrg x86_64-*linux*) 1316b290cf36Smrg LD="${LD-ld} -m elf_x86_64" 1317b290cf36Smrg ;; 1318b290cf36Smrg ppc*-*linux*|powerpc*-*linux*) 1319b290cf36Smrg LD="${LD-ld} -m elf64ppc" 1320b290cf36Smrg ;; 1321b290cf36Smrg s390*-*linux*|s390*-*tpf*) 1322b290cf36Smrg LD="${LD-ld} -m elf64_s390" 1323b290cf36Smrg ;; 1324b290cf36Smrg sparc*-*linux*) 1325b290cf36Smrg LD="${LD-ld} -m elf64_sparc" 1326b290cf36Smrg ;; 1327b290cf36Smrg esac 1328b290cf36Smrg ;; 1329b290cf36Smrg esac 1330b290cf36Smrg fi 1331b290cf36Smrg rm -rf conftest* 1332191cded7Smrg ;; 1333191cded7Smrg 1334b290cf36Smrg*-*-sco3.2v5*) 1335b290cf36Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1336b290cf36Smrg SAVE_CFLAGS="$CFLAGS" 1337b290cf36Smrg CFLAGS="$CFLAGS -belf" 1338b290cf36Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1339b290cf36Smrg [AC_LANG_PUSH(C) 1340b290cf36Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1341b290cf36Smrg AC_LANG_POP]) 1342b290cf36Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1343b290cf36Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1344b290cf36Smrg CFLAGS="$SAVE_CFLAGS" 1345b290cf36Smrg fi 1346191cded7Smrg ;; 1347b290cf36Smrgsparc*-*solaris*) 1348b290cf36Smrg # Find out which ABI we are using. 1349b290cf36Smrg echo 'int i;' > conftest.$ac_ext 1350b290cf36Smrg if AC_TRY_EVAL(ac_compile); then 1351b290cf36Smrg case `/usr/bin/file conftest.o` in 1352b290cf36Smrg *64-bit*) 1353b290cf36Smrg case $lt_cv_prog_gnu_ld in 1354b290cf36Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 1355b290cf36Smrg *) 1356b290cf36Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1357b290cf36Smrg LD="${LD-ld} -64" 1358b290cf36Smrg fi 1359b290cf36Smrg ;; 1360b290cf36Smrg esac 1361b290cf36Smrg ;; 1362b290cf36Smrg esac 1363b290cf36Smrg fi 1364b290cf36Smrg rm -rf conftest* 1365191cded7Smrg ;; 1366b290cf36Smrgesac 1367191cded7Smrg 1368b290cf36Smrgneed_locks="$enable_libtool_lock" 1369b290cf36Smrg])# _LT_ENABLE_LOCK 1370191cded7Smrg 1371191cded7Smrg 1372b290cf36Smrg# _LT_CMD_OLD_ARCHIVE 1373b290cf36Smrg# ------------------- 1374b290cf36Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1375b290cf36Smrg[AC_CHECK_TOOL(AR, ar, false) 1376b290cf36Smrgtest -z "$AR" && AR=ar 1377b290cf36Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 1378b290cf36Smrg_LT_DECL([], [AR], [1], [The archiver]) 1379b290cf36Smrg_LT_DECL([], [AR_FLAGS], [1]) 1380b290cf36Smrg 1381b290cf36SmrgAC_CHECK_TOOL(STRIP, strip, :) 1382b290cf36Smrgtest -z "$STRIP" && STRIP=: 1383b290cf36Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1384191cded7Smrg 1385b290cf36SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1386b290cf36Smrgtest -z "$RANLIB" && RANLIB=: 1387b290cf36Smrg_LT_DECL([], [RANLIB], [1], 1388b290cf36Smrg [Commands used to install an old-style archive]) 1389b290cf36Smrg 1390b290cf36Smrg# Determine commands to create old-style static archives. 1391b290cf36Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1392b290cf36Smrgold_postinstall_cmds='chmod 644 $oldlib' 1393b290cf36Smrgold_postuninstall_cmds= 1394b290cf36Smrg 1395b290cf36Smrgif test -n "$RANLIB"; then 1396b290cf36Smrg case $host_os in 1397b290cf36Smrg openbsd*) 1398b290cf36Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1399b290cf36Smrg ;; 1400191cded7Smrg *) 1401b290cf36Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1402191cded7Smrg ;; 1403191cded7Smrg esac 1404b290cf36Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1405b290cf36Smrgfi 1406b290cf36Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1407b290cf36Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1408b290cf36Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1409b290cf36Smrg [Commands used to build an old-style archive]) 1410b290cf36Smrg])# _LT_CMD_OLD_ARCHIVE 1411191cded7Smrg 1412191cded7Smrg 1413b290cf36Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1414b290cf36Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1415b290cf36Smrg# ---------------------------------------------------------------- 1416b290cf36Smrg# Check whether the given compiler option works 1417b290cf36SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1418b290cf36Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1419b290cf36Smrgm4_require([_LT_DECL_SED])dnl 1420b290cf36SmrgAC_CACHE_CHECK([$1], [$2], 1421b290cf36Smrg [$2=no 1422b290cf36Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1423b290cf36Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1424b290cf36Smrg lt_compiler_flag="$3" 1425b290cf36Smrg # Insert the option either (1) after the last *FLAGS variable, or 1426b290cf36Smrg # (2) before a word containing "conftest.", or (3) at the end. 1427b290cf36Smrg # Note that $ac_compile itself does not contain backslashes and begins 1428b290cf36Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1429b290cf36Smrg # The option is referenced via a variable to avoid confusing sed. 1430b290cf36Smrg lt_compile=`echo "$ac_compile" | $SED \ 1431b290cf36Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1432b290cf36Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1433b290cf36Smrg -e 's:$: $lt_compiler_flag:'` 1434b290cf36Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1435b290cf36Smrg (eval "$lt_compile" 2>conftest.err) 1436b290cf36Smrg ac_status=$? 1437b290cf36Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1438b290cf36Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1439b290cf36Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 1440b290cf36Smrg # The compiler can only warn and ignore the option if not recognized 1441b290cf36Smrg # So say no if there are warnings other than the usual output. 1442b290cf36Smrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 1443b290cf36Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1444b290cf36Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1445b290cf36Smrg $2=yes 1446b290cf36Smrg fi 1447b290cf36Smrg fi 1448b290cf36Smrg $RM conftest* 1449b290cf36Smrg]) 1450191cded7Smrg 1451b290cf36Smrgif test x"[$]$2" = xyes; then 1452b290cf36Smrg m4_if([$5], , :, [$5]) 1453b290cf36Smrgelse 1454b290cf36Smrg m4_if([$6], , :, [$6]) 1455b290cf36Smrgfi 1456b290cf36Smrg])# _LT_COMPILER_OPTION 1457191cded7Smrg 1458b290cf36Smrg# Old name: 1459b290cf36SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1460b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 1461b290cf36Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1462191cded7Smrg 1463b290cf36Smrg 1464b290cf36Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1465b290cf36Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1466b290cf36Smrg# ---------------------------------------------------- 1467b290cf36Smrg# Check whether the given linker option works 1468b290cf36SmrgAC_DEFUN([_LT_LINKER_OPTION], 1469b290cf36Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1470b290cf36Smrgm4_require([_LT_DECL_SED])dnl 1471b290cf36SmrgAC_CACHE_CHECK([$1], [$2], 1472b290cf36Smrg [$2=no 1473b290cf36Smrg save_LDFLAGS="$LDFLAGS" 1474b290cf36Smrg LDFLAGS="$LDFLAGS $3" 1475b290cf36Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1476b290cf36Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1477b290cf36Smrg # The linker can only warn and ignore the option if not recognized 1478b290cf36Smrg # So say no if there are warnings 1479b290cf36Smrg if test -s conftest.err; then 1480b290cf36Smrg # Append any errors to the config.log. 1481b290cf36Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1482b290cf36Smrg $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 1483b290cf36Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1484b290cf36Smrg if diff conftest.exp conftest.er2 >/dev/null; then 1485b290cf36Smrg $2=yes 1486b290cf36Smrg fi 1487b290cf36Smrg else 1488b290cf36Smrg $2=yes 1489b290cf36Smrg fi 1490b290cf36Smrg fi 1491b290cf36Smrg $RM -r conftest* 1492b290cf36Smrg LDFLAGS="$save_LDFLAGS" 1493b290cf36Smrg]) 1494b290cf36Smrg 1495b290cf36Smrgif test x"[$]$2" = xyes; then 1496b290cf36Smrg m4_if([$4], , :, [$4]) 1497b290cf36Smrgelse 1498b290cf36Smrg m4_if([$5], , :, [$5]) 1499b290cf36Smrgfi 1500b290cf36Smrg])# _LT_LINKER_OPTION 1501b290cf36Smrg 1502b290cf36Smrg# Old name: 1503b290cf36SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1504b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 1505b290cf36Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1506b290cf36Smrg 1507b290cf36Smrg 1508b290cf36Smrg# LT_CMD_MAX_LEN 1509b290cf36Smrg#--------------- 1510b290cf36SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1511b290cf36Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1512b290cf36Smrg# find the maximum length of command line arguments 1513b290cf36SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1514b290cf36SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1515b290cf36Smrg i=0 1516b290cf36Smrg teststring="ABCD" 1517b290cf36Smrg 1518b290cf36Smrg case $build_os in 1519b290cf36Smrg msdosdjgpp*) 1520b290cf36Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1521b290cf36Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1522b290cf36Smrg # during glob expansion). Even if it were fixed, the result of this 1523b290cf36Smrg # check would be larger than it should be. 1524b290cf36Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1525191cded7Smrg ;; 1526b290cf36Smrg 1527b290cf36Smrg gnu*) 1528b290cf36Smrg # Under GNU Hurd, this test is not required because there is 1529b290cf36Smrg # no limit to the length of command line arguments. 1530b290cf36Smrg # Libtool will interpret -1 as no limit whatsoever 1531b290cf36Smrg lt_cv_sys_max_cmd_len=-1; 1532191cded7Smrg ;; 1533b290cf36Smrg 1534b290cf36Smrg cygwin* | mingw* | cegcc*) 1535b290cf36Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1536b290cf36Smrg # about 5 minutes as the teststring grows exponentially. 1537b290cf36Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 1538b290cf36Smrg # you end up with a "frozen" computer, even though with patience 1539b290cf36Smrg # the test eventually succeeds (with a max line length of 256k). 1540b290cf36Smrg # Instead, let's just punt: use the minimum linelength reported by 1541b290cf36Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 1542b290cf36Smrg lt_cv_sys_max_cmd_len=8192; 1543191cded7Smrg ;; 1544b290cf36Smrg 1545b290cf36Smrg amigaos*) 1546b290cf36Smrg # On AmigaOS with pdksh, this test takes hours, literally. 1547b290cf36Smrg # So we just punt and use a minimum line length of 8192. 1548b290cf36Smrg lt_cv_sys_max_cmd_len=8192; 1549191cded7Smrg ;; 1550191cded7Smrg 1551b290cf36Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1552b290cf36Smrg # This has been around since 386BSD, at least. Likely further. 1553b290cf36Smrg if test -x /sbin/sysctl; then 1554b290cf36Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1555b290cf36Smrg elif test -x /usr/sbin/sysctl; then 1556b290cf36Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1557b290cf36Smrg else 1558b290cf36Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1559b290cf36Smrg fi 1560b290cf36Smrg # And add a safety zone 1561b290cf36Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1562b290cf36Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1563b290cf36Smrg ;; 1564191cded7Smrg 1565b290cf36Smrg interix*) 1566b290cf36Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1567b290cf36Smrg lt_cv_sys_max_cmd_len=196608 1568b290cf36Smrg ;; 1569b290cf36Smrg 1570b290cf36Smrg osf*) 1571b290cf36Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1572b290cf36Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1573b290cf36Smrg # nice to cause kernel panics so lets avoid the loop below. 1574b290cf36Smrg # First set a reasonable default. 1575b290cf36Smrg lt_cv_sys_max_cmd_len=16384 1576b290cf36Smrg # 1577b290cf36Smrg if test -x /sbin/sysconfig; then 1578b290cf36Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1579b290cf36Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1580b290cf36Smrg esac 1581191cded7Smrg fi 1582191cded7Smrg ;; 1583b290cf36Smrg sco3.2v5*) 1584b290cf36Smrg lt_cv_sys_max_cmd_len=102400 1585191cded7Smrg ;; 1586b290cf36Smrg sysv5* | sco5v6* | sysv4.2uw2*) 1587b290cf36Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1588b290cf36Smrg if test -n "$kargmax"; then 1589b290cf36Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1590b290cf36Smrg else 1591b290cf36Smrg lt_cv_sys_max_cmd_len=32768 1592b290cf36Smrg fi 1593191cded7Smrg ;; 1594191cded7Smrg *) 1595b290cf36Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1596b290cf36Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 1597b290cf36Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1598b290cf36Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1599b290cf36Smrg else 1600b290cf36Smrg # Make teststring a little bigger before we do anything with it. 1601b290cf36Smrg # a 1K string should be a reasonable start. 1602b290cf36Smrg for i in 1 2 3 4 5 6 7 8 ; do 1603b290cf36Smrg teststring=$teststring$teststring 1604b290cf36Smrg done 1605b290cf36Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1606b290cf36Smrg # If test is not a shell built-in, we'll probably end up computing a 1607b290cf36Smrg # maximum length that is only half of the actual maximum length, but 1608b290cf36Smrg # we can't tell. 1609b290cf36Smrg while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ 1610b290cf36Smrg = "XX$teststring$teststring"; } >/dev/null 2>&1 && 1611b290cf36Smrg test $i != 17 # 1/2 MB should be enough 1612b290cf36Smrg do 1613b290cf36Smrg i=`expr $i + 1` 1614b290cf36Smrg teststring=$teststring$teststring 1615b290cf36Smrg done 1616b290cf36Smrg # Only check the string length outside the loop. 1617b290cf36Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1618b290cf36Smrg teststring= 1619b290cf36Smrg # Add a significant safety factor because C++ compilers can tack on 1620b290cf36Smrg # massive amounts of additional arguments before passing them to the 1621b290cf36Smrg # linker. It appears as though 1/2 is a usable value. 1622b290cf36Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1623b290cf36Smrg fi 1624191cded7Smrg ;; 1625191cded7Smrg esac 1626b290cf36Smrg]) 1627b290cf36Smrgif test -n $lt_cv_sys_max_cmd_len ; then 1628b290cf36Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1629b290cf36Smrgelse 1630b290cf36Smrg AC_MSG_RESULT(none) 1631b290cf36Smrgfi 1632b290cf36Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1633b290cf36Smrg_LT_DECL([], [max_cmd_len], [0], 1634b290cf36Smrg [What is the maximum length of a command?]) 1635b290cf36Smrg])# LT_CMD_MAX_LEN 1636191cded7Smrg 1637b290cf36Smrg# Old name: 1638b290cf36SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1639b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 1640b290cf36Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1641191cded7Smrg 1642191cded7Smrg 1643b290cf36Smrg# _LT_HEADER_DLFCN 1644b290cf36Smrg# ---------------- 1645b290cf36Smrgm4_defun([_LT_HEADER_DLFCN], 1646b290cf36Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1647b290cf36Smrg])# _LT_HEADER_DLFCN 1648191cded7Smrg 1649191cded7Smrg 1650b290cf36Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1651b290cf36Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1652b290cf36Smrg# ---------------------------------------------------------------- 1653b290cf36Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1654b290cf36Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1655b290cf36Smrgif test "$cross_compiling" = yes; then : 1656b290cf36Smrg [$4] 1657b290cf36Smrgelse 1658b290cf36Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1659b290cf36Smrg lt_status=$lt_dlunknown 1660b290cf36Smrg cat > conftest.$ac_ext <<_LT_EOF 1661b290cf36Smrg[#line __oline__ "configure" 1662b290cf36Smrg#include "confdefs.h" 1663191cded7Smrg 1664b290cf36Smrg#if HAVE_DLFCN_H 1665b290cf36Smrg#include <dlfcn.h> 1666b290cf36Smrg#endif 1667191cded7Smrg 1668b290cf36Smrg#include <stdio.h> 1669191cded7Smrg 1670b290cf36Smrg#ifdef RTLD_GLOBAL 1671b290cf36Smrg# define LT_DLGLOBAL RTLD_GLOBAL 1672b290cf36Smrg#else 1673b290cf36Smrg# ifdef DL_GLOBAL 1674b290cf36Smrg# define LT_DLGLOBAL DL_GLOBAL 1675b290cf36Smrg# else 1676b290cf36Smrg# define LT_DLGLOBAL 0 1677b290cf36Smrg# endif 1678b290cf36Smrg#endif 1679191cded7Smrg 1680b290cf36Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1681b290cf36Smrg find out it does not work in some platform. */ 1682b290cf36Smrg#ifndef LT_DLLAZY_OR_NOW 1683b290cf36Smrg# ifdef RTLD_LAZY 1684b290cf36Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1685b290cf36Smrg# else 1686b290cf36Smrg# ifdef DL_LAZY 1687b290cf36Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 1688b290cf36Smrg# else 1689b290cf36Smrg# ifdef RTLD_NOW 1690b290cf36Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1691b290cf36Smrg# else 1692b290cf36Smrg# ifdef DL_NOW 1693b290cf36Smrg# define LT_DLLAZY_OR_NOW DL_NOW 1694b290cf36Smrg# else 1695b290cf36Smrg# define LT_DLLAZY_OR_NOW 0 1696b290cf36Smrg# endif 1697b290cf36Smrg# endif 1698b290cf36Smrg# endif 1699b290cf36Smrg# endif 1700b290cf36Smrg#endif 1701191cded7Smrg 1702b290cf36Smrgvoid fnord() { int i=42;} 1703b290cf36Smrgint main () 1704b290cf36Smrg{ 1705b290cf36Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1706b290cf36Smrg int status = $lt_dlunknown; 1707b290cf36Smrg 1708b290cf36Smrg if (self) 1709b290cf36Smrg { 1710b290cf36Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1711b290cf36Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1712b290cf36Smrg /* dlclose (self); */ 1713b290cf36Smrg } 1714191cded7Smrg else 1715b290cf36Smrg puts (dlerror ()); 1716191cded7Smrg 1717b290cf36Smrg return status; 1718b290cf36Smrg}] 1719b290cf36Smrg_LT_EOF 1720b290cf36Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1721b290cf36Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1722b290cf36Smrg lt_status=$? 1723b290cf36Smrg case x$lt_status in 1724b290cf36Smrg x$lt_dlno_uscore) $1 ;; 1725b290cf36Smrg x$lt_dlneed_uscore) $2 ;; 1726b290cf36Smrg x$lt_dlunknown|x*) $3 ;; 1727191cded7Smrg esac 1728b290cf36Smrg else : 1729b290cf36Smrg # compilation failed 1730b290cf36Smrg $3 1731191cded7Smrg fi 1732191cded7Smrgfi 1733b290cf36Smrgrm -fr conftest* 1734b290cf36Smrg])# _LT_TRY_DLOPEN_SELF 1735191cded7Smrg 1736191cded7Smrg 1737b290cf36Smrg# LT_SYS_DLOPEN_SELF 1738b290cf36Smrg# ------------------ 1739b290cf36SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1740b290cf36Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1741b290cf36Smrgif test "x$enable_dlopen" != xyes; then 1742b290cf36Smrg enable_dlopen=unknown 1743b290cf36Smrg enable_dlopen_self=unknown 1744b290cf36Smrg enable_dlopen_self_static=unknown 1745b290cf36Smrgelse 1746b290cf36Smrg lt_cv_dlopen=no 1747b290cf36Smrg lt_cv_dlopen_libs= 1748191cded7Smrg 1749b290cf36Smrg case $host_os in 1750b290cf36Smrg beos*) 1751b290cf36Smrg lt_cv_dlopen="load_add_on" 1752b290cf36Smrg lt_cv_dlopen_libs= 1753b290cf36Smrg lt_cv_dlopen_self=yes 1754b290cf36Smrg ;; 1755191cded7Smrg 1756b290cf36Smrg mingw* | pw32* | cegcc*) 1757b290cf36Smrg lt_cv_dlopen="LoadLibrary" 1758b290cf36Smrg lt_cv_dlopen_libs= 1759b290cf36Smrg ;; 1760191cded7Smrg 1761b290cf36Smrg cygwin*) 1762b290cf36Smrg lt_cv_dlopen="dlopen" 1763b290cf36Smrg lt_cv_dlopen_libs= 1764b290cf36Smrg ;; 1765191cded7Smrg 1766b290cf36Smrg darwin*) 1767b290cf36Smrg # if libdl is installed we need to link against it 1768b290cf36Smrg AC_CHECK_LIB([dl], [dlopen], 1769b290cf36Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1770b290cf36Smrg lt_cv_dlopen="dyld" 1771b290cf36Smrg lt_cv_dlopen_libs= 1772b290cf36Smrg lt_cv_dlopen_self=yes 1773b290cf36Smrg ]) 1774b290cf36Smrg ;; 1775191cded7Smrg 1776b290cf36Smrg *) 1777b290cf36Smrg AC_CHECK_FUNC([shl_load], 1778b290cf36Smrg [lt_cv_dlopen="shl_load"], 1779b290cf36Smrg [AC_CHECK_LIB([dld], [shl_load], 1780b290cf36Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1781b290cf36Smrg [AC_CHECK_FUNC([dlopen], 1782b290cf36Smrg [lt_cv_dlopen="dlopen"], 1783b290cf36Smrg [AC_CHECK_LIB([dl], [dlopen], 1784b290cf36Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1785b290cf36Smrg [AC_CHECK_LIB([svld], [dlopen], 1786b290cf36Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1787b290cf36Smrg [AC_CHECK_LIB([dld], [dld_link], 1788b290cf36Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1789b290cf36Smrg ]) 1790b290cf36Smrg ]) 1791b290cf36Smrg ]) 1792b290cf36Smrg ]) 1793b290cf36Smrg ]) 1794b290cf36Smrg ;; 1795b290cf36Smrg esac 1796191cded7Smrg 1797b290cf36Smrg if test "x$lt_cv_dlopen" != xno; then 1798b290cf36Smrg enable_dlopen=yes 1799b290cf36Smrg else 1800b290cf36Smrg enable_dlopen=no 1801b290cf36Smrg fi 1802191cded7Smrg 1803b290cf36Smrg case $lt_cv_dlopen in 1804b290cf36Smrg dlopen) 1805b290cf36Smrg save_CPPFLAGS="$CPPFLAGS" 1806b290cf36Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1807191cded7Smrg 1808b290cf36Smrg save_LDFLAGS="$LDFLAGS" 1809b290cf36Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1810191cded7Smrg 1811b290cf36Smrg save_LIBS="$LIBS" 1812b290cf36Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 1813191cded7Smrg 1814b290cf36Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 1815b290cf36Smrg lt_cv_dlopen_self, [dnl 1816b290cf36Smrg _LT_TRY_DLOPEN_SELF( 1817b290cf36Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1818b290cf36Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1819b290cf36Smrg ]) 1820191cded7Smrg 1821b290cf36Smrg if test "x$lt_cv_dlopen_self" = xyes; then 1822b290cf36Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1823b290cf36Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1824b290cf36Smrg lt_cv_dlopen_self_static, [dnl 1825b290cf36Smrg _LT_TRY_DLOPEN_SELF( 1826b290cf36Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1827b290cf36Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1828b290cf36Smrg ]) 1829191cded7Smrg fi 1830191cded7Smrg 1831b290cf36Smrg CPPFLAGS="$save_CPPFLAGS" 1832b290cf36Smrg LDFLAGS="$save_LDFLAGS" 1833b290cf36Smrg LIBS="$save_LIBS" 1834b290cf36Smrg ;; 1835b290cf36Smrg esac 1836191cded7Smrg 1837b290cf36Smrg case $lt_cv_dlopen_self in 1838b290cf36Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1839b290cf36Smrg *) enable_dlopen_self=unknown ;; 1840b290cf36Smrg esac 1841191cded7Smrg 1842b290cf36Smrg case $lt_cv_dlopen_self_static in 1843b290cf36Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1844b290cf36Smrg *) enable_dlopen_self_static=unknown ;; 1845b290cf36Smrg esac 1846b290cf36Smrgfi 1847b290cf36Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1848b290cf36Smrg [Whether dlopen is supported]) 1849b290cf36Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1850b290cf36Smrg [Whether dlopen of programs is supported]) 1851b290cf36Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1852b290cf36Smrg [Whether dlopen of statically linked programs is supported]) 1853b290cf36Smrg])# LT_SYS_DLOPEN_SELF 1854191cded7Smrg 1855b290cf36Smrg# Old name: 1856b290cf36SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1857b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 1858b290cf36Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1859191cded7Smrg 1860191cded7Smrg 1861b290cf36Smrg# _LT_COMPILER_C_O([TAGNAME]) 1862191cded7Smrg# --------------------------- 1863b290cf36Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 1864b290cf36Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1865b290cf36Smrgm4_defun([_LT_COMPILER_C_O], 1866b290cf36Smrg[m4_require([_LT_DECL_SED])dnl 1867b290cf36Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1868b290cf36Smrgm4_require([_LT_TAG_COMPILER])dnl 1869b290cf36SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1870b290cf36Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1871b290cf36Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1872b290cf36Smrg $RM -r conftest 2>/dev/null 1873b290cf36Smrg mkdir conftest 1874b290cf36Smrg cd conftest 1875b290cf36Smrg mkdir out 1876b290cf36Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1877191cded7Smrg 1878b290cf36Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1879b290cf36Smrg # Insert the option either (1) after the last *FLAGS variable, or 1880b290cf36Smrg # (2) before a word containing "conftest.", or (3) at the end. 1881b290cf36Smrg # Note that $ac_compile itself does not contain backslashes and begins 1882b290cf36Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1883b290cf36Smrg lt_compile=`echo "$ac_compile" | $SED \ 1884b290cf36Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1885b290cf36Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1886b290cf36Smrg -e 's:$: $lt_compiler_flag:'` 1887b290cf36Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1888b290cf36Smrg (eval "$lt_compile" 2>out/conftest.err) 1889b290cf36Smrg ac_status=$? 1890b290cf36Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 1891b290cf36Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1892b290cf36Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 1893b290cf36Smrg then 1894b290cf36Smrg # The compiler can only warn and ignore the option if not recognized 1895b290cf36Smrg # So say no if there are warnings 1896b290cf36Smrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 1897b290cf36Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1898b290cf36Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1899b290cf36Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1900b290cf36Smrg fi 1901b290cf36Smrg fi 1902b290cf36Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1903b290cf36Smrg $RM conftest* 1904b290cf36Smrg # SGI C++ compiler will create directory out/ii_files/ for 1905b290cf36Smrg # template instantiation 1906b290cf36Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 1907b290cf36Smrg $RM out/* && rmdir out 1908b290cf36Smrg cd .. 1909b290cf36Smrg $RM -r conftest 1910b290cf36Smrg $RM conftest* 1911b290cf36Smrg]) 1912b290cf36Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 1913b290cf36Smrg [Does compiler simultaneously support -c and -o options?]) 1914b290cf36Smrg])# _LT_COMPILER_C_O 1915191cded7Smrg 1916191cded7Smrg 1917b290cf36Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 1918b290cf36Smrg# ---------------------------------- 1919b290cf36Smrg# Check to see if we can do hard links to lock some files if needed 1920b290cf36Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 1921b290cf36Smrg[m4_require([_LT_ENABLE_LOCK])dnl 1922b290cf36Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1923b290cf36Smrg_LT_COMPILER_C_O([$1]) 1924191cded7Smrg 1925b290cf36Smrghard_links="nottested" 1926b290cf36Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1927b290cf36Smrg # do not overwrite the value of need_locks provided by the user 1928b290cf36Smrg AC_MSG_CHECKING([if we can lock with hard links]) 1929b290cf36Smrg hard_links=yes 1930b290cf36Smrg $RM conftest* 1931b290cf36Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1932b290cf36Smrg touch conftest.a 1933b290cf36Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 1934b290cf36Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1935b290cf36Smrg AC_MSG_RESULT([$hard_links]) 1936b290cf36Smrg if test "$hard_links" = no; then 1937b290cf36Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1938b290cf36Smrg need_locks=warn 1939b290cf36Smrg fi 1940b290cf36Smrgelse 1941b290cf36Smrg need_locks=no 1942b290cf36Smrgfi 1943b290cf36Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 1944b290cf36Smrg])# _LT_COMPILER_FILE_LOCKS 1945191cded7Smrg 1946191cded7Smrg 1947b290cf36Smrg# _LT_CHECK_OBJDIR 1948b290cf36Smrg# ---------------- 1949b290cf36Smrgm4_defun([_LT_CHECK_OBJDIR], 1950b290cf36Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1951b290cf36Smrg[rm -f .libs 2>/dev/null 1952b290cf36Smrgmkdir .libs 2>/dev/null 1953b290cf36Smrgif test -d .libs; then 1954b290cf36Smrg lt_cv_objdir=.libs 1955b290cf36Smrgelse 1956b290cf36Smrg # MS-DOS does not allow filenames that begin with a dot. 1957b290cf36Smrg lt_cv_objdir=_libs 1958b290cf36Smrgfi 1959b290cf36Smrgrmdir .libs 2>/dev/null]) 1960b290cf36Smrgobjdir=$lt_cv_objdir 1961b290cf36Smrg_LT_DECL([], [objdir], [0], 1962b290cf36Smrg [The name of the directory that contains temporary libtool files])dnl 1963b290cf36Smrgm4_pattern_allow([LT_OBJDIR])dnl 1964b290cf36SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 1965b290cf36Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 1966b290cf36Smrg])# _LT_CHECK_OBJDIR 1967191cded7Smrg 1968191cded7Smrg 1969b290cf36Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 1970b290cf36Smrg# -------------------------------------- 1971b290cf36Smrg# Check hardcoding attributes. 1972b290cf36Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 1973b290cf36Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1974b290cf36Smrg_LT_TAGVAR(hardcode_action, $1)= 1975b290cf36Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 1976b290cf36Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 1977b290cf36Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1978191cded7Smrg 1979b290cf36Smrg # We can hardcode non-existent directories. 1980b290cf36Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 1981b290cf36Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 1982b290cf36Smrg # have to relink, otherwise we might link with an installed library 1983b290cf36Smrg # when we should be linking with a yet-to-be-installed one 1984b290cf36Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1985b290cf36Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 1986b290cf36Smrg # Linking always hardcodes the temporary library directory. 1987b290cf36Smrg _LT_TAGVAR(hardcode_action, $1)=relink 1988b290cf36Smrg else 1989b290cf36Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1990b290cf36Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 1991b290cf36Smrg fi 1992b290cf36Smrgelse 1993b290cf36Smrg # We cannot hardcode anything, or else we can only hardcode existing 1994b290cf36Smrg # directories. 1995b290cf36Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 1996b290cf36Smrgfi 1997b290cf36SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 1998191cded7Smrg 1999b290cf36Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2000b290cf36Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2001b290cf36Smrg # Fast installation is not supported 2002b290cf36Smrg enable_fast_install=no 2003b290cf36Smrgelif test "$shlibpath_overrides_runpath" = yes || 2004b290cf36Smrg test "$enable_shared" = no; then 2005b290cf36Smrg # Fast installation is not necessary 2006b290cf36Smrg enable_fast_install=needless 2007b290cf36Smrgfi 2008b290cf36Smrg_LT_TAGDECL([], [hardcode_action], [0], 2009b290cf36Smrg [How to hardcode a shared library path into an executable]) 2010b290cf36Smrg])# _LT_LINKER_HARDCODE_LIBPATH 2011191cded7Smrg 2012191cded7Smrg 2013b290cf36Smrg# _LT_CMD_STRIPLIB 2014b290cf36Smrg# ---------------- 2015b290cf36Smrgm4_defun([_LT_CMD_STRIPLIB], 2016b290cf36Smrg[m4_require([_LT_DECL_EGREP]) 2017b290cf36Smrgstriplib= 2018b290cf36Smrgold_striplib= 2019b290cf36SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2020b290cf36Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2021b290cf36Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2022b290cf36Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2023b290cf36Smrg AC_MSG_RESULT([yes]) 2024b290cf36Smrgelse 2025b290cf36Smrg# FIXME - insert some real tests, host_os isn't really good enough 2026b290cf36Smrg case $host_os in 2027b290cf36Smrg darwin*) 2028b290cf36Smrg if test -n "$STRIP" ; then 2029b290cf36Smrg striplib="$STRIP -x" 2030b290cf36Smrg old_striplib="$STRIP -S" 2031b290cf36Smrg AC_MSG_RESULT([yes]) 2032b290cf36Smrg else 2033b290cf36Smrg AC_MSG_RESULT([no]) 2034b290cf36Smrg fi 2035b290cf36Smrg ;; 2036b290cf36Smrg *) 2037b290cf36Smrg AC_MSG_RESULT([no]) 2038b290cf36Smrg ;; 2039b290cf36Smrg esac 2040b290cf36Smrgfi 2041b290cf36Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2042b290cf36Smrg_LT_DECL([], [striplib], [1]) 2043b290cf36Smrg])# _LT_CMD_STRIPLIB 2044191cded7Smrg 2045191cded7Smrg 2046b290cf36Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2047b290cf36Smrg# ----------------------------- 2048b290cf36Smrg# PORTME Fill in your ld.so characteristics 2049b290cf36Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2050b290cf36Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2051b290cf36Smrgm4_require([_LT_DECL_EGREP])dnl 2052b290cf36Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2053b290cf36Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2054b290cf36Smrgm4_require([_LT_DECL_SED])dnl 2055b290cf36SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2056b290cf36Smrgm4_if([$1], 2057b290cf36Smrg [], [ 2058b290cf36Smrgif test "$GCC" = yes; then 2059b290cf36Smrg case $host_os in 2060b290cf36Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2061b290cf36Smrg *) lt_awk_arg="/^libraries:/" ;; 2062b290cf36Smrg esac 2063b290cf36Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2064b290cf36Smrg if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then 2065b290cf36Smrg # if the path contains ";" then we assume it to be the separator 2066b290cf36Smrg # otherwise default to the standard path separator (i.e. ":") - it is 2067b290cf36Smrg # assumed that no part of a normal pathname contains ";" but that should 2068b290cf36Smrg # okay in the real world where ";" in dirpaths is itself problematic. 2069b290cf36Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` 2070b290cf36Smrg else 2071b290cf36Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2072b290cf36Smrg fi 2073b290cf36Smrg # Ok, now we have the path, separated by spaces, we can step through it 2074b290cf36Smrg # and add multilib dir if necessary. 2075b290cf36Smrg lt_tmp_lt_search_path_spec= 2076b290cf36Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2077b290cf36Smrg for lt_sys_path in $lt_search_path_spec; do 2078b290cf36Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2079b290cf36Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2080b290cf36Smrg else 2081b290cf36Smrg test -d "$lt_sys_path" && \ 2082b290cf36Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2083191cded7Smrg fi 2084191cded7Smrg done 2085b290cf36Smrg lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' 2086b290cf36SmrgBEGIN {RS=" "; FS="/|\n";} { 2087b290cf36Smrg lt_foo=""; 2088b290cf36Smrg lt_count=0; 2089b290cf36Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 2090b290cf36Smrg if ($lt_i != "" && $lt_i != ".") { 2091b290cf36Smrg if ($lt_i == "..") { 2092b290cf36Smrg lt_count++; 2093b290cf36Smrg } else { 2094b290cf36Smrg if (lt_count == 0) { 2095b290cf36Smrg lt_foo="/" $lt_i lt_foo; 2096b290cf36Smrg } else { 2097b290cf36Smrg lt_count--; 2098b290cf36Smrg } 2099b290cf36Smrg } 2100b290cf36Smrg } 2101b290cf36Smrg } 2102b290cf36Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2103b290cf36Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2104b290cf36Smrg}'` 2105b290cf36Smrg sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 2106191cded7Smrgelse 2107b290cf36Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2108b290cf36Smrgfi]) 2109b290cf36Smrglibrary_names_spec= 2110b290cf36Smrglibname_spec='lib$name' 2111b290cf36Smrgsoname_spec= 2112b290cf36Smrgshrext_cmds=".so" 2113b290cf36Smrgpostinstall_cmds= 2114b290cf36Smrgpostuninstall_cmds= 2115b290cf36Smrgfinish_cmds= 2116b290cf36Smrgfinish_eval= 2117b290cf36Smrgshlibpath_var= 2118b290cf36Smrgshlibpath_overrides_runpath=unknown 2119b290cf36Smrgversion_type=none 2120b290cf36Smrgdynamic_linker="$host_os ld.so" 2121b290cf36Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2122b290cf36Smrgneed_lib_prefix=unknown 2123b290cf36Smrghardcode_into_libs=no 2124191cded7Smrg 2125b290cf36Smrg# when you set need_version to no, make sure it does not cause -set_version 2126b290cf36Smrg# flags to be left without arguments 2127b290cf36Smrgneed_version=unknown 2128191cded7Smrg 2129b290cf36Smrgcase $host_os in 2130b290cf36Smrgaix3*) 2131b290cf36Smrg version_type=linux 2132b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2133b290cf36Smrg shlibpath_var=LIBPATH 2134191cded7Smrg 2135b290cf36Smrg # AIX 3 has no versioning support, so we append a major version to the name. 2136b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2137b290cf36Smrg ;; 2138191cded7Smrg 2139b290cf36Smrgaix[[4-9]]*) 2140b290cf36Smrg version_type=linux 2141b290cf36Smrg need_lib_prefix=no 2142b290cf36Smrg need_version=no 2143b290cf36Smrg hardcode_into_libs=yes 2144b290cf36Smrg if test "$host_cpu" = ia64; then 2145b290cf36Smrg # AIX 5 supports IA64 2146b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2147b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2148b290cf36Smrg else 2149b290cf36Smrg # With GCC up to 2.95.x, collect2 would create an import file 2150b290cf36Smrg # for dependence libraries. The import file would start with 2151b290cf36Smrg # the line `#! .'. This would cause the generated library to 2152b290cf36Smrg # depend on `.', always an invalid library. This was fixed in 2153b290cf36Smrg # development snapshots of GCC prior to 3.0. 2154b290cf36Smrg case $host_os in 2155b290cf36Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2156b290cf36Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2157b290cf36Smrg echo ' yes ' 2158b290cf36Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2159b290cf36Smrg : 2160b290cf36Smrg else 2161b290cf36Smrg can_build_shared=no 2162b290cf36Smrg fi 2163191cded7Smrg ;; 2164b290cf36Smrg esac 2165b290cf36Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2166b290cf36Smrg # soname into executable. Probably we can add versioning support to 2167b290cf36Smrg # collect2, so additional links can be useful in future. 2168b290cf36Smrg if test "$aix_use_runtimelinking" = yes; then 2169b290cf36Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2170b290cf36Smrg # instead of lib<name>.a to let people know that these are not 2171b290cf36Smrg # typical AIX shared libraries. 2172b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2173b290cf36Smrg else 2174b290cf36Smrg # We preserve .a as extension for shared libraries through AIX4.2 2175b290cf36Smrg # and later when we are not doing run time linking. 2176b290cf36Smrg library_names_spec='${libname}${release}.a $libname.a' 2177b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2178191cded7Smrg fi 2179b290cf36Smrg shlibpath_var=LIBPATH 2180b290cf36Smrg fi 2181191cded7Smrg ;; 2182191cded7Smrg 2183b290cf36Smrgamigaos*) 2184b290cf36Smrg case $host_cpu in 2185b290cf36Smrg powerpc) 2186b290cf36Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2187b290cf36Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2188b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2189191cded7Smrg ;; 2190b290cf36Smrg m68k) 2191b290cf36Smrg library_names_spec='$libname.ixlibrary $libname.a' 2192b290cf36Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2193b290cf36Smrg 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' 2194b290cf36Smrg ;; 2195b290cf36Smrg esac 2196191cded7Smrg ;; 2197191cded7Smrg 2198191cded7Smrgbeos*) 2199b290cf36Smrg library_names_spec='${libname}${shared_ext}' 2200b290cf36Smrg dynamic_linker="$host_os ld.so" 2201b290cf36Smrg shlibpath_var=LIBRARY_PATH 2202191cded7Smrg ;; 2203191cded7Smrg 2204191cded7Smrgbsdi[[45]]*) 2205b290cf36Smrg version_type=linux 2206b290cf36Smrg need_version=no 2207b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2208b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2209b290cf36Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2210b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2211b290cf36Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2212b290cf36Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2213b290cf36Smrg # the default ld.so.conf also contains /usr/contrib/lib and 2214b290cf36Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2215b290cf36Smrg # libtool to hard-code these into programs 2216191cded7Smrg ;; 2217191cded7Smrg 2218b290cf36Smrgcygwin* | mingw* | pw32* | cegcc*) 2219b290cf36Smrg version_type=windows 2220b290cf36Smrg shrext_cmds=".dll" 2221b290cf36Smrg need_version=no 2222b290cf36Smrg need_lib_prefix=no 2223191cded7Smrg 2224b290cf36Smrg case $GCC,$host_os in 2225b290cf36Smrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 2226b290cf36Smrg library_names_spec='$libname.dll.a' 2227b290cf36Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2228b290cf36Smrg postinstall_cmds='base_file=`basename \${file}`~ 2229b290cf36Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2230b290cf36Smrg dldir=$destdir/`dirname \$dlpath`~ 2231b290cf36Smrg test -d \$dldir || mkdir -p \$dldir~ 2232b290cf36Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2233b290cf36Smrg chmod a+x \$dldir/$dlname~ 2234b290cf36Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2235b290cf36Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2236b290cf36Smrg fi' 2237b290cf36Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2238b290cf36Smrg dlpath=$dir/\$dldll~ 2239b290cf36Smrg $RM \$dlpath' 2240b290cf36Smrg shlibpath_overrides_runpath=yes 2241191cded7Smrg 2242b290cf36Smrg case $host_os in 2243b290cf36Smrg cygwin*) 2244b290cf36Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2245b290cf36Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2246b290cf36Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 2247b290cf36Smrg ;; 2248b290cf36Smrg mingw* | cegcc*) 2249b290cf36Smrg # MinGW DLLs use traditional 'lib' prefix 2250b290cf36Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2251b290cf36Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2252b290cf36Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2253b290cf36Smrg # It is most probably a Windows format PATH printed by 2254b290cf36Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 2255b290cf36Smrg # path with ; separators, and with drive letters. We can handle the 2256b290cf36Smrg # drive letters (cygwin fileutils understands them), so leave them, 2257b290cf36Smrg # especially as we might pass files found there to a mingw objdump, 2258b290cf36Smrg # which wouldn't understand a cygwinified path. Ahh. 2259b290cf36Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2260b290cf36Smrg else 2261b290cf36Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2262b290cf36Smrg fi 2263b290cf36Smrg ;; 2264b290cf36Smrg pw32*) 2265b290cf36Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2266b290cf36Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2267191cded7Smrg ;; 2268191cded7Smrg esac 2269b290cf36Smrg ;; 2270191cded7Smrg 2271b290cf36Smrg *) 2272b290cf36Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2273b290cf36Smrg ;; 2274b290cf36Smrg esac 2275b290cf36Smrg dynamic_linker='Win32 ld.exe' 2276b290cf36Smrg # FIXME: first we should search . and the directory the executable is in 2277b290cf36Smrg shlibpath_var=PATH 2278191cded7Smrg ;; 2279191cded7Smrg 2280b290cf36Smrgdarwin* | rhapsody*) 2281b290cf36Smrg dynamic_linker="$host_os dyld" 2282b290cf36Smrg version_type=darwin 2283b290cf36Smrg need_lib_prefix=no 2284b290cf36Smrg need_version=no 2285b290cf36Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2286b290cf36Smrg soname_spec='${libname}${release}${major}$shared_ext' 2287b290cf36Smrg shlibpath_overrides_runpath=yes 2288b290cf36Smrg shlibpath_var=DYLD_LIBRARY_PATH 2289b290cf36Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2290b290cf36Smrgm4_if([$1], [],[ 2291b290cf36Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2292b290cf36Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2293b290cf36Smrg ;; 2294b290cf36Smrg 2295b290cf36Smrgdgux*) 2296b290cf36Smrg version_type=linux 2297b290cf36Smrg need_lib_prefix=no 2298b290cf36Smrg need_version=no 2299b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2300b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2301b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2302b290cf36Smrg ;; 2303b290cf36Smrg 2304b290cf36Smrgfreebsd1*) 2305b290cf36Smrg dynamic_linker=no 2306b290cf36Smrg ;; 2307b290cf36Smrg 2308b290cf36Smrgfreebsd* | dragonfly*) 2309b290cf36Smrg # DragonFly does not have aout. When/if they implement a new 2310b290cf36Smrg # versioning mechanism, adjust this. 2311b290cf36Smrg if test -x /usr/bin/objformat; then 2312b290cf36Smrg objformat=`/usr/bin/objformat` 2313b290cf36Smrg else 2314b290cf36Smrg case $host_os in 2315b290cf36Smrg freebsd[[123]]*) objformat=aout ;; 2316b290cf36Smrg *) objformat=elf ;; 2317b290cf36Smrg esac 2318b290cf36Smrg fi 2319b290cf36Smrg version_type=freebsd-$objformat 2320b290cf36Smrg case $version_type in 2321b290cf36Smrg freebsd-elf*) 2322b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2323b290cf36Smrg need_version=no 2324b290cf36Smrg need_lib_prefix=no 2325b290cf36Smrg ;; 2326b290cf36Smrg freebsd-*) 2327b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2328b290cf36Smrg need_version=yes 2329b290cf36Smrg ;; 2330b290cf36Smrg esac 2331b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2332b290cf36Smrg case $host_os in 2333b290cf36Smrg freebsd2*) 2334b290cf36Smrg shlibpath_overrides_runpath=yes 2335b290cf36Smrg ;; 2336b290cf36Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2337b290cf36Smrg shlibpath_overrides_runpath=yes 2338b290cf36Smrg hardcode_into_libs=yes 2339b290cf36Smrg ;; 2340b290cf36Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2341b290cf36Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2342b290cf36Smrg shlibpath_overrides_runpath=no 2343b290cf36Smrg hardcode_into_libs=yes 2344b290cf36Smrg ;; 2345b290cf36Smrg *) # from 4.6 on, and DragonFly 2346b290cf36Smrg shlibpath_overrides_runpath=yes 2347b290cf36Smrg hardcode_into_libs=yes 2348b290cf36Smrg ;; 2349b290cf36Smrg esac 2350b290cf36Smrg ;; 2351b290cf36Smrg 2352b290cf36Smrggnu*) 2353b290cf36Smrg version_type=linux 2354b290cf36Smrg need_lib_prefix=no 2355b290cf36Smrg need_version=no 2356b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2357b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2358b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2359b290cf36Smrg hardcode_into_libs=yes 2360b290cf36Smrg ;; 2361b290cf36Smrg 2362b290cf36Smrghpux9* | hpux10* | hpux11*) 2363b290cf36Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 2364b290cf36Smrg # link against other versions. 2365b290cf36Smrg version_type=sunos 2366b290cf36Smrg need_lib_prefix=no 2367b290cf36Smrg need_version=no 2368191cded7Smrg case $host_cpu in 2369191cded7Smrg ia64*) 2370b290cf36Smrg shrext_cmds='.so' 2371b290cf36Smrg hardcode_into_libs=yes 2372b290cf36Smrg dynamic_linker="$host_os dld.so" 2373b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2374b290cf36Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2375b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2376b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2377b290cf36Smrg if test "X$HPUX_IA64_MODE" = X32; then 2378b290cf36Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2379b290cf36Smrg else 2380b290cf36Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2381b290cf36Smrg fi 2382b290cf36Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2383191cded7Smrg ;; 2384191cded7Smrg hppa*64*) 2385b290cf36Smrg shrext_cmds='.sl' 2386b290cf36Smrg hardcode_into_libs=yes 2387b290cf36Smrg dynamic_linker="$host_os dld.sl" 2388b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2389b290cf36Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2390b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2391b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2392b290cf36Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2393b290cf36Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2394191cded7Smrg ;; 2395191cded7Smrg *) 2396b290cf36Smrg shrext_cmds='.sl' 2397b290cf36Smrg dynamic_linker="$host_os dld.sl" 2398b290cf36Smrg shlibpath_var=SHLIB_PATH 2399b290cf36Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2400b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2401b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2402191cded7Smrg ;; 2403191cded7Smrg esac 2404b290cf36Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 2405b290cf36Smrg postinstall_cmds='chmod 555 $lib' 2406191cded7Smrg ;; 2407191cded7Smrg 2408b290cf36Smrginterix[[3-9]]*) 2409b290cf36Smrg version_type=linux 2410b290cf36Smrg need_lib_prefix=no 2411b290cf36Smrg need_version=no 2412b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2413b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2414b290cf36Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2415b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2416b290cf36Smrg shlibpath_overrides_runpath=no 2417b290cf36Smrg hardcode_into_libs=yes 2418191cded7Smrg ;; 2419191cded7Smrg 2420191cded7Smrgirix5* | irix6* | nonstopux*) 2421b290cf36Smrg case $host_os in 2422b290cf36Smrg nonstopux*) version_type=nonstopux ;; 2423b290cf36Smrg *) 2424b290cf36Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 2425b290cf36Smrg version_type=linux 2426b290cf36Smrg else 2427b290cf36Smrg version_type=irix 2428b290cf36Smrg fi ;; 2429191cded7Smrg esac 2430b290cf36Smrg need_lib_prefix=no 2431b290cf36Smrg need_version=no 2432b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2433b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2434b290cf36Smrg case $host_os in 2435b290cf36Smrg irix5* | nonstopux*) 2436b290cf36Smrg libsuff= shlibsuff= 2437b290cf36Smrg ;; 2438b290cf36Smrg *) 2439b290cf36Smrg case $LD in # libtool.m4 will add one of these switches to LD 2440b290cf36Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2441b290cf36Smrg libsuff= shlibsuff= libmagic=32-bit;; 2442b290cf36Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2443b290cf36Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2444b290cf36Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2445b290cf36Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2446b290cf36Smrg *) libsuff= shlibsuff= libmagic=never-match;; 2447b290cf36Smrg esac 2448b290cf36Smrg ;; 2449b290cf36Smrg esac 2450b290cf36Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2451b290cf36Smrg shlibpath_overrides_runpath=no 2452b290cf36Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2453b290cf36Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2454b290cf36Smrg hardcode_into_libs=yes 2455b290cf36Smrg ;; 2456b290cf36Smrg 2457b290cf36Smrg# No shared lib support for Linux oldld, aout, or coff. 2458b290cf36Smrglinux*oldld* | linux*aout* | linux*coff*) 2459b290cf36Smrg dynamic_linker=no 2460191cded7Smrg ;; 2461191cded7Smrg 2462191cded7Smrg# This must be Linux ELF. 2463b290cf36Smrglinux* | k*bsd*-gnu) 2464b290cf36Smrg version_type=linux 2465b290cf36Smrg need_lib_prefix=no 2466b290cf36Smrg need_version=no 2467b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2468b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2469b290cf36Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2470b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2471b290cf36Smrg shlibpath_overrides_runpath=no 2472b290cf36Smrg # Some binutils ld are patched to set DT_RUNPATH 2473b290cf36Smrg save_LDFLAGS=$LDFLAGS 2474b290cf36Smrg save_libdir=$libdir 2475b290cf36Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2476b290cf36Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2477b290cf36Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2478b290cf36Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2479b290cf36Smrg [shlibpath_overrides_runpath=yes])]) 2480b290cf36Smrg LDFLAGS=$save_LDFLAGS 2481b290cf36Smrg libdir=$save_libdir 2482b290cf36Smrg 2483b290cf36Smrg # This implies no fast_install, which is unacceptable. 2484b290cf36Smrg # Some rework will be needed to allow for fast_install 2485b290cf36Smrg # before this can be enabled. 2486b290cf36Smrg hardcode_into_libs=yes 2487b290cf36Smrg 2488b290cf36Smrg # Add ABI-specific directories to the system library path. 2489b290cf36Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2490b290cf36Smrg 2491b290cf36Smrg # Append ld.so.conf contents to the search path 2492b290cf36Smrg if test -f /etc/ld.so.conf; then 2493b290cf36Smrg 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' ' '` 2494b290cf36Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2495b290cf36Smrg fi 2496b290cf36Smrg 2497b290cf36Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2498b290cf36Smrg # powerpc, because MkLinux only supported shared libraries with the 2499b290cf36Smrg # GNU dynamic linker. Since this was broken with cross compilers, 2500b290cf36Smrg # most powerpc-linux boxes support dynamic linking these days and 2501b290cf36Smrg # people can always --disable-shared, the test was removed, and we 2502b290cf36Smrg # assume the GNU/Linux dynamic linker is in use. 2503b290cf36Smrg dynamic_linker='GNU/Linux ld.so' 2504191cded7Smrg ;; 2505191cded7Smrg 2506191cded7Smrgnetbsd*) 2507b290cf36Smrg version_type=sunos 2508b290cf36Smrg need_lib_prefix=no 2509b290cf36Smrg need_version=no 2510b290cf36Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2511b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2512b290cf36Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2513b290cf36Smrg dynamic_linker='NetBSD (a.out) ld.so' 2514191cded7Smrg else 2515b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2516b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2517b290cf36Smrg dynamic_linker='NetBSD ld.elf_so' 2518191cded7Smrg fi 2519b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2520b290cf36Smrg shlibpath_overrides_runpath=yes 2521b290cf36Smrg hardcode_into_libs=yes 2522191cded7Smrg ;; 2523191cded7Smrg 2524b290cf36Smrgnewsos6) 2525b290cf36Smrg version_type=linux 2526b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2527b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2528b290cf36Smrg shlibpath_overrides_runpath=yes 2529191cded7Smrg ;; 2530191cded7Smrg 2531b290cf36Smrg*nto* | *qnx*) 2532b290cf36Smrg version_type=qnx 2533b290cf36Smrg need_lib_prefix=no 2534b290cf36Smrg need_version=no 2535b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2536b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2537b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2538b290cf36Smrg shlibpath_overrides_runpath=no 2539b290cf36Smrg hardcode_into_libs=yes 2540b290cf36Smrg dynamic_linker='ldqnx.so' 2541191cded7Smrg ;; 2542191cded7Smrg 2543191cded7Smrgopenbsd*) 2544b290cf36Smrg version_type=sunos 2545b290cf36Smrg sys_lib_dlsearch_path_spec="/usr/lib" 2546b290cf36Smrg need_lib_prefix=no 2547b290cf36Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2548b290cf36Smrg case $host_os in 2549b290cf36Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2550b290cf36Smrg *) need_version=no ;; 2551b290cf36Smrg esac 2552b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2553b290cf36Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2554b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2555b290cf36Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2556b290cf36Smrg case $host_os in 2557b290cf36Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 2558b290cf36Smrg shlibpath_overrides_runpath=no 2559b290cf36Smrg ;; 2560b290cf36Smrg *) 2561b290cf36Smrg shlibpath_overrides_runpath=yes 2562b290cf36Smrg ;; 2563b290cf36Smrg esac 2564191cded7Smrg else 2565b290cf36Smrg shlibpath_overrides_runpath=yes 2566191cded7Smrg fi 2567191cded7Smrg ;; 2568191cded7Smrg 2569b290cf36Smrgos2*) 2570b290cf36Smrg libname_spec='$name' 2571b290cf36Smrg shrext_cmds=".dll" 2572b290cf36Smrg need_lib_prefix=no 2573b290cf36Smrg library_names_spec='$libname${shared_ext} $libname.a' 2574b290cf36Smrg dynamic_linker='OS/2 ld.exe' 2575b290cf36Smrg shlibpath_var=LIBPATH 2576191cded7Smrg ;; 2577191cded7Smrg 2578b290cf36Smrgosf3* | osf4* | osf5*) 2579b290cf36Smrg version_type=osf 2580b290cf36Smrg need_lib_prefix=no 2581b290cf36Smrg need_version=no 2582b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2583b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2584b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2585b290cf36Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2586b290cf36Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2587191cded7Smrg ;; 2588191cded7Smrg 2589b290cf36Smrgrdos*) 2590b290cf36Smrg dynamic_linker=no 2591191cded7Smrg ;; 2592191cded7Smrg 2593b290cf36Smrgsolaris*) 2594b290cf36Smrg version_type=linux 2595b290cf36Smrg need_lib_prefix=no 2596b290cf36Smrg need_version=no 2597b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2598b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2599b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2600b290cf36Smrg shlibpath_overrides_runpath=yes 2601b290cf36Smrg hardcode_into_libs=yes 2602b290cf36Smrg # ldd complains unless libraries are executable 2603b290cf36Smrg postinstall_cmds='chmod +x $lib' 2604b290cf36Smrg ;; 2605191cded7Smrg 2606b290cf36Smrgsunos4*) 2607b290cf36Smrg version_type=sunos 2608b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2609b290cf36Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2610b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2611b290cf36Smrg shlibpath_overrides_runpath=yes 2612b290cf36Smrg if test "$with_gnu_ld" = yes; then 2613b290cf36Smrg need_lib_prefix=no 2614191cded7Smrg fi 2615b290cf36Smrg need_version=yes 2616191cded7Smrg ;; 2617191cded7Smrg 2618b290cf36Smrgsysv4 | sysv4.3*) 2619b290cf36Smrg version_type=linux 2620b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2621b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2622b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2623b290cf36Smrg case $host_vendor in 2624b290cf36Smrg sni) 2625b290cf36Smrg shlibpath_overrides_runpath=no 2626b290cf36Smrg need_lib_prefix=no 2627b290cf36Smrg runpath_var=LD_RUN_PATH 2628b290cf36Smrg ;; 2629b290cf36Smrg siemens) 2630b290cf36Smrg need_lib_prefix=no 2631b290cf36Smrg ;; 2632b290cf36Smrg motorola) 2633b290cf36Smrg need_lib_prefix=no 2634b290cf36Smrg need_version=no 2635b290cf36Smrg shlibpath_overrides_runpath=no 2636b290cf36Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2637b290cf36Smrg ;; 2638191cded7Smrg esac 2639b290cf36Smrg ;; 2640191cded7Smrg 2641b290cf36Smrgsysv4*MP*) 2642b290cf36Smrg if test -d /usr/nec ;then 2643b290cf36Smrg version_type=linux 2644b290cf36Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2645b290cf36Smrg soname_spec='$libname${shared_ext}.$major' 2646b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2647b290cf36Smrg fi 2648b290cf36Smrg ;; 2649191cded7Smrg 2650b290cf36Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2651b290cf36Smrg version_type=freebsd-elf 2652b290cf36Smrg need_lib_prefix=no 2653b290cf36Smrg need_version=no 2654b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2655b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2656b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2657b290cf36Smrg shlibpath_overrides_runpath=yes 2658b290cf36Smrg hardcode_into_libs=yes 2659b290cf36Smrg if test "$with_gnu_ld" = yes; then 2660b290cf36Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2661191cded7Smrg else 2662b290cf36Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2663b290cf36Smrg case $host_os in 2664b290cf36Smrg sco3.2v5*) 2665b290cf36Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2666b290cf36Smrg ;; 2667b290cf36Smrg esac 2668191cded7Smrg fi 2669b290cf36Smrg sys_lib_dlsearch_path_spec='/usr/lib' 2670b290cf36Smrg ;; 2671191cded7Smrg 2672b290cf36Smrgtpf*) 2673b290cf36Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2674b290cf36Smrg version_type=linux 2675b290cf36Smrg need_lib_prefix=no 2676b290cf36Smrg need_version=no 2677b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2678b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2679b290cf36Smrg shlibpath_overrides_runpath=no 2680b290cf36Smrg hardcode_into_libs=yes 2681b290cf36Smrg ;; 2682191cded7Smrg 2683b290cf36Smrguts4*) 2684b290cf36Smrg version_type=linux 2685b290cf36Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2686b290cf36Smrg soname_spec='${libname}${release}${shared_ext}$major' 2687b290cf36Smrg shlibpath_var=LD_LIBRARY_PATH 2688b290cf36Smrg ;; 2689191cded7Smrg 2690b290cf36Smrg*) 2691b290cf36Smrg dynamic_linker=no 2692b290cf36Smrg ;; 2693b290cf36Smrgesac 2694b290cf36SmrgAC_MSG_RESULT([$dynamic_linker]) 2695b290cf36Smrgtest "$dynamic_linker" = no && can_build_shared=no 2696191cded7Smrg 2697b290cf36Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2698b290cf36Smrgif test "$GCC" = yes; then 2699b290cf36Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2700191cded7Smrgfi 2701191cded7Smrg 2702b290cf36Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2703b290cf36Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2704b290cf36Smrgfi 2705b290cf36Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2706b290cf36Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2707b290cf36Smrgfi 2708191cded7Smrg 2709b290cf36Smrg_LT_DECL([], [variables_saved_for_relink], [1], 2710b290cf36Smrg [Variables whose values should be saved in libtool wrapper scripts and 2711b290cf36Smrg restored at link time]) 2712b290cf36Smrg_LT_DECL([], [need_lib_prefix], [0], 2713b290cf36Smrg [Do we need the "lib" prefix for modules?]) 2714b290cf36Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2715b290cf36Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2716b290cf36Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2717b290cf36Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2718b290cf36Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2719b290cf36Smrg [Is shlibpath searched before the hard-coded library search path?]) 2720b290cf36Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2721b290cf36Smrg_LT_DECL([], [library_names_spec], [1], 2722b290cf36Smrg [[List of archive names. First name is the real one, the rest are links. 2723b290cf36Smrg The last name is the one that the linker finds with -lNAME]]) 2724b290cf36Smrg_LT_DECL([], [soname_spec], [1], 2725b290cf36Smrg [[The coded name of the library, if different from the real name]]) 2726b290cf36Smrg_LT_DECL([], [postinstall_cmds], [2], 2727b290cf36Smrg [Command to use after installation of a shared archive]) 2728b290cf36Smrg_LT_DECL([], [postuninstall_cmds], [2], 2729b290cf36Smrg [Command to use after uninstallation of a shared archive]) 2730b290cf36Smrg_LT_DECL([], [finish_cmds], [2], 2731b290cf36Smrg [Commands used to finish a libtool library installation in a directory]) 2732b290cf36Smrg_LT_DECL([], [finish_eval], [1], 2733b290cf36Smrg [[As "finish_cmds", except a single script fragment to be evaled but 2734b290cf36Smrg not shown]]) 2735b290cf36Smrg_LT_DECL([], [hardcode_into_libs], [0], 2736b290cf36Smrg [Whether we should hardcode library paths into libraries]) 2737b290cf36Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2738b290cf36Smrg [Compile-time system search path for libraries]) 2739b290cf36Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2740b290cf36Smrg [Run-time system search path for libraries]) 2741b290cf36Smrg])# _LT_SYS_DYNAMIC_LINKER 2742b290cf36Smrg 2743b290cf36Smrg 2744b290cf36Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 2745b290cf36Smrg# -------------------------- 2746b290cf36Smrg# find a file program which can recognize shared library 2747b290cf36SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2748b290cf36Smrg[m4_require([_LT_DECL_EGREP])dnl 2749b290cf36SmrgAC_MSG_CHECKING([for $1]) 2750b290cf36SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2751b290cf36Smrg[case $MAGIC_CMD in 2752b290cf36Smrg[[\\/*] | ?:[\\/]*]) 2753b290cf36Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2754b290cf36Smrg ;; 2755b290cf36Smrg*) 2756b290cf36Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2757b290cf36Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2758b290cf36Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2759b290cf36Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2760b290cf36Smrgdnl not every word. This closes a longstanding sh security hole. 2761b290cf36Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 2762b290cf36Smrg for ac_dir in $ac_dummy; do 2763b290cf36Smrg IFS="$lt_save_ifs" 2764b290cf36Smrg test -z "$ac_dir" && ac_dir=. 2765b290cf36Smrg if test -f $ac_dir/$1; then 2766b290cf36Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2767b290cf36Smrg if test -n "$file_magic_test_file"; then 2768b290cf36Smrg case $deplibs_check_method in 2769b290cf36Smrg "file_magic "*) 2770b290cf36Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2771b290cf36Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2772b290cf36Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2773b290cf36Smrg $EGREP "$file_magic_regex" > /dev/null; then 2774b290cf36Smrg : 2775b290cf36Smrg else 2776b290cf36Smrg cat <<_LT_EOF 1>&2 2777191cded7Smrg 2778b290cf36Smrg*** Warning: the command libtool uses to detect shared libraries, 2779b290cf36Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2780b290cf36Smrg*** The result is that libtool may fail to recognize shared libraries 2781b290cf36Smrg*** as such. This will affect the creation of libtool libraries that 2782b290cf36Smrg*** depend on shared libraries, but programs linked with such libtool 2783b290cf36Smrg*** libraries will work regardless of this problem. Nevertheless, you 2784b290cf36Smrg*** may want to report the problem to your system manager and/or to 2785b290cf36Smrg*** bug-libtool@gnu.org 2786191cded7Smrg 2787b290cf36Smrg_LT_EOF 2788b290cf36Smrg fi ;; 2789b290cf36Smrg esac 2790b290cf36Smrg fi 2791b290cf36Smrg break 2792b290cf36Smrg fi 2793b290cf36Smrg done 2794b290cf36Smrg IFS="$lt_save_ifs" 2795b290cf36Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 2796191cded7Smrg ;; 2797b290cf36Smrgesac]) 2798b290cf36SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2799b290cf36Smrgif test -n "$MAGIC_CMD"; then 2800b290cf36Smrg AC_MSG_RESULT($MAGIC_CMD) 2801b290cf36Smrgelse 2802b290cf36Smrg AC_MSG_RESULT(no) 2803b290cf36Smrgfi 2804b290cf36Smrg_LT_DECL([], [MAGIC_CMD], [0], 2805b290cf36Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2806b290cf36Smrg])# _LT_PATH_TOOL_PREFIX 2807191cded7Smrg 2808b290cf36Smrg# Old name: 2809b290cf36SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2810b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 2811b290cf36Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 2812191cded7Smrg 2813191cded7Smrg 2814b290cf36Smrg# _LT_PATH_MAGIC 2815b290cf36Smrg# -------------- 2816b290cf36Smrg# find a file program which can recognize a shared library 2817b290cf36Smrgm4_defun([_LT_PATH_MAGIC], 2818b290cf36Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2819b290cf36Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 2820b290cf36Smrg if test -n "$ac_tool_prefix"; then 2821b290cf36Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2822b290cf36Smrg else 2823b290cf36Smrg MAGIC_CMD=: 2824b290cf36Smrg fi 2825b290cf36Smrgfi 2826b290cf36Smrg])# _LT_PATH_MAGIC 2827191cded7Smrg 2828191cded7Smrg 2829b290cf36Smrg# LT_PATH_LD 2830b290cf36Smrg# ---------- 2831b290cf36Smrg# find the pathname to the GNU or non-GNU linker 2832b290cf36SmrgAC_DEFUN([LT_PATH_LD], 2833b290cf36Smrg[AC_REQUIRE([AC_PROG_CC])dnl 2834b290cf36SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2835b290cf36SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2836b290cf36Smrgm4_require([_LT_DECL_SED])dnl 2837b290cf36Smrgm4_require([_LT_DECL_EGREP])dnl 2838191cded7Smrg 2839b290cf36SmrgAC_ARG_WITH([gnu-ld], 2840b290cf36Smrg [AS_HELP_STRING([--with-gnu-ld], 2841b290cf36Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2842b290cf36Smrg [test "$withval" = no || with_gnu_ld=yes], 2843b290cf36Smrg [with_gnu_ld=no])dnl 2844191cded7Smrg 2845b290cf36Smrgac_prog=ld 2846b290cf36Smrgif test "$GCC" = yes; then 2847b290cf36Smrg # Check if gcc -print-prog-name=ld gives a path. 2848b290cf36Smrg AC_MSG_CHECKING([for ld used by $CC]) 2849b290cf36Smrg case $host in 2850b290cf36Smrg *-*-mingw*) 2851b290cf36Smrg # gcc leaves a trailing carriage return which upsets mingw 2852b290cf36Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2853b290cf36Smrg *) 2854b290cf36Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2855b290cf36Smrg esac 2856b290cf36Smrg case $ac_prog in 2857b290cf36Smrg # Accept absolute paths. 2858b290cf36Smrg [[\\/]]* | ?:[[\\/]]*) 2859b290cf36Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 2860b290cf36Smrg # Canonicalize the pathname of ld 2861b290cf36Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 2862b290cf36Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 2863b290cf36Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 2864b290cf36Smrg done 2865b290cf36Smrg test -z "$LD" && LD="$ac_prog" 2866b290cf36Smrg ;; 2867b290cf36Smrg "") 2868b290cf36Smrg # If it fails, then pretend we aren't using GCC. 2869b290cf36Smrg ac_prog=ld 2870b290cf36Smrg ;; 2871b290cf36Smrg *) 2872b290cf36Smrg # If it is relative, then search for the first ld in PATH. 2873b290cf36Smrg with_gnu_ld=unknown 2874b290cf36Smrg ;; 2875b290cf36Smrg esac 2876b290cf36Smrgelif test "$with_gnu_ld" = yes; then 2877b290cf36Smrg AC_MSG_CHECKING([for GNU ld]) 2878191cded7Smrgelse 2879b290cf36Smrg AC_MSG_CHECKING([for non-GNU ld]) 2880191cded7Smrgfi 2881b290cf36SmrgAC_CACHE_VAL(lt_cv_path_LD, 2882b290cf36Smrg[if test -z "$LD"; then 2883b290cf36Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2884b290cf36Smrg for ac_dir in $PATH; do 2885b290cf36Smrg IFS="$lt_save_ifs" 2886b290cf36Smrg test -z "$ac_dir" && ac_dir=. 2887b290cf36Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2888b290cf36Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 2889b290cf36Smrg # Check to see if the program is GNU ld. I'd rather use --version, 2890b290cf36Smrg # but apparently some variants of GNU ld only accept -v. 2891b290cf36Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 2892b290cf36Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2893b290cf36Smrg *GNU* | *'with BFD'*) 2894b290cf36Smrg test "$with_gnu_ld" != no && break 2895b290cf36Smrg ;; 2896b290cf36Smrg *) 2897b290cf36Smrg test "$with_gnu_ld" != yes && break 2898b290cf36Smrg ;; 2899b290cf36Smrg esac 2900b290cf36Smrg fi 2901b290cf36Smrg done 2902b290cf36Smrg IFS="$lt_save_ifs" 2903191cded7Smrgelse 2904b290cf36Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 2905b290cf36Smrgfi]) 2906b290cf36SmrgLD="$lt_cv_path_LD" 2907b290cf36Smrgif test -n "$LD"; then 2908b290cf36Smrg AC_MSG_RESULT($LD) 2909191cded7Smrgelse 2910b290cf36Smrg AC_MSG_RESULT(no) 2911191cded7Smrgfi 2912b290cf36Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2913b290cf36Smrg_LT_PATH_LD_GNU 2914b290cf36SmrgAC_SUBST([LD]) 2915191cded7Smrg 2916b290cf36Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 2917b290cf36Smrg])# LT_PATH_LD 2918191cded7Smrg 2919b290cf36Smrg# Old names: 2920b290cf36SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 2921b290cf36SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 2922b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 2923b290cf36Smrgdnl AC_DEFUN([AM_PROG_LD], []) 2924b290cf36Smrgdnl AC_DEFUN([AC_PROG_LD], []) 2925191cded7Smrg 2926191cded7Smrg 2927b290cf36Smrg# _LT_PATH_LD_GNU 2928b290cf36Smrg#- -------------- 2929b290cf36Smrgm4_defun([_LT_PATH_LD_GNU], 2930b290cf36Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2931b290cf36Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2932b290cf36Smrgcase `$LD -v 2>&1 </dev/null` in 2933b290cf36Smrg*GNU* | *'with BFD'*) 2934b290cf36Smrg lt_cv_prog_gnu_ld=yes 2935b290cf36Smrg ;; 2936b290cf36Smrg*) 2937b290cf36Smrg lt_cv_prog_gnu_ld=no 2938b290cf36Smrg ;; 2939b290cf36Smrgesac]) 2940b290cf36Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2941b290cf36Smrg])# _LT_PATH_LD_GNU 2942191cded7Smrg 2943191cded7Smrg 2944b290cf36Smrg# _LT_CMD_RELOAD 2945b290cf36Smrg# -------------- 2946b290cf36Smrg# find reload flag for linker 2947b290cf36Smrg# -- PORTME Some linkers may need a different reload flag. 2948b290cf36Smrgm4_defun([_LT_CMD_RELOAD], 2949b290cf36Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 2950b290cf36Smrg lt_cv_ld_reload_flag, 2951b290cf36Smrg [lt_cv_ld_reload_flag='-r']) 2952b290cf36Smrgreload_flag=$lt_cv_ld_reload_flag 2953b290cf36Smrgcase $reload_flag in 2954b290cf36Smrg"" | " "*) ;; 2955b290cf36Smrg*) reload_flag=" $reload_flag" ;; 2956b290cf36Smrgesac 2957b290cf36Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 2958b290cf36Smrgcase $host_os in 2959b290cf36Smrg darwin*) 2960b290cf36Smrg if test "$GCC" = yes; then 2961b290cf36Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2962191cded7Smrg else 2963b290cf36Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 2964191cded7Smrg fi 2965b290cf36Smrg ;; 2966b290cf36Smrgesac 2967b290cf36Smrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl 2968b290cf36Smrg_LT_DECL([], [reload_cmds], [2])dnl 2969b290cf36Smrg])# _LT_CMD_RELOAD 2970191cded7Smrg 2971191cded7Smrg 2972b290cf36Smrg# _LT_CHECK_MAGIC_METHOD 2973b290cf36Smrg# ---------------------- 2974b290cf36Smrg# how to check for library dependencies 2975b290cf36Smrg# -- PORTME fill in with the dynamic library characteristics 2976b290cf36Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 2977b290cf36Smrg[m4_require([_LT_DECL_EGREP]) 2978b290cf36Smrgm4_require([_LT_DECL_OBJDUMP]) 2979b290cf36SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 2980b290cf36Smrglt_cv_deplibs_check_method, 2981b290cf36Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 2982b290cf36Smrglt_cv_file_magic_test_file= 2983b290cf36Smrglt_cv_deplibs_check_method='unknown' 2984b290cf36Smrg# Need to set the preceding variable on all platforms that support 2985b290cf36Smrg# interlibrary dependencies. 2986b290cf36Smrg# 'none' -- dependencies not supported. 2987b290cf36Smrg# `unknown' -- same as none, but documents that we really don't know. 2988b290cf36Smrg# 'pass_all' -- all dependencies passed with no checks. 2989b290cf36Smrg# 'test_compile' -- check by making test program. 2990b290cf36Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 2991b290cf36Smrg# which responds to the $file_magic_cmd with a given extended regex. 2992b290cf36Smrg# If you have `file' or equivalent on your system and you're not sure 2993b290cf36Smrg# whether `pass_all' will *always* work, you probably want this one. 2994191cded7Smrg 2995191cded7Smrgcase $host_os in 2996b290cf36Smrgaix[[4-9]]*) 2997b290cf36Smrg lt_cv_deplibs_check_method=pass_all 2998b290cf36Smrg ;; 2999191cded7Smrg 3000b290cf36Smrgbeos*) 3001b290cf36Smrg lt_cv_deplibs_check_method=pass_all 3002b290cf36Smrg ;; 3003191cded7Smrg 3004b290cf36Smrgbsdi[[45]]*) 3005b290cf36Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3006b290cf36Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3007b290cf36Smrg lt_cv_file_magic_test_file=/shlib/libc.so 3008b290cf36Smrg ;; 3009191cded7Smrg 3010b290cf36Smrgcygwin*) 3011b290cf36Smrg # func_win32_libid is a shell function defined in ltmain.sh 3012b290cf36Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3013b290cf36Smrg lt_cv_file_magic_cmd='func_win32_libid' 3014b290cf36Smrg ;; 3015191cded7Smrg 3016b290cf36Smrgmingw* | pw32*) 3017b290cf36Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 3018b290cf36Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3019b290cf36Smrg # unless we find 'file', for example because we are cross-compiling. 3020b290cf36Smrg if ( file / ) >/dev/null 2>&1; then 3021b290cf36Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3022b290cf36Smrg lt_cv_file_magic_cmd='func_win32_libid' 3023b290cf36Smrg else 3024b290cf36Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 3025b290cf36Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3026b290cf36Smrg fi 3027b290cf36Smrg ;; 3028191cded7Smrg 3029b290cf36Smrgcegcc) 3030b290cf36Smrg # use the weaker test based on 'objdump'. See mingw*. 3031b290cf36Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3032b290cf36Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3033191cded7Smrg ;; 3034191cded7Smrg 3035b290cf36Smrgdarwin* | rhapsody*) 3036b290cf36Smrg lt_cv_deplibs_check_method=pass_all 3037b290cf36Smrg ;; 3038191cded7Smrg 3039b290cf36Smrgfreebsd* | dragonfly*) 3040b290cf36Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3041191cded7Smrg case $host_cpu in 3042b290cf36Smrg i*86 ) 3043b290cf36Smrg # Not sure whether the presence of OpenBSD here was a mistake. 3044b290cf36Smrg # Let's accept both of them until this is cleared up. 3045b290cf36Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3046b290cf36Smrg lt_cv_file_magic_cmd=/usr/bin/file 3047b290cf36Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3048191cded7Smrg ;; 3049191cded7Smrg esac 3050b290cf36Smrg else 3051b290cf36Smrg lt_cv_deplibs_check_method=pass_all 3052b290cf36Smrg fi 3053b290cf36Smrg ;; 3054191cded7Smrg 3055b290cf36Smrggnu*) 3056b290cf36Smrg lt_cv_deplibs_check_method=pass_all 3057b290cf36Smrg ;; 3058191cded7Smrg 3059b290cf36Smrghpux10.20* | hpux11*) 3060b290cf36Smrg lt_cv_file_magic_cmd=/usr/bin/file 3061b290cf36Smrg case $host_cpu in 3062b290cf36Smrg ia64*) 3063b290cf36Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3064b290cf36Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3065191cded7Smrg ;; 3066b290cf36Smrg hppa*64*) 3067b290cf36Smrg [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]'] 3068b290cf36Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3069191cded7Smrg ;; 3070b290cf36Smrg *) 3071b290cf36Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 3072b290cf36Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3073191cded7Smrg ;; 3074b290cf36Smrg esac 3075b290cf36Smrg ;; 3076191cded7Smrg 3077b290cf36Smrginterix[[3-9]]*) 3078b290cf36Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3079b290cf36Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3080b290cf36Smrg ;; 3081191cded7Smrg 3082b290cf36Smrgirix5* | irix6* | nonstopux*) 3083b290cf36Smrg case $LD in 3084b290cf36Smrg *-32|*"-32 ") libmagic=32-bit;; 3085b290cf36Smrg *-n32|*"-n32 ") libmagic=N32;; 3086b290cf36Smrg *-64|*"-64 ") libmagic=64-bit;; 3087b290cf36Smrg *) libmagic=never-match;; 3088b290cf36Smrg esac 3089b290cf36Smrg lt_cv_deplibs_check_method=pass_all 3090b290cf36Smrg ;; 3091191cded7Smrg 3092b290cf36Smrg# This must be Linux ELF. 3093b290cf36Smrglinux* | k*bsd*-gnu) 3094b290cf36Smrg lt_cv_deplibs_check_method=pass_all 3095b290cf36Smrg ;; 3096191cded7Smrg 3097b290cf36Smrgnetbsd*) 3098b290cf36Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3099b290cf36Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3100b290cf36Smrg else 3101b290cf36Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3102b290cf36Smrg fi 3103b290cf36Smrg ;; 3104191cded7Smrg 3105b290cf36Smrgnewos6*) 3106b290cf36Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3107b290cf36Smrg lt_cv_file_magic_cmd=/usr/bin/file 3108b290cf36Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3109b290cf36Smrg ;; 3110191cded7Smrg 3111b290cf36Smrg*nto* | *qnx*) 3112b290cf36Smrg lt_cv_deplibs_check_method=pass_all 3113b290cf36Smrg ;; 3114191cded7Smrg 3115b290cf36Smrgopenbsd*) 3116b290cf36Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3117b290cf36Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3118b290cf36Smrg else 3119b290cf36Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3120b290cf36Smrg fi 3121b290cf36Smrg ;; 3122191cded7Smrg 3123b290cf36Smrgosf3* | osf4* | osf5*) 3124b290cf36Smrg lt_cv_deplibs_check_method=pass_all 3125b290cf36Smrg ;; 3126191cded7Smrg 3127b290cf36Smrgrdos*) 3128b290cf36Smrg lt_cv_deplibs_check_method=pass_all 3129b290cf36Smrg ;; 3130191cded7Smrg 3131b290cf36Smrgsolaris*) 3132b290cf36Smrg lt_cv_deplibs_check_method=pass_all 3133b290cf36Smrg ;; 3134b290cf36Smrg 3135b290cf36Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3136b290cf36Smrg lt_cv_deplibs_check_method=pass_all 3137b290cf36Smrg ;; 3138b290cf36Smrg 3139b290cf36Smrgsysv4 | sysv4.3*) 3140b290cf36Smrg case $host_vendor in 3141b290cf36Smrg motorola) 3142b290cf36Smrg 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]]' 3143b290cf36Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3144191cded7Smrg ;; 3145b290cf36Smrg ncr) 3146b290cf36Smrg lt_cv_deplibs_check_method=pass_all 3147191cded7Smrg ;; 3148b290cf36Smrg sequent) 3149b290cf36Smrg lt_cv_file_magic_cmd='/bin/file' 3150b290cf36Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3151191cded7Smrg ;; 3152b290cf36Smrg sni) 3153b290cf36Smrg lt_cv_file_magic_cmd='/bin/file' 3154b290cf36Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3155b290cf36Smrg lt_cv_file_magic_test_file=/lib/libc.so 3156b290cf36Smrg ;; 3157b290cf36Smrg siemens) 3158b290cf36Smrg lt_cv_deplibs_check_method=pass_all 3159b290cf36Smrg ;; 3160b290cf36Smrg pc) 3161b290cf36Smrg lt_cv_deplibs_check_method=pass_all 3162b290cf36Smrg ;; 3163b290cf36Smrg esac 3164b290cf36Smrg ;; 3165191cded7Smrg 3166b290cf36Smrgtpf*) 3167b290cf36Smrg lt_cv_deplibs_check_method=pass_all 3168b290cf36Smrg ;; 3169191cded7Smrgesac 3170191cded7Smrg]) 3171b290cf36Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 3172b290cf36Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 3173b290cf36Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3174191cded7Smrg 3175b290cf36Smrg_LT_DECL([], [deplibs_check_method], [1], 3176b290cf36Smrg [Method to check whether dependent libraries are shared objects]) 3177b290cf36Smrg_LT_DECL([], [file_magic_cmd], [1], 3178b290cf36Smrg [Command to use when deplibs_check_method == "file_magic"]) 3179b290cf36Smrg])# _LT_CHECK_MAGIC_METHOD 3180191cded7Smrg 3181191cded7Smrg 3182b290cf36Smrg# LT_PATH_NM 3183b290cf36Smrg# ---------- 3184b290cf36Smrg# find the pathname to a BSD- or MS-compatible name lister 3185b290cf36SmrgAC_DEFUN([LT_PATH_NM], 3186b290cf36Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3187b290cf36SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3188b290cf36Smrg[if test -n "$NM"; then 3189b290cf36Smrg # Let the user override the test. 3190b290cf36Smrg lt_cv_path_NM="$NM" 3191b290cf36Smrgelse 3192b290cf36Smrg lt_nm_to_check="${ac_tool_prefix}nm" 3193b290cf36Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3194b290cf36Smrg lt_nm_to_check="$lt_nm_to_check nm" 3195b290cf36Smrg fi 3196b290cf36Smrg for lt_tmp_nm in $lt_nm_to_check; do 3197b290cf36Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3198b290cf36Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3199b290cf36Smrg IFS="$lt_save_ifs" 3200b290cf36Smrg test -z "$ac_dir" && ac_dir=. 3201b290cf36Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 3202b290cf36Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3203b290cf36Smrg # Check to see if the nm accepts a BSD-compat flag. 3204b290cf36Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3205b290cf36Smrg # nm: unknown option "B" ignored 3206b290cf36Smrg # Tru64's nm complains that /dev/null is an invalid object file 3207b290cf36Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3208b290cf36Smrg */dev/null* | *'Invalid file or object type'*) 3209b290cf36Smrg lt_cv_path_NM="$tmp_nm -B" 3210b290cf36Smrg break 3211b290cf36Smrg ;; 3212b290cf36Smrg *) 3213b290cf36Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3214b290cf36Smrg */dev/null*) 3215b290cf36Smrg lt_cv_path_NM="$tmp_nm -p" 3216b290cf36Smrg break 3217b290cf36Smrg ;; 3218b290cf36Smrg *) 3219b290cf36Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3220b290cf36Smrg continue # so that we can try to find one that supports BSD flags 3221b290cf36Smrg ;; 3222b290cf36Smrg esac 3223b290cf36Smrg ;; 3224b290cf36Smrg esac 3225b290cf36Smrg fi 3226b290cf36Smrg done 3227b290cf36Smrg IFS="$lt_save_ifs" 3228191cded7Smrg done 3229b290cf36Smrg : ${lt_cv_path_NM=no} 3230b290cf36Smrgfi]) 3231b290cf36Smrgif test "$lt_cv_path_NM" != "no"; then 3232b290cf36Smrg NM="$lt_cv_path_NM" 3233191cded7Smrgelse 3234b290cf36Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3235b290cf36Smrg AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 3236b290cf36Smrg AC_SUBST([DUMPBIN]) 3237b290cf36Smrg if test "$DUMPBIN" != ":"; then 3238b290cf36Smrg NM="$DUMPBIN" 3239b290cf36Smrg fi 3240191cded7Smrgfi 3241b290cf36Smrgtest -z "$NM" && NM=nm 3242b290cf36SmrgAC_SUBST([NM]) 3243b290cf36Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3244b290cf36Smrg 3245b290cf36SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3246b290cf36Smrg [lt_cv_nm_interface="BSD nm" 3247b290cf36Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3248b290cf36Smrg (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3249b290cf36Smrg (eval "$ac_compile" 2>conftest.err) 3250b290cf36Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3251b290cf36Smrg (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3252b290cf36Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3253b290cf36Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3254b290cf36Smrg (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) 3255b290cf36Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3256b290cf36Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3257b290cf36Smrg lt_cv_nm_interface="MS dumpbin" 3258b290cf36Smrg fi 3259b290cf36Smrg rm -f conftest*]) 3260b290cf36Smrg])# LT_PATH_NM 3261191cded7Smrg 3262b290cf36Smrg# Old names: 3263b290cf36SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3264b290cf36SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3265b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 3266b290cf36Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3267b290cf36Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3268191cded7Smrg 3269191cded7Smrg 3270b290cf36Smrg# LT_LIB_M 3271b290cf36Smrg# -------- 3272b290cf36Smrg# check for math library 3273b290cf36SmrgAC_DEFUN([LT_LIB_M], 3274b290cf36Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3275b290cf36SmrgLIBM= 3276b290cf36Smrgcase $host in 3277b290cf36Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 3278b290cf36Smrg # These system don't have libm, or don't need it 3279b290cf36Smrg ;; 3280b290cf36Smrg*-ncr-sysv4.3*) 3281b290cf36Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3282b290cf36Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3283b290cf36Smrg ;; 3284b290cf36Smrg*) 3285b290cf36Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3286191cded7Smrg ;; 3287191cded7Smrgesac 3288b290cf36SmrgAC_SUBST([LIBM]) 3289b290cf36Smrg])# LT_LIB_M 3290191cded7Smrg 3291b290cf36Smrg# Old name: 3292b290cf36SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3293b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 3294b290cf36Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3295191cded7Smrg 3296191cded7Smrg 3297b290cf36Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3298b290cf36Smrg# ------------------------------- 3299b290cf36Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3300b290cf36Smrg[m4_require([_LT_TAG_COMPILER])dnl 3301191cded7Smrg 3302b290cf36Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3303191cded7Smrg 3304b290cf36Smrgif test "$GCC" = yes; then 3305b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 3306191cded7Smrg 3307b290cf36Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3308b290cf36Smrg lt_cv_prog_compiler_rtti_exceptions, 3309b290cf36Smrg [-fno-rtti -fno-exceptions], [], 3310b290cf36Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3311b290cf36Smrgfi 3312b290cf36Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3313b290cf36Smrg [Compiler flag to turn off builtin functions]) 3314b290cf36Smrg])# _LT_COMPILER_NO_RTTI 3315191cded7Smrg 3316191cded7Smrg 3317b290cf36Smrg# _LT_CMD_GLOBAL_SYMBOLS 3318b290cf36Smrg# ---------------------- 3319b290cf36Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3320b290cf36Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3321b290cf36SmrgAC_REQUIRE([AC_PROG_CC])dnl 3322b290cf36SmrgAC_REQUIRE([LT_PATH_NM])dnl 3323b290cf36SmrgAC_REQUIRE([LT_PATH_LD])dnl 3324b290cf36Smrgm4_require([_LT_DECL_SED])dnl 3325b290cf36Smrgm4_require([_LT_DECL_EGREP])dnl 3326b290cf36Smrgm4_require([_LT_TAG_COMPILER])dnl 3327191cded7Smrg 3328b290cf36Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3329b290cf36SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3330b290cf36SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3331b290cf36Smrg[ 3332b290cf36Smrg# These are sane defaults that work on at least a few old systems. 3333b290cf36Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3334191cded7Smrg 3335b290cf36Smrg# Character class describing NM global symbol codes. 3336b290cf36Smrgsymcode='[[BCDEGRST]]' 3337191cded7Smrg 3338b290cf36Smrg# Regexp to match symbols that can be accessed directly from C. 3339b290cf36Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3340191cded7Smrg 3341b290cf36Smrg# Define system-specific variables. 3342191cded7Smrgcase $host_os in 3343b290cf36Smrgaix*) 3344b290cf36Smrg symcode='[[BCDT]]' 3345191cded7Smrg ;; 3346b290cf36Smrgcygwin* | mingw* | pw32* | cegcc*) 3347b290cf36Smrg symcode='[[ABCDGISTW]]' 3348b290cf36Smrg ;; 3349b290cf36Smrghpux*) 3350b290cf36Smrg if test "$host_cpu" = ia64; then 3351b290cf36Smrg symcode='[[ABCDEGRST]]' 3352191cded7Smrg fi 3353191cded7Smrg ;; 3354b290cf36Smrgirix* | nonstopux*) 3355b290cf36Smrg symcode='[[BCDEGRST]]' 3356b290cf36Smrg ;; 3357b290cf36Smrgosf*) 3358b290cf36Smrg symcode='[[BCDEGQRST]]' 3359b290cf36Smrg ;; 3360b290cf36Smrgsolaris*) 3361b290cf36Smrg symcode='[[BDRT]]' 3362b290cf36Smrg ;; 3363b290cf36Smrgsco3.2v5*) 3364b290cf36Smrg symcode='[[DT]]' 3365b290cf36Smrg ;; 3366b290cf36Smrgsysv4.2uw2*) 3367b290cf36Smrg symcode='[[DT]]' 3368b290cf36Smrg ;; 3369b290cf36Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3370b290cf36Smrg symcode='[[ABDT]]' 3371b290cf36Smrg ;; 3372b290cf36Smrgsysv4) 3373b290cf36Smrg symcode='[[DFNSTU]]' 3374b290cf36Smrg ;; 3375b290cf36Smrgesac 3376191cded7Smrg 3377b290cf36Smrg# If we're using GNU nm, then use its standard symbol codes. 3378b290cf36Smrgcase `$NM -V 2>&1` in 3379b290cf36Smrg*GNU* | *'with BFD'*) 3380b290cf36Smrg symcode='[[ABCDGIRSTW]]' ;; 3381b290cf36Smrgesac 3382191cded7Smrg 3383b290cf36Smrg# Transform an extracted symbol line into a proper C declaration. 3384b290cf36Smrg# Some systems (esp. on ia64) link data and code symbols differently, 3385b290cf36Smrg# so use this general approach. 3386b290cf36Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3387191cded7Smrg 3388b290cf36Smrg# Transform an extracted symbol line into symbol name and symbol address 3389b290cf36Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3390b290cf36Smrglt_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'" 3391191cded7Smrg 3392b290cf36Smrg# Handle CRLF in mingw tool chain 3393b290cf36Smrgopt_cr= 3394b290cf36Smrgcase $build_os in 3395b290cf36Smrgmingw*) 3396b290cf36Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3397b290cf36Smrg ;; 3398b290cf36Smrgesac 3399191cded7Smrg 3400b290cf36Smrg# Try without a prefix underscore, then with it. 3401b290cf36Smrgfor ac_symprfx in "" "_"; do 3402191cded7Smrg 3403b290cf36Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3404b290cf36Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3405191cded7Smrg 3406b290cf36Smrg # Write the raw and C identifiers. 3407b290cf36Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3408b290cf36Smrg # Fake it for dumpbin and say T for any non-static function 3409b290cf36Smrg # and D for any global variable. 3410b290cf36Smrg # Also find C++ and __fastcall symbols from MSVC++, 3411b290cf36Smrg # which start with @ or ?. 3412b290cf36Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3413b290cf36Smrg" {last_section=section; section=\$ 3};"\ 3414b290cf36Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3415b290cf36Smrg" \$ 0!~/External *\|/{next};"\ 3416b290cf36Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3417b290cf36Smrg" {if(hide[section]) next};"\ 3418b290cf36Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3419b290cf36Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3420b290cf36Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3421b290cf36Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3422b290cf36Smrg" ' prfx=^$ac_symprfx]" 3423b290cf36Smrg else 3424b290cf36Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3425b290cf36Smrg fi 3426191cded7Smrg 3427b290cf36Smrg # Check to see that the pipe works correctly. 3428b290cf36Smrg pipe_works=no 3429191cded7Smrg 3430b290cf36Smrg rm -f conftest* 3431b290cf36Smrg cat > conftest.$ac_ext <<_LT_EOF 3432b290cf36Smrg#ifdef __cplusplus 3433b290cf36Smrgextern "C" { 3434b290cf36Smrg#endif 3435b290cf36Smrgchar nm_test_var; 3436b290cf36Smrgvoid nm_test_func(void); 3437b290cf36Smrgvoid nm_test_func(void){} 3438b290cf36Smrg#ifdef __cplusplus 3439b290cf36Smrg} 3440b290cf36Smrg#endif 3441b290cf36Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 3442b290cf36Smrg_LT_EOF 3443191cded7Smrg 3444b290cf36Smrg if AC_TRY_EVAL(ac_compile); then 3445b290cf36Smrg # Now try to grab the symbols. 3446b290cf36Smrg nlist=conftest.nm 3447b290cf36Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 3448b290cf36Smrg # Try sorting and uniquifying the output. 3449b290cf36Smrg if sort "$nlist" | uniq > "$nlist"T; then 3450b290cf36Smrg mv -f "$nlist"T "$nlist" 3451b290cf36Smrg else 3452b290cf36Smrg rm -f "$nlist"T 3453b290cf36Smrg fi 3454191cded7Smrg 3455b290cf36Smrg # Make sure that we snagged all the symbols we need. 3456b290cf36Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3457b290cf36Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3458b290cf36Smrg cat <<_LT_EOF > conftest.$ac_ext 3459b290cf36Smrg#ifdef __cplusplus 3460b290cf36Smrgextern "C" { 3461b290cf36Smrg#endif 3462191cded7Smrg 3463b290cf36Smrg_LT_EOF 3464b290cf36Smrg # Now generate the symbol file. 3465b290cf36Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3466191cded7Smrg 3467b290cf36Smrg cat <<_LT_EOF >> conftest.$ac_ext 3468191cded7Smrg 3469b290cf36Smrg/* The mapping between symbol names and symbols. */ 3470b290cf36Smrgconst struct { 3471b290cf36Smrg const char *name; 3472b290cf36Smrg void *address; 3473b290cf36Smrg} 3474b290cf36Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3475b290cf36Smrg{ 3476b290cf36Smrg { "@PROGRAM@", (void *) 0 }, 3477b290cf36Smrg_LT_EOF 3478b290cf36Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3479b290cf36Smrg cat <<\_LT_EOF >> conftest.$ac_ext 3480b290cf36Smrg {0, (void *) 0} 3481b290cf36Smrg}; 3482191cded7Smrg 3483b290cf36Smrg/* This works around a problem in FreeBSD linker */ 3484b290cf36Smrg#ifdef FREEBSD_WORKAROUND 3485b290cf36Smrgstatic const void *lt_preloaded_setup() { 3486b290cf36Smrg return lt__PROGRAM__LTX_preloaded_symbols; 3487b290cf36Smrg} 3488b290cf36Smrg#endif 3489191cded7Smrg 3490b290cf36Smrg#ifdef __cplusplus 3491b290cf36Smrg} 3492b290cf36Smrg#endif 3493b290cf36Smrg_LT_EOF 3494b290cf36Smrg # Now try linking the two files. 3495b290cf36Smrg mv conftest.$ac_objext conftstm.$ac_objext 3496b290cf36Smrg lt_save_LIBS="$LIBS" 3497b290cf36Smrg lt_save_CFLAGS="$CFLAGS" 3498b290cf36Smrg LIBS="conftstm.$ac_objext" 3499b290cf36Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3500b290cf36Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3501b290cf36Smrg pipe_works=yes 3502b290cf36Smrg fi 3503b290cf36Smrg LIBS="$lt_save_LIBS" 3504b290cf36Smrg CFLAGS="$lt_save_CFLAGS" 3505b290cf36Smrg else 3506b290cf36Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3507b290cf36Smrg fi 3508b290cf36Smrg else 3509b290cf36Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3510b290cf36Smrg fi 3511b290cf36Smrg else 3512b290cf36Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3513b290cf36Smrg fi 3514b290cf36Smrg else 3515b290cf36Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3516b290cf36Smrg cat conftest.$ac_ext >&5 3517b290cf36Smrg fi 3518b290cf36Smrg rm -rf conftest* conftst* 3519191cded7Smrg 3520b290cf36Smrg # Do not use the global_symbol_pipe unless it works. 3521b290cf36Smrg if test "$pipe_works" = yes; then 3522b290cf36Smrg break 3523b290cf36Smrg else 3524b290cf36Smrg lt_cv_sys_global_symbol_pipe= 3525b290cf36Smrg fi 3526b290cf36Smrgdone 3527b290cf36Smrg]) 3528b290cf36Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3529b290cf36Smrg lt_cv_sys_global_symbol_to_cdecl= 3530b290cf36Smrgfi 3531b290cf36Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3532b290cf36Smrg AC_MSG_RESULT(failed) 3533b290cf36Smrgelse 3534b290cf36Smrg AC_MSG_RESULT(ok) 3535b290cf36Smrgfi 3536191cded7Smrg 3537b290cf36Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3538b290cf36Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 3539b290cf36Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3540b290cf36Smrg [Transform the output of nm in a proper C declaration]) 3541b290cf36Smrg_LT_DECL([global_symbol_to_c_name_address], 3542b290cf36Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3543b290cf36Smrg [Transform the output of nm in a C name address pair]) 3544b290cf36Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3545b290cf36Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3546b290cf36Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3547b290cf36Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 3548191cded7Smrg 3549191cded7Smrg 3550b290cf36Smrg# _LT_COMPILER_PIC([TAGNAME]) 3551b290cf36Smrg# --------------------------- 3552b290cf36Smrgm4_defun([_LT_COMPILER_PIC], 3553b290cf36Smrg[m4_require([_LT_TAG_COMPILER])dnl 3554b290cf36Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3555b290cf36Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3556b290cf36Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3557191cded7Smrg 3558b290cf36SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 3559b290cf36Smrgm4_if([$1], [CXX], [ 3560b290cf36Smrg # C++ specific cases for pic, static, wl, etc. 3561b290cf36Smrg if test "$GXX" = yes; then 3562b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3563b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3564191cded7Smrg 3565b290cf36Smrg case $host_os in 3566b290cf36Smrg aix*) 3567b290cf36Smrg # All AIX code is PIC. 3568b290cf36Smrg if test "$host_cpu" = ia64; then 3569b290cf36Smrg # AIX 5 now supports IA64 processor 3570b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3571b290cf36Smrg fi 3572b290cf36Smrg ;; 3573191cded7Smrg 3574b290cf36Smrg amigaos*) 3575b290cf36Smrg case $host_cpu in 3576b290cf36Smrg powerpc) 3577b290cf36Smrg # see comment about AmigaOS4 .so support 3578b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3579b290cf36Smrg ;; 3580b290cf36Smrg m68k) 3581b290cf36Smrg # FIXME: we need at least 68020 code to build shared libraries, but 3582b290cf36Smrg # adding the `-m68020' flag to GCC prevents building anything better, 3583b290cf36Smrg # like `-m68040'. 3584b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3585b290cf36Smrg ;; 3586b290cf36Smrg esac 3587b290cf36Smrg ;; 3588191cded7Smrg 3589b290cf36Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3590b290cf36Smrg # PIC is the default for these OSes. 3591b290cf36Smrg ;; 3592b290cf36Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3593b290cf36Smrg # This hack is so that the source file can tell whether it is being 3594b290cf36Smrg # built for inclusion in a dll (and should export symbols for example). 3595b290cf36Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3596b290cf36Smrg # (--disable-auto-import) libraries 3597b290cf36Smrg m4_if([$1], [GCJ], [], 3598b290cf36Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3599b290cf36Smrg ;; 3600b290cf36Smrg darwin* | rhapsody*) 3601b290cf36Smrg # PIC is the default on this platform 3602b290cf36Smrg # Common symbols not allowed in MH_DYLIB files 3603b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3604b290cf36Smrg ;; 3605b290cf36Smrg *djgpp*) 3606b290cf36Smrg # DJGPP does not support shared libraries at all 3607b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3608b290cf36Smrg ;; 3609b290cf36Smrg interix[[3-9]]*) 3610b290cf36Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3611b290cf36Smrg # Instead, we relocate shared libraries at runtime. 3612b290cf36Smrg ;; 3613b290cf36Smrg sysv4*MP*) 3614b290cf36Smrg if test -d /usr/nec; then 3615b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3616b290cf36Smrg fi 3617b290cf36Smrg ;; 3618b290cf36Smrg hpux*) 3619b290cf36Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3620b290cf36Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3621b290cf36Smrg # sets the default TLS model and affects inlining. 3622b290cf36Smrg case $host_cpu in 3623b290cf36Smrg hppa*64*) 3624b290cf36Smrg ;; 3625b290cf36Smrg *) 3626b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3627b290cf36Smrg ;; 3628b290cf36Smrg esac 3629b290cf36Smrg ;; 3630b290cf36Smrg *qnx* | *nto*) 3631b290cf36Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3632b290cf36Smrg # it will coredump. 3633b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3634191cded7Smrg ;; 3635191cded7Smrg *) 3636b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3637191cded7Smrg ;; 3638191cded7Smrg esac 3639b290cf36Smrg else 3640b290cf36Smrg case $host_os in 3641b290cf36Smrg aix[[4-9]]*) 3642b290cf36Smrg # All AIX code is PIC. 3643b290cf36Smrg if test "$host_cpu" = ia64; then 3644b290cf36Smrg # AIX 5 now supports IA64 processor 3645b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3646b290cf36Smrg else 3647b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3648b290cf36Smrg fi 3649b290cf36Smrg ;; 3650b290cf36Smrg chorus*) 3651b290cf36Smrg case $cc_basename in 3652b290cf36Smrg cxch68*) 3653b290cf36Smrg # Green Hills C++ Compiler 3654b290cf36Smrg # _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" 3655b290cf36Smrg ;; 3656b290cf36Smrg esac 3657b290cf36Smrg ;; 3658b290cf36Smrg dgux*) 3659b290cf36Smrg case $cc_basename in 3660b290cf36Smrg ec++*) 3661b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3662b290cf36Smrg ;; 3663b290cf36Smrg ghcx*) 3664b290cf36Smrg # Green Hills C++ Compiler 3665b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3666b290cf36Smrg ;; 3667b290cf36Smrg *) 3668b290cf36Smrg ;; 3669b290cf36Smrg esac 3670b290cf36Smrg ;; 3671b290cf36Smrg freebsd* | dragonfly*) 3672b290cf36Smrg # FreeBSD uses GNU C++ 3673b290cf36Smrg ;; 3674b290cf36Smrg hpux9* | hpux10* | hpux11*) 3675b290cf36Smrg case $cc_basename in 3676b290cf36Smrg CC*) 3677b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3678b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3679b290cf36Smrg if test "$host_cpu" != ia64; then 3680b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3681b290cf36Smrg fi 3682b290cf36Smrg ;; 3683b290cf36Smrg aCC*) 3684b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3685b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3686b290cf36Smrg case $host_cpu in 3687b290cf36Smrg hppa*64*|ia64*) 3688b290cf36Smrg # +Z the default 3689b290cf36Smrg ;; 3690b290cf36Smrg *) 3691b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3692b290cf36Smrg ;; 3693b290cf36Smrg esac 3694b290cf36Smrg ;; 3695b290cf36Smrg *) 3696b290cf36Smrg ;; 3697b290cf36Smrg esac 3698b290cf36Smrg ;; 3699b290cf36Smrg interix*) 3700b290cf36Smrg # This is c89, which is MS Visual C++ (no shared libs) 3701b290cf36Smrg # Anyone wants to do a port? 3702b290cf36Smrg ;; 3703b290cf36Smrg irix5* | irix6* | nonstopux*) 3704b290cf36Smrg case $cc_basename in 3705b290cf36Smrg CC*) 3706b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3707b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3708b290cf36Smrg # CC pic flag -KPIC is the default. 3709b290cf36Smrg ;; 3710b290cf36Smrg *) 3711b290cf36Smrg ;; 3712b290cf36Smrg esac 3713b290cf36Smrg ;; 3714b290cf36Smrg linux* | k*bsd*-gnu) 3715b290cf36Smrg case $cc_basename in 3716b290cf36Smrg KCC*) 3717b290cf36Smrg # KAI C++ Compiler 3718b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3719b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3720b290cf36Smrg ;; 3721b290cf36Smrg ecpc* ) 3722b290cf36Smrg # old Intel C++ for x86_64 which still supported -KPIC. 3723b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3724b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3725b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3726b290cf36Smrg ;; 3727b290cf36Smrg icpc* ) 3728b290cf36Smrg # Intel C++, used to be incompatible with GCC. 3729b290cf36Smrg # ICC 10 doesn't accept -KPIC any more. 3730b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3731b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3732b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3733b290cf36Smrg ;; 3734b290cf36Smrg pgCC* | pgcpp*) 3735b290cf36Smrg # Portland Group C++ compiler 3736b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3737b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 3738b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3739b290cf36Smrg ;; 3740b290cf36Smrg cxx*) 3741b290cf36Smrg # Compaq C++ 3742b290cf36Smrg # Make sure the PIC flag is empty. It appears that all Alpha 3743b290cf36Smrg # Linux and Compaq Tru64 Unix objects are PIC. 3744b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3745b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3746b290cf36Smrg ;; 3747b290cf36Smrg xlc* | xlC*) 3748b290cf36Smrg # IBM XL 8.0 on PPC 3749b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3750b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 3751b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 3752b290cf36Smrg ;; 3753b290cf36Smrg *) 3754b290cf36Smrg case `$CC -V 2>&1 | sed 5q` in 3755b290cf36Smrg *Sun\ C*) 3756b290cf36Smrg # Sun C++ 5.9 3757b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3758b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3759b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3760b290cf36Smrg ;; 3761b290cf36Smrg esac 3762b290cf36Smrg ;; 3763b290cf36Smrg esac 3764b290cf36Smrg ;; 3765b290cf36Smrg lynxos*) 3766b290cf36Smrg ;; 3767b290cf36Smrg m88k*) 3768b290cf36Smrg ;; 3769b290cf36Smrg mvs*) 3770b290cf36Smrg case $cc_basename in 3771b290cf36Smrg cxx*) 3772b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 3773b290cf36Smrg ;; 3774b290cf36Smrg *) 3775b290cf36Smrg ;; 3776b290cf36Smrg esac 3777b290cf36Smrg ;; 3778b290cf36Smrg netbsd*) 3779b290cf36Smrg ;; 3780b290cf36Smrg *qnx* | *nto*) 3781b290cf36Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3782b290cf36Smrg # it will coredump. 3783b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3784b290cf36Smrg ;; 3785b290cf36Smrg osf3* | osf4* | osf5*) 3786b290cf36Smrg case $cc_basename in 3787b290cf36Smrg KCC*) 3788b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3789b290cf36Smrg ;; 3790b290cf36Smrg RCC*) 3791b290cf36Smrg # Rational C++ 2.4.1 3792b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3793b290cf36Smrg ;; 3794b290cf36Smrg cxx*) 3795b290cf36Smrg # Digital/Compaq C++ 3796b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3797b290cf36Smrg # Make sure the PIC flag is empty. It appears that all Alpha 3798b290cf36Smrg # Linux and Compaq Tru64 Unix objects are PIC. 3799b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3800b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3801b290cf36Smrg ;; 3802b290cf36Smrg *) 3803b290cf36Smrg ;; 3804b290cf36Smrg esac 3805b290cf36Smrg ;; 3806b290cf36Smrg psos*) 3807b290cf36Smrg ;; 3808b290cf36Smrg solaris*) 3809b290cf36Smrg case $cc_basename in 3810b290cf36Smrg CC*) 3811b290cf36Smrg # Sun C++ 4.2, 5.x and Centerline C++ 3812b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3813b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3814b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3815b290cf36Smrg ;; 3816b290cf36Smrg gcx*) 3817b290cf36Smrg # Green Hills C++ Compiler 3818b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 3819b290cf36Smrg ;; 3820b290cf36Smrg *) 3821b290cf36Smrg ;; 3822b290cf36Smrg esac 3823b290cf36Smrg ;; 3824b290cf36Smrg sunos4*) 3825b290cf36Smrg case $cc_basename in 3826b290cf36Smrg CC*) 3827b290cf36Smrg # Sun C++ 4.x 3828b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3829b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3830b290cf36Smrg ;; 3831b290cf36Smrg lcc*) 3832b290cf36Smrg # Lucid 3833b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3834b290cf36Smrg ;; 3835b290cf36Smrg *) 3836b290cf36Smrg ;; 3837b290cf36Smrg esac 3838b290cf36Smrg ;; 3839b290cf36Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 3840b290cf36Smrg case $cc_basename in 3841b290cf36Smrg CC*) 3842b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3843b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3844b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3845b290cf36Smrg ;; 3846b290cf36Smrg esac 3847b290cf36Smrg ;; 3848b290cf36Smrg tandem*) 3849b290cf36Smrg case $cc_basename in 3850b290cf36Smrg NCC*) 3851b290cf36Smrg # NonStop-UX NCC 3.20 3852b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3853b290cf36Smrg ;; 3854b290cf36Smrg *) 3855b290cf36Smrg ;; 3856b290cf36Smrg esac 3857b290cf36Smrg ;; 3858b290cf36Smrg vxworks*) 3859b290cf36Smrg ;; 3860b290cf36Smrg *) 3861b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 3862b290cf36Smrg ;; 3863b290cf36Smrg esac 3864b290cf36Smrg fi 3865b290cf36Smrg], 3866b290cf36Smrg[ 3867b290cf36Smrg if test "$GCC" = yes; then 3868b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3869b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3870191cded7Smrg 3871b290cf36Smrg case $host_os in 3872b290cf36Smrg aix*) 3873b290cf36Smrg # All AIX code is PIC. 3874b290cf36Smrg if test "$host_cpu" = ia64; then 3875b290cf36Smrg # AIX 5 now supports IA64 processor 3876b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3877b290cf36Smrg fi 3878b290cf36Smrg ;; 3879191cded7Smrg 3880b290cf36Smrg amigaos*) 3881b290cf36Smrg case $host_cpu in 3882b290cf36Smrg powerpc) 3883b290cf36Smrg # see comment about AmigaOS4 .so support 3884b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3885b290cf36Smrg ;; 3886b290cf36Smrg m68k) 3887b290cf36Smrg # FIXME: we need at least 68020 code to build shared libraries, but 3888b290cf36Smrg # adding the `-m68020' flag to GCC prevents building anything better, 3889b290cf36Smrg # like `-m68040'. 3890b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3891b290cf36Smrg ;; 3892b290cf36Smrg esac 3893b290cf36Smrg ;; 3894191cded7Smrg 3895b290cf36Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3896b290cf36Smrg # PIC is the default for these OSes. 3897b290cf36Smrg ;; 3898191cded7Smrg 3899b290cf36Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 3900b290cf36Smrg # This hack is so that the source file can tell whether it is being 3901b290cf36Smrg # built for inclusion in a dll (and should export symbols for example). 3902b290cf36Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3903b290cf36Smrg # (--disable-auto-import) libraries 3904b290cf36Smrg m4_if([$1], [GCJ], [], 3905b290cf36Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3906b290cf36Smrg ;; 3907191cded7Smrg 3908b290cf36Smrg darwin* | rhapsody*) 3909b290cf36Smrg # PIC is the default on this platform 3910b290cf36Smrg # Common symbols not allowed in MH_DYLIB files 3911b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3912b290cf36Smrg ;; 3913191cded7Smrg 3914b290cf36Smrg hpux*) 3915b290cf36Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3916b290cf36Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3917b290cf36Smrg # sets the default TLS model and affects inlining. 3918b290cf36Smrg case $host_cpu in 3919b290cf36Smrg hppa*64*) 3920b290cf36Smrg # +Z the default 3921b290cf36Smrg ;; 3922b290cf36Smrg *) 3923b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3924b290cf36Smrg ;; 3925b290cf36Smrg esac 3926b290cf36Smrg ;; 3927191cded7Smrg 3928b290cf36Smrg interix[[3-9]]*) 3929b290cf36Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3930b290cf36Smrg # Instead, we relocate shared libraries at runtime. 3931b290cf36Smrg ;; 3932191cded7Smrg 3933b290cf36Smrg msdosdjgpp*) 3934b290cf36Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 3935b290cf36Smrg # on systems that don't support them. 3936b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 3937b290cf36Smrg enable_shared=no 3938b290cf36Smrg ;; 3939191cded7Smrg 3940b290cf36Smrg *nto* | *qnx*) 3941b290cf36Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3942b290cf36Smrg # it will coredump. 3943b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3944b290cf36Smrg ;; 3945191cded7Smrg 3946b290cf36Smrg sysv4*MP*) 3947b290cf36Smrg if test -d /usr/nec; then 3948b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3949b290cf36Smrg fi 3950b290cf36Smrg ;; 3951191cded7Smrg 3952b290cf36Smrg *) 3953b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3954b290cf36Smrg ;; 3955b290cf36Smrg esac 3956b290cf36Smrg else 3957b290cf36Smrg # PORTME Check for flag to pass linker flags through the system compiler. 3958b290cf36Smrg case $host_os in 3959b290cf36Smrg aix*) 3960b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3961b290cf36Smrg if test "$host_cpu" = ia64; then 3962b290cf36Smrg # AIX 5 now supports IA64 processor 3963b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3964b290cf36Smrg else 3965b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3966b290cf36Smrg fi 3967b290cf36Smrg ;; 3968191cded7Smrg 3969b290cf36Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 3970b290cf36Smrg # This hack is so that the source file can tell whether it is being 3971b290cf36Smrg # built for inclusion in a dll (and should export symbols for example). 3972b290cf36Smrg m4_if([$1], [GCJ], [], 3973b290cf36Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3974b290cf36Smrg ;; 3975191cded7Smrg 3976b290cf36Smrg hpux9* | hpux10* | hpux11*) 3977b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3978b290cf36Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 3979b290cf36Smrg # not for PA HP-UX. 3980b290cf36Smrg case $host_cpu in 3981b290cf36Smrg hppa*64*|ia64*) 3982b290cf36Smrg # +Z the default 3983b290cf36Smrg ;; 3984b290cf36Smrg *) 3985b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3986b290cf36Smrg ;; 3987b290cf36Smrg esac 3988b290cf36Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 3989b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3990b290cf36Smrg ;; 3991191cded7Smrg 3992b290cf36Smrg irix5* | irix6* | nonstopux*) 3993b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3994b290cf36Smrg # PIC (with -KPIC) is the default. 3995b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3996b290cf36Smrg ;; 3997191cded7Smrg 3998b290cf36Smrg linux* | k*bsd*-gnu) 3999b290cf36Smrg case $cc_basename in 4000b290cf36Smrg # old Intel for x86_64 which still supported -KPIC. 4001b290cf36Smrg ecc*) 4002b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4003b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4004b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4005b290cf36Smrg ;; 4006b290cf36Smrg # icc used to be incompatible with GCC. 4007b290cf36Smrg # ICC 10 doesn't accept -KPIC any more. 4008b290cf36Smrg icc* | ifort*) 4009b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4010b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4011b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4012b290cf36Smrg ;; 4013b290cf36Smrg # Lahey Fortran 8.1. 4014b290cf36Smrg lf95*) 4015b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4016b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4017b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4018b290cf36Smrg ;; 4019b290cf36Smrg pgcc* | pgf77* | pgf90* | pgf95*) 4020b290cf36Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4021b290cf36Smrg # which looks to be a dead project) 4022b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4023b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4024b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4025b290cf36Smrg ;; 4026b290cf36Smrg ccc*) 4027b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4028b290cf36Smrg # All Alpha code is PIC. 4029b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4030b290cf36Smrg ;; 4031b290cf36Smrg xl*) 4032b290cf36Smrg # IBM XL C 8.0/Fortran 10.1 on PPC 4033b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4034b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4035b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4036b290cf36Smrg ;; 4037b290cf36Smrg *) 4038b290cf36Smrg case `$CC -V 2>&1 | sed 5q` in 4039b290cf36Smrg *Sun\ C*) 4040b290cf36Smrg # Sun C 5.9 4041b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4042b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4043b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4044b290cf36Smrg ;; 4045b290cf36Smrg *Sun\ F*) 4046b290cf36Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4047b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4048b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4049b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4050b290cf36Smrg ;; 4051b290cf36Smrg esac 4052b290cf36Smrg ;; 4053b290cf36Smrg esac 4054b290cf36Smrg ;; 4055191cded7Smrg 4056b290cf36Smrg newsos6) 4057b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4058b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4059b290cf36Smrg ;; 4060191cded7Smrg 4061b290cf36Smrg *nto* | *qnx*) 4062b290cf36Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4063b290cf36Smrg # it will coredump. 4064b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4065b290cf36Smrg ;; 4066191cded7Smrg 4067b290cf36Smrg osf3* | osf4* | osf5*) 4068b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4069b290cf36Smrg # All OSF/1 code is PIC. 4070b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4071b290cf36Smrg ;; 4072191cded7Smrg 4073b290cf36Smrg rdos*) 4074b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4075b290cf36Smrg ;; 4076191cded7Smrg 4077b290cf36Smrg solaris*) 4078b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4079b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4080b290cf36Smrg case $cc_basename in 4081b290cf36Smrg f77* | f90* | f95*) 4082b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4083b290cf36Smrg *) 4084b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4085b290cf36Smrg esac 4086b290cf36Smrg ;; 4087191cded7Smrg 4088b290cf36Smrg sunos4*) 4089b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4090b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4091b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4092b290cf36Smrg ;; 4093191cded7Smrg 4094b290cf36Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4095b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4096b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4097b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4098b290cf36Smrg ;; 4099191cded7Smrg 4100b290cf36Smrg sysv4*MP*) 4101b290cf36Smrg if test -d /usr/nec ;then 4102b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4103b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4104b290cf36Smrg fi 4105b290cf36Smrg ;; 4106191cded7Smrg 4107b290cf36Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4108b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4109b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4110b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4111b290cf36Smrg ;; 4112191cded7Smrg 4113b290cf36Smrg unicos*) 4114b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4115b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4116b290cf36Smrg ;; 4117191cded7Smrg 4118b290cf36Smrg uts4*) 4119b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4120b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4121b290cf36Smrg ;; 4122191cded7Smrg 4123b290cf36Smrg *) 4124b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4125b290cf36Smrg ;; 4126b290cf36Smrg esac 4127b290cf36Smrg fi 4128b290cf36Smrg]) 4129b290cf36Smrgcase $host_os in 4130b290cf36Smrg # For platforms which do not support PIC, -DPIC is meaningless: 4131b290cf36Smrg *djgpp*) 4132b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4133b290cf36Smrg ;; 4134b290cf36Smrg *) 4135b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4136b290cf36Smrg ;; 4137b290cf36Smrgesac 4138b290cf36SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4139b290cf36Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4140b290cf36Smrg [How to pass a linker flag through the compiler]) 4141191cded7Smrg 4142b290cf36Smrg# 4143b290cf36Smrg# Check to make sure the PIC flag actually works. 4144b290cf36Smrg# 4145b290cf36Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4146b290cf36Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4147b290cf36Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4148b290cf36Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4149b290cf36Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4150b290cf36Smrg "" | " "*) ;; 4151b290cf36Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4152b290cf36Smrg esac], 4153b290cf36Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4154b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4155b290cf36Smrgfi 4156b290cf36Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4157b290cf36Smrg [Additional compiler flags for building library objects]) 4158191cded7Smrg 4159b290cf36Smrg# 4160b290cf36Smrg# Check to make sure the static flag actually works. 4161b290cf36Smrg# 4162b290cf36Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4163b290cf36Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4164b290cf36Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4165b290cf36Smrg $lt_tmp_static_flag, 4166b290cf36Smrg [], 4167b290cf36Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4168b290cf36Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4169b290cf36Smrg [Compiler flag to prevent dynamic linking]) 4170b290cf36Smrg])# _LT_COMPILER_PIC 4171191cded7Smrg 4172191cded7Smrg 4173b290cf36Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 4174b290cf36Smrg# ---------------------------- 4175b290cf36Smrg# See if the linker supports building shared libraries. 4176b290cf36Smrgm4_defun([_LT_LINKER_SHLIBS], 4177b290cf36Smrg[AC_REQUIRE([LT_PATH_LD])dnl 4178b290cf36SmrgAC_REQUIRE([LT_PATH_NM])dnl 4179b290cf36Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4180b290cf36Smrgm4_require([_LT_DECL_EGREP])dnl 4181b290cf36Smrgm4_require([_LT_DECL_SED])dnl 4182b290cf36Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4183b290cf36Smrgm4_require([_LT_TAG_COMPILER])dnl 4184b290cf36SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4185b290cf36Smrgm4_if([$1], [CXX], [ 4186b290cf36Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4187b290cf36Smrg case $host_os in 4188b290cf36Smrg aix[[4-9]]*) 4189b290cf36Smrg # If we're using GNU nm, then we don't want the "-C" option. 4190b290cf36Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4191b290cf36Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4192b290cf36Smrg _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' 4193b290cf36Smrg else 4194b290cf36Smrg _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' 4195b290cf36Smrg fi 4196b290cf36Smrg ;; 4197b290cf36Smrg pw32*) 4198b290cf36Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4199b290cf36Smrg ;; 4200b290cf36Smrg cygwin* | mingw* | cegcc*) 4201b290cf36Smrg _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' 4202b290cf36Smrg ;; 4203b290cf36Smrg *) 4204b290cf36Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4205b290cf36Smrg ;; 4206b290cf36Smrg esac 4207b290cf36Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4208b290cf36Smrg], [ 4209b290cf36Smrg runpath_var= 4210b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 4211b290cf36Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4212b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)= 4213b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4214b290cf36Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 4215b290cf36Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4216b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4217b290cf36Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4218b290cf36Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 4219b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4220b290cf36Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4221b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4222b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4223b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4224b290cf36Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4225b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4226b290cf36Smrg _LT_TAGVAR(inherit_rpath, $1)=no 4227b290cf36Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4228b290cf36Smrg _LT_TAGVAR(module_cmds, $1)= 4229b290cf36Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 4230b290cf36Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4231b290cf36Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4232b290cf36Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4233b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4234b290cf36Smrg # include_expsyms should be a list of space-separated symbols to be *always* 4235b290cf36Smrg # included in the symbol list 4236b290cf36Smrg _LT_TAGVAR(include_expsyms, $1)= 4237b290cf36Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 4238b290cf36Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4239b290cf36Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4240b290cf36Smrg # as well as any symbol that contains `d'. 4241b290cf36Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4242b290cf36Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4243b290cf36Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 4244b290cf36Smrg # the symbol is explicitly referenced. Since portable code cannot 4245b290cf36Smrg # rely on this symbol name, it's probably fine to never include it in 4246b290cf36Smrg # preloaded symbol tables. 4247b290cf36Smrg # Exclude shared library initialization/finalization symbols. 4248b290cf36Smrgdnl Note also adjust exclude_expsyms for C++ above. 4249b290cf36Smrg extract_expsyms_cmds= 4250191cded7Smrg 4251b290cf36Smrg case $host_os in 4252b290cf36Smrg cygwin* | mingw* | pw32* | cegcc*) 4253b290cf36Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4254b290cf36Smrg # When not using gcc, we currently assume that we are using 4255b290cf36Smrg # Microsoft Visual C++. 4256b290cf36Smrg if test "$GCC" != yes; then 4257b290cf36Smrg with_gnu_ld=no 4258b290cf36Smrg fi 4259b290cf36Smrg ;; 4260b290cf36Smrg interix*) 4261b290cf36Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4262b290cf36Smrg with_gnu_ld=yes 4263b290cf36Smrg ;; 4264b290cf36Smrg openbsd*) 4265b290cf36Smrg with_gnu_ld=no 4266b290cf36Smrg ;; 4267b290cf36Smrg esac 4268191cded7Smrg 4269b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 4270b290cf36Smrg if test "$with_gnu_ld" = yes; then 4271b290cf36Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 4272b290cf36Smrg wlarc='${wl}' 4273191cded7Smrg 4274b290cf36Smrg # Set some defaults for GNU ld with shared library support. These 4275b290cf36Smrg # are reset later if shared libraries are not supported. Putting them 4276b290cf36Smrg # here allows them to be overridden if necessary. 4277b290cf36Smrg runpath_var=LD_RUN_PATH 4278b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4279b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4280b290cf36Smrg # ancient GNU ld didn't support --whole-archive et. al. 4281b290cf36Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4282b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4283b290cf36Smrg else 4284b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4285b290cf36Smrg fi 4286b290cf36Smrg supports_anon_versioning=no 4287b290cf36Smrg case `$LD -v 2>&1` in 4288b290cf36Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4289b290cf36Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4290b290cf36Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4291b290cf36Smrg *\ 2.11.*) ;; # other 2.11 versions 4292b290cf36Smrg *) supports_anon_versioning=yes ;; 4293b290cf36Smrg esac 4294191cded7Smrg 4295b290cf36Smrg # See if GNU ld supports shared libraries. 4296b290cf36Smrg case $host_os in 4297b290cf36Smrg aix[[3-9]]*) 4298b290cf36Smrg # On AIX/PPC, the GNU linker is very broken 4299b290cf36Smrg if test "$host_cpu" != ia64; then 4300b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4301b290cf36Smrg cat <<_LT_EOF 1>&2 4302191cded7Smrg 4303b290cf36Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 4304b290cf36Smrg*** to be unable to reliably create shared libraries on AIX. 4305b290cf36Smrg*** Therefore, libtool is disabling shared libraries support. If you 4306b290cf36Smrg*** really care for shared libraries, you may want to modify your PATH 4307b290cf36Smrg*** so that a non-GNU linker is found, and then restart. 4308191cded7Smrg 4309b290cf36Smrg_LT_EOF 4310b290cf36Smrg fi 4311b290cf36Smrg ;; 4312191cded7Smrg 4313b290cf36Smrg amigaos*) 4314b290cf36Smrg case $host_cpu in 4315b290cf36Smrg powerpc) 4316b290cf36Smrg # see comment about AmigaOS4 .so support 4317b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4318b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4319b290cf36Smrg ;; 4320b290cf36Smrg m68k) 4321b290cf36Smrg _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)' 4322b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4323b290cf36Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4324b290cf36Smrg ;; 4325b290cf36Smrg esac 4326b290cf36Smrg ;; 4327191cded7Smrg 4328b290cf36Smrg beos*) 4329b290cf36Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4330b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4331b290cf36Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4332b290cf36Smrg # support --undefined. This deserves some investigation. FIXME 4333b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4334b290cf36Smrg else 4335b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4336b290cf36Smrg fi 4337b290cf36Smrg ;; 4338191cded7Smrg 4339b290cf36Smrg cygwin* | mingw* | pw32* | cegcc*) 4340b290cf36Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4341b290cf36Smrg # as there is no search path for DLLs. 4342b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4343b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4344b290cf36Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4345b290cf36Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4346b290cf36Smrg _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' 4347b290cf36Smrg 4348b290cf36Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4349b290cf36Smrg _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' 4350b290cf36Smrg # If the export-symbols file already is a .def file (1st line 4351b290cf36Smrg # is EXPORTS), use it as is; otherwise, prepend... 4352b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4353b290cf36Smrg cp $export_symbols $output_objdir/$soname.def; 4354b290cf36Smrg else 4355b290cf36Smrg echo EXPORTS > $output_objdir/$soname.def; 4356b290cf36Smrg cat $export_symbols >> $output_objdir/$soname.def; 4357b290cf36Smrg fi~ 4358b290cf36Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4359b290cf36Smrg else 4360b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4361b290cf36Smrg fi 4362b290cf36Smrg ;; 4363191cded7Smrg 4364b290cf36Smrg interix[[3-9]]*) 4365b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4366b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4367b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4368b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4369b290cf36Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4370b290cf36Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4371b290cf36Smrg # default) and relocated if they conflict, which is a slow very memory 4372b290cf36Smrg # consuming and fragmenting process. To avoid this, we pick a random, 4373b290cf36Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4374b290cf36Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4375b290cf36Smrg _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' 4376b290cf36Smrg _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' 4377b290cf36Smrg ;; 4378191cded7Smrg 4379b290cf36Smrg gnu* | linux* | tpf* | k*bsd*-gnu) 4380b290cf36Smrg tmp_diet=no 4381b290cf36Smrg if test "$host_os" = linux-dietlibc; then 4382b290cf36Smrg case $cc_basename in 4383b290cf36Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4384b290cf36Smrg esac 4385b290cf36Smrg fi 4386b290cf36Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4387b290cf36Smrg && test "$tmp_diet" = no 4388b290cf36Smrg then 4389b290cf36Smrg tmp_addflag= 4390b290cf36Smrg tmp_sharedflag='-shared' 4391b290cf36Smrg case $cc_basename,$host_cpu in 4392b290cf36Smrg pgcc*) # Portland Group C compiler 4393b290cf36Smrg _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' 4394b290cf36Smrg tmp_addflag=' $pic_flag' 4395b290cf36Smrg ;; 4396b290cf36Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 4397b290cf36Smrg _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' 4398b290cf36Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 4399b290cf36Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4400b290cf36Smrg tmp_addflag=' -i_dynamic' ;; 4401b290cf36Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4402b290cf36Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4403b290cf36Smrg ifc* | ifort*) # Intel Fortran compiler 4404b290cf36Smrg tmp_addflag=' -nofor_main' ;; 4405b290cf36Smrg lf95*) # Lahey Fortran 8.1 4406b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4407b290cf36Smrg tmp_sharedflag='--shared' ;; 4408b290cf36Smrg xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4409b290cf36Smrg tmp_sharedflag='-qmkshrobj' 4410b290cf36Smrg tmp_addflag= ;; 4411b290cf36Smrg esac 4412b290cf36Smrg case `$CC -V 2>&1 | sed 5q` in 4413b290cf36Smrg *Sun\ C*) # Sun C 5.9 4414b290cf36Smrg _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' 4415b290cf36Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4416b290cf36Smrg tmp_sharedflag='-G' ;; 4417b290cf36Smrg *Sun\ F*) # Sun Fortran 8.3 4418b290cf36Smrg tmp_sharedflag='-G' ;; 4419b290cf36Smrg esac 4420b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4421191cded7Smrg 4422b290cf36Smrg if test "x$supports_anon_versioning" = xyes; then 4423b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4424b290cf36Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4425b290cf36Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4426b290cf36Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4427b290cf36Smrg fi 4428191cded7Smrg 4429b290cf36Smrg case $cc_basename in 4430b290cf36Smrg xlf*) 4431b290cf36Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4432b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4433b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4434b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 4435b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' 4436b290cf36Smrg if test "x$supports_anon_versioning" = xyes; then 4437b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4438b290cf36Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4439b290cf36Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4440b290cf36Smrg $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4441b290cf36Smrg fi 4442b290cf36Smrg ;; 4443b290cf36Smrg esac 4444b290cf36Smrg else 4445b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4446b290cf36Smrg fi 4447b290cf36Smrg ;; 4448191cded7Smrg 4449b290cf36Smrg netbsd*) 4450b290cf36Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4451b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4452b290cf36Smrg wlarc= 4453b290cf36Smrg else 4454b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4455b290cf36Smrg _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' 4456b290cf36Smrg fi 4457b290cf36Smrg ;; 4458191cded7Smrg 4459b290cf36Smrg solaris*) 4460b290cf36Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4461b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4462b290cf36Smrg cat <<_LT_EOF 1>&2 4463191cded7Smrg 4464b290cf36Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4465b290cf36Smrg*** create shared libraries on Solaris systems. Therefore, libtool 4466b290cf36Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4467b290cf36Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 4468b290cf36Smrg*** your PATH or compiler configuration so that the native linker is 4469b290cf36Smrg*** used, and then restart. 4470191cded7Smrg 4471b290cf36Smrg_LT_EOF 4472b290cf36Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4473b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4474b290cf36Smrg _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' 4475b290cf36Smrg else 4476b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4477b290cf36Smrg fi 4478b290cf36Smrg ;; 4479191cded7Smrg 4480b290cf36Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4481b290cf36Smrg case `$LD -v 2>&1` in 4482b290cf36Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4483b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4484b290cf36Smrg cat <<_LT_EOF 1>&2 4485191cded7Smrg 4486b290cf36Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4487b290cf36Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4488b290cf36Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4489b290cf36Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4490b290cf36Smrg*** your PATH or compiler configuration so that the native linker is 4491b290cf36Smrg*** used, and then restart. 4492191cded7Smrg 4493b290cf36Smrg_LT_EOF 4494b290cf36Smrg ;; 4495b290cf36Smrg *) 4496b290cf36Smrg # For security reasons, it is highly recommended that you always 4497b290cf36Smrg # use absolute paths for naming shared libraries, and exclude the 4498b290cf36Smrg # DT_RUNPATH tag from executables and libraries. But doing so 4499b290cf36Smrg # requires that you compile everything twice, which is a pain. 4500b290cf36Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4501b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4502b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4503b290cf36Smrg _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' 4504b290cf36Smrg else 4505b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4506b290cf36Smrg fi 4507b290cf36Smrg ;; 4508b290cf36Smrg esac 4509b290cf36Smrg ;; 4510191cded7Smrg 4511b290cf36Smrg sunos4*) 4512b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4513b290cf36Smrg wlarc= 4514b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4515b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4516b290cf36Smrg ;; 4517191cded7Smrg 4518b290cf36Smrg *) 4519b290cf36Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4520b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4521b290cf36Smrg _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' 4522b290cf36Smrg else 4523b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4524b290cf36Smrg fi 4525b290cf36Smrg ;; 4526b290cf36Smrg esac 4527191cded7Smrg 4528b290cf36Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4529b290cf36Smrg runpath_var= 4530b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4531b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4532b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4533b290cf36Smrg fi 4534b290cf36Smrg else 4535b290cf36Smrg # PORTME fill in a description of your system's linker (not GNU ld) 4536b290cf36Smrg case $host_os in 4537b290cf36Smrg aix3*) 4538b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4539b290cf36Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 4540b290cf36Smrg _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' 4541b290cf36Smrg # Note: this linker hardcodes the directories in LIBPATH if there 4542b290cf36Smrg # are no directories specified by -L. 4543b290cf36Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4544b290cf36Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4545b290cf36Smrg # Neither direct hardcoding nor static linking is supported with a 4546b290cf36Smrg # broken collect2. 4547b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4548b290cf36Smrg fi 4549b290cf36Smrg ;; 4550191cded7Smrg 4551b290cf36Smrg aix[[4-9]]*) 4552b290cf36Smrg if test "$host_cpu" = ia64; then 4553b290cf36Smrg # On IA64, the linker does run time linking by default, so we don't 4554b290cf36Smrg # have to do anything special. 4555b290cf36Smrg aix_use_runtimelinking=no 4556b290cf36Smrg exp_sym_flag='-Bexport' 4557b290cf36Smrg no_entry_flag="" 4558b290cf36Smrg else 4559b290cf36Smrg # If we're using GNU nm, then we don't want the "-C" option. 4560b290cf36Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4561b290cf36Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4562b290cf36Smrg _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' 4563b290cf36Smrg else 4564b290cf36Smrg _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' 4565b290cf36Smrg fi 4566b290cf36Smrg aix_use_runtimelinking=no 4567191cded7Smrg 4568b290cf36Smrg # Test if we are trying to use run time linking or normal 4569b290cf36Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4570b290cf36Smrg # need to do runtime linking. 4571b290cf36Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4572b290cf36Smrg for ld_flag in $LDFLAGS; do 4573b290cf36Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4574b290cf36Smrg aix_use_runtimelinking=yes 4575b290cf36Smrg break 4576b290cf36Smrg fi 4577b290cf36Smrg done 4578b290cf36Smrg ;; 4579b290cf36Smrg esac 4580191cded7Smrg 4581b290cf36Smrg exp_sym_flag='-bexport' 4582b290cf36Smrg no_entry_flag='-bnoentry' 4583b290cf36Smrg fi 4584191cded7Smrg 4585b290cf36Smrg # When large executables or shared objects are built, AIX ld can 4586b290cf36Smrg # have problems creating the table of contents. If linking a library 4587b290cf36Smrg # or program results in "error TOC overflow" add -mminimal-toc to 4588b290cf36Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4589b290cf36Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4590191cded7Smrg 4591b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='' 4592b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4593b290cf36Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4594b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 4595b290cf36Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4596b290cf36Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 4597191cded7Smrg 4598b290cf36Smrg if test "$GCC" = yes; then 4599b290cf36Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 4600b290cf36Smrg # We only want to do this on AIX 4.2 and lower, the check 4601b290cf36Smrg # below for broken collect2 doesn't work under 4.3+ 4602b290cf36Smrg collect2name=`${CC} -print-prog-name=collect2` 4603b290cf36Smrg if test -f "$collect2name" && 4604b290cf36Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 4605b290cf36Smrg then 4606b290cf36Smrg # We have reworked collect2 4607b290cf36Smrg : 4608b290cf36Smrg else 4609b290cf36Smrg # We have old collect2 4610b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4611b290cf36Smrg # It fails to find uninstalled libraries when the uninstalled 4612b290cf36Smrg # path is not listed in the libpath. Setting hardcode_minus_L 4613b290cf36Smrg # to unsupported forces relinking 4614b290cf36Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4615b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4616b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4617b290cf36Smrg fi 4618b290cf36Smrg ;; 4619b290cf36Smrg esac 4620b290cf36Smrg shared_flag='-shared' 4621b290cf36Smrg if test "$aix_use_runtimelinking" = yes; then 4622b290cf36Smrg shared_flag="$shared_flag "'${wl}-G' 4623b290cf36Smrg fi 4624b290cf36Smrg else 4625b290cf36Smrg # not using gcc 4626b290cf36Smrg if test "$host_cpu" = ia64; then 4627b290cf36Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4628b290cf36Smrg # chokes on -Wl,-G. The following line is correct: 4629b290cf36Smrg shared_flag='-G' 4630b290cf36Smrg else 4631b290cf36Smrg if test "$aix_use_runtimelinking" = yes; then 4632b290cf36Smrg shared_flag='${wl}-G' 4633b290cf36Smrg else 4634b290cf36Smrg shared_flag='${wl}-bM:SRE' 4635b290cf36Smrg fi 4636b290cf36Smrg fi 4637b290cf36Smrg fi 4638191cded7Smrg 4639b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 4640b290cf36Smrg # It seems that -bexpall does not export symbols beginning with 4641b290cf36Smrg # underscore (_), so it is better to generate a list of symbols to export. 4642b290cf36Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 4643b290cf36Smrg if test "$aix_use_runtimelinking" = yes; then 4644b290cf36Smrg # Warning - without using the other runtime loading flags (-brtl), 4645b290cf36Smrg # -berok will link without error, but may produce a broken library. 4646b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 4647b290cf36Smrg # Determine the default libpath from the value encoded in an 4648b290cf36Smrg # empty executable. 4649b290cf36Smrg _LT_SYS_MODULE_PATH_AIX 4650b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4651b290cf36Smrg _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" 4652b290cf36Smrg else 4653b290cf36Smrg if test "$host_cpu" = ia64; then 4654b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 4655b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 4656b290cf36Smrg _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" 4657b290cf36Smrg else 4658b290cf36Smrg # Determine the default libpath from the value encoded in an 4659b290cf36Smrg # empty executable. 4660b290cf36Smrg _LT_SYS_MODULE_PATH_AIX 4661b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4662b290cf36Smrg # Warning - without using the other run time loading flags, 4663b290cf36Smrg # -berok will link without error, but may produce a broken library. 4664b290cf36Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 4665b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 4666b290cf36Smrg # Exported symbols can be pulled into shared objects from archives 4667b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 4668b290cf36Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 4669b290cf36Smrg # This is similar to how AIX traditionally builds its shared libraries. 4670b290cf36Smrg _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' 4671b290cf36Smrg fi 4672b290cf36Smrg fi 4673b290cf36Smrg ;; 4674191cded7Smrg 4675b290cf36Smrg amigaos*) 4676b290cf36Smrg case $host_cpu in 4677b290cf36Smrg powerpc) 4678b290cf36Smrg # see comment about AmigaOS4 .so support 4679b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4680b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4681b290cf36Smrg ;; 4682b290cf36Smrg m68k) 4683b290cf36Smrg _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)' 4684b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4685b290cf36Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4686b290cf36Smrg ;; 4687b290cf36Smrg esac 4688b290cf36Smrg ;; 4689191cded7Smrg 4690b290cf36Smrg bsdi[[45]]*) 4691b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 4692b290cf36Smrg ;; 4693191cded7Smrg 4694b290cf36Smrg cygwin* | mingw* | pw32* | cegcc*) 4695b290cf36Smrg # When not using gcc, we currently assume that we are using 4696b290cf36Smrg # Microsoft Visual C++. 4697b290cf36Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 4698b290cf36Smrg # no search path for DLLs. 4699b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 4700b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4701b290cf36Smrg # Tell ltmain to make .lib files, not .a files. 4702b290cf36Smrg libext=lib 4703b290cf36Smrg # Tell ltmain to make .dll files, not .so files. 4704b290cf36Smrg shrext_cmds=".dll" 4705b290cf36Smrg # FIXME: Setting linknames here is a bad hack. 4706b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 4707b290cf36Smrg # The linker will automatically build a .lib file if we build a DLL. 4708b290cf36Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 4709b290cf36Smrg # FIXME: Should let the user specify the lib program. 4710b290cf36Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 4711b290cf36Smrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 4712b290cf36Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4713b290cf36Smrg ;; 4714191cded7Smrg 4715b290cf36Smrg darwin* | rhapsody*) 4716b290cf36Smrg _LT_DARWIN_LINKER_FEATURES($1) 4717b290cf36Smrg ;; 4718191cded7Smrg 4719b290cf36Smrg dgux*) 4720b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4721b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4722b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4723b290cf36Smrg ;; 4724191cded7Smrg 4725b290cf36Smrg freebsd1*) 4726b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4727b290cf36Smrg ;; 4728191cded7Smrg 4729b290cf36Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 4730b290cf36Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 4731b290cf36Smrg # does not break anything, and helps significantly (at the cost of a little 4732b290cf36Smrg # extra space). 4733b290cf36Smrg freebsd2.2*) 4734b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 4735b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4736b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4737b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4738b290cf36Smrg ;; 4739191cded7Smrg 4740b290cf36Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 4741b290cf36Smrg freebsd2*) 4742b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4743b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4744b290cf36Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4745b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4746b290cf36Smrg ;; 4747191cded7Smrg 4748b290cf36Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 4749b290cf36Smrg freebsd* | dragonfly*) 4750b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 4751b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4752b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4753b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4754b290cf36Smrg ;; 4755191cded7Smrg 4756b290cf36Smrg hpux9*) 4757b290cf36Smrg if test "$GCC" = yes; then 4758b290cf36Smrg _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' 4759b290cf36Smrg else 4760b290cf36Smrg _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' 4761b290cf36Smrg fi 4762b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4763b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4764b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4765191cded7Smrg 4766b290cf36Smrg # hardcode_minus_L: Not really in the search PATH, 4767b290cf36Smrg # but as the default location of the library. 4768b290cf36Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4769b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4770b290cf36Smrg ;; 4771191cded7Smrg 4772b290cf36Smrg hpux10*) 4773b290cf36Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 4774b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4775b290cf36Smrg else 4776b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 4777b290cf36Smrg fi 4778b290cf36Smrg if test "$with_gnu_ld" = no; then 4779b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4780b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 4781b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4782b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4783b290cf36Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4784b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4785b290cf36Smrg # hardcode_minus_L: Not really in the search PATH, 4786b290cf36Smrg # but as the default location of the library. 4787b290cf36Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4788b290cf36Smrg fi 4789b290cf36Smrg ;; 4790191cded7Smrg 4791b290cf36Smrg hpux11*) 4792b290cf36Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 4793b290cf36Smrg case $host_cpu in 4794b290cf36Smrg hppa*64*) 4795b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4796b290cf36Smrg ;; 4797b290cf36Smrg ia64*) 4798b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4799b290cf36Smrg ;; 4800b290cf36Smrg *) 4801b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4802b290cf36Smrg ;; 4803b290cf36Smrg esac 4804b290cf36Smrg else 4805b290cf36Smrg case $host_cpu in 4806b290cf36Smrg hppa*64*) 4807b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4808b290cf36Smrg ;; 4809b290cf36Smrg ia64*) 4810b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4811b290cf36Smrg ;; 4812b290cf36Smrg *) 4813b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4814b290cf36Smrg ;; 4815b290cf36Smrg esac 4816b290cf36Smrg fi 4817b290cf36Smrg if test "$with_gnu_ld" = no; then 4818b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4819b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4820191cded7Smrg 4821b290cf36Smrg case $host_cpu in 4822b290cf36Smrg hppa*64*|ia64*) 4823b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4824b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4825b290cf36Smrg ;; 4826b290cf36Smrg *) 4827b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4828b290cf36Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4829b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4830191cded7Smrg 4831b290cf36Smrg # hardcode_minus_L: Not really in the search PATH, 4832b290cf36Smrg # but as the default location of the library. 4833b290cf36Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4834b290cf36Smrg ;; 4835b290cf36Smrg esac 4836b290cf36Smrg fi 4837b290cf36Smrg ;; 4838191cded7Smrg 4839b290cf36Smrg irix5* | irix6* | nonstopux*) 4840b290cf36Smrg if test "$GCC" = yes; then 4841b290cf36Smrg _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' 4842b290cf36Smrg # Try to use the -exported_symbol ld option, if it does not 4843b290cf36Smrg # work, assume that -exports_file does not work either and 4844b290cf36Smrg # implicitly export all symbols. 4845b290cf36Smrg save_LDFLAGS="$LDFLAGS" 4846b290cf36Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 4847b290cf36Smrg AC_LINK_IFELSE(int foo(void) {}, 4848b290cf36Smrg _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' 4849b290cf36Smrg ) 4850b290cf36Smrg LDFLAGS="$save_LDFLAGS" 4851b290cf36Smrg else 4852b290cf36Smrg _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' 4853b290cf36Smrg _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' 4854b290cf36Smrg fi 4855b290cf36Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4856b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4857b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4858b290cf36Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 4859b290cf36Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4860b290cf36Smrg ;; 4861191cded7Smrg 4862b290cf36Smrg netbsd*) 4863b290cf36Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4864b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 4865b290cf36Smrg else 4866b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 4867b290cf36Smrg fi 4868b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4869b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4870b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4871b290cf36Smrg ;; 4872191cded7Smrg 4873b290cf36Smrg newsos6) 4874b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4875b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4876b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4877b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4878b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4879b290cf36Smrg ;; 4880191cded7Smrg 4881b290cf36Smrg *nto* | *qnx*) 4882b290cf36Smrg ;; 4883191cded7Smrg 4884b290cf36Smrg openbsd*) 4885b290cf36Smrg if test -f /usr/libexec/ld.so; then 4886b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4887b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4888b290cf36Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4889b290cf36Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4890b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 4891b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 4892b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4893b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4894b290cf36Smrg else 4895b290cf36Smrg case $host_os in 4896b290cf36Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 4897b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4898b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4899b290cf36Smrg ;; 4900b290cf36Smrg *) 4901b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 4902b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4903b290cf36Smrg ;; 4904b290cf36Smrg esac 4905b290cf36Smrg fi 4906b290cf36Smrg else 4907b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4908b290cf36Smrg fi 4909b290cf36Smrg ;; 4910191cded7Smrg 4911b290cf36Smrg os2*) 4912b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4913b290cf36Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4914b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4915b290cf36Smrg _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' 4916b290cf36Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 4917b290cf36Smrg ;; 4918191cded7Smrg 4919b290cf36Smrg osf3*) 4920b290cf36Smrg if test "$GCC" = yes; then 4921b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4922b290cf36Smrg _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' 4923b290cf36Smrg else 4924b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4925b290cf36Smrg _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' 4926b290cf36Smrg fi 4927b290cf36Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4928b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4929b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4930b290cf36Smrg ;; 4931191cded7Smrg 4932b290cf36Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 4933b290cf36Smrg if test "$GCC" = yes; then 4934b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4935b290cf36Smrg _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' 4936b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4937b290cf36Smrg else 4938b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4939b290cf36Smrg _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' 4940b290cf36Smrg _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~ 4941b290cf36Smrg $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' 4942191cded7Smrg 4943b290cf36Smrg # Both c and cxx compiler support -rpath directly 4944b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 4945b290cf36Smrg fi 4946b290cf36Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4947b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4948b290cf36Smrg ;; 4949191cded7Smrg 4950b290cf36Smrg solaris*) 4951b290cf36Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 4952b290cf36Smrg if test "$GCC" = yes; then 4953b290cf36Smrg wlarc='${wl}' 4954b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4955b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4956b290cf36Smrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 4957b290cf36Smrg else 4958b290cf36Smrg case `$CC -V 2>&1` in 4959b290cf36Smrg *"Compilers 5.0"*) 4960b290cf36Smrg wlarc='' 4961b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 4962b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4963b290cf36Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 4964b290cf36Smrg ;; 4965b290cf36Smrg *) 4966b290cf36Smrg wlarc='${wl}' 4967b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 4968b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4969b290cf36Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 4970b290cf36Smrg ;; 4971b290cf36Smrg esac 4972b290cf36Smrg fi 4973b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4974b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4975b290cf36Smrg case $host_os in 4976b290cf36Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 4977b290cf36Smrg *) 4978b290cf36Smrg # The compiler driver will combine and reorder linker options, 4979b290cf36Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 4980b290cf36Smrg # but is careful enough not to reorder. 4981b290cf36Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 4982b290cf36Smrg if test "$GCC" = yes; then 4983b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 4984b290cf36Smrg else 4985b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 4986b290cf36Smrg fi 4987b290cf36Smrg ;; 4988b290cf36Smrg esac 4989b290cf36Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4990b290cf36Smrg ;; 4991191cded7Smrg 4992b290cf36Smrg sunos4*) 4993b290cf36Smrg if test "x$host_vendor" = xsequent; then 4994b290cf36Smrg # Use $CC to link under sequent, because it throws in some extra .o 4995b290cf36Smrg # files that make .init and .fini sections work. 4996b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 4997b290cf36Smrg else 4998b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 4999b290cf36Smrg fi 5000b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5001b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5002b290cf36Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5003b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5004b290cf36Smrg ;; 5005191cded7Smrg 5006b290cf36Smrg sysv4) 5007b290cf36Smrg case $host_vendor in 5008b290cf36Smrg sni) 5009b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5010b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5011b290cf36Smrg ;; 5012b290cf36Smrg siemens) 5013b290cf36Smrg ## LD is ld it makes a PLAMLIB 5014b290cf36Smrg ## CC just makes a GrossModule. 5015b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5016b290cf36Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5017b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5018b290cf36Smrg ;; 5019b290cf36Smrg motorola) 5020b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5021b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5022b290cf36Smrg ;; 5023b290cf36Smrg esac 5024b290cf36Smrg runpath_var='LD_RUN_PATH' 5025b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5026b290cf36Smrg ;; 5027191cded7Smrg 5028b290cf36Smrg sysv4.3*) 5029b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5030b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5031b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5032b290cf36Smrg ;; 5033191cded7Smrg 5034b290cf36Smrg sysv4*MP*) 5035b290cf36Smrg if test -d /usr/nec; then 5036b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5037b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5038b290cf36Smrg runpath_var=LD_RUN_PATH 5039b290cf36Smrg hardcode_runpath_var=yes 5040b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5041b290cf36Smrg fi 5042b290cf36Smrg ;; 5043191cded7Smrg 5044b290cf36Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5045b290cf36Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5046b290cf36Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5047b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5048b290cf36Smrg runpath_var='LD_RUN_PATH' 5049191cded7Smrg 5050b290cf36Smrg if test "$GCC" = yes; then 5051b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5052b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5053b290cf36Smrg else 5054b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5055b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5056b290cf36Smrg fi 5057b290cf36Smrg ;; 5058191cded7Smrg 5059b290cf36Smrg sysv5* | sco3.2v5* | sco5v6*) 5060b290cf36Smrg # Note: We can NOT use -z defs as we might desire, because we do not 5061b290cf36Smrg # link with -lc, and that would cause any symbols used from libc to 5062b290cf36Smrg # always be unresolved, which means just about no library would 5063b290cf36Smrg # ever link correctly. If we're not using GNU ld we use -z text 5064b290cf36Smrg # though, which does catch some bad symbols but isn't as heavy-handed 5065b290cf36Smrg # as -z defs. 5066b290cf36Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5067b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5068b290cf36Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5069b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5070b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5071b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5072b290cf36Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5073b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5074b290cf36Smrg runpath_var='LD_RUN_PATH' 5075191cded7Smrg 5076b290cf36Smrg if test "$GCC" = yes; then 5077b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5078b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5079b290cf36Smrg else 5080b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5081b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5082b290cf36Smrg fi 5083b290cf36Smrg ;; 5084191cded7Smrg 5085b290cf36Smrg uts4*) 5086b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5087b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5088b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5089b290cf36Smrg ;; 5090191cded7Smrg 5091b290cf36Smrg *) 5092b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5093b290cf36Smrg ;; 5094b290cf36Smrg esac 5095191cded7Smrg 5096b290cf36Smrg if test x$host_vendor = xsni; then 5097b290cf36Smrg case $host in 5098b290cf36Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5099b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5100b290cf36Smrg ;; 5101b290cf36Smrg esac 5102b290cf36Smrg fi 5103191cded7Smrg fi 5104b290cf36Smrg]) 5105b290cf36SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5106b290cf36Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5107b290cf36Smrg 5108b290cf36Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5109b290cf36Smrg 5110b290cf36Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5111b290cf36Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5112b290cf36Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 5113b290cf36Smrg [The commands to extract the exported symbol list from a shared archive]) 5114b290cf36Smrg 5115b290cf36Smrg# 5116b290cf36Smrg# Do we need to explicitly link libc? 5117b290cf36Smrg# 5118b290cf36Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5119b290cf36Smrgx|xyes) 5120b290cf36Smrg # Assume -lc should be added 5121b290cf36Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5122b290cf36Smrg 5123b290cf36Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5124b290cf36Smrg case $_LT_TAGVAR(archive_cmds, $1) in 5125b290cf36Smrg *'~'*) 5126b290cf36Smrg # FIXME: we may have to deal with multi-command sequences. 5127b290cf36Smrg ;; 5128b290cf36Smrg '$CC '*) 5129b290cf36Smrg # Test whether the compiler implicitly links with -lc since on some 5130b290cf36Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5131b290cf36Smrg # to ld, don't add -lc before -lgcc. 5132b290cf36Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 5133b290cf36Smrg $RM conftest* 5134b290cf36Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5135b290cf36Smrg 5136b290cf36Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5137b290cf36Smrg soname=conftest 5138b290cf36Smrg lib=conftest 5139b290cf36Smrg libobjs=conftest.$ac_objext 5140b290cf36Smrg deplibs= 5141b290cf36Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5142b290cf36Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5143b290cf36Smrg compiler_flags=-v 5144b290cf36Smrg linker_flags=-v 5145b290cf36Smrg verstring= 5146b290cf36Smrg output_objdir=. 5147b290cf36Smrg libname=conftest 5148b290cf36Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5149b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 5150b290cf36Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5151b290cf36Smrg then 5152b290cf36Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5153b290cf36Smrg else 5154b290cf36Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5155b290cf36Smrg fi 5156b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5157b290cf36Smrg else 5158b290cf36Smrg cat conftest.err 1>&5 5159b290cf36Smrg fi 5160b290cf36Smrg $RM conftest* 5161b290cf36Smrg AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) 5162b290cf36Smrg ;; 5163b290cf36Smrg esac 5164191cded7Smrg fi 5165191cded7Smrg ;; 5166191cded7Smrgesac 5167191cded7Smrg 5168b290cf36Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5169b290cf36Smrg [Whether or not to add -lc for building shared libraries]) 5170b290cf36Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5171b290cf36Smrg [enable_shared_with_static_runtimes], [0], 5172b290cf36Smrg [Whether or not to disallow shared libs when runtime libs are static]) 5173b290cf36Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5174b290cf36Smrg [Compiler flag to allow reflexive dlopens]) 5175b290cf36Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5176b290cf36Smrg [Compiler flag to generate shared objects directly from archives]) 5177b290cf36Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 5178b290cf36Smrg [Whether the compiler copes with passing no objects directly]) 5179b290cf36Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5180b290cf36Smrg [Create an old-style archive from a shared archive]) 5181b290cf36Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5182b290cf36Smrg [Create a temporary old-style archive to link instead of a shared archive]) 5183b290cf36Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5184b290cf36Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5185b290cf36Smrg_LT_TAGDECL([], [module_cmds], [2], 5186b290cf36Smrg [Commands used to build a loadable module if different from building 5187b290cf36Smrg a shared archive.]) 5188b290cf36Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5189b290cf36Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 5190b290cf36Smrg [Whether we are building with GNU ld or not]) 5191b290cf36Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5192b290cf36Smrg [Flag that allows shared libraries with undefined symbols to be built]) 5193b290cf36Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 5194b290cf36Smrg [Flag that enforces no undefined symbols]) 5195b290cf36Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5196b290cf36Smrg [Flag to hardcode $libdir into a binary during linking. 5197b290cf36Smrg This must work even if $libdir does not exist]) 5198b290cf36Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 5199b290cf36Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 5200b290cf36Smrg during linking. This must work even if $libdir does not exist]]) 5201b290cf36Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5202b290cf36Smrg [Whether we need a single "-rpath" flag with a separated argument]) 5203b290cf36Smrg_LT_TAGDECL([], [hardcode_direct], [0], 5204b290cf36Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5205b290cf36Smrg DIR into the resulting binary]) 5206b290cf36Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5207b290cf36Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5208b290cf36Smrg DIR into the resulting binary and the resulting library dependency is 5209b290cf36Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5210b290cf36Smrg library is relocated]) 5211b290cf36Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5212b290cf36Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5213b290cf36Smrg into the resulting binary]) 5214b290cf36Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5215b290cf36Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5216b290cf36Smrg into the resulting binary]) 5217b290cf36Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 5218b290cf36Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 5219b290cf36Smrg into the library and all subsequent libraries and executables linked 5220b290cf36Smrg against it]) 5221b290cf36Smrg_LT_TAGDECL([], [inherit_rpath], [0], 5222b290cf36Smrg [Set to yes if linker adds runtime paths of dependent libraries 5223b290cf36Smrg to runtime path list]) 5224b290cf36Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 5225b290cf36Smrg [Whether libtool must link a program against all its dependency libraries]) 5226b290cf36Smrg_LT_TAGDECL([], [fix_srcfile_path], [1], 5227b290cf36Smrg [Fix the shell variable $srcfile for the compiler]) 5228b290cf36Smrg_LT_TAGDECL([], [always_export_symbols], [0], 5229b290cf36Smrg [Set to "yes" if exported symbols are required]) 5230b290cf36Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5231b290cf36Smrg [The commands to list exported symbols]) 5232b290cf36Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 5233b290cf36Smrg [Symbols that should not be listed in the preloaded symbols]) 5234b290cf36Smrg_LT_TAGDECL([], [include_expsyms], [1], 5235b290cf36Smrg [Symbols that must always be exported]) 5236b290cf36Smrg_LT_TAGDECL([], [prelink_cmds], [2], 5237b290cf36Smrg [Commands necessary for linking programs (against libraries) with templates]) 5238b290cf36Smrg_LT_TAGDECL([], [file_list_spec], [1], 5239b290cf36Smrg [Specify filename containing input files]) 5240b290cf36Smrgdnl FIXME: Not yet implemented 5241b290cf36Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5242b290cf36Smrgdnl [Compiler flag to generate thread safe objects]) 5243b290cf36Smrg])# _LT_LINKER_SHLIBS 5244b290cf36Smrg 5245b290cf36Smrg 5246b290cf36Smrg# _LT_LANG_C_CONFIG([TAG]) 5247b290cf36Smrg# ------------------------ 5248b290cf36Smrg# Ensure that the configuration variables for a C compiler are suitably 5249b290cf36Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5250b290cf36Smrg# the compiler configuration to `libtool'. 5251b290cf36Smrgm4_defun([_LT_LANG_C_CONFIG], 5252b290cf36Smrg[m4_require([_LT_DECL_EGREP])dnl 5253b290cf36Smrglt_save_CC="$CC" 5254b290cf36SmrgAC_LANG_PUSH(C) 5255191cded7Smrg 5256b290cf36Smrg# Source file extension for C test sources. 5257b290cf36Smrgac_ext=c 5258191cded7Smrg 5259b290cf36Smrg# Object file extension for compiled C test sources. 5260b290cf36Smrgobjext=o 5261b290cf36Smrg_LT_TAGVAR(objext, $1)=$objext 5262191cded7Smrg 5263b290cf36Smrg# Code to be used in simple compile tests 5264b290cf36Smrglt_simple_compile_test_code="int some_variable = 0;" 5265191cded7Smrg 5266b290cf36Smrg# Code to be used in simple link tests 5267b290cf36Smrglt_simple_link_test_code='int main(){return(0);}' 5268191cded7Smrg 5269b290cf36Smrg_LT_TAG_COMPILER 5270b290cf36Smrg# Save the default compiler, since it gets overwritten when the other 5271b290cf36Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5272b290cf36Smrgcompiler_DEFAULT=$CC 5273191cded7Smrg 5274b290cf36Smrg# save warnings/boilerplate of simple test code 5275b290cf36Smrg_LT_COMPILER_BOILERPLATE 5276b290cf36Smrg_LT_LINKER_BOILERPLATE 5277191cded7Smrg 5278b290cf36Smrgif test -n "$compiler"; then 5279b290cf36Smrg _LT_COMPILER_NO_RTTI($1) 5280b290cf36Smrg _LT_COMPILER_PIC($1) 5281b290cf36Smrg _LT_COMPILER_C_O($1) 5282b290cf36Smrg _LT_COMPILER_FILE_LOCKS($1) 5283b290cf36Smrg _LT_LINKER_SHLIBS($1) 5284b290cf36Smrg _LT_SYS_DYNAMIC_LINKER($1) 5285b290cf36Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 5286b290cf36Smrg LT_SYS_DLOPEN_SELF 5287b290cf36Smrg _LT_CMD_STRIPLIB 5288b290cf36Smrg 5289b290cf36Smrg # Report which library types will actually be built 5290b290cf36Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5291b290cf36Smrg AC_MSG_RESULT([$can_build_shared]) 5292b290cf36Smrg 5293b290cf36Smrg AC_MSG_CHECKING([whether to build shared libraries]) 5294b290cf36Smrg test "$can_build_shared" = "no" && enable_shared=no 5295b290cf36Smrg 5296b290cf36Smrg # On AIX, shared libraries and static libraries use the same namespace, and 5297b290cf36Smrg # are all built from PIC. 5298b290cf36Smrg case $host_os in 5299b290cf36Smrg aix3*) 5300b290cf36Smrg test "$enable_shared" = yes && enable_static=no 5301b290cf36Smrg if test -n "$RANLIB"; then 5302b290cf36Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5303b290cf36Smrg postinstall_cmds='$RANLIB $lib' 5304b290cf36Smrg fi 5305b290cf36Smrg ;; 5306191cded7Smrg 5307b290cf36Smrg aix[[4-9]]*) 5308b290cf36Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5309b290cf36Smrg test "$enable_shared" = yes && enable_static=no 5310b290cf36Smrg fi 5311b290cf36Smrg ;; 5312b290cf36Smrg esac 5313b290cf36Smrg AC_MSG_RESULT([$enable_shared]) 5314191cded7Smrg 5315b290cf36Smrg AC_MSG_CHECKING([whether to build static libraries]) 5316b290cf36Smrg # Make sure either enable_shared or enable_static is yes. 5317b290cf36Smrg test "$enable_shared" = yes || enable_static=yes 5318b290cf36Smrg AC_MSG_RESULT([$enable_static]) 5319191cded7Smrg 5320b290cf36Smrg _LT_CONFIG($1) 5321b290cf36Smrgfi 5322b290cf36SmrgAC_LANG_POP 5323b290cf36SmrgCC="$lt_save_CC" 5324b290cf36Smrg])# _LT_LANG_C_CONFIG 5325191cded7Smrg 5326191cded7Smrg 5327b290cf36Smrg# _LT_PROG_CXX 5328b290cf36Smrg# ------------ 5329b290cf36Smrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ 5330b290cf36Smrg# compiler, we have our own version here. 5331b290cf36Smrgm4_defun([_LT_PROG_CXX], 5332b290cf36Smrg[ 5333b290cf36Smrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) 5334b290cf36SmrgAC_PROG_CXX 5335b290cf36Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5336b290cf36Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5337b290cf36Smrg (test "X$CXX" != "Xg++"))) ; then 5338b290cf36Smrg AC_PROG_CXXCPP 5339b290cf36Smrgelse 5340b290cf36Smrg _lt_caught_CXX_error=yes 5341b290cf36Smrgfi 5342b290cf36Smrgpopdef([AC_MSG_ERROR]) 5343b290cf36Smrg])# _LT_PROG_CXX 5344b290cf36Smrg 5345b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 5346b290cf36Smrgdnl AC_DEFUN([_LT_PROG_CXX], []) 5347b290cf36Smrg 5348b290cf36Smrg 5349b290cf36Smrg# _LT_LANG_CXX_CONFIG([TAG]) 5350b290cf36Smrg# -------------------------- 5351b290cf36Smrg# Ensure that the configuration variables for a C++ compiler are suitably 5352b290cf36Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5353b290cf36Smrg# the compiler configuration to `libtool'. 5354b290cf36Smrgm4_defun([_LT_LANG_CXX_CONFIG], 5355b290cf36Smrg[AC_REQUIRE([_LT_PROG_CXX])dnl 5356b290cf36Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5357b290cf36Smrgm4_require([_LT_DECL_EGREP])dnl 5358b290cf36Smrg 5359b290cf36SmrgAC_LANG_PUSH(C++) 5360b290cf36Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5361b290cf36Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 5362b290cf36Smrg_LT_TAGVAR(always_export_symbols, $1)=no 5363b290cf36Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5364b290cf36Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 5365b290cf36Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5366b290cf36Smrg_LT_TAGVAR(hardcode_direct, $1)=no 5367b290cf36Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5368b290cf36Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5369b290cf36Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5370b290cf36Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5371b290cf36Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5372b290cf36Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5373b290cf36Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 5374b290cf36Smrg_LT_TAGVAR(inherit_rpath, $1)=no 5375b290cf36Smrg_LT_TAGVAR(module_cmds, $1)= 5376b290cf36Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 5377b290cf36Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5378b290cf36Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5379b290cf36Smrg_LT_TAGVAR(no_undefined_flag, $1)= 5380b290cf36Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5381b290cf36Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5382b290cf36Smrg 5383b290cf36Smrg# Source file extension for C++ test sources. 5384b290cf36Smrgac_ext=cpp 5385b290cf36Smrg 5386b290cf36Smrg# Object file extension for compiled C++ test sources. 5387b290cf36Smrgobjext=o 5388b290cf36Smrg_LT_TAGVAR(objext, $1)=$objext 5389b290cf36Smrg 5390b290cf36Smrg# No sense in running all these tests if we already determined that 5391b290cf36Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 5392b290cf36Smrg# are currently assumed to apply to all compilers on this platform, 5393b290cf36Smrg# and will be corrupted by setting them based on a non-working compiler. 5394b290cf36Smrgif test "$_lt_caught_CXX_error" != yes; then 5395b290cf36Smrg # Code to be used in simple compile tests 5396b290cf36Smrg lt_simple_compile_test_code="int some_variable = 0;" 5397b290cf36Smrg 5398b290cf36Smrg # Code to be used in simple link tests 5399b290cf36Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5400b290cf36Smrg 5401b290cf36Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5402b290cf36Smrg _LT_TAG_COMPILER 5403b290cf36Smrg 5404b290cf36Smrg # save warnings/boilerplate of simple test code 5405b290cf36Smrg _LT_COMPILER_BOILERPLATE 5406b290cf36Smrg _LT_LINKER_BOILERPLATE 5407b290cf36Smrg 5408b290cf36Smrg # Allow CC to be a program name with arguments. 5409b290cf36Smrg lt_save_CC=$CC 5410b290cf36Smrg lt_save_LD=$LD 5411b290cf36Smrg lt_save_GCC=$GCC 5412b290cf36Smrg GCC=$GXX 5413b290cf36Smrg lt_save_with_gnu_ld=$with_gnu_ld 5414b290cf36Smrg lt_save_path_LD=$lt_cv_path_LD 5415b290cf36Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5416b290cf36Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5417191cded7Smrg else 5418b290cf36Smrg $as_unset lt_cv_prog_gnu_ld 5419191cded7Smrg fi 5420b290cf36Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 5421b290cf36Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 5422191cded7Smrg else 5423b290cf36Smrg $as_unset lt_cv_path_LD 5424191cded7Smrg fi 5425b290cf36Smrg test -z "${LDCXX+set}" || LD=$LDCXX 5426b290cf36Smrg CC=${CXX-"c++"} 5427b290cf36Smrg compiler=$CC 5428b290cf36Smrg _LT_TAGVAR(compiler, $1)=$CC 5429b290cf36Smrg _LT_CC_BASENAME([$compiler]) 5430191cded7Smrg 5431b290cf36Smrg if test -n "$compiler"; then 5432b290cf36Smrg # We don't want -fno-exception when compiling C++ code, so set the 5433b290cf36Smrg # no_builtin_flag separately 5434b290cf36Smrg if test "$GXX" = yes; then 5435b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5436b290cf36Smrg else 5437b290cf36Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5438b290cf36Smrg fi 5439191cded7Smrg 5440b290cf36Smrg if test "$GXX" = yes; then 5441b290cf36Smrg # Set up default GNU C++ configuration 5442191cded7Smrg 5443b290cf36Smrg LT_PATH_LD 5444191cded7Smrg 5445b290cf36Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5446b290cf36Smrg # archiving commands below assume that GNU ld is being used. 5447b290cf36Smrg if test "$with_gnu_ld" = yes; then 5448b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5449b290cf36Smrg _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' 5450b290cf36Smrg 5451b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5452b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5453b290cf36Smrg 5454b290cf36Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5455b290cf36Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5456b290cf36Smrg # investigate it a little bit more. (MM) 5457b290cf36Smrg wlarc='${wl}' 5458b290cf36Smrg 5459b290cf36Smrg # ancient GNU ld didn't support --whole-archive et. al. 5460b290cf36Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5461b290cf36Smrg $GREP 'no-whole-archive' > /dev/null; then 5462b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5463b290cf36Smrg else 5464b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5465b290cf36Smrg fi 5466b290cf36Smrg else 5467b290cf36Smrg with_gnu_ld=no 5468b290cf36Smrg wlarc= 5469b290cf36Smrg 5470b290cf36Smrg # A generic and very simple default shared library creation 5471b290cf36Smrg # command for GNU C++ for the case where it uses the native 5472b290cf36Smrg # linker, instead of GNU ld. If possible, this setting should 5473b290cf36Smrg # overridden to take advantage of the native linker features on 5474b290cf36Smrg # the platform it is being used on. 5475b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5476191cded7Smrg fi 5477b290cf36Smrg 5478b290cf36Smrg # Commands to make compiler produce verbose output that lists 5479b290cf36Smrg # what "hidden" libraries, object files and flags are used when 5480b290cf36Smrg # linking a shared library. 5481b290cf36Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 5482b290cf36Smrg 5483b290cf36Smrg else 5484b290cf36Smrg GXX=no 5485b290cf36Smrg with_gnu_ld=no 5486b290cf36Smrg wlarc= 5487b290cf36Smrg fi 5488b290cf36Smrg 5489b290cf36Smrg # PORTME: fill in a description of your system's C++ link characteristics 5490b290cf36Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5491b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5492191cded7Smrg case $host_os in 5493b290cf36Smrg aix3*) 5494b290cf36Smrg # FIXME: insert proper C++ library support 5495b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5496b290cf36Smrg ;; 5497b290cf36Smrg aix[[4-9]]*) 5498b290cf36Smrg if test "$host_cpu" = ia64; then 5499b290cf36Smrg # On IA64, the linker does run time linking by default, so we don't 5500b290cf36Smrg # have to do anything special. 5501b290cf36Smrg aix_use_runtimelinking=no 5502b290cf36Smrg exp_sym_flag='-Bexport' 5503b290cf36Smrg no_entry_flag="" 5504b290cf36Smrg else 5505b290cf36Smrg aix_use_runtimelinking=no 5506b290cf36Smrg 5507b290cf36Smrg # Test if we are trying to use run time linking or normal 5508b290cf36Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5509b290cf36Smrg # need to do runtime linking. 5510b290cf36Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5511b290cf36Smrg for ld_flag in $LDFLAGS; do 5512b290cf36Smrg case $ld_flag in 5513b290cf36Smrg *-brtl*) 5514b290cf36Smrg aix_use_runtimelinking=yes 5515b290cf36Smrg break 5516b290cf36Smrg ;; 5517b290cf36Smrg esac 5518b290cf36Smrg done 5519b290cf36Smrg ;; 5520b290cf36Smrg esac 5521b290cf36Smrg 5522b290cf36Smrg exp_sym_flag='-bexport' 5523b290cf36Smrg no_entry_flag='-bnoentry' 5524b290cf36Smrg fi 5525b290cf36Smrg 5526b290cf36Smrg # When large executables or shared objects are built, AIX ld can 5527b290cf36Smrg # have problems creating the table of contents. If linking a library 5528b290cf36Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5529b290cf36Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5530b290cf36Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5531b290cf36Smrg 5532b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='' 5533b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5534b290cf36Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5535b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5536b290cf36Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5537b290cf36Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5538b290cf36Smrg 5539b290cf36Smrg if test "$GXX" = yes; then 5540b290cf36Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5541b290cf36Smrg # We only want to do this on AIX 4.2 and lower, the check 5542b290cf36Smrg # below for broken collect2 doesn't work under 4.3+ 5543b290cf36Smrg collect2name=`${CC} -print-prog-name=collect2` 5544b290cf36Smrg if test -f "$collect2name" && 5545b290cf36Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5546b290cf36Smrg then 5547b290cf36Smrg # We have reworked collect2 5548b290cf36Smrg : 5549b290cf36Smrg else 5550b290cf36Smrg # We have old collect2 5551b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5552b290cf36Smrg # It fails to find uninstalled libraries when the uninstalled 5553b290cf36Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5554b290cf36Smrg # to unsupported forces relinking 5555b290cf36Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5556b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5557b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5558b290cf36Smrg fi 5559b290cf36Smrg esac 5560b290cf36Smrg shared_flag='-shared' 5561b290cf36Smrg if test "$aix_use_runtimelinking" = yes; then 5562b290cf36Smrg shared_flag="$shared_flag "'${wl}-G' 5563b290cf36Smrg fi 5564b290cf36Smrg else 5565b290cf36Smrg # not using gcc 5566b290cf36Smrg if test "$host_cpu" = ia64; then 5567b290cf36Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5568b290cf36Smrg # chokes on -Wl,-G. The following line is correct: 5569b290cf36Smrg shared_flag='-G' 5570b290cf36Smrg else 5571b290cf36Smrg if test "$aix_use_runtimelinking" = yes; then 5572b290cf36Smrg shared_flag='${wl}-G' 5573b290cf36Smrg else 5574b290cf36Smrg shared_flag='${wl}-bM:SRE' 5575b290cf36Smrg fi 5576b290cf36Smrg fi 5577b290cf36Smrg fi 5578b290cf36Smrg 5579b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5580b290cf36Smrg # It seems that -bexpall does not export symbols beginning with 5581b290cf36Smrg # underscore (_), so it is better to generate a list of symbols to 5582b290cf36Smrg # export. 5583b290cf36Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5584b290cf36Smrg if test "$aix_use_runtimelinking" = yes; then 5585b290cf36Smrg # Warning - without using the other runtime loading flags (-brtl), 5586b290cf36Smrg # -berok will link without error, but may produce a broken library. 5587b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5588b290cf36Smrg # Determine the default libpath from the value encoded in an empty 5589b290cf36Smrg # executable. 5590b290cf36Smrg _LT_SYS_MODULE_PATH_AIX 5591b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5592b290cf36Smrg 5593b290cf36Smrg _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" 5594b290cf36Smrg else 5595b290cf36Smrg if test "$host_cpu" = ia64; then 5596b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5597b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5598b290cf36Smrg _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" 5599b290cf36Smrg else 5600b290cf36Smrg # Determine the default libpath from the value encoded in an 5601b290cf36Smrg # empty executable. 5602b290cf36Smrg _LT_SYS_MODULE_PATH_AIX 5603b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5604b290cf36Smrg # Warning - without using the other run time loading flags, 5605b290cf36Smrg # -berok will link without error, but may produce a broken library. 5606b290cf36Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5607b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5608b290cf36Smrg # Exported symbols can be pulled into shared objects from archives 5609b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5610b290cf36Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5611b290cf36Smrg # This is similar to how AIX traditionally builds its shared 5612b290cf36Smrg # libraries. 5613b290cf36Smrg _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' 5614b290cf36Smrg fi 5615b290cf36Smrg fi 5616b290cf36Smrg ;; 5617b290cf36Smrg 5618b290cf36Smrg beos*) 5619b290cf36Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5620b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5621b290cf36Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5622b290cf36Smrg # support --undefined. This deserves some investigation. FIXME 5623b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5624191cded7Smrg else 5625b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5626191cded7Smrg fi 5627191cded7Smrg ;; 5628b290cf36Smrg 5629191cded7Smrg chorus*) 5630b290cf36Smrg case $cc_basename in 5631b290cf36Smrg *) 5632b290cf36Smrg # FIXME: insert proper C++ library support 5633b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5634191cded7Smrg ;; 5635b290cf36Smrg esac 5636b290cf36Smrg ;; 5637b290cf36Smrg 5638b290cf36Smrg cygwin* | mingw* | pw32* | cegcc*) 5639b290cf36Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5640b290cf36Smrg # as there is no search path for DLLs. 5641b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5642b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5643b290cf36Smrg _LT_TAGVAR(always_export_symbols, $1)=no 5644b290cf36Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5645b290cf36Smrg 5646b290cf36Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5647b290cf36Smrg _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' 5648b290cf36Smrg # If the export-symbols file already is a .def file (1st line 5649b290cf36Smrg # is EXPORTS), use it as is; otherwise, prepend... 5650b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5651b290cf36Smrg cp $export_symbols $output_objdir/$soname.def; 5652b290cf36Smrg else 5653b290cf36Smrg echo EXPORTS > $output_objdir/$soname.def; 5654b290cf36Smrg cat $export_symbols >> $output_objdir/$soname.def; 5655b290cf36Smrg fi~ 5656b290cf36Smrg $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' 5657b290cf36Smrg else 5658b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5659b290cf36Smrg fi 5660b290cf36Smrg ;; 5661b290cf36Smrg darwin* | rhapsody*) 5662b290cf36Smrg _LT_DARWIN_LINKER_FEATURES($1) 5663191cded7Smrg ;; 5664b290cf36Smrg 5665191cded7Smrg dgux*) 5666b290cf36Smrg case $cc_basename in 5667b290cf36Smrg ec++*) 5668b290cf36Smrg # FIXME: insert proper C++ library support 5669b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5670191cded7Smrg ;; 5671b290cf36Smrg ghcx*) 5672191cded7Smrg # Green Hills C++ Compiler 5673b290cf36Smrg # FIXME: insert proper C++ library support 5674b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5675191cded7Smrg ;; 5676b290cf36Smrg *) 5677b290cf36Smrg # FIXME: insert proper C++ library support 5678b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5679191cded7Smrg ;; 5680b290cf36Smrg esac 5681b290cf36Smrg ;; 5682b290cf36Smrg 5683b290cf36Smrg freebsd[[12]]*) 5684b290cf36Smrg # C++ shared libraries reported to be fairly broken before 5685b290cf36Smrg # switch to ELF 5686b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5687b290cf36Smrg ;; 5688b290cf36Smrg 5689b290cf36Smrg freebsd-elf*) 5690b290cf36Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5691b290cf36Smrg ;; 5692b290cf36Smrg 5693b290cf36Smrg freebsd* | dragonfly*) 5694b290cf36Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 5695b290cf36Smrg # conventions 5696b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5697b290cf36Smrg ;; 5698b290cf36Smrg 5699b290cf36Smrg gnu*) 5700b290cf36Smrg ;; 5701b290cf36Smrg 5702b290cf36Smrg hpux9*) 5703b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5704b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5705b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5706b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5707b290cf36Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5708b290cf36Smrg # but as the default 5709b290cf36Smrg # location of the library. 5710b290cf36Smrg 5711b290cf36Smrg case $cc_basename in 5712b290cf36Smrg CC*) 5713b290cf36Smrg # FIXME: insert proper C++ library support 5714b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5715b290cf36Smrg ;; 5716b290cf36Smrg aCC*) 5717b290cf36Smrg _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' 5718b290cf36Smrg # Commands to make compiler produce verbose output that lists 5719b290cf36Smrg # what "hidden" libraries, object files and flags are used when 5720b290cf36Smrg # linking a shared library. 5721b290cf36Smrg # 5722b290cf36Smrg # There doesn't appear to be a way to prevent this compiler from 5723b290cf36Smrg # explicitly linking system object files so we need to strip them 5724b290cf36Smrg # from the output so that they don't get included in the library 5725b290cf36Smrg # dependencies. 5726b290cf36Smrg 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' 5727b290cf36Smrg ;; 5728b290cf36Smrg *) 5729b290cf36Smrg if test "$GXX" = yes; then 5730b290cf36Smrg _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' 5731b290cf36Smrg else 5732b290cf36Smrg # FIXME: insert proper C++ library support 5733b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5734b290cf36Smrg fi 5735b290cf36Smrg ;; 5736b290cf36Smrg esac 5737b290cf36Smrg ;; 5738b290cf36Smrg 5739b290cf36Smrg hpux10*|hpux11*) 5740b290cf36Smrg if test $with_gnu_ld = no; then 5741b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5742b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5743b290cf36Smrg 5744b290cf36Smrg case $host_cpu in 5745b290cf36Smrg hppa*64*|ia64*) 5746b290cf36Smrg ;; 5747b290cf36Smrg *) 5748b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5749b290cf36Smrg ;; 5750b290cf36Smrg esac 5751b290cf36Smrg fi 5752b290cf36Smrg case $host_cpu in 5753b290cf36Smrg hppa*64*|ia64*) 5754b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5755b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5756b290cf36Smrg ;; 5757b290cf36Smrg *) 5758b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5759b290cf36Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5760b290cf36Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5761b290cf36Smrg # but as the default 5762b290cf36Smrg # location of the library. 5763b290cf36Smrg ;; 5764b290cf36Smrg esac 5765b290cf36Smrg 5766b290cf36Smrg case $cc_basename in 5767b290cf36Smrg CC*) 5768b290cf36Smrg # FIXME: insert proper C++ library support 5769b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5770191cded7Smrg ;; 5771b290cf36Smrg aCC*) 5772191cded7Smrg case $host_cpu in 5773b290cf36Smrg hppa*64*) 5774b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5775b290cf36Smrg ;; 5776b290cf36Smrg ia64*) 5777b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5778b290cf36Smrg ;; 5779b290cf36Smrg *) 5780b290cf36Smrg _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' 5781b290cf36Smrg ;; 5782191cded7Smrg esac 5783b290cf36Smrg # Commands to make compiler produce verbose output that lists 5784b290cf36Smrg # what "hidden" libraries, object files and flags are used when 5785b290cf36Smrg # linking a shared library. 5786b290cf36Smrg # 5787b290cf36Smrg # There doesn't appear to be a way to prevent this compiler from 5788b290cf36Smrg # explicitly linking system object files so we need to strip them 5789b290cf36Smrg # from the output so that they don't get included in the library 5790b290cf36Smrg # dependencies. 5791b290cf36Smrg 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' 5792191cded7Smrg ;; 5793b290cf36Smrg *) 5794b290cf36Smrg if test "$GXX" = yes; then 5795b290cf36Smrg if test $with_gnu_ld = no; then 5796b290cf36Smrg case $host_cpu in 5797b290cf36Smrg hppa*64*) 5798b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5799b290cf36Smrg ;; 5800b290cf36Smrg ia64*) 5801b290cf36Smrg _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' 5802b290cf36Smrg ;; 5803b290cf36Smrg *) 5804b290cf36Smrg _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' 5805b290cf36Smrg ;; 5806b290cf36Smrg esac 5807b290cf36Smrg fi 5808b290cf36Smrg else 5809b290cf36Smrg # FIXME: insert proper C++ library support 5810b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5811b290cf36Smrg fi 5812191cded7Smrg ;; 5813b290cf36Smrg esac 5814b290cf36Smrg ;; 5815b290cf36Smrg 5816b290cf36Smrg interix[[3-9]]*) 5817b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5818b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5819b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5820b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5821b290cf36Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5822b290cf36Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5823b290cf36Smrg # default) and relocated if they conflict, which is a slow very memory 5824b290cf36Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5825b290cf36Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5826b290cf36Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5827b290cf36Smrg _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' 5828b290cf36Smrg _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' 5829191cded7Smrg ;; 5830b290cf36Smrg irix5* | irix6*) 5831b290cf36Smrg case $cc_basename in 5832b290cf36Smrg CC*) 5833b290cf36Smrg # SGI C++ 5834b290cf36Smrg _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' 5835b290cf36Smrg 5836b290cf36Smrg # Archives containing C++ object files must be created using 5837b290cf36Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 5838b290cf36Smrg # necessary to make sure instantiated templates are included 5839b290cf36Smrg # in the archive. 5840b290cf36Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 5841191cded7Smrg ;; 5842b290cf36Smrg *) 5843b290cf36Smrg if test "$GXX" = yes; then 5844b290cf36Smrg if test "$with_gnu_ld" = no; then 5845b290cf36Smrg _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' 5846b290cf36Smrg else 5847b290cf36Smrg _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' 5848b290cf36Smrg fi 5849b290cf36Smrg fi 5850b290cf36Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5851191cded7Smrg ;; 5852b290cf36Smrg esac 5853b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5854b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5855b290cf36Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5856b290cf36Smrg ;; 5857b290cf36Smrg 5858b290cf36Smrg linux* | k*bsd*-gnu) 5859b290cf36Smrg case $cc_basename in 5860b290cf36Smrg KCC*) 5861b290cf36Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 5862b290cf36Smrg 5863b290cf36Smrg # KCC will only create a shared library if the output file 5864b290cf36Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 5865b290cf36Smrg # to its proper name (with version) after linking. 5866b290cf36Smrg _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' 5867b290cf36Smrg _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' 5868b290cf36Smrg # Commands to make compiler produce verbose output that lists 5869b290cf36Smrg # what "hidden" libraries, object files and flags are used when 5870b290cf36Smrg # linking a shared library. 5871b290cf36Smrg # 5872b290cf36Smrg # There doesn't appear to be a way to prevent this compiler from 5873b290cf36Smrg # explicitly linking system object files so we need to strip them 5874b290cf36Smrg # from the output so that they don't get included in the library 5875b290cf36Smrg # dependencies. 5876b290cf36Smrg 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' 5877b290cf36Smrg 5878b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5879b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5880b290cf36Smrg 5881b290cf36Smrg # Archives containing C++ object files must be created using 5882b290cf36Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 5883b290cf36Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 5884191cded7Smrg ;; 5885b290cf36Smrg icpc* | ecpc* ) 5886191cded7Smrg # Intel C++ 5887b290cf36Smrg with_gnu_ld=yes 5888b290cf36Smrg # version 8.0 and above of icpc choke on multiply defined symbols 5889b290cf36Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 5890b290cf36Smrg # earlier do not add the objects themselves. 5891b290cf36Smrg case `$CC -V 2>&1` in 5892b290cf36Smrg *"Version 7."*) 5893b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5894b290cf36Smrg _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' 5895b290cf36Smrg ;; 5896b290cf36Smrg *) # Version 8.0 or newer 5897b290cf36Smrg tmp_idyn= 5898b290cf36Smrg case $host_cpu in 5899b290cf36Smrg ia64*) tmp_idyn=' -i_dynamic';; 5900b290cf36Smrg esac 5901b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5902b290cf36Smrg _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' 5903b290cf36Smrg ;; 5904b290cf36Smrg esac 5905b290cf36Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5906b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5907b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5908b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5909191cded7Smrg ;; 5910b290cf36Smrg pgCC* | pgcpp*) 5911b290cf36Smrg # Portland Group C++ compiler 5912b290cf36Smrg case `$CC -V` in 5913b290cf36Smrg *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) 5914b290cf36Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 5915b290cf36Smrg rm -rf $tpldir~ 5916b290cf36Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 5917b290cf36Smrg compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' 5918b290cf36Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 5919b290cf36Smrg rm -rf $tpldir~ 5920b290cf36Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 5921b290cf36Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ 5922b290cf36Smrg $RANLIB $oldlib' 5923b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 5924b290cf36Smrg rm -rf $tpldir~ 5925b290cf36Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 5926b290cf36Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 5927b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 5928b290cf36Smrg rm -rf $tpldir~ 5929b290cf36Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 5930b290cf36Smrg $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' 5931b290cf36Smrg ;; 5932b290cf36Smrg *) # Version 6 will use weak symbols 5933b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 5934b290cf36Smrg _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' 5935b290cf36Smrg ;; 5936b290cf36Smrg esac 5937b290cf36Smrg 5938b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5939b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5940b290cf36Smrg _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' 5941b290cf36Smrg ;; 5942191cded7Smrg cxx*) 5943191cded7Smrg # Compaq C++ 5944b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5945b290cf36Smrg _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' 5946b290cf36Smrg 5947b290cf36Smrg runpath_var=LD_RUN_PATH 5948b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5949b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5950b290cf36Smrg 5951b290cf36Smrg # Commands to make compiler produce verbose output that lists 5952b290cf36Smrg # what "hidden" libraries, object files and flags are used when 5953b290cf36Smrg # linking a shared library. 5954b290cf36Smrg # 5955b290cf36Smrg # There doesn't appear to be a way to prevent this compiler from 5956b290cf36Smrg # explicitly linking system object files so we need to strip them 5957b290cf36Smrg # from the output so that they don't get included in the library 5958b290cf36Smrg # dependencies. 5959b290cf36Smrg 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' 5960b290cf36Smrg ;; 5961b290cf36Smrg xl*) 5962b290cf36Smrg # IBM XL 8.0 on PPC, with GNU ld 5963b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5964b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5965b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5966b290cf36Smrg if test "x$supports_anon_versioning" = xyes; then 5967b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5968b290cf36Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5969b290cf36Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5970b290cf36Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5971b290cf36Smrg fi 5972191cded7Smrg ;; 5973191cded7Smrg *) 5974b290cf36Smrg case `$CC -V 2>&1 | sed 5q` in 5975b290cf36Smrg *Sun\ C*) 5976b290cf36Smrg # Sun C++ 5.9 5977b290cf36Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 5978b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5979b290cf36Smrg _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' 5980b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5981b290cf36Smrg _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' 5982b290cf36Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5983b290cf36Smrg 5984b290cf36Smrg # Not sure whether something based on 5985b290cf36Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 5986b290cf36Smrg # would be better. 5987b290cf36Smrg output_verbose_link_cmd='echo' 5988b290cf36Smrg 5989b290cf36Smrg # Archives containing C++ object files must be created using 5990b290cf36Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 5991b290cf36Smrg # necessary to make sure instantiated templates are included 5992b290cf36Smrg # in the archive. 5993b290cf36Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 5994b290cf36Smrg ;; 5995b290cf36Smrg esac 5996191cded7Smrg ;; 5997191cded7Smrg esac 5998191cded7Smrg ;; 5999b290cf36Smrg 6000191cded7Smrg lynxos*) 6001b290cf36Smrg # FIXME: insert proper C++ library support 6002b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6003191cded7Smrg ;; 6004b290cf36Smrg 6005191cded7Smrg m88k*) 6006b290cf36Smrg # FIXME: insert proper C++ library support 6007b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6008191cded7Smrg ;; 6009b290cf36Smrg 6010191cded7Smrg mvs*) 6011b290cf36Smrg case $cc_basename in 6012b290cf36Smrg cxx*) 6013b290cf36Smrg # FIXME: insert proper C++ library support 6014b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6015191cded7Smrg ;; 6016191cded7Smrg *) 6017b290cf36Smrg # FIXME: insert proper C++ library support 6018b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6019191cded7Smrg ;; 6020191cded7Smrg esac 6021191cded7Smrg ;; 6022b290cf36Smrg 6023191cded7Smrg netbsd*) 6024b290cf36Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6025b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6026b290cf36Smrg wlarc= 6027b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6028b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6029b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6030b290cf36Smrg fi 6031b290cf36Smrg # Workaround some broken pre-1.5 toolchains 6032b290cf36Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6033b290cf36Smrg ;; 6034b290cf36Smrg 6035b290cf36Smrg *nto* | *qnx*) 6036b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6037b290cf36Smrg ;; 6038b290cf36Smrg 6039b290cf36Smrg openbsd2*) 6040b290cf36Smrg # C++ shared libraries are fairly broken 6041b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6042b290cf36Smrg ;; 6043b290cf36Smrg 6044b290cf36Smrg openbsd*) 6045b290cf36Smrg if test -f /usr/libexec/ld.so; then 6046b290cf36Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6047b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6048b290cf36Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6049b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6050b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6051b290cf36Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6052b290cf36Smrg _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' 6053b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6054b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6055b290cf36Smrg fi 6056b290cf36Smrg output_verbose_link_cmd=echo 6057b290cf36Smrg else 6058b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6059b290cf36Smrg fi 6060191cded7Smrg ;; 6061b290cf36Smrg 6062191cded7Smrg osf3* | osf4* | osf5*) 6063b290cf36Smrg case $cc_basename in 6064b290cf36Smrg KCC*) 6065b290cf36Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6066b290cf36Smrg 6067b290cf36Smrg # KCC will only create a shared library if the output file 6068b290cf36Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6069b290cf36Smrg # to its proper name (with version) after linking. 6070b290cf36Smrg _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' 6071b290cf36Smrg 6072b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6073b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6074b290cf36Smrg 6075b290cf36Smrg # Archives containing C++ object files must be created using 6076b290cf36Smrg # the KAI C++ compiler. 6077b290cf36Smrg case $host in 6078b290cf36Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6079b290cf36Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6080b290cf36Smrg esac 6081191cded7Smrg ;; 6082b290cf36Smrg RCC*) 6083191cded7Smrg # Rational C++ 2.4.1 6084b290cf36Smrg # FIXME: insert proper C++ library support 6085b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6086191cded7Smrg ;; 6087b290cf36Smrg cxx*) 6088b290cf36Smrg case $host in 6089b290cf36Smrg osf3*) 6090b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6091b290cf36Smrg _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' 6092b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6093b290cf36Smrg ;; 6094b290cf36Smrg *) 6095b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6096b290cf36Smrg _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' 6097b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6098b290cf36Smrg echo "-hidden">> $lib.exp~ 6099b290cf36Smrg $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~ 6100b290cf36Smrg $RM $lib.exp' 6101b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6102b290cf36Smrg ;; 6103b290cf36Smrg esac 6104b290cf36Smrg 6105b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6106b290cf36Smrg 6107b290cf36Smrg # Commands to make compiler produce verbose output that lists 6108b290cf36Smrg # what "hidden" libraries, object files and flags are used when 6109b290cf36Smrg # linking a shared library. 6110b290cf36Smrg # 6111b290cf36Smrg # There doesn't appear to be a way to prevent this compiler from 6112b290cf36Smrg # explicitly linking system object files so we need to strip them 6113b290cf36Smrg # from the output so that they don't get included in the library 6114b290cf36Smrg # dependencies. 6115b290cf36Smrg 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' 6116191cded7Smrg ;; 6117191cded7Smrg *) 6118b290cf36Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6119b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6120b290cf36Smrg case $host in 6121b290cf36Smrg osf3*) 6122b290cf36Smrg _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' 6123b290cf36Smrg ;; 6124b290cf36Smrg *) 6125b290cf36Smrg _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' 6126b290cf36Smrg ;; 6127b290cf36Smrg esac 6128b290cf36Smrg 6129b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6130b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6131b290cf36Smrg 6132b290cf36Smrg # Commands to make compiler produce verbose output that lists 6133b290cf36Smrg # what "hidden" libraries, object files and flags are used when 6134b290cf36Smrg # linking a shared library. 6135b290cf36Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6136b290cf36Smrg 6137b290cf36Smrg else 6138b290cf36Smrg # FIXME: insert proper C++ library support 6139b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6140b290cf36Smrg fi 6141191cded7Smrg ;; 6142b290cf36Smrg esac 6143b290cf36Smrg ;; 6144b290cf36Smrg 6145191cded7Smrg psos*) 6146b290cf36Smrg # FIXME: insert proper C++ library support 6147b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6148b290cf36Smrg ;; 6149b290cf36Smrg 6150b290cf36Smrg sunos4*) 6151b290cf36Smrg case $cc_basename in 6152b290cf36Smrg CC*) 6153b290cf36Smrg # Sun C++ 4.x 6154b290cf36Smrg # FIXME: insert proper C++ library support 6155b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6156b290cf36Smrg ;; 6157b290cf36Smrg lcc*) 6158b290cf36Smrg # Lucid 6159b290cf36Smrg # FIXME: insert proper C++ library support 6160b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6161b290cf36Smrg ;; 6162b290cf36Smrg *) 6163b290cf36Smrg # FIXME: insert proper C++ library support 6164b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6165b290cf36Smrg ;; 6166b290cf36Smrg esac 6167b290cf36Smrg ;; 6168b290cf36Smrg 6169191cded7Smrg solaris*) 6170b290cf36Smrg case $cc_basename in 6171b290cf36Smrg CC*) 6172191cded7Smrg # Sun C++ 4.2, 5.x and Centerline C++ 6173b290cf36Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6174b290cf36Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6175b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6176b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6177b290cf36Smrg $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' 6178b290cf36Smrg 6179b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6180b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6181b290cf36Smrg case $host_os in 6182b290cf36Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6183b290cf36Smrg *) 6184b290cf36Smrg # The compiler driver will combine and reorder linker options, 6185b290cf36Smrg # but understands `-z linker_flag'. 6186b290cf36Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6187b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6188b290cf36Smrg ;; 6189b290cf36Smrg esac 6190b290cf36Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6191b290cf36Smrg 6192b290cf36Smrg output_verbose_link_cmd='echo' 6193b290cf36Smrg 6194b290cf36Smrg # Archives containing C++ object files must be created using 6195b290cf36Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6196b290cf36Smrg # necessary to make sure instantiated templates are included 6197b290cf36Smrg # in the archive. 6198b290cf36Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6199191cded7Smrg ;; 6200b290cf36Smrg gcx*) 6201191cded7Smrg # Green Hills C++ Compiler 6202b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6203b290cf36Smrg 6204b290cf36Smrg # The C++ compiler must be used to create the archive. 6205b290cf36Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6206191cded7Smrg ;; 6207b290cf36Smrg *) 6208b290cf36Smrg # GNU C++ compiler with Solaris linker 6209b290cf36Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6210b290cf36Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6211b290cf36Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6212b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6213b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6214b290cf36Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6215b290cf36Smrg 6216b290cf36Smrg # Commands to make compiler produce verbose output that lists 6217b290cf36Smrg # what "hidden" libraries, object files and flags are used when 6218b290cf36Smrg # linking a shared library. 6219b290cf36Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6220b290cf36Smrg else 6221b290cf36Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6222b290cf36Smrg # platform. 6223b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6224b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6225b290cf36Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6226b290cf36Smrg 6227b290cf36Smrg # Commands to make compiler produce verbose output that lists 6228b290cf36Smrg # what "hidden" libraries, object files and flags are used when 6229b290cf36Smrg # linking a shared library. 6230b290cf36Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6231b290cf36Smrg fi 6232b290cf36Smrg 6233b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6234b290cf36Smrg case $host_os in 6235b290cf36Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6236b290cf36Smrg *) 6237b290cf36Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6238b290cf36Smrg ;; 6239b290cf36Smrg esac 6240b290cf36Smrg fi 6241191cded7Smrg ;; 6242b290cf36Smrg esac 6243b290cf36Smrg ;; 6244b290cf36Smrg 6245b290cf36Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6246b290cf36Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6247b290cf36Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6248b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6249b290cf36Smrg runpath_var='LD_RUN_PATH' 6250b290cf36Smrg 6251b290cf36Smrg case $cc_basename in 6252b290cf36Smrg CC*) 6253b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6254b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6255b290cf36Smrg ;; 6256b290cf36Smrg *) 6257b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6258b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6259b290cf36Smrg ;; 6260b290cf36Smrg esac 6261b290cf36Smrg ;; 6262b290cf36Smrg 6263b290cf36Smrg sysv5* | sco3.2v5* | sco5v6*) 6264b290cf36Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6265b290cf36Smrg # link with -lc, and that would cause any symbols used from libc to 6266b290cf36Smrg # always be unresolved, which means just about no library would 6267b290cf36Smrg # ever link correctly. If we're not using GNU ld we use -z text 6268b290cf36Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6269b290cf36Smrg # as -z defs. 6270b290cf36Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6271b290cf36Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6272b290cf36Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6273b290cf36Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6274b290cf36Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6275b290cf36Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6276b290cf36Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6277b290cf36Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6278b290cf36Smrg runpath_var='LD_RUN_PATH' 6279b290cf36Smrg 6280191cded7Smrg case $cc_basename in 6281b290cf36Smrg CC*) 6282b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6283b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6284191cded7Smrg ;; 6285191cded7Smrg *) 6286b290cf36Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6287b290cf36Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6288191cded7Smrg ;; 6289191cded7Smrg esac 6290b290cf36Smrg ;; 6291b290cf36Smrg 6292191cded7Smrg tandem*) 6293b290cf36Smrg case $cc_basename in 6294b290cf36Smrg NCC*) 6295191cded7Smrg # NonStop-UX NCC 3.20 6296b290cf36Smrg # FIXME: insert proper C++ library support 6297b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6298191cded7Smrg ;; 6299b290cf36Smrg *) 6300b290cf36Smrg # FIXME: insert proper C++ library support 6301b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6302191cded7Smrg ;; 6303b290cf36Smrg esac 6304b290cf36Smrg ;; 6305b290cf36Smrg 6306191cded7Smrg vxworks*) 6307b290cf36Smrg # FIXME: insert proper C++ library support 6308b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6309b290cf36Smrg ;; 6310b290cf36Smrg 6311191cded7Smrg *) 6312b290cf36Smrg # FIXME: insert proper C++ library support 6313b290cf36Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6314b290cf36Smrg ;; 6315191cded7Smrg esac 6316191cded7Smrg 6317b290cf36Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6318b290cf36Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6319b290cf36Smrg 6320b290cf36Smrg _LT_TAGVAR(GCC, $1)="$GXX" 6321b290cf36Smrg _LT_TAGVAR(LD, $1)="$LD" 6322b290cf36Smrg 6323b290cf36Smrg ## CAVEAT EMPTOR: 6324b290cf36Smrg ## There is no encapsulation within the following macros, do not change 6325b290cf36Smrg ## the running order or otherwise move them around unless you know exactly 6326b290cf36Smrg ## what you are doing... 6327b290cf36Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 6328b290cf36Smrg _LT_COMPILER_PIC($1) 6329b290cf36Smrg _LT_COMPILER_C_O($1) 6330b290cf36Smrg _LT_COMPILER_FILE_LOCKS($1) 6331b290cf36Smrg _LT_LINKER_SHLIBS($1) 6332b290cf36Smrg _LT_SYS_DYNAMIC_LINKER($1) 6333b290cf36Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6334b290cf36Smrg 6335b290cf36Smrg _LT_CONFIG($1) 6336b290cf36Smrg fi # test -n "$compiler" 6337b290cf36Smrg 6338b290cf36Smrg CC=$lt_save_CC 6339b290cf36Smrg LDCXX=$LD 6340b290cf36Smrg LD=$lt_save_LD 6341b290cf36Smrg GCC=$lt_save_GCC 6342b290cf36Smrg with_gnu_ld=$lt_save_with_gnu_ld 6343b290cf36Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 6344b290cf36Smrg lt_cv_path_LD=$lt_save_path_LD 6345b290cf36Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6346b290cf36Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6347b290cf36Smrgfi # test "$_lt_caught_CXX_error" != yes 6348191cded7Smrg 6349b290cf36SmrgAC_LANG_POP 6350b290cf36Smrg])# _LT_LANG_CXX_CONFIG 6351191cded7Smrg 6352191cded7Smrg 6353b290cf36Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6354b290cf36Smrg# --------------------------------- 6355b290cf36Smrg# Figure out "hidden" library dependencies from verbose 6356b290cf36Smrg# compiler output when linking a shared library. 6357b290cf36Smrg# Parse the compiler output and extract the necessary 6358b290cf36Smrg# objects, libraries and library flags. 6359b290cf36Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6360b290cf36Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6361b290cf36Smrg# Dependencies to place before and after the object being linked: 6362b290cf36Smrg_LT_TAGVAR(predep_objects, $1)= 6363b290cf36Smrg_LT_TAGVAR(postdep_objects, $1)= 6364b290cf36Smrg_LT_TAGVAR(predeps, $1)= 6365b290cf36Smrg_LT_TAGVAR(postdeps, $1)= 6366b290cf36Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6367191cded7Smrg 6368b290cf36Smrgdnl we can't use the lt_simple_compile_test_code here, 6369b290cf36Smrgdnl because it contains code intended for an executable, 6370b290cf36Smrgdnl not a library. It's possible we should let each 6371b290cf36Smrgdnl tag define a new lt_????_link_test_code variable, 6372b290cf36Smrgdnl but it's only used here... 6373b290cf36Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6374b290cf36Smrgint a; 6375b290cf36Smrgvoid foo (void) { a = 0; } 6376b290cf36Smrg_LT_EOF 6377b290cf36Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6378b290cf36Smrgclass Foo 6379b290cf36Smrg{ 6380b290cf36Smrgpublic: 6381b290cf36Smrg Foo (void) { a = 0; } 6382b290cf36Smrgprivate: 6383b290cf36Smrg int a; 6384b290cf36Smrg}; 6385b290cf36Smrg_LT_EOF 6386b290cf36Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6387b290cf36Smrg subroutine foo 6388b290cf36Smrg implicit none 6389b290cf36Smrg integer*4 a 6390b290cf36Smrg a=0 6391b290cf36Smrg return 6392b290cf36Smrg end 6393b290cf36Smrg_LT_EOF 6394b290cf36Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6395b290cf36Smrg subroutine foo 6396b290cf36Smrg implicit none 6397b290cf36Smrg integer a 6398b290cf36Smrg a=0 6399b290cf36Smrg return 6400b290cf36Smrg end 6401b290cf36Smrg_LT_EOF 6402b290cf36Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6403b290cf36Smrgpublic class foo { 6404b290cf36Smrg private int a; 6405b290cf36Smrg public void bar (void) { 6406b290cf36Smrg a = 0; 6407b290cf36Smrg } 6408b290cf36Smrg}; 6409b290cf36Smrg_LT_EOF 6410b290cf36Smrg]) 6411b290cf36Smrgdnl Parse the compiler output and extract the necessary 6412b290cf36Smrgdnl objects, libraries and library flags. 6413b290cf36Smrgif AC_TRY_EVAL(ac_compile); then 6414b290cf36Smrg # Parse the compiler output and extract the necessary 6415b290cf36Smrg # objects, libraries and library flags. 6416191cded7Smrg 6417b290cf36Smrg # Sentinel used to keep track of whether or not we are before 6418b290cf36Smrg # the conftest object file. 6419b290cf36Smrg pre_test_object_deps_done=no 6420191cded7Smrg 6421b290cf36Smrg for p in `eval "$output_verbose_link_cmd"`; do 6422b290cf36Smrg case $p in 6423191cded7Smrg 6424b290cf36Smrg -L* | -R* | -l*) 6425b290cf36Smrg # Some compilers place space between "-{L,R}" and the path. 6426b290cf36Smrg # Remove the space. 6427b290cf36Smrg if test $p = "-L" || 6428b290cf36Smrg test $p = "-R"; then 6429b290cf36Smrg prev=$p 6430b290cf36Smrg continue 6431b290cf36Smrg else 6432b290cf36Smrg prev= 6433b290cf36Smrg fi 6434b290cf36Smrg 6435b290cf36Smrg if test "$pre_test_object_deps_done" = no; then 6436b290cf36Smrg case $p in 6437b290cf36Smrg -L* | -R*) 6438b290cf36Smrg # Internal compiler library paths should come after those 6439b290cf36Smrg # provided the user. The postdeps already come after the 6440b290cf36Smrg # user supplied libs so there is no need to process them. 6441b290cf36Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 6442b290cf36Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 6443b290cf36Smrg else 6444b290cf36Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 6445b290cf36Smrg fi 6446b290cf36Smrg ;; 6447b290cf36Smrg # The "-l" case would never come before the object being 6448b290cf36Smrg # linked, so don't bother handling this case. 6449b290cf36Smrg esac 6450b290cf36Smrg else 6451b290cf36Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 6452b290cf36Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 6453b290cf36Smrg else 6454b290cf36Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 6455b290cf36Smrg fi 6456b290cf36Smrg fi 6457b290cf36Smrg ;; 6458b290cf36Smrg 6459b290cf36Smrg *.$objext) 6460b290cf36Smrg # This assumes that the test object file only shows up 6461b290cf36Smrg # once in the compiler output. 6462b290cf36Smrg if test "$p" = "conftest.$objext"; then 6463b290cf36Smrg pre_test_object_deps_done=yes 6464b290cf36Smrg continue 6465b290cf36Smrg fi 6466b290cf36Smrg 6467b290cf36Smrg if test "$pre_test_object_deps_done" = no; then 6468b290cf36Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 6469b290cf36Smrg _LT_TAGVAR(predep_objects, $1)="$p" 6470b290cf36Smrg else 6471b290cf36Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 6472b290cf36Smrg fi 6473b290cf36Smrg else 6474b290cf36Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 6475b290cf36Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 6476b290cf36Smrg else 6477b290cf36Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 6478b290cf36Smrg fi 6479b290cf36Smrg fi 6480b290cf36Smrg ;; 6481b290cf36Smrg 6482b290cf36Smrg *) ;; # Ignore the rest. 6483b290cf36Smrg 6484b290cf36Smrg esac 6485b290cf36Smrg done 6486b290cf36Smrg 6487b290cf36Smrg # Clean up. 6488b290cf36Smrg rm -f a.out a.exe 6489b290cf36Smrgelse 6490b290cf36Smrg echo "libtool.m4: error: problem compiling $1 test program" 6491b290cf36Smrgfi 6492b290cf36Smrg 6493b290cf36Smrg$RM -f confest.$objext 6494b290cf36Smrg 6495b290cf36Smrg# PORTME: override above test on systems where it is broken 6496b290cf36Smrgm4_if([$1], [CXX], 6497b290cf36Smrg[case $host_os in 6498b290cf36Smrginterix[[3-9]]*) 6499b290cf36Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 6500b290cf36Smrg # hack all around it, let's just trust "g++" to DTRT. 6501b290cf36Smrg _LT_TAGVAR(predep_objects,$1)= 6502b290cf36Smrg _LT_TAGVAR(postdep_objects,$1)= 6503b290cf36Smrg _LT_TAGVAR(postdeps,$1)= 6504b290cf36Smrg ;; 6505b290cf36Smrg 6506b290cf36Smrglinux*) 6507b290cf36Smrg case `$CC -V 2>&1 | sed 5q` in 6508b290cf36Smrg *Sun\ C*) 6509b290cf36Smrg # Sun C++ 5.9 6510b290cf36Smrg 6511b290cf36Smrg # The more standards-conforming stlport4 library is 6512b290cf36Smrg # incompatible with the Cstd library. Avoid specifying 6513b290cf36Smrg # it if it's in CXXFLAGS. Ignore libCrun as 6514b290cf36Smrg # -library=stlport4 depends on it. 6515b290cf36Smrg case " $CXX $CXXFLAGS " in 6516b290cf36Smrg *" -library=stlport4 "*) 6517b290cf36Smrg solaris_use_stlport4=yes 6518191cded7Smrg ;; 6519b290cf36Smrg esac 6520191cded7Smrg 6521b290cf36Smrg if test "$solaris_use_stlport4" != yes; then 6522b290cf36Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6523b290cf36Smrg fi 6524b290cf36Smrg ;; 6525b290cf36Smrg esac 6526b290cf36Smrg ;; 6527b290cf36Smrg 6528b290cf36Smrgsolaris*) 6529b290cf36Smrg case $cc_basename in 6530b290cf36Smrg CC*) 6531b290cf36Smrg # The more standards-conforming stlport4 library is 6532b290cf36Smrg # incompatible with the Cstd library. Avoid specifying 6533b290cf36Smrg # it if it's in CXXFLAGS. Ignore libCrun as 6534b290cf36Smrg # -library=stlport4 depends on it. 6535b290cf36Smrg case " $CXX $CXXFLAGS " in 6536b290cf36Smrg *" -library=stlport4 "*) 6537b290cf36Smrg solaris_use_stlport4=yes 6538191cded7Smrg ;; 6539b290cf36Smrg esac 6540b290cf36Smrg 6541b290cf36Smrg # Adding this requires a known-good setup of shared libraries for 6542b290cf36Smrg # Sun compiler versions before 5.6, else PIC objects from an old 6543b290cf36Smrg # archive will be linked into the output, leading to subtle bugs. 6544b290cf36Smrg if test "$solaris_use_stlport4" != yes; then 6545b290cf36Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6546b290cf36Smrg fi 6547b290cf36Smrg ;; 6548b290cf36Smrg esac 6549b290cf36Smrg ;; 6550b290cf36Smrgesac 6551b290cf36Smrg]) 6552b290cf36Smrg 6553b290cf36Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 6554b290cf36Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 6555b290cf36Smrgesac 6556b290cf36Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 6557b290cf36Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 6558b290cf36Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 6559b290cf36Smrgfi 6560b290cf36Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 6561b290cf36Smrg [The directories searched by this compiler when creating a shared library]) 6562b290cf36Smrg_LT_TAGDECL([], [predep_objects], [1], 6563b290cf36Smrg [Dependencies to place before and after the objects being linked to 6564b290cf36Smrg create a shared library]) 6565b290cf36Smrg_LT_TAGDECL([], [postdep_objects], [1]) 6566b290cf36Smrg_LT_TAGDECL([], [predeps], [1]) 6567b290cf36Smrg_LT_TAGDECL([], [postdeps], [1]) 6568b290cf36Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 6569b290cf36Smrg [The library search path used internally by the compiler when linking 6570b290cf36Smrg a shared library]) 6571b290cf36Smrg])# _LT_SYS_HIDDEN_LIBDEPS 6572b290cf36Smrg 6573b290cf36Smrg 6574b290cf36Smrg# _LT_PROG_F77 6575b290cf36Smrg# ------------ 6576b290cf36Smrg# Since AC_PROG_F77 is broken, in that it returns the empty string 6577b290cf36Smrg# if there is no fortran compiler, we have our own version here. 6578b290cf36Smrgm4_defun([_LT_PROG_F77], 6579b290cf36Smrg[ 6580b290cf36Smrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) 6581b290cf36SmrgAC_PROG_F77 6582b290cf36Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 6583b290cf36Smrg _lt_disable_F77=yes 6584b290cf36Smrgfi 6585b290cf36Smrgpopdef([AC_MSG_ERROR]) 6586b290cf36Smrg])# _LT_PROG_F77 6587b290cf36Smrg 6588b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 6589b290cf36Smrgdnl AC_DEFUN([_LT_PROG_F77], []) 6590b290cf36Smrg 6591b290cf36Smrg 6592b290cf36Smrg# _LT_LANG_F77_CONFIG([TAG]) 6593b290cf36Smrg# -------------------------- 6594b290cf36Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 6595b290cf36Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6596b290cf36Smrg# to write the compiler configuration to `libtool'. 6597b290cf36Smrgm4_defun([_LT_LANG_F77_CONFIG], 6598b290cf36Smrg[AC_REQUIRE([_LT_PROG_F77])dnl 6599b290cf36SmrgAC_LANG_PUSH(Fortran 77) 6600b290cf36Smrg 6601b290cf36Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6602b290cf36Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6603b290cf36Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6604b290cf36Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6605b290cf36Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6606b290cf36Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6607b290cf36Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6608b290cf36Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6609b290cf36Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6610b290cf36Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6611b290cf36Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6612b290cf36Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6613b290cf36Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6614b290cf36Smrg_LT_TAGVAR(module_cmds, $1)= 6615b290cf36Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6616b290cf36Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6617b290cf36Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6618b290cf36Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6619b290cf36Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6620b290cf36Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6621b290cf36Smrg 6622b290cf36Smrg# Source file extension for f77 test sources. 6623b290cf36Smrgac_ext=f 6624b290cf36Smrg 6625b290cf36Smrg# Object file extension for compiled f77 test sources. 6626b290cf36Smrgobjext=o 6627b290cf36Smrg_LT_TAGVAR(objext, $1)=$objext 6628b290cf36Smrg 6629b290cf36Smrg# No sense in running all these tests if we already determined that 6630b290cf36Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 6631b290cf36Smrg# are currently assumed to apply to all compilers on this platform, 6632b290cf36Smrg# and will be corrupted by setting them based on a non-working compiler. 6633b290cf36Smrgif test "$_lt_disable_F77" != yes; then 6634b290cf36Smrg # Code to be used in simple compile tests 6635b290cf36Smrg lt_simple_compile_test_code="\ 6636b290cf36Smrg subroutine t 6637b290cf36Smrg return 6638b290cf36Smrg end 6639b290cf36Smrg" 6640b290cf36Smrg 6641b290cf36Smrg # Code to be used in simple link tests 6642b290cf36Smrg lt_simple_link_test_code="\ 6643b290cf36Smrg program t 6644b290cf36Smrg end 6645b290cf36Smrg" 6646b290cf36Smrg 6647b290cf36Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6648b290cf36Smrg _LT_TAG_COMPILER 6649b290cf36Smrg 6650b290cf36Smrg # save warnings/boilerplate of simple test code 6651b290cf36Smrg _LT_COMPILER_BOILERPLATE 6652b290cf36Smrg _LT_LINKER_BOILERPLATE 6653b290cf36Smrg 6654b290cf36Smrg # Allow CC to be a program name with arguments. 6655b290cf36Smrg lt_save_CC="$CC" 6656b290cf36Smrg lt_save_GCC=$GCC 6657b290cf36Smrg CC=${F77-"f77"} 6658b290cf36Smrg compiler=$CC 6659b290cf36Smrg _LT_TAGVAR(compiler, $1)=$CC 6660b290cf36Smrg _LT_CC_BASENAME([$compiler]) 6661b290cf36Smrg GCC=$G77 6662b290cf36Smrg if test -n "$compiler"; then 6663b290cf36Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6664b290cf36Smrg AC_MSG_RESULT([$can_build_shared]) 6665b290cf36Smrg 6666b290cf36Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6667b290cf36Smrg test "$can_build_shared" = "no" && enable_shared=no 6668b290cf36Smrg 6669b290cf36Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6670b290cf36Smrg # are all built from PIC. 6671b290cf36Smrg case $host_os in 6672b290cf36Smrg aix3*) 6673b290cf36Smrg test "$enable_shared" = yes && enable_static=no 6674b290cf36Smrg if test -n "$RANLIB"; then 6675b290cf36Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6676b290cf36Smrg postinstall_cmds='$RANLIB $lib' 6677b290cf36Smrg fi 6678b290cf36Smrg ;; 6679b290cf36Smrg aix[[4-9]]*) 6680b290cf36Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6681b290cf36Smrg test "$enable_shared" = yes && enable_static=no 6682b290cf36Smrg fi 6683b290cf36Smrg ;; 6684b290cf36Smrg esac 6685b290cf36Smrg AC_MSG_RESULT([$enable_shared]) 6686b290cf36Smrg 6687b290cf36Smrg AC_MSG_CHECKING([whether to build static libraries]) 6688b290cf36Smrg # Make sure either enable_shared or enable_static is yes. 6689b290cf36Smrg test "$enable_shared" = yes || enable_static=yes 6690b290cf36Smrg AC_MSG_RESULT([$enable_static]) 6691b290cf36Smrg 6692b290cf36Smrg _LT_TAGVAR(GCC, $1)="$G77" 6693b290cf36Smrg _LT_TAGVAR(LD, $1)="$LD" 6694b290cf36Smrg 6695b290cf36Smrg ## CAVEAT EMPTOR: 6696b290cf36Smrg ## There is no encapsulation within the following macros, do not change 6697b290cf36Smrg ## the running order or otherwise move them around unless you know exactly 6698b290cf36Smrg ## what you are doing... 6699b290cf36Smrg _LT_COMPILER_PIC($1) 6700b290cf36Smrg _LT_COMPILER_C_O($1) 6701b290cf36Smrg _LT_COMPILER_FILE_LOCKS($1) 6702b290cf36Smrg _LT_LINKER_SHLIBS($1) 6703b290cf36Smrg _LT_SYS_DYNAMIC_LINKER($1) 6704b290cf36Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6705b290cf36Smrg 6706b290cf36Smrg _LT_CONFIG($1) 6707b290cf36Smrg fi # test -n "$compiler" 6708b290cf36Smrg 6709b290cf36Smrg GCC=$lt_save_GCC 6710b290cf36Smrg CC="$lt_save_CC" 6711b290cf36Smrgfi # test "$_lt_disable_F77" != yes 6712b290cf36Smrg 6713b290cf36SmrgAC_LANG_POP 6714b290cf36Smrg])# _LT_LANG_F77_CONFIG 6715b290cf36Smrg 6716b290cf36Smrg 6717b290cf36Smrg# _LT_PROG_FC 6718b290cf36Smrg# ----------- 6719b290cf36Smrg# Since AC_PROG_FC is broken, in that it returns the empty string 6720b290cf36Smrg# if there is no fortran compiler, we have our own version here. 6721b290cf36Smrgm4_defun([_LT_PROG_FC], 6722b290cf36Smrg[ 6723b290cf36Smrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) 6724b290cf36SmrgAC_PROG_FC 6725b290cf36Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 6726b290cf36Smrg _lt_disable_FC=yes 6727b290cf36Smrgfi 6728b290cf36Smrgpopdef([AC_MSG_ERROR]) 6729b290cf36Smrg])# _LT_PROG_FC 6730b290cf36Smrg 6731b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 6732b290cf36Smrgdnl AC_DEFUN([_LT_PROG_FC], []) 6733b290cf36Smrg 6734b290cf36Smrg 6735b290cf36Smrg# _LT_LANG_FC_CONFIG([TAG]) 6736b290cf36Smrg# ------------------------- 6737b290cf36Smrg# Ensure that the configuration variables for a Fortran compiler are 6738b290cf36Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6739b290cf36Smrg# to write the compiler configuration to `libtool'. 6740b290cf36Smrgm4_defun([_LT_LANG_FC_CONFIG], 6741b290cf36Smrg[AC_REQUIRE([_LT_PROG_FC])dnl 6742b290cf36SmrgAC_LANG_PUSH(Fortran) 6743b290cf36Smrg 6744b290cf36Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6745b290cf36Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6746b290cf36Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6747b290cf36Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6748b290cf36Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6749b290cf36Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6750b290cf36Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6751b290cf36Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6752b290cf36Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6753b290cf36Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6754b290cf36Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6755b290cf36Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6756b290cf36Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6757b290cf36Smrg_LT_TAGVAR(module_cmds, $1)= 6758b290cf36Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6759b290cf36Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6760b290cf36Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6761b290cf36Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6762b290cf36Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6763b290cf36Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6764b290cf36Smrg 6765b290cf36Smrg# Source file extension for fc test sources. 6766b290cf36Smrgac_ext=${ac_fc_srcext-f} 6767b290cf36Smrg 6768b290cf36Smrg# Object file extension for compiled fc test sources. 6769b290cf36Smrgobjext=o 6770b290cf36Smrg_LT_TAGVAR(objext, $1)=$objext 6771b290cf36Smrg 6772b290cf36Smrg# No sense in running all these tests if we already determined that 6773b290cf36Smrg# the FC compiler isn't working. Some variables (like enable_shared) 6774b290cf36Smrg# are currently assumed to apply to all compilers on this platform, 6775b290cf36Smrg# and will be corrupted by setting them based on a non-working compiler. 6776b290cf36Smrgif test "$_lt_disable_FC" != yes; then 6777b290cf36Smrg # Code to be used in simple compile tests 6778b290cf36Smrg lt_simple_compile_test_code="\ 6779b290cf36Smrg subroutine t 6780b290cf36Smrg return 6781b290cf36Smrg end 6782b290cf36Smrg" 6783b290cf36Smrg 6784b290cf36Smrg # Code to be used in simple link tests 6785b290cf36Smrg lt_simple_link_test_code="\ 6786b290cf36Smrg program t 6787b290cf36Smrg end 6788b290cf36Smrg" 6789b290cf36Smrg 6790b290cf36Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6791b290cf36Smrg _LT_TAG_COMPILER 6792b290cf36Smrg 6793b290cf36Smrg # save warnings/boilerplate of simple test code 6794b290cf36Smrg _LT_COMPILER_BOILERPLATE 6795b290cf36Smrg _LT_LINKER_BOILERPLATE 6796b290cf36Smrg 6797b290cf36Smrg # Allow CC to be a program name with arguments. 6798b290cf36Smrg lt_save_CC="$CC" 6799b290cf36Smrg lt_save_GCC=$GCC 6800b290cf36Smrg CC=${FC-"f95"} 6801b290cf36Smrg compiler=$CC 6802b290cf36Smrg GCC=$ac_cv_fc_compiler_gnu 6803b290cf36Smrg 6804b290cf36Smrg _LT_TAGVAR(compiler, $1)=$CC 6805b290cf36Smrg _LT_CC_BASENAME([$compiler]) 6806b290cf36Smrg 6807b290cf36Smrg if test -n "$compiler"; then 6808b290cf36Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6809b290cf36Smrg AC_MSG_RESULT([$can_build_shared]) 6810b290cf36Smrg 6811b290cf36Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6812b290cf36Smrg test "$can_build_shared" = "no" && enable_shared=no 6813b290cf36Smrg 6814b290cf36Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6815b290cf36Smrg # are all built from PIC. 6816b290cf36Smrg case $host_os in 6817b290cf36Smrg aix3*) 6818b290cf36Smrg test "$enable_shared" = yes && enable_static=no 6819b290cf36Smrg if test -n "$RANLIB"; then 6820b290cf36Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6821b290cf36Smrg postinstall_cmds='$RANLIB $lib' 6822b290cf36Smrg fi 6823b290cf36Smrg ;; 6824b290cf36Smrg aix[[4-9]]*) 6825b290cf36Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6826b290cf36Smrg test "$enable_shared" = yes && enable_static=no 6827b290cf36Smrg fi 6828b290cf36Smrg ;; 6829b290cf36Smrg esac 6830b290cf36Smrg AC_MSG_RESULT([$enable_shared]) 6831b290cf36Smrg 6832b290cf36Smrg AC_MSG_CHECKING([whether to build static libraries]) 6833b290cf36Smrg # Make sure either enable_shared or enable_static is yes. 6834b290cf36Smrg test "$enable_shared" = yes || enable_static=yes 6835b290cf36Smrg AC_MSG_RESULT([$enable_static]) 6836b290cf36Smrg 6837b290cf36Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 6838b290cf36Smrg _LT_TAGVAR(LD, $1)="$LD" 6839b290cf36Smrg 6840b290cf36Smrg ## CAVEAT EMPTOR: 6841b290cf36Smrg ## There is no encapsulation within the following macros, do not change 6842b290cf36Smrg ## the running order or otherwise move them around unless you know exactly 6843b290cf36Smrg ## what you are doing... 6844b290cf36Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 6845b290cf36Smrg _LT_COMPILER_PIC($1) 6846b290cf36Smrg _LT_COMPILER_C_O($1) 6847b290cf36Smrg _LT_COMPILER_FILE_LOCKS($1) 6848b290cf36Smrg _LT_LINKER_SHLIBS($1) 6849b290cf36Smrg _LT_SYS_DYNAMIC_LINKER($1) 6850b290cf36Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6851b290cf36Smrg 6852b290cf36Smrg _LT_CONFIG($1) 6853b290cf36Smrg fi # test -n "$compiler" 6854b290cf36Smrg 6855b290cf36Smrg GCC=$lt_save_GCC 6856b290cf36Smrg CC="$lt_save_CC" 6857b290cf36Smrgfi # test "$_lt_disable_FC" != yes 6858b290cf36Smrg 6859b290cf36SmrgAC_LANG_POP 6860b290cf36Smrg])# _LT_LANG_FC_CONFIG 6861b290cf36Smrg 6862b290cf36Smrg 6863b290cf36Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 6864b290cf36Smrg# -------------------------- 6865b290cf36Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 6866b290cf36Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 6867b290cf36Smrg# to write the compiler configuration to `libtool'. 6868b290cf36Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 6869b290cf36Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 6870b290cf36SmrgAC_LANG_SAVE 6871b290cf36Smrg 6872b290cf36Smrg# Source file extension for Java test sources. 6873b290cf36Smrgac_ext=java 6874b290cf36Smrg 6875b290cf36Smrg# Object file extension for compiled Java test sources. 6876b290cf36Smrgobjext=o 6877b290cf36Smrg_LT_TAGVAR(objext, $1)=$objext 6878b290cf36Smrg 6879b290cf36Smrg# Code to be used in simple compile tests 6880b290cf36Smrglt_simple_compile_test_code="class foo {}" 6881b290cf36Smrg 6882b290cf36Smrg# Code to be used in simple link tests 6883b290cf36Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 6884b290cf36Smrg 6885b290cf36Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6886b290cf36Smrg_LT_TAG_COMPILER 6887b290cf36Smrg 6888b290cf36Smrg# save warnings/boilerplate of simple test code 6889b290cf36Smrg_LT_COMPILER_BOILERPLATE 6890b290cf36Smrg_LT_LINKER_BOILERPLATE 6891b290cf36Smrg 6892b290cf36Smrg# Allow CC to be a program name with arguments. 6893b290cf36Smrglt_save_CC="$CC" 6894b290cf36Smrglt_save_GCC=$GCC 6895b290cf36SmrgGCC=yes 6896b290cf36SmrgCC=${GCJ-"gcj"} 6897b290cf36Smrgcompiler=$CC 6898b290cf36Smrg_LT_TAGVAR(compiler, $1)=$CC 6899b290cf36Smrg_LT_TAGVAR(LD, $1)="$LD" 6900b290cf36Smrg_LT_CC_BASENAME([$compiler]) 6901b290cf36Smrg 6902b290cf36Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 6903b290cf36Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6904b290cf36Smrg 6905b290cf36Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6906b290cf36Smrg 6907b290cf36Smrgif test -n "$compiler"; then 6908b290cf36Smrg _LT_COMPILER_NO_RTTI($1) 6909b290cf36Smrg _LT_COMPILER_PIC($1) 6910b290cf36Smrg _LT_COMPILER_C_O($1) 6911b290cf36Smrg _LT_COMPILER_FILE_LOCKS($1) 6912b290cf36Smrg _LT_LINKER_SHLIBS($1) 6913b290cf36Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6914b290cf36Smrg 6915b290cf36Smrg _LT_CONFIG($1) 6916b290cf36Smrgfi 6917b290cf36Smrg 6918b290cf36SmrgAC_LANG_RESTORE 6919b290cf36Smrg 6920b290cf36SmrgGCC=$lt_save_GCC 6921b290cf36SmrgCC="$lt_save_CC" 6922b290cf36Smrg])# _LT_LANG_GCJ_CONFIG 6923b290cf36Smrg 6924b290cf36Smrg 6925b290cf36Smrg# _LT_LANG_RC_CONFIG([TAG]) 6926b290cf36Smrg# ------------------------- 6927b290cf36Smrg# Ensure that the configuration variables for the Windows resource compiler 6928b290cf36Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 6929b290cf36Smrg# to write the compiler configuration to `libtool'. 6930b290cf36Smrgm4_defun([_LT_LANG_RC_CONFIG], 6931b290cf36Smrg[AC_REQUIRE([LT_PROG_RC])dnl 6932b290cf36SmrgAC_LANG_SAVE 6933b290cf36Smrg 6934b290cf36Smrg# Source file extension for RC test sources. 6935b290cf36Smrgac_ext=rc 6936191cded7Smrg 6937b290cf36Smrg# Object file extension for compiled RC test sources. 6938b290cf36Smrgobjext=o 6939b290cf36Smrg_LT_TAGVAR(objext, $1)=$objext 6940191cded7Smrg 6941b290cf36Smrg# Code to be used in simple compile tests 6942b290cf36Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 6943191cded7Smrg 6944b290cf36Smrg# Code to be used in simple link tests 6945b290cf36Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 6946191cded7Smrg 6947b290cf36Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6948b290cf36Smrg_LT_TAG_COMPILER 6949191cded7Smrg 6950b290cf36Smrg# save warnings/boilerplate of simple test code 6951b290cf36Smrg_LT_COMPILER_BOILERPLATE 6952b290cf36Smrg_LT_LINKER_BOILERPLATE 6953191cded7Smrg 6954b290cf36Smrg# Allow CC to be a program name with arguments. 6955b290cf36Smrglt_save_CC="$CC" 6956b290cf36Smrglt_save_GCC=$GCC 6957b290cf36SmrgGCC= 6958b290cf36SmrgCC=${RC-"windres"} 6959b290cf36Smrgcompiler=$CC 6960b290cf36Smrg_LT_TAGVAR(compiler, $1)=$CC 6961b290cf36Smrg_LT_CC_BASENAME([$compiler]) 6962b290cf36Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 6963191cded7Smrg 6964b290cf36Smrgif test -n "$compiler"; then 6965b290cf36Smrg : 6966b290cf36Smrg _LT_CONFIG($1) 6967b290cf36Smrgfi 6968191cded7Smrg 6969b290cf36SmrgGCC=$lt_save_GCC 6970b290cf36SmrgAC_LANG_RESTORE 6971b290cf36SmrgCC="$lt_save_CC" 6972b290cf36Smrg])# _LT_LANG_RC_CONFIG 6973191cded7Smrg 6974191cded7Smrg 6975b290cf36Smrg# LT_PROG_GCJ 6976b290cf36Smrg# ----------- 6977b290cf36SmrgAC_DEFUN([LT_PROG_GCJ], 6978b290cf36Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 6979b290cf36Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 6980b290cf36Smrg [AC_CHECK_TOOL(GCJ, gcj,) 6981b290cf36Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6982b290cf36Smrg AC_SUBST(GCJFLAGS)])])[]dnl 6983b290cf36Smrg]) 6984191cded7Smrg 6985b290cf36Smrg# Old name: 6986b290cf36SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 6987b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 6988b290cf36Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 6989191cded7Smrg 6990191cded7Smrg 6991b290cf36Smrg# LT_PROG_RC 6992b290cf36Smrg# ---------- 6993b290cf36SmrgAC_DEFUN([LT_PROG_RC], 6994b290cf36Smrg[AC_CHECK_TOOL(RC, windres,) 6995b290cf36Smrg]) 6996191cded7Smrg 6997b290cf36Smrg# Old name: 6998b290cf36SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 6999b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 7000b290cf36Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 7001191cded7Smrg 7002b290cf36Smrg 7003b290cf36Smrg# _LT_DECL_EGREP 7004b290cf36Smrg# -------------- 7005b290cf36Smrg# If we don't have a new enough Autoconf to choose the best grep 7006b290cf36Smrg# available, choose the one first in the user's PATH. 7007b290cf36Smrgm4_defun([_LT_DECL_EGREP], 7008b290cf36Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7009b290cf36SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7010b290cf36Smrgtest -z "$GREP" && GREP=grep 7011b290cf36Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7012b290cf36Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7013b290cf36Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7014b290cf36Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7015b290cf36SmrgAC_SUBST([GREP]) 7016191cded7Smrg]) 7017191cded7Smrg 7018191cded7Smrg 7019b290cf36Smrg# _LT_DECL_OBJDUMP 7020b290cf36Smrg# -------------- 7021b290cf36Smrg# If we don't have a new enough Autoconf to choose the best objdump 7022b290cf36Smrg# available, choose the one first in the user's PATH. 7023b290cf36Smrgm4_defun([_LT_DECL_OBJDUMP], 7024b290cf36Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7025b290cf36Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7026b290cf36Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7027b290cf36SmrgAC_SUBST([OBJDUMP]) 7028191cded7Smrg]) 7029191cded7Smrg 7030191cded7Smrg 7031b290cf36Smrg# _LT_DECL_SED 7032b290cf36Smrg# ------------ 7033b290cf36Smrg# Check for a fully-functional sed program, that truncates 7034b290cf36Smrg# as few characters as possible. Prefer GNU sed if found. 7035b290cf36Smrgm4_defun([_LT_DECL_SED], 7036b290cf36Smrg[AC_PROG_SED 7037b290cf36Smrgtest -z "$SED" && SED=sed 7038b290cf36SmrgXsed="$SED -e 1s/^X//" 7039b290cf36Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7040b290cf36Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7041b290cf36Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7042b290cf36Smrg])# _LT_DECL_SED 7043b290cf36Smrg 7044b290cf36Smrgm4_ifndef([AC_PROG_SED], [ 7045b290cf36Smrg# NOTE: This macro has been submitted for inclusion into # 7046b290cf36Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7047b290cf36Smrg# a released version of Autoconf we should remove this # 7048b290cf36Smrg# macro and use it instead. # 7049b290cf36Smrg 7050b290cf36Smrgm4_defun([AC_PROG_SED], 7051b290cf36Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7052b290cf36SmrgAC_CACHE_VAL(lt_cv_path_SED, 7053b290cf36Smrg[# Loop through the user's path and test for sed and gsed. 7054b290cf36Smrg# Then use that list of sed's as ones to test for truncation. 7055b290cf36Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7056b290cf36Smrgfor as_dir in $PATH 7057b290cf36Smrgdo 7058b290cf36Smrg IFS=$as_save_IFS 7059b290cf36Smrg test -z "$as_dir" && as_dir=. 7060b290cf36Smrg for lt_ac_prog in sed gsed; do 7061b290cf36Smrg for ac_exec_ext in '' $ac_executable_extensions; do 7062b290cf36Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7063b290cf36Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7064b290cf36Smrg fi 7065b290cf36Smrg done 7066b290cf36Smrg done 7067b290cf36Smrgdone 7068b290cf36SmrgIFS=$as_save_IFS 7069b290cf36Smrglt_ac_max=0 7070b290cf36Smrglt_ac_count=0 7071b290cf36Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7072b290cf36Smrg# along with /bin/sed that truncates output. 7073b290cf36Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7074b290cf36Smrg test ! -f $lt_ac_sed && continue 7075b290cf36Smrg cat /dev/null > conftest.in 7076b290cf36Smrg lt_ac_count=0 7077b290cf36Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7078b290cf36Smrg # Check for GNU sed and select it if it is found. 7079b290cf36Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7080b290cf36Smrg lt_cv_path_SED=$lt_ac_sed 7081b290cf36Smrg break 7082b290cf36Smrg fi 7083b290cf36Smrg while true; do 7084b290cf36Smrg cat conftest.in conftest.in >conftest.tmp 7085b290cf36Smrg mv conftest.tmp conftest.in 7086b290cf36Smrg cp conftest.in conftest.nl 7087b290cf36Smrg echo >>conftest.nl 7088b290cf36Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7089b290cf36Smrg cmp -s conftest.out conftest.nl || break 7090b290cf36Smrg # 10000 chars as input seems more than enough 7091b290cf36Smrg test $lt_ac_count -gt 10 && break 7092b290cf36Smrg lt_ac_count=`expr $lt_ac_count + 1` 7093b290cf36Smrg if test $lt_ac_count -gt $lt_ac_max; then 7094b290cf36Smrg lt_ac_max=$lt_ac_count 7095b290cf36Smrg lt_cv_path_SED=$lt_ac_sed 7096191cded7Smrg fi 7097b290cf36Smrg done 7098b290cf36Smrgdone 7099b290cf36Smrg]) 7100b290cf36SmrgSED=$lt_cv_path_SED 7101b290cf36SmrgAC_SUBST([SED]) 7102b290cf36SmrgAC_MSG_RESULT([$SED]) 7103b290cf36Smrg])#AC_PROG_SED 7104b290cf36Smrg])#m4_ifndef 7105b290cf36Smrg 7106b290cf36Smrg# Old name: 7107b290cf36SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7108b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 7109b290cf36Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7110b290cf36Smrg 7111b290cf36Smrg 7112b290cf36Smrg# _LT_CHECK_SHELL_FEATURES 7113b290cf36Smrg# ------------------------ 7114b290cf36Smrg# Find out whether the shell is Bourne or XSI compatible, 7115b290cf36Smrg# or has some other useful features. 7116b290cf36Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7117b290cf36Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7118b290cf36Smrg# Try some XSI features 7119b290cf36Smrgxsi_shell=no 7120b290cf36Smrg( _lt_dummy="a/b/c" 7121b290cf36Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 7122b290cf36Smrg = c,a/b,, \ 7123b290cf36Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7124b290cf36Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7125b290cf36Smrg && xsi_shell=yes 7126b290cf36SmrgAC_MSG_RESULT([$xsi_shell]) 7127b290cf36Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7128b290cf36Smrg 7129b290cf36SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7130b290cf36Smrglt_shell_append=no 7131b290cf36Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7132b290cf36Smrg >/dev/null 2>&1 \ 7133b290cf36Smrg && lt_shell_append=yes 7134b290cf36SmrgAC_MSG_RESULT([$lt_shell_append]) 7135b290cf36Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7136b290cf36Smrg 7137b290cf36Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7138b290cf36Smrg lt_unset=unset 7139b290cf36Smrgelse 7140b290cf36Smrg lt_unset=false 7141b290cf36Smrgfi 7142b290cf36Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7143b290cf36Smrg 7144b290cf36Smrg# test EBCDIC or ASCII 7145b290cf36Smrgcase `echo X|tr X '\101'` in 7146b290cf36Smrg A) # ASCII based system 7147b290cf36Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7148b290cf36Smrg lt_SP2NL='tr \040 \012' 7149b290cf36Smrg lt_NL2SP='tr \015\012 \040\040' 7150191cded7Smrg ;; 7151b290cf36Smrg *) # EBCDIC based system 7152b290cf36Smrg lt_SP2NL='tr \100 \n' 7153b290cf36Smrg lt_NL2SP='tr \r\n \100\100' 7154191cded7Smrg ;; 7155b290cf36Smrgesac 7156b290cf36Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7157b290cf36Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7158b290cf36Smrg])# _LT_CHECK_SHELL_FEATURES 7159b290cf36Smrg 7160b290cf36Smrg 7161b290cf36Smrg# _LT_PROG_XSI_SHELLFNS 7162b290cf36Smrg# --------------------- 7163b290cf36Smrg# Bourne and XSI compatible variants of some useful shell functions. 7164b290cf36Smrgm4_defun([_LT_PROG_XSI_SHELLFNS], 7165b290cf36Smrg[case $xsi_shell in 7166b290cf36Smrg yes) 7167b290cf36Smrg cat << \_LT_EOF >> "$cfgfile" 7168b290cf36Smrg 7169b290cf36Smrg# func_dirname file append nondir_replacement 7170b290cf36Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7171b290cf36Smrg# otherwise set result to NONDIR_REPLACEMENT. 7172b290cf36Smrgfunc_dirname () 7173b290cf36Smrg{ 7174b290cf36Smrg case ${1} in 7175b290cf36Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7176b290cf36Smrg * ) func_dirname_result="${3}" ;; 7177191cded7Smrg esac 7178b290cf36Smrg} 7179b290cf36Smrg 7180b290cf36Smrg# func_basename file 7181b290cf36Smrgfunc_basename () 7182b290cf36Smrg{ 7183b290cf36Smrg func_basename_result="${1##*/}" 7184b290cf36Smrg} 7185b290cf36Smrg 7186b290cf36Smrg# func_dirname_and_basename file append nondir_replacement 7187b290cf36Smrg# perform func_basename and func_dirname in a single function 7188b290cf36Smrg# call: 7189b290cf36Smrg# dirname: Compute the dirname of FILE. If nonempty, 7190b290cf36Smrg# add APPEND to the result, otherwise set result 7191b290cf36Smrg# to NONDIR_REPLACEMENT. 7192b290cf36Smrg# value returned in "$func_dirname_result" 7193b290cf36Smrg# basename: Compute filename of FILE. 7194b290cf36Smrg# value retuned in "$func_basename_result" 7195b290cf36Smrg# Implementation must be kept synchronized with func_dirname 7196b290cf36Smrg# and func_basename. For efficiency, we do not delegate to 7197b290cf36Smrg# those functions but instead duplicate the functionality here. 7198b290cf36Smrgfunc_dirname_and_basename () 7199b290cf36Smrg{ 7200b290cf36Smrg case ${1} in 7201b290cf36Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7202b290cf36Smrg * ) func_dirname_result="${3}" ;; 7203191cded7Smrg esac 7204b290cf36Smrg func_basename_result="${1##*/}" 7205b290cf36Smrg} 7206191cded7Smrg 7207b290cf36Smrg# func_stripname prefix suffix name 7208b290cf36Smrg# strip PREFIX and SUFFIX off of NAME. 7209b290cf36Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7210b290cf36Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7211b290cf36Smrg# dot (in which case that matches only a dot). 7212b290cf36Smrgfunc_stripname () 7213b290cf36Smrg{ 7214b290cf36Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7215b290cf36Smrg # positional parameters, so assign one to ordinary parameter first. 7216b290cf36Smrg func_stripname_result=${3} 7217b290cf36Smrg func_stripname_result=${func_stripname_result#"${1}"} 7218b290cf36Smrg func_stripname_result=${func_stripname_result%"${2}"} 7219b290cf36Smrg} 7220191cded7Smrg 7221b290cf36Smrg# func_opt_split 7222b290cf36Smrgfunc_opt_split () 7223b290cf36Smrg{ 7224b290cf36Smrg func_opt_split_opt=${1%%=*} 7225b290cf36Smrg func_opt_split_arg=${1#*=} 7226b290cf36Smrg} 7227191cded7Smrg 7228b290cf36Smrg# func_lo2o object 7229b290cf36Smrgfunc_lo2o () 7230b290cf36Smrg{ 7231b290cf36Smrg case ${1} in 7232b290cf36Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7233b290cf36Smrg *) func_lo2o_result=${1} ;; 7234b290cf36Smrg esac 7235b290cf36Smrg} 7236191cded7Smrg 7237b290cf36Smrg# func_xform libobj-or-source 7238b290cf36Smrgfunc_xform () 7239b290cf36Smrg{ 7240b290cf36Smrg func_xform_result=${1%.*}.lo 7241b290cf36Smrg} 7242191cded7Smrg 7243b290cf36Smrg# func_arith arithmetic-term... 7244b290cf36Smrgfunc_arith () 7245b290cf36Smrg{ 7246b290cf36Smrg func_arith_result=$(( $[*] )) 7247b290cf36Smrg} 7248191cded7Smrg 7249b290cf36Smrg# func_len string 7250b290cf36Smrg# STRING may not start with a hyphen. 7251b290cf36Smrgfunc_len () 7252b290cf36Smrg{ 7253b290cf36Smrg func_len_result=${#1} 7254b290cf36Smrg} 7255191cded7Smrg 7256b290cf36Smrg_LT_EOF 7257b290cf36Smrg ;; 7258b290cf36Smrg *) # Bourne compatible functions. 7259b290cf36Smrg cat << \_LT_EOF >> "$cfgfile" 7260191cded7Smrg 7261b290cf36Smrg# func_dirname file append nondir_replacement 7262b290cf36Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7263b290cf36Smrg# otherwise set result to NONDIR_REPLACEMENT. 7264b290cf36Smrgfunc_dirname () 7265b290cf36Smrg{ 7266b290cf36Smrg # Extract subdirectory from the argument. 7267b290cf36Smrg func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` 7268b290cf36Smrg if test "X$func_dirname_result" = "X${1}"; then 7269b290cf36Smrg func_dirname_result="${3}" 7270b290cf36Smrg else 7271b290cf36Smrg func_dirname_result="$func_dirname_result${2}" 7272b290cf36Smrg fi 7273b290cf36Smrg} 7274191cded7Smrg 7275b290cf36Smrg# func_basename file 7276b290cf36Smrgfunc_basename () 7277b290cf36Smrg{ 7278b290cf36Smrg func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` 7279b290cf36Smrg} 7280191cded7Smrg 7281b290cf36Smrgdnl func_dirname_and_basename 7282b290cf36Smrgdnl A portable version of this function is already defined in general.m4sh 7283b290cf36Smrgdnl so there is no need for it here. 7284b290cf36Smrg 7285b290cf36Smrg# func_stripname prefix suffix name 7286b290cf36Smrg# strip PREFIX and SUFFIX off of NAME. 7287b290cf36Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7288b290cf36Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7289b290cf36Smrg# dot (in which case that matches only a dot). 7290b290cf36Smrg# func_strip_suffix prefix name 7291b290cf36Smrgfunc_stripname () 7292b290cf36Smrg{ 7293b290cf36Smrg case ${2} in 7294b290cf36Smrg .*) func_stripname_result=`$ECHO "X${3}" \ 7295b290cf36Smrg | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; 7296b290cf36Smrg *) func_stripname_result=`$ECHO "X${3}" \ 7297b290cf36Smrg | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; 7298b290cf36Smrg esac 7299b290cf36Smrg} 7300191cded7Smrg 7301b290cf36Smrg# sed scripts: 7302b290cf36Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 7303b290cf36Smrgmy_sed_long_arg='1s/^-[[^=]]*=//' 7304191cded7Smrg 7305b290cf36Smrg# func_opt_split 7306b290cf36Smrgfunc_opt_split () 7307b290cf36Smrg{ 7308b290cf36Smrg func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` 7309b290cf36Smrg func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` 7310b290cf36Smrg} 7311191cded7Smrg 7312b290cf36Smrg# func_lo2o object 7313b290cf36Smrgfunc_lo2o () 7314b290cf36Smrg{ 7315b290cf36Smrg func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` 7316b290cf36Smrg} 7317191cded7Smrg 7318b290cf36Smrg# func_xform libobj-or-source 7319b290cf36Smrgfunc_xform () 7320b290cf36Smrg{ 7321b290cf36Smrg func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` 7322b290cf36Smrg} 7323191cded7Smrg 7324b290cf36Smrg# func_arith arithmetic-term... 7325b290cf36Smrgfunc_arith () 7326b290cf36Smrg{ 7327b290cf36Smrg func_arith_result=`expr "$[@]"` 7328b290cf36Smrg} 7329191cded7Smrg 7330b290cf36Smrg# func_len string 7331b290cf36Smrg# STRING may not start with a hyphen. 7332b290cf36Smrgfunc_len () 7333b290cf36Smrg{ 7334b290cf36Smrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 7335b290cf36Smrg} 7336191cded7Smrg 7337b290cf36Smrg_LT_EOF 7338b290cf36Smrgesac 7339b290cf36Smrg 7340b290cf36Smrgcase $lt_shell_append in 7341b290cf36Smrg yes) 7342b290cf36Smrg cat << \_LT_EOF >> "$cfgfile" 7343191cded7Smrg 7344b290cf36Smrg# func_append var value 7345b290cf36Smrg# Append VALUE to the end of shell variable VAR. 7346b290cf36Smrgfunc_append () 7347b290cf36Smrg{ 7348b290cf36Smrg eval "$[1]+=\$[2]" 7349b290cf36Smrg} 7350191cded7Smrg_LT_EOF 7351b290cf36Smrg ;; 7352b290cf36Smrg *) 7353b290cf36Smrg cat << \_LT_EOF >> "$cfgfile" 7354191cded7Smrg 7355b290cf36Smrg# func_append var value 7356b290cf36Smrg# Append VALUE to the end of shell variable VAR. 7357b290cf36Smrgfunc_append () 7358b290cf36Smrg{ 7359b290cf36Smrg eval "$[1]=\$$[1]\$[2]" 7360b290cf36Smrg} 7361191cded7Smrg 7362b290cf36Smrg_LT_EOF 7363b290cf36Smrg ;; 7364b290cf36Smrg esac 7365b290cf36Smrg]) 7366191cded7Smrg 7367b290cf36Smrg# Helper functions for option handling. -*- Autoconf -*- 7368b290cf36Smrg# 7369b290cf36Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 7370b290cf36Smrg# Written by Gary V. Vaughan, 2004 7371b290cf36Smrg# 7372b290cf36Smrg# This file is free software; the Free Software Foundation gives 7373b290cf36Smrg# unlimited permission to copy and/or distribute it, with or without 7374b290cf36Smrg# modifications, as long as this notice is preserved. 7375191cded7Smrg 7376b290cf36Smrg# serial 6 ltoptions.m4 7377191cded7Smrg 7378b290cf36Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7379b290cf36SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 7380191cded7Smrg 7381191cded7Smrg 7382b290cf36Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 7383b290cf36Smrg# ------------------------------------------ 7384b290cf36Smrgm4_define([_LT_MANGLE_OPTION], 7385b290cf36Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 7386191cded7Smrg 7387191cded7Smrg 7388b290cf36Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 7389b290cf36Smrg# --------------------------------------- 7390b290cf36Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 7391b290cf36Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 7392b290cf36Smrg# saved as a flag. 7393b290cf36Smrgm4_define([_LT_SET_OPTION], 7394b290cf36Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 7395b290cf36Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 7396b290cf36Smrg _LT_MANGLE_DEFUN([$1], [$2]), 7397b290cf36Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 7398b290cf36Smrg]) 7399191cded7Smrg 7400191cded7Smrg 7401b290cf36Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 7402b290cf36Smrg# ------------------------------------------------------------ 7403b290cf36Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7404b290cf36Smrgm4_define([_LT_IF_OPTION], 7405b290cf36Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 7406b290cf36Smrg 7407b290cf36Smrg 7408b290cf36Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 7409b290cf36Smrg# ------------------------------------------------------- 7410b290cf36Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 7411b290cf36Smrg# are set. 7412b290cf36Smrgm4_define([_LT_UNLESS_OPTIONS], 7413b290cf36Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7414b290cf36Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 7415b290cf36Smrg [m4_define([$0_found])])])[]dnl 7416b290cf36Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 7417b290cf36Smrg])[]dnl 7418b290cf36Smrg]) 7419191cded7Smrg 7420191cded7Smrg 7421b290cf36Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 7422b290cf36Smrg# ---------------------------------------- 7423b290cf36Smrg# OPTION-LIST is a space-separated list of Libtool options associated 7424b290cf36Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 7425b290cf36Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 7426b290cf36Smrg# the unknown option and exit. 7427b290cf36Smrgm4_defun([_LT_SET_OPTIONS], 7428b290cf36Smrg[# Set options 7429b290cf36Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7430b290cf36Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 7431b290cf36Smrg 7432b290cf36Smrgm4_if([$1],[LT_INIT],[ 7433b290cf36Smrg dnl 7434b290cf36Smrg dnl Simply set some default values (i.e off) if boolean options were not 7435b290cf36Smrg dnl specified: 7436b290cf36Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 7437b290cf36Smrg ]) 7438b290cf36Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 7439b290cf36Smrg ]) 7440b290cf36Smrg dnl 7441b290cf36Smrg dnl If no reference was made to various pairs of opposing options, then 7442b290cf36Smrg dnl we run the default mode handler for the pair. For example, if neither 7443b290cf36Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 7444b290cf36Smrg dnl archives by default: 7445b290cf36Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 7446b290cf36Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 7447b290cf36Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 7448b290cf36Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 7449b290cf36Smrg [_LT_ENABLE_FAST_INSTALL]) 7450b290cf36Smrg ]) 7451b290cf36Smrg])# _LT_SET_OPTIONS 7452b290cf36Smrg 7453b290cf36Smrg 7454b290cf36Smrg 7455b290cf36Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 7456b290cf36Smrg# ----------------------------------------- 7457b290cf36Smrgm4_define([_LT_MANGLE_DEFUN], 7458b290cf36Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 7459191cded7Smrg 7460191cded7Smrg 7461b290cf36Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 7462b290cf36Smrg# ----------------------------------------------- 7463b290cf36Smrgm4_define([LT_OPTION_DEFINE], 7464b290cf36Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 7465b290cf36Smrg])# LT_OPTION_DEFINE 7466191cded7Smrg 7467191cded7Smrg 7468b290cf36Smrg# dlopen 7469b290cf36Smrg# ------ 7470b290cf36SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 7471b290cf36Smrg]) 7472191cded7Smrg 7473b290cf36SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 7474b290cf36Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 7475b290cf36SmrgAC_DIAGNOSE([obsolete], 7476b290cf36Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7477b290cf36Smrgput the `dlopen' option into LT_INIT's first parameter.]) 7478b290cf36Smrg]) 7479191cded7Smrg 7480b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 7481b290cf36Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 7482191cded7Smrg 7483191cded7Smrg 7484b290cf36Smrg# win32-dll 7485b290cf36Smrg# --------- 7486b290cf36Smrg# Declare package support for building win32 dll's. 7487b290cf36SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 7488b290cf36Smrg[enable_win32_dll=yes 7489191cded7Smrg 7490b290cf36Smrgcase $host in 7491b290cf36Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) 7492b290cf36Smrg AC_CHECK_TOOL(AS, as, false) 7493b290cf36Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7494b290cf36Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7495b290cf36Smrg ;; 7496b290cf36Smrgesac 7497191cded7Smrg 7498b290cf36Smrgtest -z "$AS" && AS=as 7499b290cf36Smrg_LT_DECL([], [AS], [0], [Assembler program])dnl 7500191cded7Smrg 7501b290cf36Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7502b290cf36Smrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl 7503191cded7Smrg 7504b290cf36Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7505b290cf36Smrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl 7506b290cf36Smrg])# win32-dll 7507191cded7Smrg 7508b290cf36SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 7509b290cf36Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7510b290cf36Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 7511b290cf36SmrgAC_DIAGNOSE([obsolete], 7512b290cf36Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7513b290cf36Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 7514b290cf36Smrg]) 7515191cded7Smrg 7516b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 7517b290cf36Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 7518191cded7Smrg 7519191cded7Smrg 7520b290cf36Smrg# _LT_ENABLE_SHARED([DEFAULT]) 7521b290cf36Smrg# ---------------------------- 7522b290cf36Smrg# implement the --enable-shared flag, and supports the `shared' and 7523b290cf36Smrg# `disable-shared' LT_INIT options. 7524b290cf36Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7525b290cf36Smrgm4_define([_LT_ENABLE_SHARED], 7526b290cf36Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 7527b290cf36SmrgAC_ARG_ENABLE([shared], 7528b290cf36Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 7529b290cf36Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 7530b290cf36Smrg [p=${PACKAGE-default} 7531b290cf36Smrg case $enableval in 7532b290cf36Smrg yes) enable_shared=yes ;; 7533b290cf36Smrg no) enable_shared=no ;; 7534b290cf36Smrg *) 7535b290cf36Smrg enable_shared=no 7536b290cf36Smrg # Look at the argument we got. We use all the common list separators. 7537b290cf36Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7538b290cf36Smrg for pkg in $enableval; do 7539b290cf36Smrg IFS="$lt_save_ifs" 7540b290cf36Smrg if test "X$pkg" = "X$p"; then 7541b290cf36Smrg enable_shared=yes 7542b290cf36Smrg fi 7543b290cf36Smrg done 7544b290cf36Smrg IFS="$lt_save_ifs" 7545191cded7Smrg ;; 7546b290cf36Smrg esac], 7547b290cf36Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 7548191cded7Smrg 7549b290cf36Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 7550b290cf36Smrg [Whether or not to build shared libraries]) 7551b290cf36Smrg])# _LT_ENABLE_SHARED 7552191cded7Smrg 7553b290cf36SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 7554b290cf36SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 7555191cded7Smrg 7556b290cf36Smrg# Old names: 7557b290cf36SmrgAC_DEFUN([AC_ENABLE_SHARED], 7558b290cf36Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 7559b290cf36Smrg]) 7560191cded7Smrg 7561b290cf36SmrgAC_DEFUN([AC_DISABLE_SHARED], 7562b290cf36Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 7563b290cf36Smrg]) 7564191cded7Smrg 7565b290cf36SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 7566b290cf36SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 7567191cded7Smrg 7568b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 7569b290cf36Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 7570b290cf36Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 7571191cded7Smrg 7572191cded7Smrg 7573191cded7Smrg 7574b290cf36Smrg# _LT_ENABLE_STATIC([DEFAULT]) 7575b290cf36Smrg# ---------------------------- 7576b290cf36Smrg# implement the --enable-static flag, and support the `static' and 7577b290cf36Smrg# `disable-static' LT_INIT options. 7578b290cf36Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7579b290cf36Smrgm4_define([_LT_ENABLE_STATIC], 7580b290cf36Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 7581b290cf36SmrgAC_ARG_ENABLE([static], 7582b290cf36Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 7583b290cf36Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 7584b290cf36Smrg [p=${PACKAGE-default} 7585b290cf36Smrg case $enableval in 7586b290cf36Smrg yes) enable_static=yes ;; 7587b290cf36Smrg no) enable_static=no ;; 7588b290cf36Smrg *) 7589b290cf36Smrg enable_static=no 7590b290cf36Smrg # Look at the argument we got. We use all the common list separators. 7591b290cf36Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7592b290cf36Smrg for pkg in $enableval; do 7593b290cf36Smrg IFS="$lt_save_ifs" 7594b290cf36Smrg if test "X$pkg" = "X$p"; then 7595b290cf36Smrg enable_static=yes 7596b290cf36Smrg fi 7597b290cf36Smrg done 7598b290cf36Smrg IFS="$lt_save_ifs" 7599191cded7Smrg ;; 7600b290cf36Smrg esac], 7601b290cf36Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 7602191cded7Smrg 7603b290cf36Smrg _LT_DECL([build_old_libs], [enable_static], [0], 7604b290cf36Smrg [Whether or not to build static libraries]) 7605b290cf36Smrg])# _LT_ENABLE_STATIC 7606191cded7Smrg 7607b290cf36SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 7608b290cf36SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 7609191cded7Smrg 7610b290cf36Smrg# Old names: 7611b290cf36SmrgAC_DEFUN([AC_ENABLE_STATIC], 7612b290cf36Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 7613b290cf36Smrg]) 7614191cded7Smrg 7615b290cf36SmrgAC_DEFUN([AC_DISABLE_STATIC], 7616b290cf36Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 7617b290cf36Smrg]) 7618191cded7Smrg 7619b290cf36SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 7620b290cf36SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 7621b290cf36Smrg 7622b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 7623b290cf36Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 7624b290cf36Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 7625191cded7Smrg 7626191cded7Smrg 7627191cded7Smrg 7628b290cf36Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 7629b290cf36Smrg# ---------------------------------- 7630b290cf36Smrg# implement the --enable-fast-install flag, and support the `fast-install' 7631b290cf36Smrg# and `disable-fast-install' LT_INIT options. 7632b290cf36Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7633b290cf36Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 7634b290cf36Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 7635b290cf36SmrgAC_ARG_ENABLE([fast-install], 7636b290cf36Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 7637b290cf36Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 7638b290cf36Smrg [p=${PACKAGE-default} 7639b290cf36Smrg case $enableval in 7640b290cf36Smrg yes) enable_fast_install=yes ;; 7641b290cf36Smrg no) enable_fast_install=no ;; 7642191cded7Smrg *) 7643b290cf36Smrg enable_fast_install=no 7644b290cf36Smrg # Look at the argument we got. We use all the common list separators. 7645b290cf36Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7646b290cf36Smrg for pkg in $enableval; do 7647b290cf36Smrg IFS="$lt_save_ifs" 7648b290cf36Smrg if test "X$pkg" = "X$p"; then 7649b290cf36Smrg enable_fast_install=yes 7650b290cf36Smrg fi 7651b290cf36Smrg done 7652b290cf36Smrg IFS="$lt_save_ifs" 7653191cded7Smrg ;; 7654b290cf36Smrg esac], 7655b290cf36Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 7656b290cf36Smrg 7657b290cf36Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 7658b290cf36Smrg [Whether or not to optimize for fast installation])dnl 7659b290cf36Smrg])# _LT_ENABLE_FAST_INSTALL 7660b290cf36Smrg 7661b290cf36SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 7662b290cf36SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 7663b290cf36Smrg 7664b290cf36Smrg# Old names: 7665b290cf36SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 7666b290cf36Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 7667b290cf36SmrgAC_DIAGNOSE([obsolete], 7668b290cf36Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7669b290cf36Smrgthe `fast-install' option into LT_INIT's first parameter.]) 7670191cded7Smrg]) 7671191cded7Smrg 7672b290cf36SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 7673b290cf36Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 7674b290cf36SmrgAC_DIAGNOSE([obsolete], 7675b290cf36Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7676b290cf36Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 7677b290cf36Smrg]) 7678191cded7Smrg 7679b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 7680b290cf36Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 7681b290cf36Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 7682b290cf36Smrg 7683b290cf36Smrg 7684b290cf36Smrg# _LT_WITH_PIC([MODE]) 7685b290cf36Smrg# -------------------- 7686b290cf36Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 7687b290cf36Smrg# LT_INIT options. 7688b290cf36Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 7689b290cf36Smrgm4_define([_LT_WITH_PIC], 7690b290cf36Smrg[AC_ARG_WITH([pic], 7691b290cf36Smrg [AS_HELP_STRING([--with-pic], 7692b290cf36Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 7693b290cf36Smrg [pic_mode="$withval"], 7694b290cf36Smrg [pic_mode=default]) 7695b290cf36Smrg 7696b290cf36Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 7697b290cf36Smrg 7698b290cf36Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 7699b290cf36Smrg])# _LT_WITH_PIC 7700b290cf36Smrg 7701b290cf36SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 7702b290cf36SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 7703191cded7Smrg 7704b290cf36Smrg# Old name: 7705b290cf36SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 7706b290cf36Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 7707b290cf36SmrgAC_DIAGNOSE([obsolete], 7708b290cf36Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7709b290cf36Smrgput the `pic-only' option into LT_INIT's first parameter.]) 7710b290cf36Smrg]) 7711191cded7Smrg 7712b290cf36Smrgdnl aclocal-1.4 backwards compatibility: 7713b290cf36Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 7714191cded7Smrg 7715b290cf36Smrg 7716b290cf36Smrgm4_define([_LTDL_MODE], []) 7717b290cf36SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 7718b290cf36Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 7719b290cf36SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 7720b290cf36Smrg [m4_define([_LTDL_MODE], [recursive])]) 7721b290cf36SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 7722b290cf36Smrg [m4_define([_LTDL_MODE], [subproject])]) 7723b290cf36Smrg 7724b290cf36Smrgm4_define([_LTDL_TYPE], []) 7725b290cf36SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 7726b290cf36Smrg [m4_define([_LTDL_TYPE], [installable])]) 7727b290cf36SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 7728b290cf36Smrg [m4_define([_LTDL_TYPE], [convenience])]) 7729b290cf36Smrg 7730b290cf36Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 7731191cded7Smrg# 7732b290cf36Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 7733b290cf36Smrg# Written by Gary V. Vaughan, 2004 7734191cded7Smrg# 7735b290cf36Smrg# This file is free software; the Free Software Foundation gives 7736b290cf36Smrg# unlimited permission to copy and/or distribute it, with or without 7737b290cf36Smrg# modifications, as long as this notice is preserved. 7738b290cf36Smrg 7739b290cf36Smrg# serial 6 ltsugar.m4 7740b290cf36Smrg 7741b290cf36Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7742b290cf36SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 7743b290cf36Smrg 7744b290cf36Smrg 7745b290cf36Smrg# lt_join(SEP, ARG1, [ARG2...]) 7746b290cf36Smrg# ----------------------------- 7747b290cf36Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 7748b290cf36Smrg# associated separator. 7749b290cf36Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 7750b290cf36Smrg# versions in m4sugar had bugs. 7751b290cf36Smrgm4_define([lt_join], 7752b290cf36Smrg[m4_if([$#], [1], [], 7753b290cf36Smrg [$#], [2], [[$2]], 7754b290cf36Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 7755b290cf36Smrgm4_define([_lt_join], 7756b290cf36Smrg[m4_if([$#$2], [2], [], 7757b290cf36Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 7758b290cf36Smrg 7759b290cf36Smrg 7760b290cf36Smrg# lt_car(LIST) 7761b290cf36Smrg# lt_cdr(LIST) 7762b290cf36Smrg# ------------ 7763b290cf36Smrg# Manipulate m4 lists. 7764b290cf36Smrg# These macros are necessary as long as will still need to support 7765b290cf36Smrg# Autoconf-2.59 which quotes differently. 7766b290cf36Smrgm4_define([lt_car], [[$1]]) 7767b290cf36Smrgm4_define([lt_cdr], 7768b290cf36Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 7769b290cf36Smrg [$#], 1, [], 7770b290cf36Smrg [m4_dquote(m4_shift($@))])]) 7771b290cf36Smrgm4_define([lt_unquote], $1) 7772b290cf36Smrg 7773b290cf36Smrg 7774b290cf36Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 7775b290cf36Smrg# ------------------------------------------ 7776b290cf36Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 7777b290cf36Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 7778b290cf36Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 7779b290cf36Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 7780b290cf36Smrg# than defined and empty). 7781191cded7Smrg# 7782b290cf36Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 7783b290cf36Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 7784b290cf36Smrgm4_define([lt_append], 7785b290cf36Smrg[m4_define([$1], 7786b290cf36Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 7787b290cf36Smrg 7788b290cf36Smrg 7789b290cf36Smrg 7790b290cf36Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 7791b290cf36Smrg# ---------------------------------------------------------- 7792b290cf36Smrg# Produce a SEP delimited list of all paired combinations of elements of 7793b290cf36Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 7794b290cf36Smrg# has the form PREFIXmINFIXSUFFIXn. 7795b290cf36Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 7796b290cf36Smrgm4_define([lt_combine], 7797b290cf36Smrg[m4_if(m4_eval([$# > 3]), [1], 7798b290cf36Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 7799b290cf36Smrg[[m4_foreach([_Lt_prefix], [$2], 7800b290cf36Smrg [m4_foreach([_Lt_suffix], 7801b290cf36Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 7802b290cf36Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 7803b290cf36Smrg 7804b290cf36Smrg 7805b290cf36Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 7806b290cf36Smrg# ----------------------------------------------------------------------- 7807b290cf36Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 7808b290cf36Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 7809b290cf36Smrgm4_define([lt_if_append_uniq], 7810b290cf36Smrg[m4_ifdef([$1], 7811b290cf36Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 7812b290cf36Smrg [lt_append([$1], [$2], [$3])$4], 7813b290cf36Smrg [$5])], 7814b290cf36Smrg [lt_append([$1], [$2], [$3])$4])]) 7815b290cf36Smrg 7816b290cf36Smrg 7817b290cf36Smrg# lt_dict_add(DICT, KEY, VALUE) 7818b290cf36Smrg# ----------------------------- 7819b290cf36Smrgm4_define([lt_dict_add], 7820b290cf36Smrg[m4_define([$1($2)], [$3])]) 7821191cded7Smrg 7822191cded7Smrg 7823b290cf36Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 7824b290cf36Smrg# -------------------------------------------- 7825b290cf36Smrgm4_define([lt_dict_add_subkey], 7826b290cf36Smrg[m4_define([$1($2:$3)], [$4])]) 7827191cded7Smrg 7828191cded7Smrg 7829b290cf36Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 7830b290cf36Smrg# ---------------------------------- 7831b290cf36Smrgm4_define([lt_dict_fetch], 7832b290cf36Smrg[m4_ifval([$3], 7833b290cf36Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 7834b290cf36Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 7835191cded7Smrg 7836191cded7Smrg 7837b290cf36Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 7838b290cf36Smrg# ----------------------------------------------------------------- 7839b290cf36Smrgm4_define([lt_if_dict_fetch], 7840b290cf36Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 7841b290cf36Smrg [$5], 7842b290cf36Smrg [$6])]) 7843191cded7Smrg 7844191cded7Smrg 7845b290cf36Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 7846b290cf36Smrg# -------------------------------------------------------------- 7847b290cf36Smrgm4_define([lt_dict_filter], 7848b290cf36Smrg[m4_if([$5], [], [], 7849b290cf36Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 7850b290cf36Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 7851b290cf36Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 7852191cded7Smrg]) 7853b290cf36Smrg 7854b290cf36Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 7855b290cf36Smrg# 7856b290cf36Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 7857b290cf36Smrg# Written by Scott James Remnant, 2004 7858b290cf36Smrg# 7859b290cf36Smrg# This file is free software; the Free Software Foundation gives 7860b290cf36Smrg# unlimited permission to copy and/or distribute it, with or without 7861b290cf36Smrg# modifications, as long as this notice is preserved. 7862b290cf36Smrg 7863b290cf36Smrg# Generated from ltversion.in. 7864b290cf36Smrg 7865b290cf36Smrg# serial 3012 ltversion.m4 7866b290cf36Smrg# This file is part of GNU Libtool 7867b290cf36Smrg 7868b290cf36Smrgm4_define([LT_PACKAGE_VERSION], [2.2.6]) 7869b290cf36Smrgm4_define([LT_PACKAGE_REVISION], [1.3012]) 7870b290cf36Smrg 7871b290cf36SmrgAC_DEFUN([LTVERSION_VERSION], 7872b290cf36Smrg[macro_version='2.2.6' 7873b290cf36Smrgmacro_revision='1.3012' 7874b290cf36Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 7875b290cf36Smrg_LT_DECL(, macro_revision, 0) 7876191cded7Smrg]) 7877191cded7Smrg 7878b290cf36Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 7879b290cf36Smrg# 7880b290cf36Smrg# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. 7881b290cf36Smrg# Written by Scott James Remnant, 2004. 7882b290cf36Smrg# 7883b290cf36Smrg# This file is free software; the Free Software Foundation gives 7884b290cf36Smrg# unlimited permission to copy and/or distribute it, with or without 7885b290cf36Smrg# modifications, as long as this notice is preserved. 7886b290cf36Smrg 7887b290cf36Smrg# serial 4 lt~obsolete.m4 7888b290cf36Smrg 7889b290cf36Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 7890b290cf36Smrg# 7891b290cf36Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 7892b290cf36Smrg# which have later been changed to m4_define as they aren't part of the 7893b290cf36Smrg# exported API, or moved to Autoconf or Automake where they belong. 7894b290cf36Smrg# 7895b290cf36Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 7896b290cf36Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 7897b290cf36Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 7898b290cf36Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 7899b290cf36Smrg# and doesn't know about Autoconf macros at all.) 7900b290cf36Smrg# 7901b290cf36Smrg# So we provide this file, which has a silly filename so it's always 7902b290cf36Smrg# included after everything else. This provides aclocal with the 7903b290cf36Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 7904b290cf36Smrg# because those macros already exist, or will be overwritten later. 7905b290cf36Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 7906b290cf36Smrg# 7907b290cf36Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 7908b290cf36Smrg# Yes, that means every name once taken will need to remain here until 7909b290cf36Smrg# we give up compatibility with versions before 1.7, at which point 7910b290cf36Smrg# we need to keep only those names which we still refer to. 7911b290cf36Smrg 7912b290cf36Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7913b290cf36SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 7914b290cf36Smrg 7915b290cf36Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 7916b290cf36Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 7917b290cf36Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 7918b290cf36Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 7919b290cf36Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 7920b290cf36Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 7921b290cf36Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 7922b290cf36Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 7923b290cf36Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 7924b290cf36Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 7925b290cf36Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 7926b290cf36Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 7927b290cf36Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 7928b290cf36Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 7929b290cf36Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 7930b290cf36Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 7931b290cf36Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 7932b290cf36Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 7933b290cf36Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 7934b290cf36Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 7935b290cf36Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 7936b290cf36Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 7937b290cf36Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 7938b290cf36Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 7939b290cf36Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 7940b290cf36Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 7941b290cf36Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 7942b290cf36Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 7943b290cf36Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 7944b290cf36Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 7945b290cf36Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 7946b290cf36Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 7947b290cf36Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 7948b290cf36Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 7949b290cf36Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 7950b290cf36Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 7951b290cf36Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 7952b290cf36Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 7953b290cf36Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 7954b290cf36Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 7955b290cf36Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 7956b290cf36Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 7957b290cf36Smrgm4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 7958b290cf36Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 7959b290cf36Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 7960b290cf36Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 7961b290cf36Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 7962b290cf36Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 7963b290cf36Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 7964b290cf36Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 7965b290cf36Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 7966b290cf36Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 7967b290cf36Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 7968b290cf36Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 7969b290cf36Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 7970b290cf36Smrg 7971191cded7Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 7972191cded7Smrg# 7973191cded7Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 7974191cded7Smrg# 7975191cded7Smrg# This program is free software; you can redistribute it and/or modify 7976191cded7Smrg# it under the terms of the GNU General Public License as published by 7977191cded7Smrg# the Free Software Foundation; either version 2 of the License, or 7978191cded7Smrg# (at your option) any later version. 7979191cded7Smrg# 7980191cded7Smrg# This program is distributed in the hope that it will be useful, but 7981191cded7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 7982191cded7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 7983191cded7Smrg# General Public License for more details. 7984191cded7Smrg# 7985191cded7Smrg# You should have received a copy of the GNU General Public License 7986191cded7Smrg# along with this program; if not, write to the Free Software 7987191cded7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 7988191cded7Smrg# 7989191cded7Smrg# As a special exception to the GNU General Public License, if you 7990191cded7Smrg# distribute this file as part of a program that contains a 7991191cded7Smrg# configuration script generated by Autoconf, you may include it under 7992191cded7Smrg# the same distribution terms that you use for the rest of that program. 7993191cded7Smrg 7994191cded7Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 7995191cded7Smrg# ---------------------------------- 7996191cded7SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 7997191cded7Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 7998191cded7Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 7999191cded7SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 8000191cded7Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8001191cded7Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8002191cded7Smrgfi 8003191cded7Smrgif test -n "$PKG_CONFIG"; then 8004191cded7Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 8005191cded7Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8006191cded7Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8007191cded7Smrg AC_MSG_RESULT([yes]) 8008191cded7Smrg else 8009191cded7Smrg AC_MSG_RESULT([no]) 8010191cded7Smrg PKG_CONFIG="" 8011191cded7Smrg fi 8012191cded7Smrg 8013191cded7Smrgfi[]dnl 8014191cded7Smrg])# PKG_PROG_PKG_CONFIG 8015191cded7Smrg 8016191cded7Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8017191cded7Smrg# 8018b290cf36Smrg# Check to see whether a particular set of modules exists. Similar 8019b290cf36Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8020b290cf36Smrg# 8021b290cf36Smrg# 8022b290cf36Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 8023b290cf36Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 8024b290cf36Smrg# PKG_CHECK_EXISTS manually 8025b290cf36Smrg# -------------------------------------------------------------- 8026b290cf36SmrgAC_DEFUN([PKG_CHECK_EXISTS], 8027b290cf36Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8028b290cf36Smrgif test -n "$PKG_CONFIG" && \ 8029b290cf36Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8030b290cf36Smrg m4_ifval([$2], [$2], [:]) 8031b290cf36Smrgm4_ifvaln([$3], [else 8032b290cf36Smrg $3])dnl 8033b290cf36Smrgfi]) 8034b290cf36Smrg 8035b290cf36Smrg 8036b290cf36Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8037b290cf36Smrg# --------------------------------------------- 8038b290cf36Smrgm4_define([_PKG_CONFIG], 8039b290cf36Smrg[if test -n "$$1"; then 8040b290cf36Smrg pkg_cv_[]$1="$$1" 8041b290cf36Smrg elif test -n "$PKG_CONFIG"; then 8042b290cf36Smrg PKG_CHECK_EXISTS([$3], 8043b290cf36Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 8044b290cf36Smrg [pkg_failed=yes]) 8045b290cf36Smrg else 8046b290cf36Smrg pkg_failed=untried 8047b290cf36Smrgfi[]dnl 8048b290cf36Smrg])# _PKG_CONFIG 8049b290cf36Smrg 8050b290cf36Smrg# _PKG_SHORT_ERRORS_SUPPORTED 8051b290cf36Smrg# ----------------------------- 8052b290cf36SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8053b290cf36Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8054b290cf36Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8055b290cf36Smrg _pkg_short_errors_supported=yes 8056b290cf36Smrgelse 8057b290cf36Smrg _pkg_short_errors_supported=no 8058b290cf36Smrgfi[]dnl 8059b290cf36Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 8060b290cf36Smrg 8061b290cf36Smrg 8062b290cf36Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8063b290cf36Smrg# [ACTION-IF-NOT-FOUND]) 8064b290cf36Smrg# 8065b290cf36Smrg# 8066b290cf36Smrg# Note that if there is a possibility the first call to 8067b290cf36Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8068b290cf36Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8069b290cf36Smrg# 8070b290cf36Smrg# 8071b290cf36Smrg# -------------------------------------------------------------- 8072b290cf36SmrgAC_DEFUN([PKG_CHECK_MODULES], 8073b290cf36Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8074b290cf36SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8075b290cf36SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8076b290cf36Smrg 8077b290cf36Smrgpkg_failed=no 8078b290cf36SmrgAC_MSG_CHECKING([for $1]) 8079b290cf36Smrg 8080b290cf36Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8081b290cf36Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8082b290cf36Smrg 8083b290cf36Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8084b290cf36Smrgand $1[]_LIBS to avoid the need to call pkg-config. 8085b290cf36SmrgSee the pkg-config man page for more details.]) 8086b290cf36Smrg 8087b290cf36Smrgif test $pkg_failed = yes; then 8088b290cf36Smrg _PKG_SHORT_ERRORS_SUPPORTED 8089b290cf36Smrg if test $_pkg_short_errors_supported = yes; then 8090b290cf36Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 8091b290cf36Smrg else 8092b290cf36Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 8093b290cf36Smrg fi 8094b290cf36Smrg # Put the nasty error message in config.log where it belongs 8095b290cf36Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8096b290cf36Smrg 8097b290cf36Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 8098b290cf36Smrg[Package requirements ($2) were not met: 8099b290cf36Smrg 8100b290cf36Smrg$$1_PKG_ERRORS 8101b290cf36Smrg 8102b290cf36SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8103b290cf36Smrginstalled software in a non-standard prefix. 8104b290cf36Smrg 8105b290cf36Smrg_PKG_TEXT 8106b290cf36Smrg])], 8107b290cf36Smrg [AC_MSG_RESULT([no]) 8108b290cf36Smrg $4]) 8109b290cf36Smrgelif test $pkg_failed = untried; then 8110b290cf36Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 8111b290cf36Smrg[The pkg-config script could not be found or is too old. Make sure it 8112b290cf36Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 8113b290cf36Smrgpath to pkg-config. 8114b290cf36Smrg 8115b290cf36Smrg_PKG_TEXT 8116b290cf36Smrg 8117b290cf36SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 8118b290cf36Smrg [$4]) 8119b290cf36Smrgelse 8120b290cf36Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8121b290cf36Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8122b290cf36Smrg AC_MSG_RESULT([yes]) 8123b290cf36Smrg ifelse([$3], , :, [$3]) 8124b290cf36Smrgfi[]dnl 8125b290cf36Smrg])# PKG_CHECK_MODULES 8126b290cf36Smrg 8127b290cf36Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 8128b290cf36Smrg# 8129b290cf36Smrg# This file is free software; the Free Software Foundation 8130b290cf36Smrg# gives unlimited permission to copy and/or distribute it, 8131b290cf36Smrg# with or without modifications, as long as this notice is preserved. 8132b290cf36Smrg 8133b290cf36Smrg# AM_AUTOMAKE_VERSION(VERSION) 8134b290cf36Smrg# ---------------------------- 8135b290cf36Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 8136b290cf36Smrg# generated from the m4 files accompanying Automake X.Y. 8137b290cf36Smrg# (This private macro should not be called outside this file.) 8138b290cf36SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 8139b290cf36Smrg[am__api_version='1.11' 8140b290cf36Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 8141b290cf36Smrgdnl require some minimum version. Point them to the right macro. 8142b290cf36Smrgm4_if([$1], [1.11], [], 8143b290cf36Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 8144b290cf36Smrg]) 8145b290cf36Smrg 8146b290cf36Smrg# _AM_AUTOCONF_VERSION(VERSION) 8147b290cf36Smrg# ----------------------------- 8148b290cf36Smrg# aclocal traces this macro to find the Autoconf version. 8149b290cf36Smrg# This is a private macro too. Using m4_define simplifies 8150b290cf36Smrg# the logic in aclocal, which can simply ignore this definition. 8151b290cf36Smrgm4_define([_AM_AUTOCONF_VERSION], []) 8152b290cf36Smrg 8153b290cf36Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 8154b290cf36Smrg# ------------------------------- 8155b290cf36Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 8156b290cf36Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 8157b290cf36SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 8158b290cf36Smrg[AM_AUTOMAKE_VERSION([1.11])dnl 8159b290cf36Smrgm4_ifndef([AC_AUTOCONF_VERSION], 8160b290cf36Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 8161b290cf36Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 8162b290cf36Smrg 8163b290cf36Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 8164b290cf36Smrg 8165b290cf36Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8166b290cf36Smrg# 8167b290cf36Smrg# This file is free software; the Free Software Foundation 8168b290cf36Smrg# gives unlimited permission to copy and/or distribute it, 8169b290cf36Smrg# with or without modifications, as long as this notice is preserved. 8170b290cf36Smrg 8171b290cf36Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 8172b290cf36Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 8173b290cf36Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 8174b290cf36Smrg# 8175b290cf36Smrg# Of course, Automake must honor this variable whenever it calls a 8176b290cf36Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 8177b290cf36Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 8178b290cf36Smrg# depending on how configure is run. This is pretty annoying, since 8179b290cf36Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 8180b290cf36Smrg# source directory, any form will work fine, but in subdirectories a 8181b290cf36Smrg# relative path needs to be adjusted first. 8182b290cf36Smrg# 8183b290cf36Smrg# $ac_aux_dir/missing 8184b290cf36Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8185b290cf36Smrg# $top_srcdir/$ac_aux_dir/missing 8186b290cf36Smrg# fails if $ac_aux_dir is absolute, 8187b290cf36Smrg# fails when called from a subdirectory in a VPATH build with 8188b290cf36Smrg# a relative $ac_aux_dir 8189b290cf36Smrg# 8190b290cf36Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8191b290cf36Smrg# are both prefixed by $srcdir. In an in-source build this is usually 8192b290cf36Smrg# harmless because $srcdir is `.', but things will broke when you 8193b290cf36Smrg# start a VPATH build or use an absolute $srcdir. 8194b290cf36Smrg# 8195b290cf36Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 8196b290cf36Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 8197b290cf36Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 8198b290cf36Smrg# and then we would define $MISSING as 8199b290cf36Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 8200b290cf36Smrg# This will work as long as MISSING is not called from configure, because 8201b290cf36Smrg# unfortunately $(top_srcdir) has no meaning in configure. 8202b290cf36Smrg# However there are other variables, like CC, which are often used in 8203b290cf36Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 8204191cded7Smrg# 8205b290cf36Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 8206b290cf36Smrg# absolute PATH. The drawback is that using absolute paths prevent a 8207b290cf36Smrg# configured tree to be moved without reconfiguration. 8208b290cf36Smrg 8209b290cf36SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 8210b290cf36Smrg[dnl Rely on autoconf to set up CDPATH properly. 8211b290cf36SmrgAC_PREREQ([2.50])dnl 8212b290cf36Smrg# expand $ac_aux_dir to an absolute path 8213b290cf36Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 8214b290cf36Smrg]) 8215b290cf36Smrg 8216b290cf36Smrg# AM_CONDITIONAL -*- Autoconf -*- 8217b290cf36Smrg 8218b290cf36Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 8219b290cf36Smrg# Free Software Foundation, Inc. 8220191cded7Smrg# 8221b290cf36Smrg# This file is free software; the Free Software Foundation 8222b290cf36Smrg# gives unlimited permission to copy and/or distribute it, 8223b290cf36Smrg# with or without modifications, as long as this notice is preserved. 8224191cded7Smrg 8225b290cf36Smrg# serial 9 8226191cded7Smrg 8227b290cf36Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 8228b290cf36Smrg# ------------------------------------- 8229b290cf36Smrg# Define a conditional. 8230b290cf36SmrgAC_DEFUN([AM_CONDITIONAL], 8231b290cf36Smrg[AC_PREREQ(2.52)dnl 8232b290cf36Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 8233b290cf36Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 8234b290cf36SmrgAC_SUBST([$1_TRUE])dnl 8235b290cf36SmrgAC_SUBST([$1_FALSE])dnl 8236b290cf36Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 8237b290cf36Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 8238b290cf36Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 8239b290cf36Smrgif $2; then 8240b290cf36Smrg $1_TRUE= 8241b290cf36Smrg $1_FALSE='#' 8242191cded7Smrgelse 8243b290cf36Smrg $1_TRUE='#' 8244b290cf36Smrg $1_FALSE= 8245b290cf36Smrgfi 8246b290cf36SmrgAC_CONFIG_COMMANDS_PRE( 8247b290cf36Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 8248b290cf36Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 8249b290cf36SmrgUsually this means the macro was only invoked conditionally.]]) 8250b290cf36Smrgfi])]) 8251191cded7Smrg 8252b290cf36Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 8253b290cf36Smrg# Free Software Foundation, Inc. 8254b290cf36Smrg# 8255b290cf36Smrg# This file is free software; the Free Software Foundation 8256b290cf36Smrg# gives unlimited permission to copy and/or distribute it, 8257b290cf36Smrg# with or without modifications, as long as this notice is preserved. 8258191cded7Smrg 8259b290cf36Smrg# serial 10 8260191cded7Smrg 8261b290cf36Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 8262b290cf36Smrg# written in clear, in which case automake, when reading aclocal.m4, 8263b290cf36Smrg# will think it sees a *use*, and therefore will trigger all it's 8264b290cf36Smrg# C support machinery. Also note that it means that autoscan, seeing 8265b290cf36Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 8266b290cf36Smrg 8267b290cf36Smrg 8268b290cf36Smrg# _AM_DEPENDENCIES(NAME) 8269b290cf36Smrg# ---------------------- 8270b290cf36Smrg# See how the compiler implements dependency checking. 8271b290cf36Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 8272b290cf36Smrg# We try a few techniques and use that to set a single cache variable. 8273191cded7Smrg# 8274b290cf36Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 8275b290cf36Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 8276b290cf36Smrg# dependency, and given that the user is not expected to run this macro, 8277b290cf36Smrg# just rely on AC_PROG_CC. 8278b290cf36SmrgAC_DEFUN([_AM_DEPENDENCIES], 8279b290cf36Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 8280b290cf36SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 8281b290cf36SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 8282b290cf36SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 8283191cded7Smrg 8284b290cf36Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 8285b290cf36Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 8286b290cf36Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 8287b290cf36Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 8288b290cf36Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 8289b290cf36Smrg [depcc="$$1" am_compiler_list=]) 8290191cded7Smrg 8291b290cf36SmrgAC_CACHE_CHECK([dependency style of $depcc], 8292b290cf36Smrg [am_cv_$1_dependencies_compiler_type], 8293b290cf36Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 8294b290cf36Smrg # We make a subdir and do the tests there. Otherwise we can end up 8295b290cf36Smrg # making bogus files that we don't know about and never remove. For 8296b290cf36Smrg # instance it was reported that on HP-UX the gcc test will end up 8297b290cf36Smrg # making a dummy file named `D' -- because `-MD' means `put the output 8298b290cf36Smrg # in D'. 8299b290cf36Smrg mkdir conftest.dir 8300b290cf36Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 8301b290cf36Smrg # using a relative directory. 8302b290cf36Smrg cp "$am_depcomp" conftest.dir 8303b290cf36Smrg cd conftest.dir 8304b290cf36Smrg # We will build objects and dependencies in a subdirectory because 8305b290cf36Smrg # it helps to detect inapplicable dependency modes. For instance 8306b290cf36Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 8307b290cf36Smrg # side effect of compilation, but ICC will put the dependencies in 8308b290cf36Smrg # the current directory while Tru64 will put them in the object 8309b290cf36Smrg # directory. 8310b290cf36Smrg mkdir sub 8311191cded7Smrg 8312b290cf36Smrg am_cv_$1_dependencies_compiler_type=none 8313b290cf36Smrg if test "$am_compiler_list" = ""; then 8314b290cf36Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 8315b290cf36Smrg fi 8316b290cf36Smrg am__universal=false 8317b290cf36Smrg m4_case([$1], [CC], 8318b290cf36Smrg [case " $depcc " in #( 8319b290cf36Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 8320b290cf36Smrg esac], 8321b290cf36Smrg [CXX], 8322b290cf36Smrg [case " $depcc " in #( 8323b290cf36Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 8324b290cf36Smrg esac]) 8325191cded7Smrg 8326b290cf36Smrg for depmode in $am_compiler_list; do 8327b290cf36Smrg # Setup a source with many dependencies, because some compilers 8328b290cf36Smrg # like to wrap large dependency lists on column 80 (with \), and 8329b290cf36Smrg # we should not choose a depcomp mode which is confused by this. 8330b290cf36Smrg # 8331b290cf36Smrg # We need to recreate these files for each test, as the compiler may 8332b290cf36Smrg # overwrite some of them when testing with obscure command lines. 8333b290cf36Smrg # This happens at least with the AIX C compiler. 8334b290cf36Smrg : > sub/conftest.c 8335b290cf36Smrg for i in 1 2 3 4 5 6; do 8336b290cf36Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 8337b290cf36Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 8338b290cf36Smrg # Solaris 8's {/usr,}/bin/sh. 8339b290cf36Smrg touch sub/conftst$i.h 8340b290cf36Smrg done 8341b290cf36Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 8342191cded7Smrg 8343b290cf36Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 8344b290cf36Smrg # mode. It turns out that the SunPro C++ compiler does not properly 8345b290cf36Smrg # handle `-M -o', and we need to detect this. Also, some Intel 8346b290cf36Smrg # versions had trouble with output in subdirs 8347b290cf36Smrg am__obj=sub/conftest.${OBJEXT-o} 8348b290cf36Smrg am__minus_obj="-o $am__obj" 8349b290cf36Smrg case $depmode in 8350b290cf36Smrg gcc) 8351b290cf36Smrg # This depmode causes a compiler race in universal mode. 8352b290cf36Smrg test "$am__universal" = false || continue 8353b290cf36Smrg ;; 8354b290cf36Smrg nosideeffect) 8355b290cf36Smrg # after this tag, mechanisms are not by side-effect, so they'll 8356b290cf36Smrg # only be used when explicitly requested 8357b290cf36Smrg if test "x$enable_dependency_tracking" = xyes; then 8358b290cf36Smrg continue 8359b290cf36Smrg else 8360b290cf36Smrg break 8361b290cf36Smrg fi 8362b290cf36Smrg ;; 8363b290cf36Smrg msvisualcpp | msvcmsys) 8364b290cf36Smrg # This compiler won't grok `-c -o', but also, the minuso test has 8365b290cf36Smrg # not run yet. These depmodes are late enough in the game, and 8366b290cf36Smrg # so weak that their functioning should not be impacted. 8367b290cf36Smrg am__obj=conftest.${OBJEXT-o} 8368b290cf36Smrg am__minus_obj= 8369b290cf36Smrg ;; 8370b290cf36Smrg none) break ;; 8371b290cf36Smrg esac 8372b290cf36Smrg if depmode=$depmode \ 8373b290cf36Smrg source=sub/conftest.c object=$am__obj \ 8374b290cf36Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 8375b290cf36Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 8376b290cf36Smrg >/dev/null 2>conftest.err && 8377b290cf36Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 8378b290cf36Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 8379b290cf36Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 8380b290cf36Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 8381b290cf36Smrg # icc doesn't choke on unknown options, it will just issue warnings 8382b290cf36Smrg # or remarks (even with -Werror). So we grep stderr for any message 8383b290cf36Smrg # that says an option was ignored or not supported. 8384b290cf36Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 8385b290cf36Smrg # icc: Command line warning: ignoring option '-M'; no argument required 8386b290cf36Smrg # The diagnosis changed in icc 8.0: 8387b290cf36Smrg # icc: Command line remark: option '-MP' not supported 8388b290cf36Smrg if (grep 'ignoring option' conftest.err || 8389b290cf36Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 8390b290cf36Smrg am_cv_$1_dependencies_compiler_type=$depmode 8391b290cf36Smrg break 8392b290cf36Smrg fi 8393b290cf36Smrg fi 8394b290cf36Smrg done 8395191cded7Smrg 8396b290cf36Smrg cd .. 8397b290cf36Smrg rm -rf conftest.dir 8398b290cf36Smrgelse 8399b290cf36Smrg am_cv_$1_dependencies_compiler_type=none 8400b290cf36Smrgfi 8401b290cf36Smrg]) 8402b290cf36SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 8403b290cf36SmrgAM_CONDITIONAL([am__fastdep$1], [ 8404b290cf36Smrg test "x$enable_dependency_tracking" != xno \ 8405b290cf36Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 8406b290cf36Smrg]) 8407191cded7Smrg 8408191cded7Smrg 8409b290cf36Smrg# AM_SET_DEPDIR 8410b290cf36Smrg# ------------- 8411b290cf36Smrg# Choose a directory name for dependency files. 8412b290cf36Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 8413b290cf36SmrgAC_DEFUN([AM_SET_DEPDIR], 8414b290cf36Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 8415b290cf36SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 8416b290cf36Smrg]) 8417b290cf36Smrg 8418b290cf36Smrg 8419b290cf36Smrg# AM_DEP_TRACK 8420b290cf36Smrg# ------------ 8421b290cf36SmrgAC_DEFUN([AM_DEP_TRACK], 8422b290cf36Smrg[AC_ARG_ENABLE(dependency-tracking, 8423b290cf36Smrg[ --disable-dependency-tracking speeds up one-time build 8424b290cf36Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 8425b290cf36Smrgif test "x$enable_dependency_tracking" != xno; then 8426b290cf36Smrg am_depcomp="$ac_aux_dir/depcomp" 8427b290cf36Smrg AMDEPBACKSLASH='\' 8428b290cf36Smrgfi 8429b290cf36SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 8430b290cf36SmrgAC_SUBST([AMDEPBACKSLASH])dnl 8431b290cf36Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 8432b290cf36Smrg]) 8433b290cf36Smrg 8434b290cf36Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 8435191cded7Smrg 8436b290cf36Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 8437b290cf36Smrg# Free Software Foundation, Inc. 8438b290cf36Smrg# 8439b290cf36Smrg# This file is free software; the Free Software Foundation 8440b290cf36Smrg# gives unlimited permission to copy and/or distribute it, 8441b290cf36Smrg# with or without modifications, as long as this notice is preserved. 8442191cded7Smrg 8443b290cf36Smrg#serial 5 8444191cded7Smrg 8445b290cf36Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 8446b290cf36Smrg# ------------------------------ 8447b290cf36SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 8448b290cf36Smrg[{ 8449b290cf36Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 8450b290cf36Smrg # are listed without --file. Let's play safe and only enable the eval 8451b290cf36Smrg # if we detect the quoting. 8452b290cf36Smrg case $CONFIG_FILES in 8453b290cf36Smrg *\'*) eval set x "$CONFIG_FILES" ;; 8454b290cf36Smrg *) set x $CONFIG_FILES ;; 8455b290cf36Smrg esac 8456b290cf36Smrg shift 8457b290cf36Smrg for mf 8458b290cf36Smrg do 8459b290cf36Smrg # Strip MF so we end up with the name of the file. 8460b290cf36Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 8461b290cf36Smrg # Check whether this is an Automake generated Makefile or not. 8462b290cf36Smrg # We used to match only the files named `Makefile.in', but 8463b290cf36Smrg # some people rename them; so instead we look at the file content. 8464b290cf36Smrg # Grep'ing the first line is not enough: some people post-process 8465b290cf36Smrg # each Makefile.in and add a new line on top of each file to say so. 8466b290cf36Smrg # Grep'ing the whole file is not good either: AIX grep has a line 8467b290cf36Smrg # limit of 2048, but all sed's we know have understand at least 4000. 8468b290cf36Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 8469b290cf36Smrg dirpart=`AS_DIRNAME("$mf")` 8470b290cf36Smrg else 8471b290cf36Smrg continue 8472b290cf36Smrg fi 8473b290cf36Smrg # Extract the definition of DEPDIR, am__include, and am__quote 8474b290cf36Smrg # from the Makefile without running `make'. 8475b290cf36Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 8476b290cf36Smrg test -z "$DEPDIR" && continue 8477b290cf36Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 8478b290cf36Smrg test -z "am__include" && continue 8479b290cf36Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 8480b290cf36Smrg # When using ansi2knr, U may be empty or an underscore; expand it 8481b290cf36Smrg U=`sed -n 's/^U = //p' < "$mf"` 8482b290cf36Smrg # Find all dependency output files, they are included files with 8483b290cf36Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 8484b290cf36Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 8485b290cf36Smrg # expansion. 8486b290cf36Smrg for file in `sed -n " 8487b290cf36Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 8488b290cf36Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 8489b290cf36Smrg # Make sure the directory exists. 8490b290cf36Smrg test -f "$dirpart/$file" && continue 8491b290cf36Smrg fdir=`AS_DIRNAME(["$file"])` 8492b290cf36Smrg AS_MKDIR_P([$dirpart/$fdir]) 8493b290cf36Smrg # echo "creating $dirpart/$file" 8494b290cf36Smrg echo '# dummy' > "$dirpart/$file" 8495b290cf36Smrg done 8496b290cf36Smrg done 8497b290cf36Smrg} 8498b290cf36Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 8499191cded7Smrg 8500191cded7Smrg 8501b290cf36Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 8502b290cf36Smrg# ----------------------------- 8503b290cf36Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 8504b290cf36Smrg# 8505b290cf36Smrg# This code is only required when automatic dependency tracking 8506b290cf36Smrg# is enabled. FIXME. This creates each `.P' file that we will 8507b290cf36Smrg# need in order to bootstrap the dependency handling code. 8508b290cf36SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 8509b290cf36Smrg[AC_CONFIG_COMMANDS([depfiles], 8510b290cf36Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 8511b290cf36Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 8512b290cf36Smrg]) 8513191cded7Smrg 8514b290cf36Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 8515b290cf36Smrg# Free Software Foundation, Inc. 8516b290cf36Smrg# 8517b290cf36Smrg# This file is free software; the Free Software Foundation 8518b290cf36Smrg# gives unlimited permission to copy and/or distribute it, 8519b290cf36Smrg# with or without modifications, as long as this notice is preserved. 8520191cded7Smrg 8521b290cf36Smrg# serial 8 8522191cded7Smrg 8523b290cf36Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 8524b290cf36SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 8525191cded7Smrg 8526b290cf36Smrg# Do all the work for Automake. -*- Autoconf -*- 8527191cded7Smrg 8528b290cf36Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 8529b290cf36Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 8530b290cf36Smrg# 8531b290cf36Smrg# This file is free software; the Free Software Foundation 8532b290cf36Smrg# gives unlimited permission to copy and/or distribute it, 8533b290cf36Smrg# with or without modifications, as long as this notice is preserved. 8534191cded7Smrg 8535b290cf36Smrg# serial 16 8536191cded7Smrg 8537b290cf36Smrg# This macro actually does too much. Some checks are only needed if 8538b290cf36Smrg# your package does certain things. But this isn't really a big deal. 8539191cded7Smrg 8540b290cf36Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 8541b290cf36Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 8542b290cf36Smrg# ----------------------------------------------- 8543b290cf36Smrg# The call with PACKAGE and VERSION arguments is the old style 8544b290cf36Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 8545b290cf36Smrg# and VERSION should now be passed to AC_INIT and removed from 8546b290cf36Smrg# the call to AM_INIT_AUTOMAKE. 8547b290cf36Smrg# We support both call styles for the transition. After 8548b290cf36Smrg# the next Automake release, Autoconf can make the AC_INIT 8549b290cf36Smrg# arguments mandatory, and then we can depend on a new Autoconf 8550b290cf36Smrg# release and drop the old call support. 8551b290cf36SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 8552b290cf36Smrg[AC_PREREQ([2.62])dnl 8553b290cf36Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 8554b290cf36Smrgdnl the ones we care about. 8555b290cf36Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 8556b290cf36SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 8557b290cf36SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 8558b290cf36Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 8559b290cf36Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 8560b290cf36Smrg # is not polluted with repeated "-I." 8561b290cf36Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 8562b290cf36Smrg # test to see if srcdir already configured 8563b290cf36Smrg if test -f $srcdir/config.status; then 8564b290cf36Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 8565b290cf36Smrg fi 8566191cded7Smrgfi 8567191cded7Smrg 8568b290cf36Smrg# test whether we have cygpath 8569b290cf36Smrgif test -z "$CYGPATH_W"; then 8570b290cf36Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 8571b290cf36Smrg CYGPATH_W='cygpath -w' 8572b290cf36Smrg else 8573b290cf36Smrg CYGPATH_W=echo 8574b290cf36Smrg fi 8575191cded7Smrgfi 8576b290cf36SmrgAC_SUBST([CYGPATH_W]) 8577191cded7Smrg 8578b290cf36Smrg# Define the identity of the package. 8579b290cf36Smrgdnl Distinguish between old-style and new-style calls. 8580b290cf36Smrgm4_ifval([$2], 8581b290cf36Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 8582b290cf36Smrg AC_SUBST([PACKAGE], [$1])dnl 8583b290cf36Smrg AC_SUBST([VERSION], [$2])], 8584b290cf36Smrg[_AM_SET_OPTIONS([$1])dnl 8585b290cf36Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 8586b290cf36Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 8587b290cf36Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 8588b290cf36Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 8589b290cf36Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 8590191cded7Smrg 8591b290cf36Smrg_AM_IF_OPTION([no-define],, 8592b290cf36Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 8593b290cf36Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 8594191cded7Smrg 8595b290cf36Smrg# Some tools Automake needs. 8596b290cf36SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 8597b290cf36SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 8598b290cf36SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 8599b290cf36SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 8600b290cf36SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 8601b290cf36SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 8602b290cf36SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 8603b290cf36SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 8604b290cf36SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 8605b290cf36SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 8606b290cf36Smrg# We need awk for the "check" target. The system "awk" is bad on 8607b290cf36Smrg# some platforms. 8608b290cf36SmrgAC_REQUIRE([AC_PROG_AWK])dnl 8609b290cf36SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 8610b290cf36SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 8611b290cf36Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 8612b290cf36Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 8613b290cf36Smrg [_AM_PROG_TAR([v7])])]) 8614b290cf36Smrg_AM_IF_OPTION([no-dependencies],, 8615b290cf36Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 8616b290cf36Smrg [_AM_DEPENDENCIES(CC)], 8617b290cf36Smrg [define([AC_PROG_CC], 8618b290cf36Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 8619b290cf36SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 8620b290cf36Smrg [_AM_DEPENDENCIES(CXX)], 8621b290cf36Smrg [define([AC_PROG_CXX], 8622b290cf36Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 8623b290cf36SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 8624b290cf36Smrg [_AM_DEPENDENCIES(OBJC)], 8625b290cf36Smrg [define([AC_PROG_OBJC], 8626b290cf36Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 8627b290cf36Smrg]) 8628b290cf36Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 8629b290cf36Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 8630b290cf36Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 8631b290cf36Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 8632b290cf36SmrgAC_CONFIG_COMMANDS_PRE(dnl 8633b290cf36Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 8634b290cf36Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 8635b290cf36Smrg]) 8636191cded7Smrg 8637b290cf36Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 8638b290cf36Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 8639b290cf36Smrgdnl mangled by Autoconf and run in a shell conditional statement. 8640b290cf36Smrgm4_define([_AC_COMPILER_EXEEXT], 8641b290cf36Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 8642191cded7Smrg 8643191cded7Smrg 8644b290cf36Smrg# When config.status generates a header, we must update the stamp-h file. 8645b290cf36Smrg# This file resides in the same directory as the config header 8646b290cf36Smrg# that is generated. The stamp files are numbered to have different names. 8647191cded7Smrg 8648b290cf36Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 8649b290cf36Smrg# loop where config.status creates the headers, so we can generate 8650b290cf36Smrg# our stamp files there. 8651b290cf36SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 8652b290cf36Smrg[# Compute $1's index in $config_headers. 8653b290cf36Smrg_am_arg=$1 8654b290cf36Smrg_am_stamp_count=1 8655b290cf36Smrgfor _am_header in $config_headers :; do 8656b290cf36Smrg case $_am_header in 8657b290cf36Smrg $_am_arg | $_am_arg:* ) 8658b290cf36Smrg break ;; 8659b290cf36Smrg * ) 8660b290cf36Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 8661b290cf36Smrg esac 8662b290cf36Smrgdone 8663b290cf36Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 8664191cded7Smrg 8665b290cf36Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 8666b290cf36Smrg# 8667b290cf36Smrg# This file is free software; the Free Software Foundation 8668b290cf36Smrg# gives unlimited permission to copy and/or distribute it, 8669b290cf36Smrg# with or without modifications, as long as this notice is preserved. 8670191cded7Smrg 8671b290cf36Smrg# AM_PROG_INSTALL_SH 8672b290cf36Smrg# ------------------ 8673b290cf36Smrg# Define $install_sh. 8674b290cf36SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 8675b290cf36Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 8676b290cf36Smrgif test x"${install_sh}" != xset; then 8677b290cf36Smrg case $am_aux_dir in 8678b290cf36Smrg *\ * | *\ *) 8679b290cf36Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 8680b290cf36Smrg *) 8681b290cf36Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 8682b290cf36Smrg esac 8683191cded7Smrgfi 8684b290cf36SmrgAC_SUBST(install_sh)]) 8685191cded7Smrg 8686b290cf36Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 8687b290cf36Smrg# 8688b290cf36Smrg# This file is free software; the Free Software Foundation 8689b290cf36Smrg# gives unlimited permission to copy and/or distribute it, 8690b290cf36Smrg# with or without modifications, as long as this notice is preserved. 8691191cded7Smrg 8692b290cf36Smrg# serial 2 8693191cded7Smrg 8694b290cf36Smrg# Check whether the underlying file-system supports filenames 8695b290cf36Smrg# with a leading dot. For instance MS-DOS doesn't. 8696b290cf36SmrgAC_DEFUN([AM_SET_LEADING_DOT], 8697b290cf36Smrg[rm -rf .tst 2>/dev/null 8698b290cf36Smrgmkdir .tst 2>/dev/null 8699b290cf36Smrgif test -d .tst; then 8700b290cf36Smrg am__leading_dot=. 8701b290cf36Smrgelse 8702b290cf36Smrg am__leading_dot=_ 8703b290cf36Smrgfi 8704b290cf36Smrgrmdir .tst 2>/dev/null 8705b290cf36SmrgAC_SUBST([am__leading_dot])]) 8706191cded7Smrg 8707b290cf36Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 8708b290cf36Smrg# From Jim Meyering 8709191cded7Smrg 8710b290cf36Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 8711b290cf36Smrg# Free Software Foundation, Inc. 8712b290cf36Smrg# 8713b290cf36Smrg# This file is free software; the Free Software Foundation 8714b290cf36Smrg# gives unlimited permission to copy and/or distribute it, 8715b290cf36Smrg# with or without modifications, as long as this notice is preserved. 8716191cded7Smrg 8717b290cf36Smrg# serial 5 8718191cded7Smrg 8719b290cf36Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 8720b290cf36Smrg# ---------------------------------- 8721b290cf36Smrg# Control maintainer-specific portions of Makefiles. 8722b290cf36Smrg# Default is to disable them, unless `enable' is passed literally. 8723b290cf36Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 8724b290cf36Smrg# can override the default with the --enable/--disable switch. 8725b290cf36SmrgAC_DEFUN([AM_MAINTAINER_MODE], 8726b290cf36Smrg[m4_case(m4_default([$1], [disable]), 8727b290cf36Smrg [enable], [m4_define([am_maintainer_other], [disable])], 8728b290cf36Smrg [disable], [m4_define([am_maintainer_other], [enable])], 8729b290cf36Smrg [m4_define([am_maintainer_other], [enable]) 8730b290cf36Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 8731b290cf36SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 8732b290cf36Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 8733b290cf36Smrg AC_ARG_ENABLE([maintainer-mode], 8734b290cf36Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 8735b290cf36Smrg (and sometimes confusing) to the casual installer], 8736b290cf36Smrg [USE_MAINTAINER_MODE=$enableval], 8737b290cf36Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 8738b290cf36Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 8739b290cf36Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 8740b290cf36Smrg MAINT=$MAINTAINER_MODE_TRUE 8741b290cf36Smrg AC_SUBST([MAINT])dnl 8742b290cf36Smrg] 8743b290cf36Smrg) 8744191cded7Smrg 8745b290cf36SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 8746191cded7Smrg 8747b290cf36Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 8748191cded7Smrg 8749b290cf36Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 8750191cded7Smrg# 8751191cded7Smrg# This file is free software; the Free Software Foundation 8752191cded7Smrg# gives unlimited permission to copy and/or distribute it, 8753191cded7Smrg# with or without modifications, as long as this notice is preserved. 8754191cded7Smrg 8755b290cf36Smrg# serial 4 8756191cded7Smrg 8757b290cf36Smrg# AM_MAKE_INCLUDE() 8758b290cf36Smrg# ----------------- 8759b290cf36Smrg# Check to see how make treats includes. 8760b290cf36SmrgAC_DEFUN([AM_MAKE_INCLUDE], 8761b290cf36Smrg[am_make=${MAKE-make} 8762b290cf36Smrgcat > confinc << 'END' 8763b290cf36Smrgam__doit: 8764b290cf36Smrg @echo this is the am__doit target 8765b290cf36Smrg.PHONY: am__doit 8766b290cf36SmrgEND 8767b290cf36Smrg# If we don't find an include directive, just comment out the code. 8768b290cf36SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 8769b290cf36Smrgam__include="#" 8770b290cf36Smrgam__quote= 8771b290cf36Smrg_am_result=none 8772b290cf36Smrg# First try GNU make style include. 8773b290cf36Smrgecho "include confinc" > confmf 8774b290cf36Smrg# Ignore all kinds of additional output from `make'. 8775b290cf36Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 8776b290cf36Smrg*the\ am__doit\ target*) 8777b290cf36Smrg am__include=include 8778b290cf36Smrg am__quote= 8779b290cf36Smrg _am_result=GNU 8780b290cf36Smrg ;; 8781b290cf36Smrgesac 8782b290cf36Smrg# Now try BSD make style include. 8783b290cf36Smrgif test "$am__include" = "#"; then 8784b290cf36Smrg echo '.include "confinc"' > confmf 8785b290cf36Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 8786b290cf36Smrg *the\ am__doit\ target*) 8787b290cf36Smrg am__include=.include 8788b290cf36Smrg am__quote="\"" 8789b290cf36Smrg _am_result=BSD 8790b290cf36Smrg ;; 8791b290cf36Smrg esac 8792b290cf36Smrgfi 8793b290cf36SmrgAC_SUBST([am__include]) 8794b290cf36SmrgAC_SUBST([am__quote]) 8795b290cf36SmrgAC_MSG_RESULT([$_am_result]) 8796b290cf36Smrgrm -f confinc confmf 8797b290cf36Smrg]) 8798191cded7Smrg 8799b290cf36Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 8800191cded7Smrg 8801b290cf36Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 8802b290cf36Smrg# Free Software Foundation, Inc. 8803191cded7Smrg# 8804191cded7Smrg# This file is free software; the Free Software Foundation 8805191cded7Smrg# gives unlimited permission to copy and/or distribute it, 8806191cded7Smrg# with or without modifications, as long as this notice is preserved. 8807191cded7Smrg 8808b290cf36Smrg# serial 6 8809191cded7Smrg 8810b290cf36Smrg# AM_MISSING_PROG(NAME, PROGRAM) 8811b290cf36Smrg# ------------------------------ 8812b290cf36SmrgAC_DEFUN([AM_MISSING_PROG], 8813b290cf36Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 8814b290cf36Smrg$1=${$1-"${am_missing_run}$2"} 8815b290cf36SmrgAC_SUBST($1)]) 8816191cded7Smrg 8817191cded7Smrg 8818b290cf36Smrg# AM_MISSING_HAS_RUN 8819b290cf36Smrg# ------------------ 8820b290cf36Smrg# Define MISSING if not defined so far and test if it supports --run. 8821b290cf36Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 8822b290cf36SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 8823b290cf36Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 8824b290cf36SmrgAC_REQUIRE_AUX_FILE([missing])dnl 8825b290cf36Smrgif test x"${MISSING+set}" != xset; then 8826b290cf36Smrg case $am_aux_dir in 8827b290cf36Smrg *\ * | *\ *) 8828b290cf36Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 8829b290cf36Smrg *) 8830b290cf36Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 8831b290cf36Smrg esac 8832b290cf36Smrgfi 8833b290cf36Smrg# Use eval to expand $SHELL 8834b290cf36Smrgif eval "$MISSING --run true"; then 8835b290cf36Smrg am_missing_run="$MISSING --run " 8836b290cf36Smrgelse 8837b290cf36Smrg am_missing_run= 8838b290cf36Smrg AC_MSG_WARN([`missing' script is too old or missing]) 8839b290cf36Smrgfi 8840b290cf36Smrg]) 8841b290cf36Smrg 8842b290cf36Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 8843191cded7Smrg# 8844191cded7Smrg# This file is free software; the Free Software Foundation 8845191cded7Smrg# gives unlimited permission to copy and/or distribute it, 8846191cded7Smrg# with or without modifications, as long as this notice is preserved. 8847191cded7Smrg 8848b290cf36Smrg# AM_PROG_MKDIR_P 8849b290cf36Smrg# --------------- 8850b290cf36Smrg# Check for `mkdir -p'. 8851b290cf36SmrgAC_DEFUN([AM_PROG_MKDIR_P], 8852b290cf36Smrg[AC_PREREQ([2.60])dnl 8853b290cf36SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 8854b290cf36Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 8855b290cf36Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 8856b290cf36Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 8857b290cf36Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 8858b290cf36Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 8859b290cf36Smrgdnl adjustment using top_builddir (which is defined more often than 8860b290cf36Smrgdnl MKDIR_P). 8861b290cf36SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 8862b290cf36Smrgcase $mkdir_p in 8863b290cf36Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 8864b290cf36Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 8865b290cf36Smrgesac 8866b290cf36Smrg]) 8867191cded7Smrg 8868b290cf36Smrg# Helper functions for option handling. -*- Autoconf -*- 8869191cded7Smrg 8870b290cf36Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 8871191cded7Smrg# 8872191cded7Smrg# This file is free software; the Free Software Foundation 8873191cded7Smrg# gives unlimited permission to copy and/or distribute it, 8874191cded7Smrg# with or without modifications, as long as this notice is preserved. 8875191cded7Smrg 8876b290cf36Smrg# serial 4 8877191cded7Smrg 8878b290cf36Smrg# _AM_MANGLE_OPTION(NAME) 8879b290cf36Smrg# ----------------------- 8880b290cf36SmrgAC_DEFUN([_AM_MANGLE_OPTION], 8881b290cf36Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 8882b290cf36Smrg 8883b290cf36Smrg# _AM_SET_OPTION(NAME) 8884b290cf36Smrg# ------------------------------ 8885b290cf36Smrg# Set option NAME. Presently that only means defining a flag for this option. 8886b290cf36SmrgAC_DEFUN([_AM_SET_OPTION], 8887b290cf36Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 8888191cded7Smrg 8889b290cf36Smrg# _AM_SET_OPTIONS(OPTIONS) 8890b290cf36Smrg# ---------------------------------- 8891b290cf36Smrg# OPTIONS is a space-separated list of Automake options. 8892b290cf36SmrgAC_DEFUN([_AM_SET_OPTIONS], 8893b290cf36Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 8894191cded7Smrg 8895b290cf36Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 8896b290cf36Smrg# ------------------------------------------- 8897b290cf36Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8898b290cf36SmrgAC_DEFUN([_AM_IF_OPTION], 8899b290cf36Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 8900b290cf36Smrg 8901b290cf36Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8902b290cf36Smrg 8903b290cf36Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 8904b290cf36Smrg# Free Software Foundation, Inc. 8905191cded7Smrg# 8906b290cf36Smrg# This file is free software; the Free Software Foundation 8907b290cf36Smrg# gives unlimited permission to copy and/or distribute it, 8908b290cf36Smrg# with or without modifications, as long as this notice is preserved. 8909191cded7Smrg 8910b290cf36Smrg# serial 5 8911191cded7Smrg 8912b290cf36Smrg# AM_SANITY_CHECK 8913b290cf36Smrg# --------------- 8914b290cf36SmrgAC_DEFUN([AM_SANITY_CHECK], 8915b290cf36Smrg[AC_MSG_CHECKING([whether build environment is sane]) 8916b290cf36Smrg# Just in case 8917b290cf36Smrgsleep 1 8918b290cf36Smrgecho timestamp > conftest.file 8919b290cf36Smrg# Reject unsafe characters in $srcdir or the absolute working directory 8920b290cf36Smrg# name. Accept space and tab only in the latter. 8921b290cf36Smrgam_lf=' 8922b290cf36Smrg' 8923b290cf36Smrgcase `pwd` in 8924b290cf36Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8925b290cf36Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8926b290cf36Smrgesac 8927b290cf36Smrgcase $srcdir in 8928b290cf36Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8929b290cf36Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 8930b290cf36Smrgesac 8931191cded7Smrg 8932b290cf36Smrg# Do `set' in a subshell so we don't clobber the current shell's 8933b290cf36Smrg# arguments. Must try -L first in case configure is actually a 8934b290cf36Smrg# symlink; some systems play weird games with the mod time of symlinks 8935b290cf36Smrg# (eg FreeBSD returns the mod time of the symlink's containing 8936b290cf36Smrg# directory). 8937b290cf36Smrgif ( 8938b290cf36Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8939b290cf36Smrg if test "$[*]" = "X"; then 8940b290cf36Smrg # -L didn't work. 8941b290cf36Smrg set X `ls -t "$srcdir/configure" conftest.file` 8942b290cf36Smrg fi 8943b290cf36Smrg rm -f conftest.file 8944b290cf36Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8945b290cf36Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8946191cded7Smrg 8947b290cf36Smrg # If neither matched, then we have a broken ls. This can happen 8948b290cf36Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8949b290cf36Smrg # broken ls alias from the environment. This has actually 8950b290cf36Smrg # happened. Such a system could not be considered "sane". 8951b290cf36Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8952b290cf36Smrgalias in your environment]) 8953b290cf36Smrg fi 8954191cded7Smrg 8955b290cf36Smrg test "$[2]" = conftest.file 8956b290cf36Smrg ) 8957b290cf36Smrgthen 8958b290cf36Smrg # Ok. 8959b290cf36Smrg : 8960191cded7Smrgelse 8961b290cf36Smrg AC_MSG_ERROR([newly created file is older than distributed files! 8962b290cf36SmrgCheck your system clock]) 8963191cded7Smrgfi 8964b290cf36SmrgAC_MSG_RESULT(yes)]) 8965191cded7Smrg 8966b290cf36Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 8967b290cf36Smrg# 8968b290cf36Smrg# This file is free software; the Free Software Foundation 8969b290cf36Smrg# gives unlimited permission to copy and/or distribute it, 8970b290cf36Smrg# with or without modifications, as long as this notice is preserved. 8971191cded7Smrg 8972b290cf36Smrg# serial 1 8973b290cf36Smrg 8974b290cf36Smrg# AM_SILENT_RULES([DEFAULT]) 8975b290cf36Smrg# -------------------------- 8976b290cf36Smrg# Enable less verbose build rules; with the default set to DEFAULT 8977b290cf36Smrg# (`yes' being less verbose, `no' or empty being verbose). 8978b290cf36SmrgAC_DEFUN([AM_SILENT_RULES], 8979b290cf36Smrg[AC_ARG_ENABLE([silent-rules], 8980b290cf36Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 8981b290cf36Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 8982b290cf36Smrgcase $enable_silent_rules in 8983b290cf36Smrgyes) AM_DEFAULT_VERBOSITY=0;; 8984b290cf36Smrgno) AM_DEFAULT_VERBOSITY=1;; 8985b290cf36Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 8986b290cf36Smrgesac 8987b290cf36SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 8988b290cf36SmrgAM_BACKSLASH='\' 8989b290cf36SmrgAC_SUBST([AM_BACKSLASH])dnl 8990b290cf36Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 8991191cded7Smrg]) 8992191cded7Smrg 8993b290cf36Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8994b290cf36Smrg# 8995b290cf36Smrg# This file is free software; the Free Software Foundation 8996b290cf36Smrg# gives unlimited permission to copy and/or distribute it, 8997b290cf36Smrg# with or without modifications, as long as this notice is preserved. 8998191cded7Smrg 8999b290cf36Smrg# AM_PROG_INSTALL_STRIP 9000b290cf36Smrg# --------------------- 9001b290cf36Smrg# One issue with vendor `install' (even GNU) is that you can't 9002b290cf36Smrg# specify the program used to strip binaries. This is especially 9003b290cf36Smrg# annoying in cross-compiling environments, where the build's strip 9004b290cf36Smrg# is unlikely to handle the host's binaries. 9005b290cf36Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9006b290cf36Smrg# always use install-sh in `make install-strip', and initialize 9007b290cf36Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 9008b290cf36SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9009b290cf36Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9010b290cf36Smrg# Installed binaries are usually stripped using `strip' when the user 9011b290cf36Smrg# run `make install-strip'. However `strip' might not be the right 9012b290cf36Smrg# tool to use in cross-compilation environments, therefore Automake 9013b290cf36Smrg# will honor the `STRIP' environment variable to overrule this program. 9014b290cf36Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 9015b290cf36Smrgif test "$cross_compiling" != no; then 9016b290cf36Smrg AC_CHECK_TOOL([STRIP], [strip], :) 9017191cded7Smrgfi 9018b290cf36SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9019b290cf36SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9020191cded7Smrg 9021b290cf36Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 9022191cded7Smrg# 9023191cded7Smrg# This file is free software; the Free Software Foundation 9024191cded7Smrg# gives unlimited permission to copy and/or distribute it, 9025191cded7Smrg# with or without modifications, as long as this notice is preserved. 9026191cded7Smrg 9027b290cf36Smrg# serial 2 9028191cded7Smrg 9029b290cf36Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 9030b290cf36Smrg# --------------------------- 9031b290cf36Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9032b290cf36Smrg# This macro is traced by Automake. 9033b290cf36SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9034191cded7Smrg 9035b290cf36Smrg# AM_SUBST_NOTMAKE(VARIABLE) 9036b290cf36Smrg# --------------------------- 9037b290cf36Smrg# Public sister of _AM_SUBST_NOTMAKE. 9038b290cf36SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9039191cded7Smrg 9040b290cf36Smrg# Check how to create a tarball. -*- Autoconf -*- 9041191cded7Smrg 9042b290cf36Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 9043191cded7Smrg# 9044191cded7Smrg# This file is free software; the Free Software Foundation 9045191cded7Smrg# gives unlimited permission to copy and/or distribute it, 9046191cded7Smrg# with or without modifications, as long as this notice is preserved. 9047191cded7Smrg 9048b290cf36Smrg# serial 2 9049191cded7Smrg 9050b290cf36Smrg# _AM_PROG_TAR(FORMAT) 9051b290cf36Smrg# -------------------- 9052b290cf36Smrg# Check how to create a tarball in format FORMAT. 9053b290cf36Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 9054b290cf36Smrg# 9055b290cf36Smrg# Substitute a variable $(am__tar) that is a command 9056b290cf36Smrg# writing to stdout a FORMAT-tarball containing the directory 9057b290cf36Smrg# $tardir. 9058b290cf36Smrg# tardir=directory && $(am__tar) > result.tar 9059b290cf36Smrg# 9060b290cf36Smrg# Substitute a variable $(am__untar) that extract such 9061b290cf36Smrg# a tarball read from stdin. 9062b290cf36Smrg# $(am__untar) < result.tar 9063b290cf36SmrgAC_DEFUN([_AM_PROG_TAR], 9064b290cf36Smrg[# Always define AMTAR for backward compatibility. 9065b290cf36SmrgAM_MISSING_PROG([AMTAR], [tar]) 9066b290cf36Smrgm4_if([$1], [v7], 9067b290cf36Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 9068b290cf36Smrg [m4_case([$1], [ustar],, [pax],, 9069b290cf36Smrg [m4_fatal([Unknown tar format])]) 9070b290cf36SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 9071b290cf36Smrg# Loop over all known methods to create a tar archive until one works. 9072b290cf36Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9073b290cf36Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9074b290cf36Smrg# Do not fold the above two line into one, because Tru64 sh and 9075b290cf36Smrg# Solaris sh will not grok spaces in the rhs of `-'. 9076b290cf36Smrgfor _am_tool in $_am_tools 9077b290cf36Smrgdo 9078b290cf36Smrg case $_am_tool in 9079b290cf36Smrg gnutar) 9080b290cf36Smrg for _am_tar in tar gnutar gtar; 9081b290cf36Smrg do 9082b290cf36Smrg AM_RUN_LOG([$_am_tar --version]) && break 9083b290cf36Smrg done 9084b290cf36Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9085b290cf36Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9086b290cf36Smrg am__untar="$_am_tar -xf -" 9087b290cf36Smrg ;; 9088b290cf36Smrg plaintar) 9089b290cf36Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 9090b290cf36Smrg # ustar tarball either. 9091b290cf36Smrg (tar --version) >/dev/null 2>&1 && continue 9092b290cf36Smrg am__tar='tar chf - "$$tardir"' 9093b290cf36Smrg am__tar_='tar chf - "$tardir"' 9094b290cf36Smrg am__untar='tar xf -' 9095b290cf36Smrg ;; 9096b290cf36Smrg pax) 9097b290cf36Smrg am__tar='pax -L -x $1 -w "$$tardir"' 9098b290cf36Smrg am__tar_='pax -L -x $1 -w "$tardir"' 9099b290cf36Smrg am__untar='pax -r' 9100b290cf36Smrg ;; 9101b290cf36Smrg cpio) 9102b290cf36Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9103b290cf36Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9104b290cf36Smrg am__untar='cpio -i -H $1 -d' 9105b290cf36Smrg ;; 9106b290cf36Smrg none) 9107b290cf36Smrg am__tar=false 9108b290cf36Smrg am__tar_=false 9109b290cf36Smrg am__untar=false 9110b290cf36Smrg ;; 9111b290cf36Smrg esac 9112191cded7Smrg 9113b290cf36Smrg # If the value was cached, stop now. We just wanted to have am__tar 9114b290cf36Smrg # and am__untar set. 9115b290cf36Smrg test -n "${am_cv_prog_tar_$1}" && break 9116191cded7Smrg 9117b290cf36Smrg # tar/untar a dummy directory, and stop if the command works 9118b290cf36Smrg rm -rf conftest.dir 9119b290cf36Smrg mkdir conftest.dir 9120b290cf36Smrg echo GrepMe > conftest.dir/file 9121b290cf36Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 9122b290cf36Smrg rm -rf conftest.dir 9123b290cf36Smrg if test -s conftest.tar; then 9124b290cf36Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 9125b290cf36Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 9126b290cf36Smrg fi 9127b290cf36Smrgdone 9128b290cf36Smrgrm -rf conftest.dir 9129b290cf36Smrg 9130b290cf36SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 9131b290cf36SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 9132b290cf36SmrgAC_SUBST([am__tar]) 9133b290cf36SmrgAC_SUBST([am__untar]) 9134b290cf36Smrg]) # _AM_PROG_TAR 9135b290cf36Smrg 9136b290cf36Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9137b290cf36Smrgdnl 9138b290cf36Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 9139b290cf36Smrgdnl 9140b290cf36Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9141b290cf36Smrgdnl copy of this software and associated documentation files (the 9142b290cf36Smrgdnl "Software"), to deal in the Software without restriction, including 9143b290cf36Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 9144b290cf36Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 9145b290cf36Smrgdnl to whom the Software is furnished to do so, provided that the above 9146b290cf36Smrgdnl copyright notice(s) and this permission notice appear in all copies of 9147b290cf36Smrgdnl the Software and that both the above copyright notice(s) and this 9148b290cf36Smrgdnl permission notice appear in supporting documentation. 9149b290cf36Smrgdnl 9150b290cf36Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 9151b290cf36Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 9152b290cf36Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 9153b290cf36Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 9154b290cf36Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 9155b290cf36Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 9156b290cf36Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 9157b290cf36Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 9158b290cf36Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 9159b290cf36Smrgdnl 9160b290cf36Smrgdnl Except as contained in this notice, the name of a copyright holder 9161b290cf36Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 9162b290cf36Smrgdnl or other dealings in this Software without prior written authorization 9163b290cf36Smrgdnl of the copyright holder. 9164b290cf36Smrg 9165b290cf36Smrg# XORG_MACROS_VERSION(required-version) 9166b290cf36Smrg# ------------------------------------- 9167b290cf36Smrg# Minimum version: 1.1.0 9168191cded7Smrg# 9169b290cf36Smrg# If you're using a macro added in Version 1.1 or newer, include this in 9170b290cf36Smrg# your configure.ac with the minimum required version, such as: 9171b290cf36Smrg# XORG_MACROS_VERSION(1.1) 9172b290cf36Smrg# 9173b290cf36Smrg# To ensure that this macro is defined, also add: 9174b290cf36Smrg# m4_ifndef([XORG_MACROS_VERSION], 9175b290cf36Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9176b290cf36Smrg# 9177b290cf36Smrg# 9178b290cf36Smrg# See the "minimum version" comment for each macro you use to see what 9179b290cf36Smrg# version you require. 9180b290cf36Smrgm4_defun([XORG_MACROS_VERSION],[ 9181b290cf36Smrgm4_define([vers_have], [1.3.0]) 9182b290cf36Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9183b290cf36Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9184b290cf36Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9185b290cf36Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9186b290cf36Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9187b290cf36Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9188b290cf36Smrgm4_undefine([vers_have]) 9189b290cf36Smrgm4_undefine([maj_have]) 9190b290cf36Smrgm4_undefine([maj_needed]) 9191b290cf36Smrg]) # XORG_MACROS_VERSION 9192191cded7Smrg 9193b290cf36Smrg# XORG_PROG_RAWCPP() 9194b290cf36Smrg# ------------------ 9195b290cf36Smrg# Minimum version: 1.0.0 9196b290cf36Smrg# 9197b290cf36Smrg# Find cpp program and necessary flags for use in pre-processing text files 9198b290cf36Smrg# such as man pages and config files 9199b290cf36SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9200b290cf36SmrgAC_REQUIRE([AC_PROG_CPP]) 9201b290cf36SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9202b290cf36Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9203191cded7Smrg 9204b290cf36Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9205b290cf36Smrg# which is not the best choice for supporting other OS'es, but covers most 9206b290cf36Smrg# of the ones we need for now. 9207b290cf36SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9208b290cf36SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 9209b290cf36Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9210b290cf36Smrg AC_MSG_RESULT([no]) 9211b290cf36Smrgelse 9212b290cf36Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9213b290cf36Smrg RAWCPPFLAGS=-undef 9214b290cf36Smrg AC_MSG_RESULT([yes]) 9215b290cf36Smrg # under Cygwin unix is still defined even with -undef 9216b290cf36Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9217b290cf36Smrg RAWCPPFLAGS="-undef -ansi" 9218b290cf36Smrg AC_MSG_RESULT([yes, with -ansi]) 9219b290cf36Smrg else 9220b290cf36Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9221b290cf36Smrg fi 9222b290cf36Smrgfi 9223b290cf36Smrgrm -f conftest.$ac_ext 9224191cded7Smrg 9225b290cf36SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9226b290cf36SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 9227b290cf36Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9228b290cf36Smrg AC_MSG_RESULT([no]) 9229b290cf36Smrgelse 9230b290cf36Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9231b290cf36Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9232b290cf36Smrg AC_MSG_RESULT([yes]) 9233b290cf36Smrg else 9234b290cf36Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9235b290cf36Smrg fi 9236191cded7Smrgfi 9237b290cf36Smrgrm -f conftest.$ac_ext 9238b290cf36SmrgAC_SUBST(RAWCPPFLAGS) 9239b290cf36Smrg]) # XORG_PROG_RAWCPP 9240191cded7Smrg 9241b290cf36Smrg# XORG_MANPAGE_SECTIONS() 9242b290cf36Smrg# ----------------------- 9243b290cf36Smrg# Minimum version: 1.0.0 9244b290cf36Smrg# 9245b290cf36Smrg# Determine which sections man pages go in for the different man page types 9246b290cf36Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9247b290cf36Smrg# Not sure if there's any better way than just hardcoding by OS name. 9248b290cf36Smrg# Override default settings by setting environment variables 9249b290cf36Smrg 9250b290cf36SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9251b290cf36SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9252b290cf36Smrg 9253b290cf36Smrgif test x$APP_MAN_SUFFIX = x ; then 9254b290cf36Smrg APP_MAN_SUFFIX=1 9255b290cf36Smrgfi 9256b290cf36Smrgif test x$APP_MAN_DIR = x ; then 9257b290cf36Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9258191cded7Smrgfi 9259191cded7Smrg 9260b290cf36Smrgif test x$LIB_MAN_SUFFIX = x ; then 9261b290cf36Smrg LIB_MAN_SUFFIX=3 9262b290cf36Smrgfi 9263b290cf36Smrgif test x$LIB_MAN_DIR = x ; then 9264b290cf36Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9265b290cf36Smrgfi 9266191cded7Smrg 9267b290cf36Smrgif test x$FILE_MAN_SUFFIX = x ; then 9268b290cf36Smrg case $host_os in 9269b290cf36Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 9270b290cf36Smrg *) FILE_MAN_SUFFIX=5 ;; 9271b290cf36Smrg esac 9272b290cf36Smrgfi 9273b290cf36Smrgif test x$FILE_MAN_DIR = x ; then 9274b290cf36Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9275b290cf36Smrgfi 9276b290cf36Smrg 9277b290cf36Smrgif test x$MISC_MAN_SUFFIX = x ; then 9278b290cf36Smrg case $host_os in 9279b290cf36Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 9280b290cf36Smrg *) MISC_MAN_SUFFIX=7 ;; 9281b290cf36Smrg esac 9282b290cf36Smrgfi 9283b290cf36Smrgif test x$MISC_MAN_DIR = x ; then 9284b290cf36Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9285b290cf36Smrgfi 9286191cded7Smrg 9287b290cf36Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 9288b290cf36Smrg case $host_os in 9289b290cf36Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 9290b290cf36Smrg *) DRIVER_MAN_SUFFIX=4 ;; 9291b290cf36Smrg esac 9292b290cf36Smrgfi 9293b290cf36Smrgif test x$DRIVER_MAN_DIR = x ; then 9294b290cf36Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9295b290cf36Smrgfi 9296191cded7Smrg 9297b290cf36Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 9298b290cf36Smrg case $host_os in 9299b290cf36Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 9300b290cf36Smrg *) ADMIN_MAN_SUFFIX=8 ;; 9301b290cf36Smrg esac 9302b290cf36Smrgfi 9303b290cf36Smrgif test x$ADMIN_MAN_DIR = x ; then 9304b290cf36Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9305b290cf36Smrgfi 9306191cded7Smrg 9307191cded7Smrg 9308b290cf36SmrgAC_SUBST([APP_MAN_SUFFIX]) 9309b290cf36SmrgAC_SUBST([LIB_MAN_SUFFIX]) 9310b290cf36SmrgAC_SUBST([FILE_MAN_SUFFIX]) 9311b290cf36SmrgAC_SUBST([MISC_MAN_SUFFIX]) 9312b290cf36SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 9313b290cf36SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 9314b290cf36SmrgAC_SUBST([APP_MAN_DIR]) 9315b290cf36SmrgAC_SUBST([LIB_MAN_DIR]) 9316b290cf36SmrgAC_SUBST([FILE_MAN_DIR]) 9317b290cf36SmrgAC_SUBST([MISC_MAN_DIR]) 9318b290cf36SmrgAC_SUBST([DRIVER_MAN_DIR]) 9319b290cf36SmrgAC_SUBST([ADMIN_MAN_DIR]) 9320b290cf36Smrg]) # XORG_MANPAGE_SECTIONS 9321191cded7Smrg 9322b290cf36Smrg# XORG_CHECK_LINUXDOC 9323b290cf36Smrg# ------------------- 9324b290cf36Smrg# Minimum version: 1.0.0 9325191cded7Smrg# 9326b290cf36Smrg# Defines the variable MAKE_TEXT if the necessary tools and 9327b290cf36Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9328b290cf36Smrg# Whether or not the necessary tools and files are found can be checked 9329b290cf36Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9330b290cf36SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9331b290cf36Smrgif test x$XORG_SGML_PATH = x ; then 9332b290cf36Smrg XORG_SGML_PATH=$prefix/share/sgml 9333b290cf36Smrgfi 9334b290cf36SmrgHAVE_DEFS_ENT= 9335191cded7Smrg 9336b290cf36Smrgif test x"$cross_compiling" = x"yes" ; then 9337b290cf36Smrg HAVE_DEFS_ENT=no 9338b290cf36Smrgelse 9339b290cf36Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 9340b290cf36Smrgfi 9341191cded7Smrg 9342b290cf36SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9343b290cf36SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 9344191cded7Smrg 9345b290cf36SmrgAC_MSG_CHECKING([Whether to build documentation]) 9346191cded7Smrg 9347b290cf36Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 9348b290cf36Smrg BUILDDOC=yes 9349191cded7Smrgelse 9350b290cf36Smrg BUILDDOC=no 9351191cded7Smrgfi 9352191cded7Smrg 9353b290cf36SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9354191cded7Smrg 9355b290cf36SmrgAC_MSG_RESULT([$BUILDDOC]) 9356191cded7Smrg 9357b290cf36SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 9358191cded7Smrg 9359b290cf36Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 9360b290cf36Smrg BUILDPDFDOC=yes 9361b290cf36Smrgelse 9362b290cf36Smrg BUILDPDFDOC=no 9363b290cf36Smrgfi 9364191cded7Smrg 9365b290cf36SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9366191cded7Smrg 9367b290cf36SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9368191cded7Smrg 9369b290cf36SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 9370b290cf36SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9371b290cf36SmrgMAKE_PDF="$PS2PDF" 9372b290cf36SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9373191cded7Smrg 9374b290cf36SmrgAC_SUBST(MAKE_TEXT) 9375b290cf36SmrgAC_SUBST(MAKE_PS) 9376b290cf36SmrgAC_SUBST(MAKE_PDF) 9377b290cf36SmrgAC_SUBST(MAKE_HTML) 9378b290cf36Smrg]) # XORG_CHECK_LINUXDOC 9379191cded7Smrg 9380b290cf36Smrg# XORG_CHECK_DOCBOOK 9381b290cf36Smrg# ------------------- 9382b290cf36Smrg# Minimum version: 1.0.0 9383b290cf36Smrg# 9384b290cf36Smrg# Checks for the ability to build output formats from SGML DocBook source. 9385b290cf36Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9386b290cf36Smrg# indicates whether the necessary tools and files are found and, if set, 9387b290cf36Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9388b290cf36SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9389b290cf36Smrgif test x$XORG_SGML_PATH = x ; then 9390b290cf36Smrg XORG_SGML_PATH=$prefix/share/sgml 9391191cded7Smrgfi 9392b290cf36SmrgHAVE_DEFS_ENT= 9393b290cf36SmrgBUILDTXTDOC=no 9394b290cf36SmrgBUILDPDFDOC=no 9395b290cf36SmrgBUILDPSDOC=no 9396b290cf36SmrgBUILDHTMLDOC=no 9397b290cf36Smrg 9398b290cf36SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 9399b290cf36Smrg 9400b290cf36SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9401b290cf36SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9402b290cf36SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9403b290cf36SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9404b290cf36Smrg 9405b290cf36SmrgAC_MSG_CHECKING([Whether to build text documentation]) 9406b290cf36Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 9407b290cf36Smrg test x$BUILD_TXTDOC != xno; then 9408b290cf36Smrg BUILDTXTDOC=yes 9409191cded7Smrgfi 9410b290cf36SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9411b290cf36SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9412191cded7Smrg 9413b290cf36SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 9414b290cf36Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 9415b290cf36Smrg test x$BUILD_PDFDOC != xno; then 9416b290cf36Smrg BUILDPDFDOC=yes 9417b290cf36Smrgfi 9418b290cf36SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9419b290cf36SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9420191cded7Smrg 9421b290cf36SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 9422b290cf36Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 9423b290cf36Smrg test x$BUILD_PSDOC != xno; then 9424b290cf36Smrg BUILDPSDOC=yes 9425b290cf36Smrgfi 9426b290cf36SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9427b290cf36SmrgAC_MSG_RESULT([$BUILDPSDOC]) 9428191cded7Smrg 9429b290cf36SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 9430b290cf36Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 9431b290cf36Smrg test x$BUILD_HTMLDOC != xno; then 9432b290cf36Smrg BUILDHTMLDOC=yes 9433b290cf36Smrgfi 9434b290cf36SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9435b290cf36SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9436191cded7Smrg 9437b290cf36SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9438b290cf36SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9439b290cf36SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9440b290cf36SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9441191cded7Smrg 9442b290cf36SmrgAC_SUBST(MAKE_TEXT) 9443b290cf36SmrgAC_SUBST(MAKE_PS) 9444b290cf36SmrgAC_SUBST(MAKE_PDF) 9445b290cf36SmrgAC_SUBST(MAKE_HTML) 9446b290cf36Smrg]) # XORG_CHECK_DOCBOOK 9447191cded7Smrg 9448b290cf36Smrg# XORG_CHECK_MALLOC_ZERO 9449b290cf36Smrg# ---------------------- 9450b290cf36Smrg# Minimum version: 1.0.0 9451191cded7Smrg# 9452b290cf36Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 9453b290cf36Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 9454b290cf36Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 9455b290cf36SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 9456b290cf36SmrgAC_ARG_ENABLE(malloc0returnsnull, 9457b290cf36Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 9458b290cf36Smrg [malloc(0) returns NULL (default: auto)]), 9459b290cf36Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 9460b290cf36Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 9461191cded7Smrg 9462b290cf36SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 9463b290cf36Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 9464b290cf36Smrg AC_RUN_IFELSE([ 9465b290cf36Smrgchar *malloc(); 9466b290cf36Smrgchar *realloc(); 9467b290cf36Smrgchar *calloc(); 9468b290cf36Smrgmain() { 9469b290cf36Smrg char *m0, *r0, *c0, *p; 9470b290cf36Smrg m0 = malloc(0); 9471b290cf36Smrg p = malloc(10); 9472b290cf36Smrg r0 = realloc(p,0); 9473b290cf36Smrg c0 = calloc(0); 9474b290cf36Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 9475b290cf36Smrg}], 9476b290cf36Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 9477b290cf36Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 9478b290cf36Smrgfi 9479b290cf36SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 9480b290cf36Smrg 9481b290cf36Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 9482b290cf36Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 9483b290cf36Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 9484b290cf36Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 9485191cded7Smrgelse 9486b290cf36Smrg MALLOC_ZERO_CFLAGS="" 9487b290cf36Smrg XMALLOC_ZERO_CFLAGS="" 9488b290cf36Smrg XTMALLOC_ZERO_CFLAGS="" 9489191cded7Smrgfi 9490191cded7Smrg 9491b290cf36SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 9492b290cf36SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 9493b290cf36SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 9494b290cf36Smrg]) # XORG_CHECK_MALLOC_ZERO 9495191cded7Smrg 9496b290cf36Smrg# XORG_WITH_LINT() 9497b290cf36Smrg# ---------------- 9498b290cf36Smrg# Minimum version: 1.1.0 9499191cded7Smrg# 9500b290cf36Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 9501b290cf36Smrg# is specified. (Use --with-lint=sparse for sparse.) 9502b290cf36Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 9503b290cf36Smrg# Sets $LINT_FLAGS to flags to pass to source checker 9504b290cf36Smrg# Sets LINT automake conditional if enabled (default: disabled) 9505b290cf36Smrg# 9506b290cf36SmrgAC_DEFUN([XORG_WITH_LINT],[ 9507b290cf36Smrg 9508b290cf36Smrg# Allow checking code with lint, sparse, etc. 9509b290cf36SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 9510b290cf36Smrg [Use a lint-style source code checker (default: disabled)])], 9511b290cf36Smrg [use_lint=$withval], [use_lint=no]) 9512b290cf36Smrgif test "x$use_lint" = "xyes" ; then 9513b290cf36Smrg LINT="lint" 9514b290cf36Smrgelse 9515b290cf36Smrg LINT="$use_lint" 9516b290cf36Smrgfi 9517b290cf36Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 9518b290cf36Smrg case $LINT in 9519b290cf36Smrg lint|*/lint) 9520b290cf36Smrg case $host_os in 9521b290cf36Smrg solaris*) 9522b290cf36Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 9523b290cf36Smrg ;; 9524b290cf36Smrg esac 9525b290cf36Smrg ;; 9526b290cf36Smrg esac 9527b290cf36Smrgfi 9528191cded7Smrg 9529b290cf36SmrgAC_SUBST(LINT) 9530b290cf36SmrgAC_SUBST(LINT_FLAGS) 9531b290cf36SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 9532191cded7Smrg 9533b290cf36Smrg]) # XORG_WITH_LINT 9534191cded7Smrg 9535b290cf36Smrg# XORG_LINT_LIBRARY(LIBNAME) 9536b290cf36Smrg# -------------------------- 9537b290cf36Smrg# Minimum version: 1.1.0 9538b290cf36Smrg# 9539b290cf36Smrg# Sets up flags for building lint libraries for checking programs that call 9540b290cf36Smrg# functions in the library. 9541b290cf36Smrg# Disabled by default, enable with --enable-lint-library 9542b290cf36Smrg# Sets: 9543b290cf36Smrg# @LINTLIB@ - name of lint library file to make 9544b290cf36Smrg# MAKE_LINT_LIB - automake conditional 9545191cded7Smrg# 9546191cded7Smrg 9547b290cf36SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 9548b290cf36SmrgAC_REQUIRE([XORG_WITH_LINT]) 9549b290cf36Smrg# Build lint "library" for more indepth checks of programs calling this library 9550b290cf36SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 9551b290cf36Smrg [Create lint library (default: disabled)])], 9552b290cf36Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 9553b290cf36Smrgif test "x$make_lint_lib" != "xno" ; then 9554b290cf36Smrg if test "x$LINT" = "xno" ; then 9555b290cf36Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 9556b290cf36Smrg fi 9557b290cf36Smrg if test "x$make_lint_lib" = "xyes" ; then 9558b290cf36Smrg LINTLIB=llib-l$1.ln 9559b290cf36Smrg else 9560b290cf36Smrg LINTLIB=$make_lint_lib 9561b290cf36Smrg fi 9562b290cf36Smrgfi 9563b290cf36SmrgAC_SUBST(LINTLIB) 9564b290cf36SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 9565191cded7Smrg 9566b290cf36Smrg]) # XORG_LINT_LIBRARY 9567191cded7Smrg 9568b290cf36Smrg# XORG_CWARNFLAGS 9569b290cf36Smrg# --------------- 9570b290cf36Smrg# Minimum version: 1.2.0 9571b290cf36Smrg# 9572b290cf36Smrg# Defines CWARNFLAGS to enable C compiler warnings. 9573b290cf36Smrg# 9574b290cf36SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 9575b290cf36SmrgAC_REQUIRE([AC_PROG_CC]) 9576b290cf36Smrgif test "x$GCC" = xyes ; then 9577b290cf36Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 9578b290cf36Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 9579b290cf36Smrg-Wbad-function-cast" 9580b290cf36Smrg case `$CC -dumpversion` in 9581b290cf36Smrg 3.4.* | 4.*) 9582b290cf36Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 9583b290cf36Smrg ;; 9584b290cf36Smrg esac 9585191cded7Smrgelse 9586b290cf36Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 9587b290cf36Smrg if test "x$SUNCC" = "xyes"; then 9588b290cf36Smrg CWARNFLAGS="-v" 9589b290cf36Smrg fi 9590191cded7Smrgfi 9591b290cf36SmrgAC_SUBST(CWARNFLAGS) 9592b290cf36Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 9593b290cf36Smrg]) # XORG_CWARNFLAGS 9594191cded7Smrg 9595b290cf36Smrg# XORG_STRICT_OPTION 9596b290cf36Smrg# ----------------------- 9597b290cf36Smrg# Minimum version: 1.3.0 9598191cded7Smrg# 9599b290cf36Smrg# Add configure option to enable strict compilation 9600b290cf36SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 9601b290cf36SmrgAC_REQUIRE([AC_PROG_CC]) 9602b290cf36SmrgAC_REQUIRE([AC_PROG_CC_C99]) 9603b290cf36SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 9604b290cf36Smrg 9605b290cf36SmrgAC_ARG_ENABLE(strict-compilation, 9606b290cf36Smrg AS_HELP_STRING([--enable-strict-compilation], 9607b290cf36Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 9608b290cf36Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 9609b290cf36Smrgif test "x$STRICT_COMPILE" = "xyes"; then 9610b290cf36Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 9611b290cf36Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 9612b290cf36Smrg if test "x$GCC" = xyes ; then 9613b290cf36Smrg STRICT_CFLAGS="-pedantic -Werror" 9614b290cf36Smrg elif test "x$SUNCC" = "xyes"; then 9615b290cf36Smrg STRICT_CFLAGS="-errwarn" 9616b290cf36Smrg elif test "x$INTELCC" = "xyes"; then 9617b290cf36Smrg STRICT_CFLAGS="-Werror" 9618b290cf36Smrg fi 9619191cded7Smrgfi 9620b290cf36SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 9621b290cf36SmrgAC_SUBST([CWARNFLAGS]) 9622b290cf36Smrg]) # XORG_STRICT_OPTION 9623191cded7Smrg 9624b290cf36Smrg# XORG_DEFAULT_OPTIONS 9625191cded7Smrg# -------------------- 9626b290cf36Smrg# Minimum version: 1.3.0 9627191cded7Smrg# 9628b290cf36Smrg# Defines default options for X.Org modules. 9629191cded7Smrg# 9630b290cf36SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 9631b290cf36SmrgXORG_CWARNFLAGS 9632b290cf36SmrgXORG_STRICT_OPTION 9633b290cf36SmrgXORG_RELEASE_VERSION 9634b290cf36SmrgXORG_CHANGELOG 9635b290cf36SmrgXORG_MANPAGE_SECTIONS 9636b290cf36Smrg]) # XORG_DEFAULT_OPTIONS 9637b290cf36Smrgdnl Copyright 2005 Red Hat, Inc 9638b290cf36Smrgdnl 9639b290cf36Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 9640b290cf36Smrgdnl documentation for any purpose is hereby granted without fee, provided that 9641b290cf36Smrgdnl the above copyright notice appear in all copies and that both that 9642b290cf36Smrgdnl copyright notice and this permission notice appear in supporting 9643b290cf36Smrgdnl documentation. 9644b290cf36Smrgdnl 9645b290cf36Smrgdnl The above copyright notice and this permission notice shall be included 9646b290cf36Smrgdnl in all copies or substantial portions of the Software. 9647b290cf36Smrgdnl 9648b290cf36Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 9649b290cf36Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 9650b290cf36Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 9651b290cf36Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 9652b290cf36Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 9653b290cf36Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 9654b290cf36Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 9655b290cf36Smrgdnl 9656b290cf36Smrgdnl Except as contained in this notice, the name of the copyright holders shall 9657b290cf36Smrgdnl not be used in advertising or otherwise to promote the sale, use or 9658b290cf36Smrgdnl other dealings in this Software without prior written authorization 9659b290cf36Smrgdnl from the copyright holders. 9660b290cf36Smrgdnl 9661191cded7Smrg 9662b290cf36Smrg# XORG_RELEASE_VERSION 9663b290cf36Smrg# -------------------- 9664b290cf36Smrg# Adds --with/without-release-string and changes the PACKAGE and 9665b290cf36Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 9666b290cf36Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 9667b290cf36Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 9668b290cf36Smrg 9669b290cf36SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 9670b290cf36Smrg AC_ARG_WITH(release-version, 9671b290cf36Smrg AS_HELP_STRING([--with-release-version=STRING], 9672b290cf36Smrg [Use release version string in package name]), 9673b290cf36Smrg [RELEASE_VERSION="$withval"], 9674b290cf36Smrg [RELEASE_VERSION=""]) 9675b290cf36Smrg if test "x$RELEASE_VERSION" != "x"; then 9676b290cf36Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 9677b290cf36Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 9678b290cf36Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 9679b290cf36Smrg fi 9680b290cf36Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 9681b290cf36Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 9682b290cf36Smrg [Major version of this package]) 9683b290cf36Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 9684b290cf36Smrg if test "x$PVM" = "x"; then 9685b290cf36Smrg PVM="0" 9686b290cf36Smrg fi 9687b290cf36Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 9688b290cf36Smrg [$PVM], 9689b290cf36Smrg [Minor version of this package]) 9690b290cf36Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 9691b290cf36Smrg if test "x$PVP" = "x"; then 9692b290cf36Smrg PVP="0" 9693b290cf36Smrg fi 9694b290cf36Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 9695b290cf36Smrg [$PVP], 9696b290cf36Smrg [Patch version of this package]) 9697b290cf36Smrg]) 9698191cded7Smrg 9699b290cf36Smrg# XORG_CHANGELOG() 9700b290cf36Smrg# ---------------- 9701b290cf36Smrg# Minimum version: 1.2.0 9702b290cf36Smrg# 9703b290cf36Smrg# Defines the variable CHANGELOG_CMD as the command to generate 9704b290cf36Smrg# ChangeLog from git. 9705b290cf36Smrg# 9706b290cf36Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 9707b290cf36Smrg# 9708b290cf36SmrgAC_DEFUN([XORG_CHANGELOG], [ 9709b290cf36SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 9710b290cf36Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 9711b290cf36Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 9712b290cf36SmrgAC_SUBST([CHANGELOG_CMD]) 9713b290cf36SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 9714b290cf36Smrg]) # XORG_CHANGELOG 9715191cded7Smrg 9716