aclocal.m4 revision 302b15bd
1b85037dbSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2b85037dbSmrg 3b85037dbSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4b85037dbSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5b85037dbSmrg# This file is free software; the Free Software Foundation 6b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 7b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8b85037dbSmrg 9b85037dbSmrg# This program is distributed in the hope that it will be useful, 10b85037dbSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11b85037dbSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12b85037dbSmrg# PARTICULAR PURPOSE. 13b85037dbSmrg 14b85037dbSmrgm4_ifndef([AC_AUTOCONF_VERSION], 15b85037dbSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16302b15bdSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 17302b15bdSmrg[m4_warning([this file was generated for autoconf 2.68. 18b85037dbSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19b85037dbSmrgIf you have problems, you may need to regenerate the build system entirely. 20b85037dbSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21b85037dbSmrg 22b85037dbSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23b85037dbSmrg# 24b85037dbSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 25b85037dbSmrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 26b85037dbSmrg# Inc. 27b85037dbSmrg# Written by Gordon Matzigkeit, 1996 28b85037dbSmrg# 29b85037dbSmrg# This file is free software; the Free Software Foundation gives 30b85037dbSmrg# unlimited permission to copy and/or distribute it, with or without 31b85037dbSmrg# modifications, as long as this notice is preserved. 32b85037dbSmrg 33b85037dbSmrgm4_define([_LT_COPYING], [dnl 34b85037dbSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 35b85037dbSmrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 36b85037dbSmrg# Inc. 37b85037dbSmrg# Written by Gordon Matzigkeit, 1996 38b85037dbSmrg# 39b85037dbSmrg# This file is part of GNU Libtool. 40b85037dbSmrg# 41b85037dbSmrg# GNU Libtool is free software; you can redistribute it and/or 42b85037dbSmrg# modify it under the terms of the GNU General Public License as 43b85037dbSmrg# published by the Free Software Foundation; either version 2 of 44b85037dbSmrg# the License, or (at your option) any later version. 45b85037dbSmrg# 46b85037dbSmrg# As a special exception to the GNU General Public License, 47b85037dbSmrg# if you distribute this file as part of a program or library that 48b85037dbSmrg# is built using GNU Libtool, you may include this file under the 49b85037dbSmrg# same distribution terms that you use for the rest of that program. 50b85037dbSmrg# 51b85037dbSmrg# GNU Libtool is distributed in the hope that it will be useful, 52b85037dbSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 53b85037dbSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 54b85037dbSmrg# GNU General Public License for more details. 55b85037dbSmrg# 56b85037dbSmrg# You should have received a copy of the GNU General Public License 57b85037dbSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 58b85037dbSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 59b85037dbSmrg# obtained by writing to the Free Software Foundation, Inc., 60b85037dbSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 61b85037dbSmrg]) 62b85037dbSmrg 63b85037dbSmrg# serial 57 LT_INIT 64b85037dbSmrg 65b85037dbSmrg 66b85037dbSmrg# LT_PREREQ(VERSION) 67b85037dbSmrg# ------------------ 68b85037dbSmrg# Complain and exit if this libtool version is less that VERSION. 69b85037dbSmrgm4_defun([LT_PREREQ], 70b85037dbSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 71b85037dbSmrg [m4_default([$3], 72b85037dbSmrg [m4_fatal([Libtool version $1 or higher is required], 73b85037dbSmrg 63)])], 74b85037dbSmrg [$2])]) 75b85037dbSmrg 76b85037dbSmrg 77b85037dbSmrg# _LT_CHECK_BUILDDIR 78b85037dbSmrg# ------------------ 79b85037dbSmrg# Complain if the absolute build directory name contains unusual characters 80b85037dbSmrgm4_defun([_LT_CHECK_BUILDDIR], 81b85037dbSmrg[case `pwd` in 82b85037dbSmrg *\ * | *\ *) 83b85037dbSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 84b85037dbSmrgesac 85b85037dbSmrg]) 86b85037dbSmrg 87b85037dbSmrg 88b85037dbSmrg# LT_INIT([OPTIONS]) 89b85037dbSmrg# ------------------ 90b85037dbSmrgAC_DEFUN([LT_INIT], 91b85037dbSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 92b85037dbSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 93b85037dbSmrgAC_BEFORE([$0], [LT_LANG])dnl 94b85037dbSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 95b85037dbSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 96b85037dbSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 97b85037dbSmrg 98b85037dbSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 99b85037dbSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 100b85037dbSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 101b85037dbSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 102b85037dbSmrgdnl unless we require an AC_DEFUNed macro: 103b85037dbSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 104b85037dbSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 105b85037dbSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 106b85037dbSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 107b85037dbSmrgm4_require([_LT_PROG_LTMAIN])dnl 108b85037dbSmrg 109b85037dbSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 110b85037dbSmrg 111b85037dbSmrgdnl Parse OPTIONS 112b85037dbSmrg_LT_SET_OPTIONS([$0], [$1]) 113b85037dbSmrg 114b85037dbSmrg# This can be used to rebuild libtool when needed 115b85037dbSmrgLIBTOOL_DEPS="$ltmain" 116b85037dbSmrg 117b85037dbSmrg# Always use our own libtool. 118b85037dbSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 119b85037dbSmrgAC_SUBST(LIBTOOL)dnl 120b85037dbSmrg 121b85037dbSmrg_LT_SETUP 122b85037dbSmrg 123b85037dbSmrg# Only expand once: 124b85037dbSmrgm4_define([LT_INIT]) 125b85037dbSmrg])# LT_INIT 126b85037dbSmrg 127b85037dbSmrg# Old names: 128b85037dbSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 129b85037dbSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 130b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 131b85037dbSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 132b85037dbSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 133b85037dbSmrg 134b85037dbSmrg 135b85037dbSmrg# _LT_CC_BASENAME(CC) 136b85037dbSmrg# ------------------- 137b85037dbSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 138b85037dbSmrgm4_defun([_LT_CC_BASENAME], 139b85037dbSmrg[for cc_temp in $1""; do 140b85037dbSmrg case $cc_temp in 141b85037dbSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 142b85037dbSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 143b85037dbSmrg \-*) ;; 144b85037dbSmrg *) break;; 145b85037dbSmrg esac 146b85037dbSmrgdone 147b85037dbSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 148b85037dbSmrg]) 149b85037dbSmrg 150b85037dbSmrg 151b85037dbSmrg# _LT_FILEUTILS_DEFAULTS 152b85037dbSmrg# ---------------------- 153b85037dbSmrg# It is okay to use these file commands and assume they have been set 154b85037dbSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 155b85037dbSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 156b85037dbSmrg[: ${CP="cp -f"} 157b85037dbSmrg: ${MV="mv -f"} 158b85037dbSmrg: ${RM="rm -f"} 159b85037dbSmrg])# _LT_FILEUTILS_DEFAULTS 160b85037dbSmrg 161b85037dbSmrg 162b85037dbSmrg# _LT_SETUP 163b85037dbSmrg# --------- 164b85037dbSmrgm4_defun([_LT_SETUP], 165b85037dbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 166b85037dbSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 167b85037dbSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 168b85037dbSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 169b85037dbSmrg 170b85037dbSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 171b85037dbSmrg_LT_DECL([], [host], [0])dnl 172b85037dbSmrg_LT_DECL([], [host_os], [0])dnl 173b85037dbSmrgdnl 174b85037dbSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 175b85037dbSmrg_LT_DECL([], [build], [0])dnl 176b85037dbSmrg_LT_DECL([], [build_os], [0])dnl 177b85037dbSmrgdnl 178b85037dbSmrgAC_REQUIRE([AC_PROG_CC])dnl 179b85037dbSmrgAC_REQUIRE([LT_PATH_LD])dnl 180b85037dbSmrgAC_REQUIRE([LT_PATH_NM])dnl 181b85037dbSmrgdnl 182b85037dbSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 183b85037dbSmrgtest -z "$LN_S" && LN_S="ln -s" 184b85037dbSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 185b85037dbSmrgdnl 186b85037dbSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 187b85037dbSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 188b85037dbSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 189b85037dbSmrgdnl 190b85037dbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 191b85037dbSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 192302b15bdSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 193b85037dbSmrgm4_require([_LT_CMD_RELOAD])dnl 194b85037dbSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 195302b15bdSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 196b85037dbSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 197b85037dbSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 198302b15bdSmrgm4_require([_LT_WITH_SYSROOT])dnl 199b85037dbSmrg 200b85037dbSmrg_LT_CONFIG_LIBTOOL_INIT([ 201b85037dbSmrg# See if we are running on zsh, and set the options which allow our 202b85037dbSmrg# commands through without removal of \ escapes INIT. 203b85037dbSmrgif test -n "\${ZSH_VERSION+set}" ; then 204b85037dbSmrg setopt NO_GLOB_SUBST 205b85037dbSmrgfi 206b85037dbSmrg]) 207b85037dbSmrgif test -n "${ZSH_VERSION+set}" ; then 208b85037dbSmrg setopt NO_GLOB_SUBST 209b85037dbSmrgfi 210b85037dbSmrg 211b85037dbSmrg_LT_CHECK_OBJDIR 212b85037dbSmrg 213b85037dbSmrgm4_require([_LT_TAG_COMPILER])dnl 214b85037dbSmrg 215b85037dbSmrgcase $host_os in 216b85037dbSmrgaix3*) 217b85037dbSmrg # AIX sometimes has problems with the GCC collect2 program. For some 218b85037dbSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 219b85037dbSmrg # vanish in a puff of smoke. 220b85037dbSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 221b85037dbSmrg COLLECT_NAMES= 222b85037dbSmrg export COLLECT_NAMES 223b85037dbSmrg fi 224b85037dbSmrg ;; 225b85037dbSmrgesac 226b85037dbSmrg 227b85037dbSmrg# Global variables: 228b85037dbSmrgofile=libtool 229b85037dbSmrgcan_build_shared=yes 230b85037dbSmrg 231b85037dbSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 232b85037dbSmrg# which needs '.lib'). 233b85037dbSmrglibext=a 234b85037dbSmrg 235b85037dbSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 236b85037dbSmrg 237b85037dbSmrgold_CC="$CC" 238b85037dbSmrgold_CFLAGS="$CFLAGS" 239b85037dbSmrg 240b85037dbSmrg# Set sane defaults for various variables 241b85037dbSmrgtest -z "$CC" && CC=cc 242b85037dbSmrgtest -z "$LTCC" && LTCC=$CC 243b85037dbSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 244b85037dbSmrgtest -z "$LD" && LD=ld 245b85037dbSmrgtest -z "$ac_objext" && ac_objext=o 246b85037dbSmrg 247b85037dbSmrg_LT_CC_BASENAME([$compiler]) 248b85037dbSmrg 249b85037dbSmrg# Only perform the check for file, if the check method requires it 250b85037dbSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 251b85037dbSmrgcase $deplibs_check_method in 252b85037dbSmrgfile_magic*) 253b85037dbSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 254b85037dbSmrg _LT_PATH_MAGIC 255b85037dbSmrg fi 256b85037dbSmrg ;; 257b85037dbSmrgesac 258b85037dbSmrg 259b85037dbSmrg# Use C for the default configuration in the libtool script 260b85037dbSmrgLT_SUPPORTED_TAG([CC]) 261b85037dbSmrg_LT_LANG_C_CONFIG 262b85037dbSmrg_LT_LANG_DEFAULT_CONFIG 263b85037dbSmrg_LT_CONFIG_COMMANDS 264b85037dbSmrg])# _LT_SETUP 265b85037dbSmrg 266b85037dbSmrg 267b85037dbSmrg# _LT_PREPARE_SED_QUOTE_VARS 268b85037dbSmrg# -------------------------- 269b85037dbSmrg# Define a few sed substitution that help us do robust quoting. 270b85037dbSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 271b85037dbSmrg[# Backslashify metacharacters that are still active within 272b85037dbSmrg# double-quoted strings. 273b85037dbSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 274b85037dbSmrg 275b85037dbSmrg# Same as above, but do not quote variable references. 276b85037dbSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 277b85037dbSmrg 278b85037dbSmrg# Sed substitution to delay expansion of an escaped shell variable in a 279b85037dbSmrg# double_quote_subst'ed string. 280b85037dbSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 281b85037dbSmrg 282b85037dbSmrg# Sed substitution to delay expansion of an escaped single quote. 283b85037dbSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 284b85037dbSmrg 285b85037dbSmrg# Sed substitution to avoid accidental globbing in evaled expressions 286b85037dbSmrgno_glob_subst='s/\*/\\\*/g' 287b85037dbSmrg]) 288b85037dbSmrg 289b85037dbSmrg# _LT_PROG_LTMAIN 290b85037dbSmrg# --------------- 291b85037dbSmrg# Note that this code is called both from `configure', and `config.status' 292b85037dbSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 293b85037dbSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 294b85037dbSmrg# so we pass a copy along to make sure it has a sensible value anyway. 295b85037dbSmrgm4_defun([_LT_PROG_LTMAIN], 296b85037dbSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 297b85037dbSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 298b85037dbSmrgltmain="$ac_aux_dir/ltmain.sh" 299b85037dbSmrg])# _LT_PROG_LTMAIN 300b85037dbSmrg 301b85037dbSmrg 302b85037dbSmrg 303b85037dbSmrg# So that we can recreate a full libtool script including additional 304b85037dbSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 305b85037dbSmrg# in macros and then make a single call at the end using the `libtool' 306b85037dbSmrg# label. 307b85037dbSmrg 308b85037dbSmrg 309b85037dbSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 310b85037dbSmrg# ---------------------------------------- 311b85037dbSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 312b85037dbSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 313b85037dbSmrg[m4_ifval([$1], 314b85037dbSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 315b85037dbSmrg [$1 316b85037dbSmrg])])]) 317b85037dbSmrg 318b85037dbSmrg# Initialize. 319b85037dbSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 320b85037dbSmrg 321b85037dbSmrg 322b85037dbSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 323b85037dbSmrg# ------------------------------ 324b85037dbSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 325b85037dbSmrgm4_define([_LT_CONFIG_LIBTOOL], 326b85037dbSmrg[m4_ifval([$1], 327b85037dbSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 328b85037dbSmrg [$1 329b85037dbSmrg])])]) 330b85037dbSmrg 331b85037dbSmrg# Initialize. 332b85037dbSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 333b85037dbSmrg 334b85037dbSmrg 335b85037dbSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 336b85037dbSmrg# ----------------------------------------------------- 337b85037dbSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 338b85037dbSmrg[_LT_CONFIG_LIBTOOL([$1]) 339b85037dbSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 340b85037dbSmrg]) 341b85037dbSmrg 342b85037dbSmrg 343b85037dbSmrg# _LT_FORMAT_COMMENT([COMMENT]) 344b85037dbSmrg# ----------------------------- 345b85037dbSmrg# Add leading comment marks to the start of each line, and a trailing 346b85037dbSmrg# full-stop to the whole comment if one is not present already. 347b85037dbSmrgm4_define([_LT_FORMAT_COMMENT], 348b85037dbSmrg[m4_ifval([$1], [ 349b85037dbSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 350b85037dbSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 351b85037dbSmrg)]) 352b85037dbSmrg 353b85037dbSmrg 354b85037dbSmrg 355b85037dbSmrg 356b85037dbSmrg 357b85037dbSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 358b85037dbSmrg# ------------------------------------------------------------------- 359b85037dbSmrg# CONFIGNAME is the name given to the value in the libtool script. 360b85037dbSmrg# VARNAME is the (base) name used in the configure script. 361b85037dbSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 362b85037dbSmrg# VARNAME. Any other value will be used directly. 363b85037dbSmrgm4_define([_LT_DECL], 364b85037dbSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 365b85037dbSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 366b85037dbSmrg [m4_ifval([$1], [$1], [$2])]) 367b85037dbSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 368b85037dbSmrg m4_ifval([$4], 369b85037dbSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 370b85037dbSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 371b85037dbSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 372b85037dbSmrg]) 373b85037dbSmrg 374b85037dbSmrg 375b85037dbSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 376b85037dbSmrg# -------------------------------------------------------- 377b85037dbSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 378b85037dbSmrg 379b85037dbSmrg 380b85037dbSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 381b85037dbSmrg# ------------------------------------------------ 382b85037dbSmrgm4_define([lt_decl_tag_varnames], 383b85037dbSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 384b85037dbSmrg 385b85037dbSmrg 386b85037dbSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 387b85037dbSmrg# --------------------------------------------------------- 388b85037dbSmrgm4_define([_lt_decl_filter], 389b85037dbSmrg[m4_case([$#], 390b85037dbSmrg [0], [m4_fatal([$0: too few arguments: $#])], 391b85037dbSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 392b85037dbSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 393b85037dbSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 394b85037dbSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 395b85037dbSmrg]) 396b85037dbSmrg 397b85037dbSmrg 398b85037dbSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 399b85037dbSmrg# -------------------------------------------------- 400b85037dbSmrgm4_define([lt_decl_quote_varnames], 401b85037dbSmrg[_lt_decl_filter([value], [1], $@)]) 402b85037dbSmrg 403b85037dbSmrg 404b85037dbSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 405b85037dbSmrg# --------------------------------------------------- 406b85037dbSmrgm4_define([lt_decl_dquote_varnames], 407b85037dbSmrg[_lt_decl_filter([value], [2], $@)]) 408b85037dbSmrg 409b85037dbSmrg 410b85037dbSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 411b85037dbSmrg# --------------------------------------------------- 412b85037dbSmrgm4_define([lt_decl_varnames_tagged], 413b85037dbSmrg[m4_assert([$# <= 2])dnl 414b85037dbSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 415b85037dbSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 416b85037dbSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 417b85037dbSmrgm4_define([_lt_decl_varnames_tagged], 418b85037dbSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 419b85037dbSmrg 420b85037dbSmrg 421b85037dbSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 422b85037dbSmrg# ------------------------------------------------ 423b85037dbSmrgm4_define([lt_decl_all_varnames], 424b85037dbSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 425b85037dbSmrg m4_if([$2], [], 426b85037dbSmrg m4_quote(lt_decl_varnames), 427b85037dbSmrg m4_quote(m4_shift($@))))[]dnl 428b85037dbSmrg]) 429b85037dbSmrgm4_define([_lt_decl_all_varnames], 430b85037dbSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 431b85037dbSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 432b85037dbSmrg]) 433b85037dbSmrg 434b85037dbSmrg 435b85037dbSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 436b85037dbSmrg# ------------------------------------ 437b85037dbSmrg# Quote a variable value, and forward it to `config.status' so that its 438b85037dbSmrg# declaration there will have the same value as in `configure'. VARNAME 439b85037dbSmrg# must have a single quote delimited value for this to work. 440b85037dbSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 441b85037dbSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 442b85037dbSmrg 443b85037dbSmrg 444b85037dbSmrg# _LT_CONFIG_STATUS_DECLARATIONS 445b85037dbSmrg# ------------------------------ 446b85037dbSmrg# We delimit libtool config variables with single quotes, so when 447b85037dbSmrg# we write them to config.status, we have to be sure to quote all 448b85037dbSmrg# embedded single quotes properly. In configure, this macro expands 449b85037dbSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 450b85037dbSmrg# 451b85037dbSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 452b85037dbSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 453b85037dbSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 454b85037dbSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 455b85037dbSmrg 456b85037dbSmrg 457b85037dbSmrg# _LT_LIBTOOL_TAGS 458b85037dbSmrg# ---------------- 459b85037dbSmrg# Output comment and list of tags supported by the script 460b85037dbSmrgm4_defun([_LT_LIBTOOL_TAGS], 461b85037dbSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 462b85037dbSmrgavailable_tags="_LT_TAGS"dnl 463b85037dbSmrg]) 464b85037dbSmrg 465b85037dbSmrg 466b85037dbSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 467b85037dbSmrg# ----------------------------------- 468b85037dbSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 469b85037dbSmrg# expand to a commented shell variable setting: 470b85037dbSmrg# 471b85037dbSmrg# # Some comment about what VAR is for. 472b85037dbSmrg# visible_name=$lt_internal_name 473b85037dbSmrgm4_define([_LT_LIBTOOL_DECLARE], 474b85037dbSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 475b85037dbSmrg [description])))[]dnl 476b85037dbSmrgm4_pushdef([_libtool_name], 477b85037dbSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 478b85037dbSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 479b85037dbSmrg [0], [_libtool_name=[$]$1], 480b85037dbSmrg [1], [_libtool_name=$lt_[]$1], 481b85037dbSmrg [2], [_libtool_name=$lt_[]$1], 482b85037dbSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 483b85037dbSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 484b85037dbSmrg]) 485b85037dbSmrg 486b85037dbSmrg 487b85037dbSmrg# _LT_LIBTOOL_CONFIG_VARS 488b85037dbSmrg# ----------------------- 489b85037dbSmrg# Produce commented declarations of non-tagged libtool config variables 490b85037dbSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 491b85037dbSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 492b85037dbSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 493b85037dbSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 494b85037dbSmrg[m4_foreach([_lt_var], 495b85037dbSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 496b85037dbSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 497b85037dbSmrg 498b85037dbSmrg 499b85037dbSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 500b85037dbSmrg# ------------------------- 501b85037dbSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 502b85037dbSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 503b85037dbSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 504b85037dbSmrg 505b85037dbSmrg 506b85037dbSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 507b85037dbSmrg# ------------------------------ 508b85037dbSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 509b85037dbSmrg 510b85037dbSmrg 511b85037dbSmrg# _LT_CONFIG_COMMANDS 512b85037dbSmrg# ------------------- 513b85037dbSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 514b85037dbSmrg# variables for single and double quote escaping we saved from calls 515b85037dbSmrg# to _LT_DECL, we can put quote escaped variables declarations 516b85037dbSmrg# into `config.status', and then the shell code to quote escape them in 517b85037dbSmrg# for loops in `config.status'. Finally, any additional code accumulated 518b85037dbSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 519b85037dbSmrgm4_defun([_LT_CONFIG_COMMANDS], 520b85037dbSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 521b85037dbSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 522b85037dbSmrg dnl instead of duplicating it all over again into config.status, 523b85037dbSmrg dnl then we will have config.status run $CONFIG_LT later, so it 524b85037dbSmrg dnl needs to know what name is stored there: 525b85037dbSmrg [AC_CONFIG_COMMANDS([libtool], 526b85037dbSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 527b85037dbSmrg dnl If the libtool generation code is destined for config.status, 528b85037dbSmrg dnl expand the accumulated commands and init code now: 529b85037dbSmrg [AC_CONFIG_COMMANDS([libtool], 530b85037dbSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 531b85037dbSmrg])#_LT_CONFIG_COMMANDS 532b85037dbSmrg 533b85037dbSmrg 534b85037dbSmrg# Initialize. 535b85037dbSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 536b85037dbSmrg[ 537b85037dbSmrg 538b85037dbSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 539b85037dbSmrg# if CDPATH is set. 540b85037dbSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 541b85037dbSmrg 542b85037dbSmrgsed_quote_subst='$sed_quote_subst' 543b85037dbSmrgdouble_quote_subst='$double_quote_subst' 544b85037dbSmrgdelay_variable_subst='$delay_variable_subst' 545b85037dbSmrg_LT_CONFIG_STATUS_DECLARATIONS 546b85037dbSmrgLTCC='$LTCC' 547b85037dbSmrgLTCFLAGS='$LTCFLAGS' 548b85037dbSmrgcompiler='$compiler_DEFAULT' 549b85037dbSmrg 550b85037dbSmrg# A function that is used when there is no print builtin or printf. 551b85037dbSmrgfunc_fallback_echo () 552b85037dbSmrg{ 553b85037dbSmrg eval 'cat <<_LTECHO_EOF 554b85037dbSmrg\$[]1 555b85037dbSmrg_LTECHO_EOF' 556b85037dbSmrg} 557b85037dbSmrg 558b85037dbSmrg# Quote evaled strings. 559b85037dbSmrgfor var in lt_decl_all_varnames([[ \ 560b85037dbSmrg]], lt_decl_quote_varnames); do 561b85037dbSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 562b85037dbSmrg *[[\\\\\\\`\\"\\\$]]*) 563b85037dbSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 564b85037dbSmrg ;; 565b85037dbSmrg *) 566b85037dbSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 567b85037dbSmrg ;; 568b85037dbSmrg esac 569b85037dbSmrgdone 570b85037dbSmrg 571b85037dbSmrg# Double-quote double-evaled strings. 572b85037dbSmrgfor var in lt_decl_all_varnames([[ \ 573b85037dbSmrg]], lt_decl_dquote_varnames); do 574b85037dbSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 575b85037dbSmrg *[[\\\\\\\`\\"\\\$]]*) 576b85037dbSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 577b85037dbSmrg ;; 578b85037dbSmrg *) 579b85037dbSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 580b85037dbSmrg ;; 581b85037dbSmrg esac 582b85037dbSmrgdone 583b85037dbSmrg 584b85037dbSmrg_LT_OUTPUT_LIBTOOL_INIT 585b85037dbSmrg]) 586b85037dbSmrg 587b85037dbSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 588b85037dbSmrg# ------------------------------------ 589b85037dbSmrg# Generate a child script FILE with all initialization necessary to 590b85037dbSmrg# reuse the environment learned by the parent script, and make the 591b85037dbSmrg# file executable. If COMMENT is supplied, it is inserted after the 592b85037dbSmrg# `#!' sequence but before initialization text begins. After this 593b85037dbSmrg# macro, additional text can be appended to FILE to form the body of 594b85037dbSmrg# the child script. The macro ends with non-zero status if the 595b85037dbSmrg# file could not be fully written (such as if the disk is full). 596b85037dbSmrgm4_ifdef([AS_INIT_GENERATED], 597b85037dbSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 598b85037dbSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 599b85037dbSmrg[m4_require([AS_PREPARE])]dnl 600b85037dbSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 601b85037dbSmrg[lt_write_fail=0 602b85037dbSmrgcat >$1 <<_ASEOF || lt_write_fail=1 603b85037dbSmrg#! $SHELL 604b85037dbSmrg# Generated by $as_me. 605b85037dbSmrg$2 606b85037dbSmrgSHELL=\${CONFIG_SHELL-$SHELL} 607b85037dbSmrgexport SHELL 608b85037dbSmrg_ASEOF 609b85037dbSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 610b85037dbSmrgAS_SHELL_SANITIZE 611b85037dbSmrg_AS_PREPARE 612b85037dbSmrgexec AS_MESSAGE_FD>&1 613b85037dbSmrg_ASEOF 614b85037dbSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 615b85037dbSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 616b85037dbSmrg 617b85037dbSmrg# LT_OUTPUT 618b85037dbSmrg# --------- 619b85037dbSmrg# This macro allows early generation of the libtool script (before 620b85037dbSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 621b85037dbSmrg# tests. 622b85037dbSmrgAC_DEFUN([LT_OUTPUT], 623b85037dbSmrg[: ${CONFIG_LT=./config.lt} 624b85037dbSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 625b85037dbSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 626b85037dbSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 627b85037dbSmrg 628b85037dbSmrgcat >>"$CONFIG_LT" <<\_LTEOF 629b85037dbSmrglt_cl_silent=false 630b85037dbSmrgexec AS_MESSAGE_LOG_FD>>config.log 631b85037dbSmrg{ 632b85037dbSmrg echo 633b85037dbSmrg AS_BOX([Running $as_me.]) 634b85037dbSmrg} >&AS_MESSAGE_LOG_FD 635b85037dbSmrg 636b85037dbSmrglt_cl_help="\ 637b85037dbSmrg\`$as_me' creates a local libtool stub from the current configuration, 638b85037dbSmrgfor use in further configure time tests before the real libtool is 639b85037dbSmrggenerated. 640b85037dbSmrg 641b85037dbSmrgUsage: $[0] [[OPTIONS]] 642b85037dbSmrg 643b85037dbSmrg -h, --help print this help, then exit 644b85037dbSmrg -V, --version print version number, then exit 645b85037dbSmrg -q, --quiet do not print progress messages 646b85037dbSmrg -d, --debug don't remove temporary files 647b85037dbSmrg 648b85037dbSmrgReport bugs to <bug-libtool@gnu.org>." 649b85037dbSmrg 650b85037dbSmrglt_cl_version="\ 651b85037dbSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 652b85037dbSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 653b85037dbSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 654b85037dbSmrg 655b85037dbSmrgCopyright (C) 2010 Free Software Foundation, Inc. 656b85037dbSmrgThis config.lt script is free software; the Free Software Foundation 657b85037dbSmrggives unlimited permision to copy, distribute and modify it." 658b85037dbSmrg 659b85037dbSmrgwhile test $[#] != 0 660b85037dbSmrgdo 661b85037dbSmrg case $[1] in 662b85037dbSmrg --version | --v* | -V ) 663b85037dbSmrg echo "$lt_cl_version"; exit 0 ;; 664b85037dbSmrg --help | --h* | -h ) 665b85037dbSmrg echo "$lt_cl_help"; exit 0 ;; 666b85037dbSmrg --debug | --d* | -d ) 667b85037dbSmrg debug=: ;; 668b85037dbSmrg --quiet | --q* | --silent | --s* | -q ) 669b85037dbSmrg lt_cl_silent=: ;; 670b85037dbSmrg 671b85037dbSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 672b85037dbSmrgTry \`$[0] --help' for more information.]) ;; 673b85037dbSmrg 674b85037dbSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 675b85037dbSmrgTry \`$[0] --help' for more information.]) ;; 676b85037dbSmrg esac 677b85037dbSmrg shift 678b85037dbSmrgdone 679b85037dbSmrg 680b85037dbSmrgif $lt_cl_silent; then 681b85037dbSmrg exec AS_MESSAGE_FD>/dev/null 682b85037dbSmrgfi 683b85037dbSmrg_LTEOF 684b85037dbSmrg 685b85037dbSmrgcat >>"$CONFIG_LT" <<_LTEOF 686b85037dbSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 687b85037dbSmrg_LTEOF 688b85037dbSmrg 689b85037dbSmrgcat >>"$CONFIG_LT" <<\_LTEOF 690b85037dbSmrgAC_MSG_NOTICE([creating $ofile]) 691b85037dbSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 692b85037dbSmrgAS_EXIT(0) 693b85037dbSmrg_LTEOF 694b85037dbSmrgchmod +x "$CONFIG_LT" 695b85037dbSmrg 696b85037dbSmrg# configure is writing to config.log, but config.lt does its own redirection, 697b85037dbSmrg# appending to config.log, which fails on DOS, as config.log is still kept 698b85037dbSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 699b85037dbSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 700b85037dbSmrglt_cl_success=: 701b85037dbSmrgtest "$silent" = yes && 702b85037dbSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 703b85037dbSmrgexec AS_MESSAGE_LOG_FD>/dev/null 704b85037dbSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 705b85037dbSmrgexec AS_MESSAGE_LOG_FD>>config.log 706b85037dbSmrg$lt_cl_success || AS_EXIT(1) 707b85037dbSmrg])# LT_OUTPUT 708b85037dbSmrg 709b85037dbSmrg 710b85037dbSmrg# _LT_CONFIG(TAG) 711b85037dbSmrg# --------------- 712b85037dbSmrg# If TAG is the built-in tag, create an initial libtool script with a 713b85037dbSmrg# default configuration from the untagged config vars. Otherwise add code 714b85037dbSmrg# to config.status for appending the configuration named by TAG from the 715b85037dbSmrg# matching tagged config vars. 716b85037dbSmrgm4_defun([_LT_CONFIG], 717b85037dbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 718b85037dbSmrg_LT_CONFIG_SAVE_COMMANDS([ 719b85037dbSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 720b85037dbSmrg m4_if(_LT_TAG, [C], [ 721b85037dbSmrg # See if we are running on zsh, and set the options which allow our 722b85037dbSmrg # commands through without removal of \ escapes. 723b85037dbSmrg if test -n "${ZSH_VERSION+set}" ; then 724b85037dbSmrg setopt NO_GLOB_SUBST 725b85037dbSmrg fi 726b85037dbSmrg 727b85037dbSmrg cfgfile="${ofile}T" 728b85037dbSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 729b85037dbSmrg $RM "$cfgfile" 730b85037dbSmrg 731b85037dbSmrg cat <<_LT_EOF >> "$cfgfile" 732b85037dbSmrg#! $SHELL 733b85037dbSmrg 734b85037dbSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 735b85037dbSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 736b85037dbSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 737b85037dbSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 738b85037dbSmrg# 739b85037dbSmrg_LT_COPYING 740b85037dbSmrg_LT_LIBTOOL_TAGS 741b85037dbSmrg 742b85037dbSmrg# ### BEGIN LIBTOOL CONFIG 743b85037dbSmrg_LT_LIBTOOL_CONFIG_VARS 744b85037dbSmrg_LT_LIBTOOL_TAG_VARS 745b85037dbSmrg# ### END LIBTOOL CONFIG 746b85037dbSmrg 747b85037dbSmrg_LT_EOF 748b85037dbSmrg 749b85037dbSmrg case $host_os in 750b85037dbSmrg aix3*) 751b85037dbSmrg cat <<\_LT_EOF >> "$cfgfile" 752b85037dbSmrg# AIX sometimes has problems with the GCC collect2 program. For some 753b85037dbSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 754b85037dbSmrg# vanish in a puff of smoke. 755b85037dbSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 756b85037dbSmrg COLLECT_NAMES= 757b85037dbSmrg export COLLECT_NAMES 758b85037dbSmrgfi 759b85037dbSmrg_LT_EOF 760b85037dbSmrg ;; 761b85037dbSmrg esac 762b85037dbSmrg 763b85037dbSmrg _LT_PROG_LTMAIN 764b85037dbSmrg 765b85037dbSmrg # We use sed instead of cat because bash on DJGPP gets confused if 766b85037dbSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 767b85037dbSmrg # text mode, it properly converts lines to CR/LF. This bash problem 768b85037dbSmrg # is reportedly fixed, but why not run on old versions too? 769302b15bdSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 770302b15bdSmrg || (rm -f "$cfgfile"; exit 1) 771b85037dbSmrg 772302b15bdSmrg _LT_PROG_REPLACE_SHELLFNS 773b85037dbSmrg 774302b15bdSmrg mv -f "$cfgfile" "$ofile" || 775b85037dbSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 776b85037dbSmrg chmod +x "$ofile" 777b85037dbSmrg], 778b85037dbSmrg[cat <<_LT_EOF >> "$ofile" 779b85037dbSmrg 780b85037dbSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 781b85037dbSmrgdnl in a comment (ie after a #). 782b85037dbSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 783b85037dbSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 784b85037dbSmrg# ### END LIBTOOL TAG CONFIG: $1 785b85037dbSmrg_LT_EOF 786b85037dbSmrg])dnl /m4_if 787b85037dbSmrg], 788b85037dbSmrg[m4_if([$1], [], [ 789b85037dbSmrg PACKAGE='$PACKAGE' 790b85037dbSmrg VERSION='$VERSION' 791b85037dbSmrg TIMESTAMP='$TIMESTAMP' 792b85037dbSmrg RM='$RM' 793b85037dbSmrg ofile='$ofile'], []) 794b85037dbSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 795b85037dbSmrg])# _LT_CONFIG 796b85037dbSmrg 797b85037dbSmrg 798b85037dbSmrg# LT_SUPPORTED_TAG(TAG) 799b85037dbSmrg# --------------------- 800b85037dbSmrg# Trace this macro to discover what tags are supported by the libtool 801b85037dbSmrg# --tag option, using: 802b85037dbSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 803b85037dbSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 804b85037dbSmrg 805b85037dbSmrg 806b85037dbSmrg# C support is built-in for now 807b85037dbSmrgm4_define([_LT_LANG_C_enabled], []) 808b85037dbSmrgm4_define([_LT_TAGS], []) 809b85037dbSmrg 810b85037dbSmrg 811b85037dbSmrg# LT_LANG(LANG) 812b85037dbSmrg# ------------- 813b85037dbSmrg# Enable libtool support for the given language if not already enabled. 814b85037dbSmrgAC_DEFUN([LT_LANG], 815b85037dbSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 816b85037dbSmrgm4_case([$1], 817b85037dbSmrg [C], [_LT_LANG(C)], 818b85037dbSmrg [C++], [_LT_LANG(CXX)], 819b85037dbSmrg [Java], [_LT_LANG(GCJ)], 820b85037dbSmrg [Fortran 77], [_LT_LANG(F77)], 821b85037dbSmrg [Fortran], [_LT_LANG(FC)], 822b85037dbSmrg [Windows Resource], [_LT_LANG(RC)], 823b85037dbSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 824b85037dbSmrg [_LT_LANG($1)], 825b85037dbSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 826b85037dbSmrg])# LT_LANG 827b85037dbSmrg 828b85037dbSmrg 829b85037dbSmrg# _LT_LANG(LANGNAME) 830b85037dbSmrg# ------------------ 831b85037dbSmrgm4_defun([_LT_LANG], 832b85037dbSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 833b85037dbSmrg [LT_SUPPORTED_TAG([$1])dnl 834b85037dbSmrg m4_append([_LT_TAGS], [$1 ])dnl 835b85037dbSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 836b85037dbSmrg _LT_LANG_$1_CONFIG($1)])dnl 837b85037dbSmrg])# _LT_LANG 838b85037dbSmrg 839b85037dbSmrg 840b85037dbSmrg# _LT_LANG_DEFAULT_CONFIG 841b85037dbSmrg# ----------------------- 842b85037dbSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 843b85037dbSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 844b85037dbSmrg [LT_LANG(CXX)], 845b85037dbSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 846b85037dbSmrg 847b85037dbSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 848b85037dbSmrg [LT_LANG(F77)], 849b85037dbSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 850b85037dbSmrg 851b85037dbSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 852b85037dbSmrg [LT_LANG(FC)], 853b85037dbSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 854b85037dbSmrg 855b85037dbSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 856b85037dbSmrgdnl pulling things in needlessly. 857b85037dbSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 858b85037dbSmrg [LT_LANG(GCJ)], 859b85037dbSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 860b85037dbSmrg [LT_LANG(GCJ)], 861b85037dbSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 862b85037dbSmrg [LT_LANG(GCJ)], 863b85037dbSmrg [m4_ifdef([AC_PROG_GCJ], 864b85037dbSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 865b85037dbSmrg m4_ifdef([A][M_PROG_GCJ], 866b85037dbSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 867b85037dbSmrg m4_ifdef([LT_PROG_GCJ], 868b85037dbSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 869b85037dbSmrg 870b85037dbSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 871b85037dbSmrg [LT_LANG(RC)], 872b85037dbSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 873b85037dbSmrg])# _LT_LANG_DEFAULT_CONFIG 874b85037dbSmrg 875b85037dbSmrg# Obsolete macros: 876b85037dbSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 877b85037dbSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 878b85037dbSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 879b85037dbSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 880b85037dbSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 881b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 882b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 883b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 884b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 885b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 886b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 887b85037dbSmrg 888b85037dbSmrg 889b85037dbSmrg# _LT_TAG_COMPILER 890b85037dbSmrg# ---------------- 891b85037dbSmrgm4_defun([_LT_TAG_COMPILER], 892b85037dbSmrg[AC_REQUIRE([AC_PROG_CC])dnl 893b85037dbSmrg 894b85037dbSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 895b85037dbSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 896b85037dbSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 897b85037dbSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 898b85037dbSmrg 899b85037dbSmrg# If no C compiler was specified, use CC. 900b85037dbSmrgLTCC=${LTCC-"$CC"} 901b85037dbSmrg 902b85037dbSmrg# If no C compiler flags were specified, use CFLAGS. 903b85037dbSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 904b85037dbSmrg 905b85037dbSmrg# Allow CC to be a program name with arguments. 906b85037dbSmrgcompiler=$CC 907b85037dbSmrg])# _LT_TAG_COMPILER 908b85037dbSmrg 909b85037dbSmrg 910b85037dbSmrg# _LT_COMPILER_BOILERPLATE 911b85037dbSmrg# ------------------------ 912b85037dbSmrg# Check for compiler boilerplate output or warnings with 913b85037dbSmrg# the simple compiler test code. 914b85037dbSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 915b85037dbSmrg[m4_require([_LT_DECL_SED])dnl 916b85037dbSmrgac_outfile=conftest.$ac_objext 917b85037dbSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 918b85037dbSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 919b85037dbSmrg_lt_compiler_boilerplate=`cat conftest.err` 920b85037dbSmrg$RM conftest* 921b85037dbSmrg])# _LT_COMPILER_BOILERPLATE 922b85037dbSmrg 923b85037dbSmrg 924b85037dbSmrg# _LT_LINKER_BOILERPLATE 925b85037dbSmrg# ---------------------- 926b85037dbSmrg# Check for linker boilerplate output or warnings with 927b85037dbSmrg# the simple link test code. 928b85037dbSmrgm4_defun([_LT_LINKER_BOILERPLATE], 929b85037dbSmrg[m4_require([_LT_DECL_SED])dnl 930b85037dbSmrgac_outfile=conftest.$ac_objext 931b85037dbSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 932b85037dbSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 933b85037dbSmrg_lt_linker_boilerplate=`cat conftest.err` 934b85037dbSmrg$RM -r conftest* 935b85037dbSmrg])# _LT_LINKER_BOILERPLATE 936b85037dbSmrg 937b85037dbSmrg# _LT_REQUIRED_DARWIN_CHECKS 938b85037dbSmrg# ------------------------- 939b85037dbSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 940b85037dbSmrg case $host_os in 941b85037dbSmrg rhapsody* | darwin*) 942b85037dbSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 943b85037dbSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 944b85037dbSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 945b85037dbSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 946b85037dbSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 947b85037dbSmrg _LT_DECL([], [DSYMUTIL], [1], 948b85037dbSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 949b85037dbSmrg _LT_DECL([], [NMEDIT], [1], 950b85037dbSmrg [Tool to change global to local symbols on Mac OS X]) 951b85037dbSmrg _LT_DECL([], [LIPO], [1], 952b85037dbSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 953b85037dbSmrg _LT_DECL([], [OTOOL], [1], 954b85037dbSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 955b85037dbSmrg _LT_DECL([], [OTOOL64], [1], 956b85037dbSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 957b85037dbSmrg 958b85037dbSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 959b85037dbSmrg [lt_cv_apple_cc_single_mod=no 960b85037dbSmrg if test -z "${LT_MULTI_MODULE}"; then 961b85037dbSmrg # By default we will add the -single_module flag. You can override 962b85037dbSmrg # by either setting the environment variable LT_MULTI_MODULE 963b85037dbSmrg # non-empty at configure time, or by adding -multi_module to the 964b85037dbSmrg # link flags. 965b85037dbSmrg rm -rf libconftest.dylib* 966b85037dbSmrg echo "int foo(void){return 1;}" > conftest.c 967b85037dbSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 968b85037dbSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 969b85037dbSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 970b85037dbSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 971b85037dbSmrg _lt_result=$? 972b85037dbSmrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 973b85037dbSmrg lt_cv_apple_cc_single_mod=yes 974b85037dbSmrg else 975b85037dbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 976b85037dbSmrg fi 977b85037dbSmrg rm -rf libconftest.dylib* 978b85037dbSmrg rm -f conftest.* 979b85037dbSmrg fi]) 980b85037dbSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 981b85037dbSmrg [lt_cv_ld_exported_symbols_list], 982b85037dbSmrg [lt_cv_ld_exported_symbols_list=no 983b85037dbSmrg save_LDFLAGS=$LDFLAGS 984b85037dbSmrg echo "_main" > conftest.sym 985b85037dbSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 986b85037dbSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 987b85037dbSmrg [lt_cv_ld_exported_symbols_list=yes], 988b85037dbSmrg [lt_cv_ld_exported_symbols_list=no]) 989b85037dbSmrg LDFLAGS="$save_LDFLAGS" 990b85037dbSmrg ]) 991b85037dbSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 992b85037dbSmrg [lt_cv_ld_force_load=no 993b85037dbSmrg cat > conftest.c << _LT_EOF 994b85037dbSmrgint forced_loaded() { return 2;} 995b85037dbSmrg_LT_EOF 996b85037dbSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 997b85037dbSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 998b85037dbSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 999b85037dbSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1000b85037dbSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1001b85037dbSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1002b85037dbSmrg cat > conftest.c << _LT_EOF 1003b85037dbSmrgint main() { return 0;} 1004b85037dbSmrg_LT_EOF 1005b85037dbSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1006b85037dbSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1007b85037dbSmrg _lt_result=$? 1008b85037dbSmrg if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 1009b85037dbSmrg lt_cv_ld_force_load=yes 1010b85037dbSmrg else 1011b85037dbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1012b85037dbSmrg fi 1013b85037dbSmrg rm -f conftest.err libconftest.a conftest conftest.c 1014b85037dbSmrg rm -rf conftest.dSYM 1015b85037dbSmrg ]) 1016b85037dbSmrg case $host_os in 1017b85037dbSmrg rhapsody* | darwin1.[[012]]) 1018b85037dbSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 1019b85037dbSmrg darwin1.*) 1020b85037dbSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1021b85037dbSmrg darwin*) # darwin 5.x on 1022b85037dbSmrg # if running on 10.5 or later, the deployment target defaults 1023b85037dbSmrg # to the OS version, if on x86, and 10.4, the deployment 1024b85037dbSmrg # target defaults to 10.4. Don't you love it? 1025b85037dbSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1026b85037dbSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1027b85037dbSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1028b85037dbSmrg 10.[[012]]*) 1029b85037dbSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1030b85037dbSmrg 10.*) 1031b85037dbSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1032b85037dbSmrg esac 1033b85037dbSmrg ;; 1034b85037dbSmrg esac 1035b85037dbSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 1036b85037dbSmrg _lt_dar_single_mod='$single_module' 1037b85037dbSmrg fi 1038b85037dbSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 1039b85037dbSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 1040b85037dbSmrg else 1041b85037dbSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 1042b85037dbSmrg fi 1043b85037dbSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1044b85037dbSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1045b85037dbSmrg else 1046b85037dbSmrg _lt_dsymutil= 1047b85037dbSmrg fi 1048b85037dbSmrg ;; 1049b85037dbSmrg esac 1050b85037dbSmrg]) 1051b85037dbSmrg 1052b85037dbSmrg 1053b85037dbSmrg# _LT_DARWIN_LINKER_FEATURES 1054b85037dbSmrg# -------------------------- 1055b85037dbSmrg# Checks for linker and compiler features on darwin 1056b85037dbSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1057b85037dbSmrg[ 1058b85037dbSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1059b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1060b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 1061b85037dbSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1062b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1063b85037dbSmrg if test "$lt_cv_ld_force_load" = "yes"; then 1064b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 1065b85037dbSmrg else 1066b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1067b85037dbSmrg fi 1068b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1069b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1070b85037dbSmrg case $cc_basename in 1071b85037dbSmrg ifort*) _lt_dar_can_shared=yes ;; 1072b85037dbSmrg *) _lt_dar_can_shared=$GCC ;; 1073b85037dbSmrg esac 1074b85037dbSmrg if test "$_lt_dar_can_shared" = "yes"; then 1075b85037dbSmrg output_verbose_link_cmd=func_echo_all 1076b85037dbSmrg _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}" 1077b85037dbSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1078b85037dbSmrg _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}" 1079b85037dbSmrg _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}" 1080b85037dbSmrg m4_if([$1], [CXX], 1081b85037dbSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1082b85037dbSmrg _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}" 1083b85037dbSmrg _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}" 1084b85037dbSmrg fi 1085b85037dbSmrg],[]) 1086b85037dbSmrg else 1087b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 1088b85037dbSmrg fi 1089b85037dbSmrg]) 1090b85037dbSmrg 1091302b15bdSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1092302b15bdSmrg# ---------------------------------- 1093b85037dbSmrg# Links a minimal program and checks the executable 1094b85037dbSmrg# for the system default hardcoded library path. In most cases, 1095b85037dbSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1096b85037dbSmrg# the location of the communication and MPI libs are included too. 1097b85037dbSmrg# If we don't find anything, use the default library path according 1098b85037dbSmrg# to the aix ld manual. 1099302b15bdSmrg# Store the results from the different compilers for each TAGNAME. 1100302b15bdSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 1101b85037dbSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1102b85037dbSmrg[m4_require([_LT_DECL_SED])dnl 1103302b15bdSmrgif test "${lt_cv_aix_libpath+set}" = set; then 1104302b15bdSmrg aix_libpath=$lt_cv_aix_libpath 1105302b15bdSmrgelse 1106302b15bdSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1107302b15bdSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1108302b15bdSmrg lt_aix_libpath_sed='[ 1109302b15bdSmrg /Import File Strings/,/^$/ { 1110302b15bdSmrg /^0/ { 1111302b15bdSmrg s/^0 *\([^ ]*\) *$/\1/ 1112302b15bdSmrg p 1113302b15bdSmrg } 1114302b15bdSmrg }]' 1115302b15bdSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1116302b15bdSmrg # Check for a 64-bit object if we didn't find anything. 1117302b15bdSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1118302b15bdSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1119302b15bdSmrg fi],[]) 1120302b15bdSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1121302b15bdSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1122302b15bdSmrg fi 1123302b15bdSmrg ]) 1124302b15bdSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1125302b15bdSmrgfi 1126b85037dbSmrg])# _LT_SYS_MODULE_PATH_AIX 1127b85037dbSmrg 1128b85037dbSmrg 1129b85037dbSmrg# _LT_SHELL_INIT(ARG) 1130b85037dbSmrg# ------------------- 1131b85037dbSmrgm4_define([_LT_SHELL_INIT], 1132b85037dbSmrg[m4_divert_text([M4SH-INIT], [$1 1133b85037dbSmrg])])# _LT_SHELL_INIT 1134b85037dbSmrg 1135b85037dbSmrg 1136b85037dbSmrg 1137b85037dbSmrg# _LT_PROG_ECHO_BACKSLASH 1138b85037dbSmrg# ----------------------- 1139b85037dbSmrg# Find how we can fake an echo command that does not interpret backslash. 1140b85037dbSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 1141b85037dbSmrg# of the generated configure script which will find a shell with a builtin 1142b85037dbSmrg# printf (which we can use as an echo command). 1143b85037dbSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1144b85037dbSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1145b85037dbSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1146b85037dbSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1147b85037dbSmrg 1148b85037dbSmrgAC_MSG_CHECKING([how to print strings]) 1149b85037dbSmrg# Test print first, because it will be a builtin if present. 1150302b15bdSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1151b85037dbSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1152b85037dbSmrg ECHO='print -r --' 1153b85037dbSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1154b85037dbSmrg ECHO='printf %s\n' 1155b85037dbSmrgelse 1156b85037dbSmrg # Use this function as a fallback that always works. 1157b85037dbSmrg func_fallback_echo () 1158b85037dbSmrg { 1159b85037dbSmrg eval 'cat <<_LTECHO_EOF 1160b85037dbSmrg$[]1 1161b85037dbSmrg_LTECHO_EOF' 1162b85037dbSmrg } 1163b85037dbSmrg ECHO='func_fallback_echo' 1164b85037dbSmrgfi 1165b85037dbSmrg 1166b85037dbSmrg# func_echo_all arg... 1167b85037dbSmrg# Invoke $ECHO with all args, space-separated. 1168b85037dbSmrgfunc_echo_all () 1169b85037dbSmrg{ 1170b85037dbSmrg $ECHO "$*" 1171b85037dbSmrg} 1172b85037dbSmrg 1173b85037dbSmrgcase "$ECHO" in 1174b85037dbSmrg printf*) AC_MSG_RESULT([printf]) ;; 1175b85037dbSmrg print*) AC_MSG_RESULT([print -r]) ;; 1176b85037dbSmrg *) AC_MSG_RESULT([cat]) ;; 1177b85037dbSmrgesac 1178b85037dbSmrg 1179b85037dbSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 1180b85037dbSmrg[_AS_DETECT_SUGGESTED([ 1181b85037dbSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1182b85037dbSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1183b85037dbSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1184b85037dbSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1185b85037dbSmrg PATH=/empty FPATH=/empty; export PATH FPATH 1186b85037dbSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1187b85037dbSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1188b85037dbSmrg 1189b85037dbSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1190b85037dbSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1191b85037dbSmrg])# _LT_PROG_ECHO_BACKSLASH 1192b85037dbSmrg 1193b85037dbSmrg 1194302b15bdSmrg# _LT_WITH_SYSROOT 1195302b15bdSmrg# ---------------- 1196302b15bdSmrgAC_DEFUN([_LT_WITH_SYSROOT], 1197302b15bdSmrg[AC_MSG_CHECKING([for sysroot]) 1198302b15bdSmrgAC_ARG_WITH([sysroot], 1199302b15bdSmrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1200302b15bdSmrg (or the compiler's sysroot if not specified).], 1201302b15bdSmrg[], [with_sysroot=no]) 1202302b15bdSmrg 1203302b15bdSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 1204302b15bdSmrgdnl in case the user passed a directory name. 1205302b15bdSmrglt_sysroot= 1206302b15bdSmrgcase ${with_sysroot} in #( 1207302b15bdSmrg yes) 1208302b15bdSmrg if test "$GCC" = yes; then 1209302b15bdSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1210302b15bdSmrg fi 1211302b15bdSmrg ;; #( 1212302b15bdSmrg /*) 1213302b15bdSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1214302b15bdSmrg ;; #( 1215302b15bdSmrg no|'') 1216302b15bdSmrg ;; #( 1217302b15bdSmrg *) 1218302b15bdSmrg AC_MSG_RESULT([${with_sysroot}]) 1219302b15bdSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1220302b15bdSmrg ;; 1221302b15bdSmrgesac 1222302b15bdSmrg 1223302b15bdSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1224302b15bdSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1225302b15bdSmrg[dependent libraries, and in which our libraries should be installed.])]) 1226302b15bdSmrg 1227b85037dbSmrg# _LT_ENABLE_LOCK 1228b85037dbSmrg# --------------- 1229b85037dbSmrgm4_defun([_LT_ENABLE_LOCK], 1230b85037dbSmrg[AC_ARG_ENABLE([libtool-lock], 1231b85037dbSmrg [AS_HELP_STRING([--disable-libtool-lock], 1232b85037dbSmrg [avoid locking (might break parallel builds)])]) 1233b85037dbSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1234b85037dbSmrg 1235b85037dbSmrg# Some flags need to be propagated to the compiler or linker for good 1236b85037dbSmrg# libtool support. 1237b85037dbSmrgcase $host in 1238b85037dbSmrgia64-*-hpux*) 1239b85037dbSmrg # Find out which ABI we are using. 1240b85037dbSmrg echo 'int i;' > conftest.$ac_ext 1241b85037dbSmrg if AC_TRY_EVAL(ac_compile); then 1242b85037dbSmrg case `/usr/bin/file conftest.$ac_objext` in 1243b85037dbSmrg *ELF-32*) 1244b85037dbSmrg HPUX_IA64_MODE="32" 1245b85037dbSmrg ;; 1246b85037dbSmrg *ELF-64*) 1247b85037dbSmrg HPUX_IA64_MODE="64" 1248b85037dbSmrg ;; 1249b85037dbSmrg esac 1250b85037dbSmrg fi 1251b85037dbSmrg rm -rf conftest* 1252b85037dbSmrg ;; 1253b85037dbSmrg*-*-irix6*) 1254b85037dbSmrg # Find out which ABI we are using. 1255b85037dbSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1256b85037dbSmrg if AC_TRY_EVAL(ac_compile); then 1257b85037dbSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 1258b85037dbSmrg case `/usr/bin/file conftest.$ac_objext` in 1259b85037dbSmrg *32-bit*) 1260b85037dbSmrg LD="${LD-ld} -melf32bsmip" 1261b85037dbSmrg ;; 1262b85037dbSmrg *N32*) 1263b85037dbSmrg LD="${LD-ld} -melf32bmipn32" 1264b85037dbSmrg ;; 1265b85037dbSmrg *64-bit*) 1266b85037dbSmrg LD="${LD-ld} -melf64bmip" 1267b85037dbSmrg ;; 1268b85037dbSmrg esac 1269b85037dbSmrg else 1270b85037dbSmrg case `/usr/bin/file conftest.$ac_objext` in 1271b85037dbSmrg *32-bit*) 1272b85037dbSmrg LD="${LD-ld} -32" 1273b85037dbSmrg ;; 1274b85037dbSmrg *N32*) 1275b85037dbSmrg LD="${LD-ld} -n32" 1276b85037dbSmrg ;; 1277b85037dbSmrg *64-bit*) 1278b85037dbSmrg LD="${LD-ld} -64" 1279b85037dbSmrg ;; 1280b85037dbSmrg esac 1281b85037dbSmrg fi 1282b85037dbSmrg fi 1283b85037dbSmrg rm -rf conftest* 1284b85037dbSmrg ;; 1285b85037dbSmrg 1286b85037dbSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1287b85037dbSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1288b85037dbSmrg # Find out which ABI we are using. 1289b85037dbSmrg echo 'int i;' > conftest.$ac_ext 1290b85037dbSmrg if AC_TRY_EVAL(ac_compile); then 1291b85037dbSmrg case `/usr/bin/file conftest.o` in 1292b85037dbSmrg *32-bit*) 1293b85037dbSmrg case $host in 1294b85037dbSmrg x86_64-*kfreebsd*-gnu) 1295b85037dbSmrg LD="${LD-ld} -m elf_i386_fbsd" 1296b85037dbSmrg ;; 1297b85037dbSmrg x86_64-*linux*) 1298b85037dbSmrg LD="${LD-ld} -m elf_i386" 1299b85037dbSmrg ;; 1300b85037dbSmrg ppc64-*linux*|powerpc64-*linux*) 1301b85037dbSmrg LD="${LD-ld} -m elf32ppclinux" 1302b85037dbSmrg ;; 1303b85037dbSmrg s390x-*linux*) 1304b85037dbSmrg LD="${LD-ld} -m elf_s390" 1305b85037dbSmrg ;; 1306b85037dbSmrg sparc64-*linux*) 1307b85037dbSmrg LD="${LD-ld} -m elf32_sparc" 1308b85037dbSmrg ;; 1309b85037dbSmrg esac 1310b85037dbSmrg ;; 1311b85037dbSmrg *64-bit*) 1312b85037dbSmrg case $host in 1313b85037dbSmrg x86_64-*kfreebsd*-gnu) 1314b85037dbSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 1315b85037dbSmrg ;; 1316b85037dbSmrg x86_64-*linux*) 1317b85037dbSmrg LD="${LD-ld} -m elf_x86_64" 1318b85037dbSmrg ;; 1319b85037dbSmrg ppc*-*linux*|powerpc*-*linux*) 1320b85037dbSmrg LD="${LD-ld} -m elf64ppc" 1321b85037dbSmrg ;; 1322b85037dbSmrg s390*-*linux*|s390*-*tpf*) 1323b85037dbSmrg LD="${LD-ld} -m elf64_s390" 1324b85037dbSmrg ;; 1325b85037dbSmrg sparc*-*linux*) 1326b85037dbSmrg LD="${LD-ld} -m elf64_sparc" 1327b85037dbSmrg ;; 1328b85037dbSmrg esac 1329b85037dbSmrg ;; 1330b85037dbSmrg esac 1331b85037dbSmrg fi 1332b85037dbSmrg rm -rf conftest* 1333b85037dbSmrg ;; 1334b85037dbSmrg 1335b85037dbSmrg*-*-sco3.2v5*) 1336b85037dbSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1337b85037dbSmrg SAVE_CFLAGS="$CFLAGS" 1338b85037dbSmrg CFLAGS="$CFLAGS -belf" 1339b85037dbSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1340b85037dbSmrg [AC_LANG_PUSH(C) 1341b85037dbSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1342b85037dbSmrg AC_LANG_POP]) 1343b85037dbSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1344b85037dbSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1345b85037dbSmrg CFLAGS="$SAVE_CFLAGS" 1346b85037dbSmrg fi 1347b85037dbSmrg ;; 1348b85037dbSmrgsparc*-*solaris*) 1349b85037dbSmrg # Find out which ABI we are using. 1350b85037dbSmrg echo 'int i;' > conftest.$ac_ext 1351b85037dbSmrg if AC_TRY_EVAL(ac_compile); then 1352b85037dbSmrg case `/usr/bin/file conftest.o` in 1353b85037dbSmrg *64-bit*) 1354b85037dbSmrg case $lt_cv_prog_gnu_ld in 1355b85037dbSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 1356b85037dbSmrg *) 1357b85037dbSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1358b85037dbSmrg LD="${LD-ld} -64" 1359b85037dbSmrg fi 1360b85037dbSmrg ;; 1361b85037dbSmrg esac 1362b85037dbSmrg ;; 1363b85037dbSmrg esac 1364b85037dbSmrg fi 1365b85037dbSmrg rm -rf conftest* 1366b85037dbSmrg ;; 1367b85037dbSmrgesac 1368b85037dbSmrg 1369b85037dbSmrgneed_locks="$enable_libtool_lock" 1370b85037dbSmrg])# _LT_ENABLE_LOCK 1371b85037dbSmrg 1372b85037dbSmrg 1373302b15bdSmrg# _LT_PROG_AR 1374302b15bdSmrg# ----------- 1375302b15bdSmrgm4_defun([_LT_PROG_AR], 1376302b15bdSmrg[AC_CHECK_TOOLS(AR, [ar], false) 1377302b15bdSmrg: ${AR=ar} 1378302b15bdSmrg: ${AR_FLAGS=cru} 1379302b15bdSmrg_LT_DECL([], [AR], [1], [The archiver]) 1380302b15bdSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1381302b15bdSmrg 1382302b15bdSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1383302b15bdSmrg [lt_cv_ar_at_file=no 1384302b15bdSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1385302b15bdSmrg [echo conftest.$ac_objext > conftest.lst 1386302b15bdSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1387302b15bdSmrg AC_TRY_EVAL([lt_ar_try]) 1388302b15bdSmrg if test "$ac_status" -eq 0; then 1389302b15bdSmrg # Ensure the archiver fails upon bogus file names. 1390302b15bdSmrg rm -f conftest.$ac_objext libconftest.a 1391302b15bdSmrg AC_TRY_EVAL([lt_ar_try]) 1392302b15bdSmrg if test "$ac_status" -ne 0; then 1393302b15bdSmrg lt_cv_ar_at_file=@ 1394302b15bdSmrg fi 1395302b15bdSmrg fi 1396302b15bdSmrg rm -f conftest.* libconftest.a 1397302b15bdSmrg ]) 1398302b15bdSmrg ]) 1399302b15bdSmrg 1400302b15bdSmrgif test "x$lt_cv_ar_at_file" = xno; then 1401302b15bdSmrg archiver_list_spec= 1402302b15bdSmrgelse 1403302b15bdSmrg archiver_list_spec=$lt_cv_ar_at_file 1404302b15bdSmrgfi 1405302b15bdSmrg_LT_DECL([], [archiver_list_spec], [1], 1406302b15bdSmrg [How to feed a file listing to the archiver]) 1407302b15bdSmrg])# _LT_PROG_AR 1408302b15bdSmrg 1409302b15bdSmrg 1410b85037dbSmrg# _LT_CMD_OLD_ARCHIVE 1411b85037dbSmrg# ------------------- 1412b85037dbSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1413302b15bdSmrg[_LT_PROG_AR 1414b85037dbSmrg 1415b85037dbSmrgAC_CHECK_TOOL(STRIP, strip, :) 1416b85037dbSmrgtest -z "$STRIP" && STRIP=: 1417b85037dbSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1418b85037dbSmrg 1419b85037dbSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1420b85037dbSmrgtest -z "$RANLIB" && RANLIB=: 1421b85037dbSmrg_LT_DECL([], [RANLIB], [1], 1422b85037dbSmrg [Commands used to install an old-style archive]) 1423b85037dbSmrg 1424b85037dbSmrg# Determine commands to create old-style static archives. 1425b85037dbSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1426b85037dbSmrgold_postinstall_cmds='chmod 644 $oldlib' 1427b85037dbSmrgold_postuninstall_cmds= 1428b85037dbSmrg 1429b85037dbSmrgif test -n "$RANLIB"; then 1430b85037dbSmrg case $host_os in 1431b85037dbSmrg openbsd*) 1432b85037dbSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1433b85037dbSmrg ;; 1434b85037dbSmrg *) 1435b85037dbSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1436b85037dbSmrg ;; 1437b85037dbSmrg esac 1438b85037dbSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1439b85037dbSmrgfi 1440b85037dbSmrg 1441b85037dbSmrgcase $host_os in 1442b85037dbSmrg darwin*) 1443b85037dbSmrg lock_old_archive_extraction=yes ;; 1444b85037dbSmrg *) 1445b85037dbSmrg lock_old_archive_extraction=no ;; 1446b85037dbSmrgesac 1447b85037dbSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 1448b85037dbSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1449b85037dbSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 1450b85037dbSmrg [Commands used to build an old-style archive]) 1451b85037dbSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 1452b85037dbSmrg [Whether to use a lock for old archive extraction]) 1453b85037dbSmrg])# _LT_CMD_OLD_ARCHIVE 1454b85037dbSmrg 1455b85037dbSmrg 1456b85037dbSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1457b85037dbSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1458b85037dbSmrg# ---------------------------------------------------------------- 1459b85037dbSmrg# Check whether the given compiler option works 1460b85037dbSmrgAC_DEFUN([_LT_COMPILER_OPTION], 1461b85037dbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1462b85037dbSmrgm4_require([_LT_DECL_SED])dnl 1463b85037dbSmrgAC_CACHE_CHECK([$1], [$2], 1464b85037dbSmrg [$2=no 1465b85037dbSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1466b85037dbSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1467b85037dbSmrg lt_compiler_flag="$3" 1468b85037dbSmrg # Insert the option either (1) after the last *FLAGS variable, or 1469b85037dbSmrg # (2) before a word containing "conftest.", or (3) at the end. 1470b85037dbSmrg # Note that $ac_compile itself does not contain backslashes and begins 1471b85037dbSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1472b85037dbSmrg # The option is referenced via a variable to avoid confusing sed. 1473b85037dbSmrg lt_compile=`echo "$ac_compile" | $SED \ 1474b85037dbSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1475b85037dbSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1476b85037dbSmrg -e 's:$: $lt_compiler_flag:'` 1477b85037dbSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1478b85037dbSmrg (eval "$lt_compile" 2>conftest.err) 1479b85037dbSmrg ac_status=$? 1480b85037dbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1481b85037dbSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1482b85037dbSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 1483b85037dbSmrg # The compiler can only warn and ignore the option if not recognized 1484b85037dbSmrg # So say no if there are warnings other than the usual output. 1485b85037dbSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1486b85037dbSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1487b85037dbSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1488b85037dbSmrg $2=yes 1489b85037dbSmrg fi 1490b85037dbSmrg fi 1491b85037dbSmrg $RM conftest* 1492b85037dbSmrg]) 1493b85037dbSmrg 1494b85037dbSmrgif test x"[$]$2" = xyes; then 1495b85037dbSmrg m4_if([$5], , :, [$5]) 1496b85037dbSmrgelse 1497b85037dbSmrg m4_if([$6], , :, [$6]) 1498b85037dbSmrgfi 1499b85037dbSmrg])# _LT_COMPILER_OPTION 1500b85037dbSmrg 1501b85037dbSmrg# Old name: 1502b85037dbSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1503b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 1504b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1505b85037dbSmrg 1506b85037dbSmrg 1507b85037dbSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1508b85037dbSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1509b85037dbSmrg# ---------------------------------------------------- 1510b85037dbSmrg# Check whether the given linker option works 1511b85037dbSmrgAC_DEFUN([_LT_LINKER_OPTION], 1512b85037dbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1513b85037dbSmrgm4_require([_LT_DECL_SED])dnl 1514b85037dbSmrgAC_CACHE_CHECK([$1], [$2], 1515b85037dbSmrg [$2=no 1516b85037dbSmrg save_LDFLAGS="$LDFLAGS" 1517b85037dbSmrg LDFLAGS="$LDFLAGS $3" 1518b85037dbSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1519b85037dbSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1520b85037dbSmrg # The linker can only warn and ignore the option if not recognized 1521b85037dbSmrg # So say no if there are warnings 1522b85037dbSmrg if test -s conftest.err; then 1523b85037dbSmrg # Append any errors to the config.log. 1524b85037dbSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1525b85037dbSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1526b85037dbSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1527b85037dbSmrg if diff conftest.exp conftest.er2 >/dev/null; then 1528b85037dbSmrg $2=yes 1529b85037dbSmrg fi 1530b85037dbSmrg else 1531b85037dbSmrg $2=yes 1532b85037dbSmrg fi 1533b85037dbSmrg fi 1534b85037dbSmrg $RM -r conftest* 1535b85037dbSmrg LDFLAGS="$save_LDFLAGS" 1536b85037dbSmrg]) 1537b85037dbSmrg 1538b85037dbSmrgif test x"[$]$2" = xyes; then 1539b85037dbSmrg m4_if([$4], , :, [$4]) 1540b85037dbSmrgelse 1541b85037dbSmrg m4_if([$5], , :, [$5]) 1542b85037dbSmrgfi 1543b85037dbSmrg])# _LT_LINKER_OPTION 1544b85037dbSmrg 1545b85037dbSmrg# Old name: 1546b85037dbSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1547b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 1548b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1549b85037dbSmrg 1550b85037dbSmrg 1551b85037dbSmrg# LT_CMD_MAX_LEN 1552b85037dbSmrg#--------------- 1553b85037dbSmrgAC_DEFUN([LT_CMD_MAX_LEN], 1554b85037dbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1555b85037dbSmrg# find the maximum length of command line arguments 1556b85037dbSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1557b85037dbSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1558b85037dbSmrg i=0 1559b85037dbSmrg teststring="ABCD" 1560b85037dbSmrg 1561b85037dbSmrg case $build_os in 1562b85037dbSmrg msdosdjgpp*) 1563b85037dbSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1564b85037dbSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1565b85037dbSmrg # during glob expansion). Even if it were fixed, the result of this 1566b85037dbSmrg # check would be larger than it should be. 1567b85037dbSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1568b85037dbSmrg ;; 1569b85037dbSmrg 1570b85037dbSmrg gnu*) 1571b85037dbSmrg # Under GNU Hurd, this test is not required because there is 1572b85037dbSmrg # no limit to the length of command line arguments. 1573b85037dbSmrg # Libtool will interpret -1 as no limit whatsoever 1574b85037dbSmrg lt_cv_sys_max_cmd_len=-1; 1575b85037dbSmrg ;; 1576b85037dbSmrg 1577b85037dbSmrg cygwin* | mingw* | cegcc*) 1578b85037dbSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1579b85037dbSmrg # about 5 minutes as the teststring grows exponentially. 1580b85037dbSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 1581b85037dbSmrg # you end up with a "frozen" computer, even though with patience 1582b85037dbSmrg # the test eventually succeeds (with a max line length of 256k). 1583b85037dbSmrg # Instead, let's just punt: use the minimum linelength reported by 1584b85037dbSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 1585b85037dbSmrg lt_cv_sys_max_cmd_len=8192; 1586b85037dbSmrg ;; 1587b85037dbSmrg 1588b85037dbSmrg mint*) 1589b85037dbSmrg # On MiNT this can take a long time and run out of memory. 1590b85037dbSmrg lt_cv_sys_max_cmd_len=8192; 1591b85037dbSmrg ;; 1592b85037dbSmrg 1593b85037dbSmrg amigaos*) 1594b85037dbSmrg # On AmigaOS with pdksh, this test takes hours, literally. 1595b85037dbSmrg # So we just punt and use a minimum line length of 8192. 1596b85037dbSmrg lt_cv_sys_max_cmd_len=8192; 1597b85037dbSmrg ;; 1598b85037dbSmrg 1599b85037dbSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1600b85037dbSmrg # This has been around since 386BSD, at least. Likely further. 1601b85037dbSmrg if test -x /sbin/sysctl; then 1602b85037dbSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1603b85037dbSmrg elif test -x /usr/sbin/sysctl; then 1604b85037dbSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1605b85037dbSmrg else 1606b85037dbSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1607b85037dbSmrg fi 1608b85037dbSmrg # And add a safety zone 1609b85037dbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1610b85037dbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1611b85037dbSmrg ;; 1612b85037dbSmrg 1613b85037dbSmrg interix*) 1614b85037dbSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1615b85037dbSmrg lt_cv_sys_max_cmd_len=196608 1616b85037dbSmrg ;; 1617b85037dbSmrg 1618b85037dbSmrg osf*) 1619b85037dbSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1620b85037dbSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1621b85037dbSmrg # nice to cause kernel panics so lets avoid the loop below. 1622b85037dbSmrg # First set a reasonable default. 1623b85037dbSmrg lt_cv_sys_max_cmd_len=16384 1624b85037dbSmrg # 1625b85037dbSmrg if test -x /sbin/sysconfig; then 1626b85037dbSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1627b85037dbSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1628b85037dbSmrg esac 1629b85037dbSmrg fi 1630b85037dbSmrg ;; 1631b85037dbSmrg sco3.2v5*) 1632b85037dbSmrg lt_cv_sys_max_cmd_len=102400 1633b85037dbSmrg ;; 1634b85037dbSmrg sysv5* | sco5v6* | sysv4.2uw2*) 1635b85037dbSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1636b85037dbSmrg if test -n "$kargmax"; then 1637b85037dbSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1638b85037dbSmrg else 1639b85037dbSmrg lt_cv_sys_max_cmd_len=32768 1640b85037dbSmrg fi 1641b85037dbSmrg ;; 1642b85037dbSmrg *) 1643b85037dbSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1644b85037dbSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 1645b85037dbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1646b85037dbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1647b85037dbSmrg else 1648b85037dbSmrg # Make teststring a little bigger before we do anything with it. 1649b85037dbSmrg # a 1K string should be a reasonable start. 1650b85037dbSmrg for i in 1 2 3 4 5 6 7 8 ; do 1651b85037dbSmrg teststring=$teststring$teststring 1652b85037dbSmrg done 1653b85037dbSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1654b85037dbSmrg # If test is not a shell built-in, we'll probably end up computing a 1655b85037dbSmrg # maximum length that is only half of the actual maximum length, but 1656b85037dbSmrg # we can't tell. 1657b85037dbSmrg while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 1658b85037dbSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1659b85037dbSmrg test $i != 17 # 1/2 MB should be enough 1660b85037dbSmrg do 1661b85037dbSmrg i=`expr $i + 1` 1662b85037dbSmrg teststring=$teststring$teststring 1663b85037dbSmrg done 1664b85037dbSmrg # Only check the string length outside the loop. 1665b85037dbSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1666b85037dbSmrg teststring= 1667b85037dbSmrg # Add a significant safety factor because C++ compilers can tack on 1668b85037dbSmrg # massive amounts of additional arguments before passing them to the 1669b85037dbSmrg # linker. It appears as though 1/2 is a usable value. 1670b85037dbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1671b85037dbSmrg fi 1672b85037dbSmrg ;; 1673b85037dbSmrg esac 1674b85037dbSmrg]) 1675b85037dbSmrgif test -n $lt_cv_sys_max_cmd_len ; then 1676b85037dbSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1677b85037dbSmrgelse 1678b85037dbSmrg AC_MSG_RESULT(none) 1679b85037dbSmrgfi 1680b85037dbSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1681b85037dbSmrg_LT_DECL([], [max_cmd_len], [0], 1682b85037dbSmrg [What is the maximum length of a command?]) 1683b85037dbSmrg])# LT_CMD_MAX_LEN 1684b85037dbSmrg 1685b85037dbSmrg# Old name: 1686b85037dbSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1687b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 1688b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1689b85037dbSmrg 1690b85037dbSmrg 1691b85037dbSmrg# _LT_HEADER_DLFCN 1692b85037dbSmrg# ---------------- 1693b85037dbSmrgm4_defun([_LT_HEADER_DLFCN], 1694b85037dbSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1695b85037dbSmrg])# _LT_HEADER_DLFCN 1696b85037dbSmrg 1697b85037dbSmrg 1698b85037dbSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1699b85037dbSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1700b85037dbSmrg# ---------------------------------------------------------------- 1701b85037dbSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 1702b85037dbSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1703b85037dbSmrgif test "$cross_compiling" = yes; then : 1704b85037dbSmrg [$4] 1705b85037dbSmrgelse 1706b85037dbSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1707b85037dbSmrg lt_status=$lt_dlunknown 1708b85037dbSmrg cat > conftest.$ac_ext <<_LT_EOF 1709b85037dbSmrg[#line $LINENO "configure" 1710b85037dbSmrg#include "confdefs.h" 1711b85037dbSmrg 1712b85037dbSmrg#if HAVE_DLFCN_H 1713b85037dbSmrg#include <dlfcn.h> 1714b85037dbSmrg#endif 1715b85037dbSmrg 1716b85037dbSmrg#include <stdio.h> 1717b85037dbSmrg 1718b85037dbSmrg#ifdef RTLD_GLOBAL 1719b85037dbSmrg# define LT_DLGLOBAL RTLD_GLOBAL 1720b85037dbSmrg#else 1721b85037dbSmrg# ifdef DL_GLOBAL 1722b85037dbSmrg# define LT_DLGLOBAL DL_GLOBAL 1723b85037dbSmrg# else 1724b85037dbSmrg# define LT_DLGLOBAL 0 1725b85037dbSmrg# endif 1726b85037dbSmrg#endif 1727b85037dbSmrg 1728b85037dbSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1729b85037dbSmrg find out it does not work in some platform. */ 1730b85037dbSmrg#ifndef LT_DLLAZY_OR_NOW 1731b85037dbSmrg# ifdef RTLD_LAZY 1732b85037dbSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1733b85037dbSmrg# else 1734b85037dbSmrg# ifdef DL_LAZY 1735b85037dbSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 1736b85037dbSmrg# else 1737b85037dbSmrg# ifdef RTLD_NOW 1738b85037dbSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1739b85037dbSmrg# else 1740b85037dbSmrg# ifdef DL_NOW 1741b85037dbSmrg# define LT_DLLAZY_OR_NOW DL_NOW 1742b85037dbSmrg# else 1743b85037dbSmrg# define LT_DLLAZY_OR_NOW 0 1744b85037dbSmrg# endif 1745b85037dbSmrg# endif 1746b85037dbSmrg# endif 1747b85037dbSmrg# endif 1748b85037dbSmrg#endif 1749b85037dbSmrg 1750b85037dbSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 1751b85037dbSmrg correspondingly for the symbols needed. */ 1752b85037dbSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1753302b15bdSmrgint fnord () __attribute__((visibility("default"))); 1754b85037dbSmrg#endif 1755b85037dbSmrg 1756302b15bdSmrgint fnord () { return 42; } 1757b85037dbSmrgint main () 1758b85037dbSmrg{ 1759b85037dbSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1760b85037dbSmrg int status = $lt_dlunknown; 1761b85037dbSmrg 1762b85037dbSmrg if (self) 1763b85037dbSmrg { 1764b85037dbSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1765b85037dbSmrg else 1766b85037dbSmrg { 1767b85037dbSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1768b85037dbSmrg else puts (dlerror ()); 1769b85037dbSmrg } 1770b85037dbSmrg /* dlclose (self); */ 1771b85037dbSmrg } 1772b85037dbSmrg else 1773b85037dbSmrg puts (dlerror ()); 1774b85037dbSmrg 1775b85037dbSmrg return status; 1776b85037dbSmrg}] 1777b85037dbSmrg_LT_EOF 1778b85037dbSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1779b85037dbSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1780b85037dbSmrg lt_status=$? 1781b85037dbSmrg case x$lt_status in 1782b85037dbSmrg x$lt_dlno_uscore) $1 ;; 1783b85037dbSmrg x$lt_dlneed_uscore) $2 ;; 1784b85037dbSmrg x$lt_dlunknown|x*) $3 ;; 1785b85037dbSmrg esac 1786b85037dbSmrg else : 1787b85037dbSmrg # compilation failed 1788b85037dbSmrg $3 1789b85037dbSmrg fi 1790b85037dbSmrgfi 1791b85037dbSmrgrm -fr conftest* 1792b85037dbSmrg])# _LT_TRY_DLOPEN_SELF 1793b85037dbSmrg 1794b85037dbSmrg 1795b85037dbSmrg# LT_SYS_DLOPEN_SELF 1796b85037dbSmrg# ------------------ 1797b85037dbSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1798b85037dbSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1799b85037dbSmrgif test "x$enable_dlopen" != xyes; then 1800b85037dbSmrg enable_dlopen=unknown 1801b85037dbSmrg enable_dlopen_self=unknown 1802b85037dbSmrg enable_dlopen_self_static=unknown 1803b85037dbSmrgelse 1804b85037dbSmrg lt_cv_dlopen=no 1805b85037dbSmrg lt_cv_dlopen_libs= 1806b85037dbSmrg 1807b85037dbSmrg case $host_os in 1808b85037dbSmrg beos*) 1809b85037dbSmrg lt_cv_dlopen="load_add_on" 1810b85037dbSmrg lt_cv_dlopen_libs= 1811b85037dbSmrg lt_cv_dlopen_self=yes 1812b85037dbSmrg ;; 1813b85037dbSmrg 1814b85037dbSmrg mingw* | pw32* | cegcc*) 1815b85037dbSmrg lt_cv_dlopen="LoadLibrary" 1816b85037dbSmrg lt_cv_dlopen_libs= 1817b85037dbSmrg ;; 1818b85037dbSmrg 1819b85037dbSmrg cygwin*) 1820b85037dbSmrg lt_cv_dlopen="dlopen" 1821b85037dbSmrg lt_cv_dlopen_libs= 1822b85037dbSmrg ;; 1823b85037dbSmrg 1824b85037dbSmrg darwin*) 1825b85037dbSmrg # if libdl is installed we need to link against it 1826b85037dbSmrg AC_CHECK_LIB([dl], [dlopen], 1827b85037dbSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1828b85037dbSmrg lt_cv_dlopen="dyld" 1829b85037dbSmrg lt_cv_dlopen_libs= 1830b85037dbSmrg lt_cv_dlopen_self=yes 1831b85037dbSmrg ]) 1832b85037dbSmrg ;; 1833b85037dbSmrg 1834b85037dbSmrg *) 1835b85037dbSmrg AC_CHECK_FUNC([shl_load], 1836b85037dbSmrg [lt_cv_dlopen="shl_load"], 1837b85037dbSmrg [AC_CHECK_LIB([dld], [shl_load], 1838b85037dbSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1839b85037dbSmrg [AC_CHECK_FUNC([dlopen], 1840b85037dbSmrg [lt_cv_dlopen="dlopen"], 1841b85037dbSmrg [AC_CHECK_LIB([dl], [dlopen], 1842b85037dbSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1843b85037dbSmrg [AC_CHECK_LIB([svld], [dlopen], 1844b85037dbSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1845b85037dbSmrg [AC_CHECK_LIB([dld], [dld_link], 1846b85037dbSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1847b85037dbSmrg ]) 1848b85037dbSmrg ]) 1849b85037dbSmrg ]) 1850b85037dbSmrg ]) 1851b85037dbSmrg ]) 1852b85037dbSmrg ;; 1853b85037dbSmrg esac 1854b85037dbSmrg 1855b85037dbSmrg if test "x$lt_cv_dlopen" != xno; then 1856b85037dbSmrg enable_dlopen=yes 1857b85037dbSmrg else 1858b85037dbSmrg enable_dlopen=no 1859b85037dbSmrg fi 1860b85037dbSmrg 1861b85037dbSmrg case $lt_cv_dlopen in 1862b85037dbSmrg dlopen) 1863b85037dbSmrg save_CPPFLAGS="$CPPFLAGS" 1864b85037dbSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1865b85037dbSmrg 1866b85037dbSmrg save_LDFLAGS="$LDFLAGS" 1867b85037dbSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1868b85037dbSmrg 1869b85037dbSmrg save_LIBS="$LIBS" 1870b85037dbSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 1871b85037dbSmrg 1872b85037dbSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 1873b85037dbSmrg lt_cv_dlopen_self, [dnl 1874b85037dbSmrg _LT_TRY_DLOPEN_SELF( 1875b85037dbSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1876b85037dbSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1877b85037dbSmrg ]) 1878b85037dbSmrg 1879b85037dbSmrg if test "x$lt_cv_dlopen_self" = xyes; then 1880b85037dbSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1881b85037dbSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1882b85037dbSmrg lt_cv_dlopen_self_static, [dnl 1883b85037dbSmrg _LT_TRY_DLOPEN_SELF( 1884b85037dbSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1885b85037dbSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1886b85037dbSmrg ]) 1887b85037dbSmrg fi 1888b85037dbSmrg 1889b85037dbSmrg CPPFLAGS="$save_CPPFLAGS" 1890b85037dbSmrg LDFLAGS="$save_LDFLAGS" 1891b85037dbSmrg LIBS="$save_LIBS" 1892b85037dbSmrg ;; 1893b85037dbSmrg esac 1894b85037dbSmrg 1895b85037dbSmrg case $lt_cv_dlopen_self in 1896b85037dbSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1897b85037dbSmrg *) enable_dlopen_self=unknown ;; 1898b85037dbSmrg esac 1899b85037dbSmrg 1900b85037dbSmrg case $lt_cv_dlopen_self_static in 1901b85037dbSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1902b85037dbSmrg *) enable_dlopen_self_static=unknown ;; 1903b85037dbSmrg esac 1904b85037dbSmrgfi 1905b85037dbSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1906b85037dbSmrg [Whether dlopen is supported]) 1907b85037dbSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1908b85037dbSmrg [Whether dlopen of programs is supported]) 1909b85037dbSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1910b85037dbSmrg [Whether dlopen of statically linked programs is supported]) 1911b85037dbSmrg])# LT_SYS_DLOPEN_SELF 1912b85037dbSmrg 1913b85037dbSmrg# Old name: 1914b85037dbSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1915b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 1916b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1917b85037dbSmrg 1918b85037dbSmrg 1919b85037dbSmrg# _LT_COMPILER_C_O([TAGNAME]) 1920b85037dbSmrg# --------------------------- 1921b85037dbSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 1922b85037dbSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1923b85037dbSmrgm4_defun([_LT_COMPILER_C_O], 1924b85037dbSmrg[m4_require([_LT_DECL_SED])dnl 1925b85037dbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1926b85037dbSmrgm4_require([_LT_TAG_COMPILER])dnl 1927b85037dbSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1928b85037dbSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1929b85037dbSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1930b85037dbSmrg $RM -r conftest 2>/dev/null 1931b85037dbSmrg mkdir conftest 1932b85037dbSmrg cd conftest 1933b85037dbSmrg mkdir out 1934b85037dbSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1935b85037dbSmrg 1936b85037dbSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1937b85037dbSmrg # Insert the option either (1) after the last *FLAGS variable, or 1938b85037dbSmrg # (2) before a word containing "conftest.", or (3) at the end. 1939b85037dbSmrg # Note that $ac_compile itself does not contain backslashes and begins 1940b85037dbSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1941b85037dbSmrg lt_compile=`echo "$ac_compile" | $SED \ 1942b85037dbSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1943b85037dbSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1944b85037dbSmrg -e 's:$: $lt_compiler_flag:'` 1945b85037dbSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1946b85037dbSmrg (eval "$lt_compile" 2>out/conftest.err) 1947b85037dbSmrg ac_status=$? 1948b85037dbSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 1949b85037dbSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1950b85037dbSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 1951b85037dbSmrg then 1952b85037dbSmrg # The compiler can only warn and ignore the option if not recognized 1953b85037dbSmrg # So say no if there are warnings 1954b85037dbSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 1955b85037dbSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1956b85037dbSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1957b85037dbSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1958b85037dbSmrg fi 1959b85037dbSmrg fi 1960b85037dbSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1961b85037dbSmrg $RM conftest* 1962b85037dbSmrg # SGI C++ compiler will create directory out/ii_files/ for 1963b85037dbSmrg # template instantiation 1964b85037dbSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 1965b85037dbSmrg $RM out/* && rmdir out 1966b85037dbSmrg cd .. 1967b85037dbSmrg $RM -r conftest 1968b85037dbSmrg $RM conftest* 1969b85037dbSmrg]) 1970b85037dbSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 1971b85037dbSmrg [Does compiler simultaneously support -c and -o options?]) 1972b85037dbSmrg])# _LT_COMPILER_C_O 1973b85037dbSmrg 1974b85037dbSmrg 1975b85037dbSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 1976b85037dbSmrg# ---------------------------------- 1977b85037dbSmrg# Check to see if we can do hard links to lock some files if needed 1978b85037dbSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 1979b85037dbSmrg[m4_require([_LT_ENABLE_LOCK])dnl 1980b85037dbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1981b85037dbSmrg_LT_COMPILER_C_O([$1]) 1982b85037dbSmrg 1983b85037dbSmrghard_links="nottested" 1984b85037dbSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1985b85037dbSmrg # do not overwrite the value of need_locks provided by the user 1986b85037dbSmrg AC_MSG_CHECKING([if we can lock with hard links]) 1987b85037dbSmrg hard_links=yes 1988b85037dbSmrg $RM conftest* 1989b85037dbSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1990b85037dbSmrg touch conftest.a 1991b85037dbSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 1992b85037dbSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1993b85037dbSmrg AC_MSG_RESULT([$hard_links]) 1994b85037dbSmrg if test "$hard_links" = no; then 1995b85037dbSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1996b85037dbSmrg need_locks=warn 1997b85037dbSmrg fi 1998b85037dbSmrgelse 1999b85037dbSmrg need_locks=no 2000b85037dbSmrgfi 2001b85037dbSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2002b85037dbSmrg])# _LT_COMPILER_FILE_LOCKS 2003b85037dbSmrg 2004b85037dbSmrg 2005b85037dbSmrg# _LT_CHECK_OBJDIR 2006b85037dbSmrg# ---------------- 2007b85037dbSmrgm4_defun([_LT_CHECK_OBJDIR], 2008b85037dbSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2009b85037dbSmrg[rm -f .libs 2>/dev/null 2010b85037dbSmrgmkdir .libs 2>/dev/null 2011b85037dbSmrgif test -d .libs; then 2012b85037dbSmrg lt_cv_objdir=.libs 2013b85037dbSmrgelse 2014b85037dbSmrg # MS-DOS does not allow filenames that begin with a dot. 2015b85037dbSmrg lt_cv_objdir=_libs 2016b85037dbSmrgfi 2017b85037dbSmrgrmdir .libs 2>/dev/null]) 2018b85037dbSmrgobjdir=$lt_cv_objdir 2019b85037dbSmrg_LT_DECL([], [objdir], [0], 2020b85037dbSmrg [The name of the directory that contains temporary libtool files])dnl 2021b85037dbSmrgm4_pattern_allow([LT_OBJDIR])dnl 2022b85037dbSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2023b85037dbSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2024b85037dbSmrg])# _LT_CHECK_OBJDIR 2025b85037dbSmrg 2026b85037dbSmrg 2027b85037dbSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2028b85037dbSmrg# -------------------------------------- 2029b85037dbSmrg# Check hardcoding attributes. 2030b85037dbSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2031b85037dbSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2032b85037dbSmrg_LT_TAGVAR(hardcode_action, $1)= 2033b85037dbSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2034b85037dbSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2035b85037dbSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2036b85037dbSmrg 2037b85037dbSmrg # We can hardcode non-existent directories. 2038b85037dbSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 2039b85037dbSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2040b85037dbSmrg # have to relink, otherwise we might link with an installed library 2041b85037dbSmrg # when we should be linking with a yet-to-be-installed one 2042b85037dbSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2043b85037dbSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 2044b85037dbSmrg # Linking always hardcodes the temporary library directory. 2045b85037dbSmrg _LT_TAGVAR(hardcode_action, $1)=relink 2046b85037dbSmrg else 2047b85037dbSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2048b85037dbSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 2049b85037dbSmrg fi 2050b85037dbSmrgelse 2051b85037dbSmrg # We cannot hardcode anything, or else we can only hardcode existing 2052b85037dbSmrg # directories. 2053b85037dbSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2054b85037dbSmrgfi 2055b85037dbSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2056b85037dbSmrg 2057b85037dbSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2058b85037dbSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2059b85037dbSmrg # Fast installation is not supported 2060b85037dbSmrg enable_fast_install=no 2061b85037dbSmrgelif test "$shlibpath_overrides_runpath" = yes || 2062b85037dbSmrg test "$enable_shared" = no; then 2063b85037dbSmrg # Fast installation is not necessary 2064b85037dbSmrg enable_fast_install=needless 2065b85037dbSmrgfi 2066b85037dbSmrg_LT_TAGDECL([], [hardcode_action], [0], 2067b85037dbSmrg [How to hardcode a shared library path into an executable]) 2068b85037dbSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2069b85037dbSmrg 2070b85037dbSmrg 2071b85037dbSmrg# _LT_CMD_STRIPLIB 2072b85037dbSmrg# ---------------- 2073b85037dbSmrgm4_defun([_LT_CMD_STRIPLIB], 2074b85037dbSmrg[m4_require([_LT_DECL_EGREP]) 2075b85037dbSmrgstriplib= 2076b85037dbSmrgold_striplib= 2077b85037dbSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2078b85037dbSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2079b85037dbSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2080b85037dbSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2081b85037dbSmrg AC_MSG_RESULT([yes]) 2082b85037dbSmrgelse 2083b85037dbSmrg# FIXME - insert some real tests, host_os isn't really good enough 2084b85037dbSmrg case $host_os in 2085b85037dbSmrg darwin*) 2086b85037dbSmrg if test -n "$STRIP" ; then 2087b85037dbSmrg striplib="$STRIP -x" 2088b85037dbSmrg old_striplib="$STRIP -S" 2089b85037dbSmrg AC_MSG_RESULT([yes]) 2090b85037dbSmrg else 2091b85037dbSmrg AC_MSG_RESULT([no]) 2092b85037dbSmrg fi 2093b85037dbSmrg ;; 2094b85037dbSmrg *) 2095b85037dbSmrg AC_MSG_RESULT([no]) 2096b85037dbSmrg ;; 2097b85037dbSmrg esac 2098b85037dbSmrgfi 2099b85037dbSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2100b85037dbSmrg_LT_DECL([], [striplib], [1]) 2101b85037dbSmrg])# _LT_CMD_STRIPLIB 2102b85037dbSmrg 2103b85037dbSmrg 2104b85037dbSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2105b85037dbSmrg# ----------------------------- 2106b85037dbSmrg# PORTME Fill in your ld.so characteristics 2107b85037dbSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2108b85037dbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2109b85037dbSmrgm4_require([_LT_DECL_EGREP])dnl 2110b85037dbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2111b85037dbSmrgm4_require([_LT_DECL_OBJDUMP])dnl 2112b85037dbSmrgm4_require([_LT_DECL_SED])dnl 2113b85037dbSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2114b85037dbSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2115b85037dbSmrgm4_if([$1], 2116b85037dbSmrg [], [ 2117b85037dbSmrgif test "$GCC" = yes; then 2118b85037dbSmrg case $host_os in 2119b85037dbSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2120b85037dbSmrg *) lt_awk_arg="/^libraries:/" ;; 2121b85037dbSmrg esac 2122b85037dbSmrg case $host_os in 2123b85037dbSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2124b85037dbSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 2125b85037dbSmrg esac 2126b85037dbSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2127b85037dbSmrg case $lt_search_path_spec in 2128b85037dbSmrg *\;*) 2129b85037dbSmrg # if the path contains ";" then we assume it to be the separator 2130b85037dbSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2131b85037dbSmrg # assumed that no part of a normal pathname contains ";" but that should 2132b85037dbSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2133b85037dbSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2134b85037dbSmrg ;; 2135b85037dbSmrg *) 2136b85037dbSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2137b85037dbSmrg ;; 2138b85037dbSmrg esac 2139b85037dbSmrg # Ok, now we have the path, separated by spaces, we can step through it 2140b85037dbSmrg # and add multilib dir if necessary. 2141b85037dbSmrg lt_tmp_lt_search_path_spec= 2142b85037dbSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2143b85037dbSmrg for lt_sys_path in $lt_search_path_spec; do 2144b85037dbSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2145b85037dbSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2146b85037dbSmrg else 2147b85037dbSmrg test -d "$lt_sys_path" && \ 2148b85037dbSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2149b85037dbSmrg fi 2150b85037dbSmrg done 2151b85037dbSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2152b85037dbSmrgBEGIN {RS=" "; FS="/|\n";} { 2153b85037dbSmrg lt_foo=""; 2154b85037dbSmrg lt_count=0; 2155b85037dbSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 2156b85037dbSmrg if ($lt_i != "" && $lt_i != ".") { 2157b85037dbSmrg if ($lt_i == "..") { 2158b85037dbSmrg lt_count++; 2159b85037dbSmrg } else { 2160b85037dbSmrg if (lt_count == 0) { 2161b85037dbSmrg lt_foo="/" $lt_i lt_foo; 2162b85037dbSmrg } else { 2163b85037dbSmrg lt_count--; 2164b85037dbSmrg } 2165b85037dbSmrg } 2166b85037dbSmrg } 2167b85037dbSmrg } 2168b85037dbSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2169b85037dbSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2170b85037dbSmrg}'` 2171b85037dbSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 2172b85037dbSmrg # for these hosts. 2173b85037dbSmrg case $host_os in 2174b85037dbSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2175b85037dbSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2176b85037dbSmrg esac 2177b85037dbSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2178b85037dbSmrgelse 2179b85037dbSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2180b85037dbSmrgfi]) 2181b85037dbSmrglibrary_names_spec= 2182b85037dbSmrglibname_spec='lib$name' 2183b85037dbSmrgsoname_spec= 2184b85037dbSmrgshrext_cmds=".so" 2185b85037dbSmrgpostinstall_cmds= 2186b85037dbSmrgpostuninstall_cmds= 2187b85037dbSmrgfinish_cmds= 2188b85037dbSmrgfinish_eval= 2189b85037dbSmrgshlibpath_var= 2190b85037dbSmrgshlibpath_overrides_runpath=unknown 2191b85037dbSmrgversion_type=none 2192b85037dbSmrgdynamic_linker="$host_os ld.so" 2193b85037dbSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2194b85037dbSmrgneed_lib_prefix=unknown 2195b85037dbSmrghardcode_into_libs=no 2196b85037dbSmrg 2197b85037dbSmrg# when you set need_version to no, make sure it does not cause -set_version 2198b85037dbSmrg# flags to be left without arguments 2199b85037dbSmrgneed_version=unknown 2200b85037dbSmrg 2201b85037dbSmrgcase $host_os in 2202b85037dbSmrgaix3*) 2203b85037dbSmrg version_type=linux 2204b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2205b85037dbSmrg shlibpath_var=LIBPATH 2206b85037dbSmrg 2207b85037dbSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2208b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2209b85037dbSmrg ;; 2210b85037dbSmrg 2211b85037dbSmrgaix[[4-9]]*) 2212b85037dbSmrg version_type=linux 2213b85037dbSmrg need_lib_prefix=no 2214b85037dbSmrg need_version=no 2215b85037dbSmrg hardcode_into_libs=yes 2216b85037dbSmrg if test "$host_cpu" = ia64; then 2217b85037dbSmrg # AIX 5 supports IA64 2218b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2219b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2220b85037dbSmrg else 2221b85037dbSmrg # With GCC up to 2.95.x, collect2 would create an import file 2222b85037dbSmrg # for dependence libraries. The import file would start with 2223b85037dbSmrg # the line `#! .'. This would cause the generated library to 2224b85037dbSmrg # depend on `.', always an invalid library. This was fixed in 2225b85037dbSmrg # development snapshots of GCC prior to 3.0. 2226b85037dbSmrg case $host_os in 2227b85037dbSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2228b85037dbSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2229b85037dbSmrg echo ' yes ' 2230b85037dbSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2231b85037dbSmrg : 2232b85037dbSmrg else 2233b85037dbSmrg can_build_shared=no 2234b85037dbSmrg fi 2235b85037dbSmrg ;; 2236b85037dbSmrg esac 2237b85037dbSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2238b85037dbSmrg # soname into executable. Probably we can add versioning support to 2239b85037dbSmrg # collect2, so additional links can be useful in future. 2240b85037dbSmrg if test "$aix_use_runtimelinking" = yes; then 2241b85037dbSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2242b85037dbSmrg # instead of lib<name>.a to let people know that these are not 2243b85037dbSmrg # typical AIX shared libraries. 2244b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2245b85037dbSmrg else 2246b85037dbSmrg # We preserve .a as extension for shared libraries through AIX4.2 2247b85037dbSmrg # and later when we are not doing run time linking. 2248b85037dbSmrg library_names_spec='${libname}${release}.a $libname.a' 2249b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2250b85037dbSmrg fi 2251b85037dbSmrg shlibpath_var=LIBPATH 2252b85037dbSmrg fi 2253b85037dbSmrg ;; 2254b85037dbSmrg 2255b85037dbSmrgamigaos*) 2256b85037dbSmrg case $host_cpu in 2257b85037dbSmrg powerpc) 2258b85037dbSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2259b85037dbSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2260b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2261b85037dbSmrg ;; 2262b85037dbSmrg m68k) 2263b85037dbSmrg library_names_spec='$libname.ixlibrary $libname.a' 2264b85037dbSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2265b85037dbSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 2266b85037dbSmrg ;; 2267b85037dbSmrg esac 2268b85037dbSmrg ;; 2269b85037dbSmrg 2270b85037dbSmrgbeos*) 2271b85037dbSmrg library_names_spec='${libname}${shared_ext}' 2272b85037dbSmrg dynamic_linker="$host_os ld.so" 2273b85037dbSmrg shlibpath_var=LIBRARY_PATH 2274b85037dbSmrg ;; 2275b85037dbSmrg 2276b85037dbSmrgbsdi[[45]]*) 2277b85037dbSmrg version_type=linux 2278b85037dbSmrg need_version=no 2279b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2280b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2281b85037dbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2282b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2283b85037dbSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2284b85037dbSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2285b85037dbSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2286b85037dbSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2287b85037dbSmrg # libtool to hard-code these into programs 2288b85037dbSmrg ;; 2289b85037dbSmrg 2290b85037dbSmrgcygwin* | mingw* | pw32* | cegcc*) 2291b85037dbSmrg version_type=windows 2292b85037dbSmrg shrext_cmds=".dll" 2293b85037dbSmrg need_version=no 2294b85037dbSmrg need_lib_prefix=no 2295b85037dbSmrg 2296302b15bdSmrg case $GCC,$cc_basename in 2297302b15bdSmrg yes,*) 2298302b15bdSmrg # gcc 2299b85037dbSmrg library_names_spec='$libname.dll.a' 2300b85037dbSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2301b85037dbSmrg postinstall_cmds='base_file=`basename \${file}`~ 2302b85037dbSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2303b85037dbSmrg dldir=$destdir/`dirname \$dlpath`~ 2304b85037dbSmrg test -d \$dldir || mkdir -p \$dldir~ 2305b85037dbSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2306b85037dbSmrg chmod a+x \$dldir/$dlname~ 2307b85037dbSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2308b85037dbSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2309b85037dbSmrg fi' 2310b85037dbSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2311b85037dbSmrg dlpath=$dir/\$dldll~ 2312b85037dbSmrg $RM \$dlpath' 2313b85037dbSmrg shlibpath_overrides_runpath=yes 2314b85037dbSmrg 2315b85037dbSmrg case $host_os in 2316b85037dbSmrg cygwin*) 2317b85037dbSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2318b85037dbSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2319b85037dbSmrgm4_if([$1], [],[ 2320b85037dbSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2321b85037dbSmrg ;; 2322b85037dbSmrg mingw* | cegcc*) 2323b85037dbSmrg # MinGW DLLs use traditional 'lib' prefix 2324b85037dbSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2325b85037dbSmrg ;; 2326b85037dbSmrg pw32*) 2327b85037dbSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2328b85037dbSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2329b85037dbSmrg ;; 2330b85037dbSmrg esac 2331302b15bdSmrg dynamic_linker='Win32 ld.exe' 2332302b15bdSmrg ;; 2333302b15bdSmrg 2334302b15bdSmrg *,cl*) 2335302b15bdSmrg # Native MSVC 2336302b15bdSmrg libname_spec='$name' 2337302b15bdSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2338302b15bdSmrg library_names_spec='${libname}.dll.lib' 2339302b15bdSmrg 2340302b15bdSmrg case $build_os in 2341302b15bdSmrg mingw*) 2342302b15bdSmrg sys_lib_search_path_spec= 2343302b15bdSmrg lt_save_ifs=$IFS 2344302b15bdSmrg IFS=';' 2345302b15bdSmrg for lt_path in $LIB 2346302b15bdSmrg do 2347302b15bdSmrg IFS=$lt_save_ifs 2348302b15bdSmrg # Let DOS variable expansion print the short 8.3 style file name. 2349302b15bdSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2350302b15bdSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2351302b15bdSmrg done 2352302b15bdSmrg IFS=$lt_save_ifs 2353302b15bdSmrg # Convert to MSYS style. 2354302b15bdSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2355302b15bdSmrg ;; 2356302b15bdSmrg cygwin*) 2357302b15bdSmrg # Convert to unix form, then to dos form, then back to unix form 2358302b15bdSmrg # but this time dos style (no spaces!) so that the unix form looks 2359302b15bdSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 2360302b15bdSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2361302b15bdSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2362302b15bdSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2363302b15bdSmrg ;; 2364302b15bdSmrg *) 2365302b15bdSmrg sys_lib_search_path_spec="$LIB" 2366302b15bdSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2367302b15bdSmrg # It is most probably a Windows format PATH. 2368302b15bdSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2369302b15bdSmrg else 2370302b15bdSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2371302b15bdSmrg fi 2372302b15bdSmrg # FIXME: find the short name or the path components, as spaces are 2373302b15bdSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 2374302b15bdSmrg ;; 2375302b15bdSmrg esac 2376302b15bdSmrg 2377302b15bdSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2378302b15bdSmrg postinstall_cmds='base_file=`basename \${file}`~ 2379302b15bdSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2380302b15bdSmrg dldir=$destdir/`dirname \$dlpath`~ 2381302b15bdSmrg test -d \$dldir || mkdir -p \$dldir~ 2382302b15bdSmrg $install_prog $dir/$dlname \$dldir/$dlname' 2383302b15bdSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2384302b15bdSmrg dlpath=$dir/\$dldll~ 2385302b15bdSmrg $RM \$dlpath' 2386302b15bdSmrg shlibpath_overrides_runpath=yes 2387302b15bdSmrg dynamic_linker='Win32 link.exe' 2388b85037dbSmrg ;; 2389b85037dbSmrg 2390b85037dbSmrg *) 2391302b15bdSmrg # Assume MSVC wrapper 2392b85037dbSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2393302b15bdSmrg dynamic_linker='Win32 ld.exe' 2394b85037dbSmrg ;; 2395b85037dbSmrg esac 2396b85037dbSmrg # FIXME: first we should search . and the directory the executable is in 2397b85037dbSmrg shlibpath_var=PATH 2398b85037dbSmrg ;; 2399b85037dbSmrg 2400b85037dbSmrgdarwin* | rhapsody*) 2401b85037dbSmrg dynamic_linker="$host_os dyld" 2402b85037dbSmrg version_type=darwin 2403b85037dbSmrg need_lib_prefix=no 2404b85037dbSmrg need_version=no 2405b85037dbSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2406b85037dbSmrg soname_spec='${libname}${release}${major}$shared_ext' 2407b85037dbSmrg shlibpath_overrides_runpath=yes 2408b85037dbSmrg shlibpath_var=DYLD_LIBRARY_PATH 2409b85037dbSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2410b85037dbSmrgm4_if([$1], [],[ 2411b85037dbSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2412b85037dbSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2413b85037dbSmrg ;; 2414b85037dbSmrg 2415b85037dbSmrgdgux*) 2416b85037dbSmrg version_type=linux 2417b85037dbSmrg need_lib_prefix=no 2418b85037dbSmrg need_version=no 2419b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2420b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2421b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2422b85037dbSmrg ;; 2423b85037dbSmrg 2424b85037dbSmrgfreebsd1*) 2425b85037dbSmrg dynamic_linker=no 2426b85037dbSmrg ;; 2427b85037dbSmrg 2428b85037dbSmrgfreebsd* | dragonfly*) 2429b85037dbSmrg # DragonFly does not have aout. When/if they implement a new 2430b85037dbSmrg # versioning mechanism, adjust this. 2431b85037dbSmrg if test -x /usr/bin/objformat; then 2432b85037dbSmrg objformat=`/usr/bin/objformat` 2433b85037dbSmrg else 2434b85037dbSmrg case $host_os in 2435b85037dbSmrg freebsd[[123]]*) objformat=aout ;; 2436b85037dbSmrg *) objformat=elf ;; 2437b85037dbSmrg esac 2438b85037dbSmrg fi 2439b85037dbSmrg version_type=freebsd-$objformat 2440b85037dbSmrg case $version_type in 2441b85037dbSmrg freebsd-elf*) 2442b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2443b85037dbSmrg need_version=no 2444b85037dbSmrg need_lib_prefix=no 2445b85037dbSmrg ;; 2446b85037dbSmrg freebsd-*) 2447b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2448b85037dbSmrg need_version=yes 2449b85037dbSmrg ;; 2450b85037dbSmrg esac 2451b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2452b85037dbSmrg case $host_os in 2453b85037dbSmrg freebsd2*) 2454b85037dbSmrg shlibpath_overrides_runpath=yes 2455b85037dbSmrg ;; 2456b85037dbSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2457b85037dbSmrg shlibpath_overrides_runpath=yes 2458b85037dbSmrg hardcode_into_libs=yes 2459b85037dbSmrg ;; 2460b85037dbSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2461b85037dbSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2462b85037dbSmrg shlibpath_overrides_runpath=no 2463b85037dbSmrg hardcode_into_libs=yes 2464b85037dbSmrg ;; 2465b85037dbSmrg *) # from 4.6 on, and DragonFly 2466b85037dbSmrg shlibpath_overrides_runpath=yes 2467b85037dbSmrg hardcode_into_libs=yes 2468b85037dbSmrg ;; 2469b85037dbSmrg esac 2470b85037dbSmrg ;; 2471b85037dbSmrg 2472b85037dbSmrggnu*) 2473b85037dbSmrg version_type=linux 2474b85037dbSmrg need_lib_prefix=no 2475b85037dbSmrg need_version=no 2476b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2477b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2478b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2479b85037dbSmrg hardcode_into_libs=yes 2480b85037dbSmrg ;; 2481b85037dbSmrg 2482b85037dbSmrghaiku*) 2483b85037dbSmrg version_type=linux 2484b85037dbSmrg need_lib_prefix=no 2485b85037dbSmrg need_version=no 2486b85037dbSmrg dynamic_linker="$host_os runtime_loader" 2487b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2488b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2489b85037dbSmrg shlibpath_var=LIBRARY_PATH 2490b85037dbSmrg shlibpath_overrides_runpath=yes 2491b85037dbSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2492b85037dbSmrg hardcode_into_libs=yes 2493b85037dbSmrg ;; 2494b85037dbSmrg 2495b85037dbSmrghpux9* | hpux10* | hpux11*) 2496b85037dbSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2497b85037dbSmrg # link against other versions. 2498b85037dbSmrg version_type=sunos 2499b85037dbSmrg need_lib_prefix=no 2500b85037dbSmrg need_version=no 2501b85037dbSmrg case $host_cpu in 2502b85037dbSmrg ia64*) 2503b85037dbSmrg shrext_cmds='.so' 2504b85037dbSmrg hardcode_into_libs=yes 2505b85037dbSmrg dynamic_linker="$host_os dld.so" 2506b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2507b85037dbSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2508b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2509b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2510b85037dbSmrg if test "X$HPUX_IA64_MODE" = X32; then 2511b85037dbSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2512b85037dbSmrg else 2513b85037dbSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2514b85037dbSmrg fi 2515b85037dbSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2516b85037dbSmrg ;; 2517b85037dbSmrg hppa*64*) 2518b85037dbSmrg shrext_cmds='.sl' 2519b85037dbSmrg hardcode_into_libs=yes 2520b85037dbSmrg dynamic_linker="$host_os dld.sl" 2521b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2522b85037dbSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2523b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2524b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2525b85037dbSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2526b85037dbSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2527b85037dbSmrg ;; 2528b85037dbSmrg *) 2529b85037dbSmrg shrext_cmds='.sl' 2530b85037dbSmrg dynamic_linker="$host_os dld.sl" 2531b85037dbSmrg shlibpath_var=SHLIB_PATH 2532b85037dbSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2533b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2534b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2535b85037dbSmrg ;; 2536b85037dbSmrg esac 2537b85037dbSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2538b85037dbSmrg postinstall_cmds='chmod 555 $lib' 2539b85037dbSmrg # or fails outright, so override atomically: 2540b85037dbSmrg install_override_mode=555 2541b85037dbSmrg ;; 2542b85037dbSmrg 2543b85037dbSmrginterix[[3-9]]*) 2544b85037dbSmrg version_type=linux 2545b85037dbSmrg need_lib_prefix=no 2546b85037dbSmrg need_version=no 2547b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2548b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2549b85037dbSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2550b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2551b85037dbSmrg shlibpath_overrides_runpath=no 2552b85037dbSmrg hardcode_into_libs=yes 2553b85037dbSmrg ;; 2554b85037dbSmrg 2555b85037dbSmrgirix5* | irix6* | nonstopux*) 2556b85037dbSmrg case $host_os in 2557b85037dbSmrg nonstopux*) version_type=nonstopux ;; 2558b85037dbSmrg *) 2559b85037dbSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 2560b85037dbSmrg version_type=linux 2561b85037dbSmrg else 2562b85037dbSmrg version_type=irix 2563b85037dbSmrg fi ;; 2564b85037dbSmrg esac 2565b85037dbSmrg need_lib_prefix=no 2566b85037dbSmrg need_version=no 2567b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2568b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2569b85037dbSmrg case $host_os in 2570b85037dbSmrg irix5* | nonstopux*) 2571b85037dbSmrg libsuff= shlibsuff= 2572b85037dbSmrg ;; 2573b85037dbSmrg *) 2574b85037dbSmrg case $LD in # libtool.m4 will add one of these switches to LD 2575b85037dbSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2576b85037dbSmrg libsuff= shlibsuff= libmagic=32-bit;; 2577b85037dbSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2578b85037dbSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2579b85037dbSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2580b85037dbSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2581b85037dbSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2582b85037dbSmrg esac 2583b85037dbSmrg ;; 2584b85037dbSmrg esac 2585b85037dbSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2586b85037dbSmrg shlibpath_overrides_runpath=no 2587b85037dbSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2588b85037dbSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2589b85037dbSmrg hardcode_into_libs=yes 2590b85037dbSmrg ;; 2591b85037dbSmrg 2592b85037dbSmrg# No shared lib support for Linux oldld, aout, or coff. 2593b85037dbSmrglinux*oldld* | linux*aout* | linux*coff*) 2594b85037dbSmrg dynamic_linker=no 2595b85037dbSmrg ;; 2596b85037dbSmrg 2597b85037dbSmrg# This must be Linux ELF. 2598b85037dbSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 2599b85037dbSmrg version_type=linux 2600b85037dbSmrg need_lib_prefix=no 2601b85037dbSmrg need_version=no 2602b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2603b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2604b85037dbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2605b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2606b85037dbSmrg shlibpath_overrides_runpath=no 2607b85037dbSmrg 2608b85037dbSmrg # Some binutils ld are patched to set DT_RUNPATH 2609b85037dbSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2610b85037dbSmrg [lt_cv_shlibpath_overrides_runpath=no 2611b85037dbSmrg save_LDFLAGS=$LDFLAGS 2612b85037dbSmrg save_libdir=$libdir 2613b85037dbSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2614b85037dbSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2615b85037dbSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2616b85037dbSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2617b85037dbSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2618b85037dbSmrg LDFLAGS=$save_LDFLAGS 2619b85037dbSmrg libdir=$save_libdir 2620b85037dbSmrg ]) 2621b85037dbSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2622b85037dbSmrg 2623b85037dbSmrg # This implies no fast_install, which is unacceptable. 2624b85037dbSmrg # Some rework will be needed to allow for fast_install 2625b85037dbSmrg # before this can be enabled. 2626b85037dbSmrg hardcode_into_libs=yes 2627b85037dbSmrg 2628b85037dbSmrg # Add ABI-specific directories to the system library path. 2629b85037dbSmrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2630b85037dbSmrg 2631b85037dbSmrg # Append ld.so.conf contents to the search path 2632b85037dbSmrg if test -f /etc/ld.so.conf; then 2633b85037dbSmrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` 2634b85037dbSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2635b85037dbSmrg 2636b85037dbSmrg fi 2637b85037dbSmrg 2638b85037dbSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2639b85037dbSmrg # powerpc, because MkLinux only supported shared libraries with the 2640b85037dbSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2641b85037dbSmrg # most powerpc-linux boxes support dynamic linking these days and 2642b85037dbSmrg # people can always --disable-shared, the test was removed, and we 2643b85037dbSmrg # assume the GNU/Linux dynamic linker is in use. 2644b85037dbSmrg dynamic_linker='GNU/Linux ld.so' 2645b85037dbSmrg ;; 2646b85037dbSmrg 2647b85037dbSmrgnetbsd*) 2648b85037dbSmrg version_type=sunos 2649b85037dbSmrg need_lib_prefix=no 2650b85037dbSmrg need_version=no 2651b85037dbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2652b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2653b85037dbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2654b85037dbSmrg dynamic_linker='NetBSD (a.out) ld.so' 2655b85037dbSmrg else 2656b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2657b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2658b85037dbSmrg dynamic_linker='NetBSD ld.elf_so' 2659b85037dbSmrg fi 2660b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2661b85037dbSmrg shlibpath_overrides_runpath=yes 2662b85037dbSmrg hardcode_into_libs=yes 2663b85037dbSmrg ;; 2664b85037dbSmrg 2665b85037dbSmrgnewsos6) 2666b85037dbSmrg version_type=linux 2667b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2668b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2669b85037dbSmrg shlibpath_overrides_runpath=yes 2670b85037dbSmrg ;; 2671b85037dbSmrg 2672b85037dbSmrg*nto* | *qnx*) 2673b85037dbSmrg version_type=qnx 2674b85037dbSmrg need_lib_prefix=no 2675b85037dbSmrg need_version=no 2676b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2677b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2678b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2679b85037dbSmrg shlibpath_overrides_runpath=no 2680b85037dbSmrg hardcode_into_libs=yes 2681b85037dbSmrg dynamic_linker='ldqnx.so' 2682b85037dbSmrg ;; 2683b85037dbSmrg 2684b85037dbSmrgopenbsd*) 2685b85037dbSmrg version_type=sunos 2686b85037dbSmrg sys_lib_dlsearch_path_spec="/usr/lib" 2687b85037dbSmrg need_lib_prefix=no 2688b85037dbSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2689b85037dbSmrg case $host_os in 2690b85037dbSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2691b85037dbSmrg *) need_version=no ;; 2692b85037dbSmrg esac 2693b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2694b85037dbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2695b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2696b85037dbSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2697b85037dbSmrg case $host_os in 2698b85037dbSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 2699b85037dbSmrg shlibpath_overrides_runpath=no 2700b85037dbSmrg ;; 2701b85037dbSmrg *) 2702b85037dbSmrg shlibpath_overrides_runpath=yes 2703b85037dbSmrg ;; 2704b85037dbSmrg esac 2705b85037dbSmrg else 2706b85037dbSmrg shlibpath_overrides_runpath=yes 2707b85037dbSmrg fi 2708b85037dbSmrg ;; 2709b85037dbSmrg 2710b85037dbSmrgos2*) 2711b85037dbSmrg libname_spec='$name' 2712b85037dbSmrg shrext_cmds=".dll" 2713b85037dbSmrg need_lib_prefix=no 2714b85037dbSmrg library_names_spec='$libname${shared_ext} $libname.a' 2715b85037dbSmrg dynamic_linker='OS/2 ld.exe' 2716b85037dbSmrg shlibpath_var=LIBPATH 2717b85037dbSmrg ;; 2718b85037dbSmrg 2719b85037dbSmrgosf3* | osf4* | osf5*) 2720b85037dbSmrg version_type=osf 2721b85037dbSmrg need_lib_prefix=no 2722b85037dbSmrg need_version=no 2723b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2724b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2725b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2726b85037dbSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2727b85037dbSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2728b85037dbSmrg ;; 2729b85037dbSmrg 2730b85037dbSmrgrdos*) 2731b85037dbSmrg dynamic_linker=no 2732b85037dbSmrg ;; 2733b85037dbSmrg 2734b85037dbSmrgsolaris*) 2735b85037dbSmrg version_type=linux 2736b85037dbSmrg need_lib_prefix=no 2737b85037dbSmrg need_version=no 2738b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2739b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2740b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2741b85037dbSmrg shlibpath_overrides_runpath=yes 2742b85037dbSmrg hardcode_into_libs=yes 2743b85037dbSmrg # ldd complains unless libraries are executable 2744b85037dbSmrg postinstall_cmds='chmod +x $lib' 2745b85037dbSmrg ;; 2746b85037dbSmrg 2747b85037dbSmrgsunos4*) 2748b85037dbSmrg version_type=sunos 2749b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2750b85037dbSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2751b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2752b85037dbSmrg shlibpath_overrides_runpath=yes 2753b85037dbSmrg if test "$with_gnu_ld" = yes; then 2754b85037dbSmrg need_lib_prefix=no 2755b85037dbSmrg fi 2756b85037dbSmrg need_version=yes 2757b85037dbSmrg ;; 2758b85037dbSmrg 2759b85037dbSmrgsysv4 | sysv4.3*) 2760b85037dbSmrg version_type=linux 2761b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2762b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2763b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2764b85037dbSmrg case $host_vendor in 2765b85037dbSmrg sni) 2766b85037dbSmrg shlibpath_overrides_runpath=no 2767b85037dbSmrg need_lib_prefix=no 2768b85037dbSmrg runpath_var=LD_RUN_PATH 2769b85037dbSmrg ;; 2770b85037dbSmrg siemens) 2771b85037dbSmrg need_lib_prefix=no 2772b85037dbSmrg ;; 2773b85037dbSmrg motorola) 2774b85037dbSmrg need_lib_prefix=no 2775b85037dbSmrg need_version=no 2776b85037dbSmrg shlibpath_overrides_runpath=no 2777b85037dbSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2778b85037dbSmrg ;; 2779b85037dbSmrg esac 2780b85037dbSmrg ;; 2781b85037dbSmrg 2782b85037dbSmrgsysv4*MP*) 2783b85037dbSmrg if test -d /usr/nec ;then 2784b85037dbSmrg version_type=linux 2785b85037dbSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2786b85037dbSmrg soname_spec='$libname${shared_ext}.$major' 2787b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2788b85037dbSmrg fi 2789b85037dbSmrg ;; 2790b85037dbSmrg 2791b85037dbSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2792b85037dbSmrg version_type=freebsd-elf 2793b85037dbSmrg need_lib_prefix=no 2794b85037dbSmrg need_version=no 2795b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2796b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2797b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2798b85037dbSmrg shlibpath_overrides_runpath=yes 2799b85037dbSmrg hardcode_into_libs=yes 2800b85037dbSmrg if test "$with_gnu_ld" = yes; then 2801b85037dbSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2802b85037dbSmrg else 2803b85037dbSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2804b85037dbSmrg case $host_os in 2805b85037dbSmrg sco3.2v5*) 2806b85037dbSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2807b85037dbSmrg ;; 2808b85037dbSmrg esac 2809b85037dbSmrg fi 2810b85037dbSmrg sys_lib_dlsearch_path_spec='/usr/lib' 2811b85037dbSmrg ;; 2812b85037dbSmrg 2813b85037dbSmrgtpf*) 2814b85037dbSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2815b85037dbSmrg version_type=linux 2816b85037dbSmrg need_lib_prefix=no 2817b85037dbSmrg need_version=no 2818b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2819b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2820b85037dbSmrg shlibpath_overrides_runpath=no 2821b85037dbSmrg hardcode_into_libs=yes 2822b85037dbSmrg ;; 2823b85037dbSmrg 2824b85037dbSmrguts4*) 2825b85037dbSmrg version_type=linux 2826b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2827b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2828b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2829b85037dbSmrg ;; 2830b85037dbSmrg 2831b85037dbSmrg*) 2832b85037dbSmrg dynamic_linker=no 2833b85037dbSmrg ;; 2834b85037dbSmrgesac 2835b85037dbSmrgAC_MSG_RESULT([$dynamic_linker]) 2836b85037dbSmrgtest "$dynamic_linker" = no && can_build_shared=no 2837b85037dbSmrg 2838b85037dbSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2839b85037dbSmrgif test "$GCC" = yes; then 2840b85037dbSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2841b85037dbSmrgfi 2842b85037dbSmrg 2843b85037dbSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2844b85037dbSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2845b85037dbSmrgfi 2846b85037dbSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2847b85037dbSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2848b85037dbSmrgfi 2849b85037dbSmrg 2850b85037dbSmrg_LT_DECL([], [variables_saved_for_relink], [1], 2851b85037dbSmrg [Variables whose values should be saved in libtool wrapper scripts and 2852b85037dbSmrg restored at link time]) 2853b85037dbSmrg_LT_DECL([], [need_lib_prefix], [0], 2854b85037dbSmrg [Do we need the "lib" prefix for modules?]) 2855b85037dbSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2856b85037dbSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2857b85037dbSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2858b85037dbSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2859b85037dbSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2860b85037dbSmrg [Is shlibpath searched before the hard-coded library search path?]) 2861b85037dbSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2862b85037dbSmrg_LT_DECL([], [library_names_spec], [1], 2863b85037dbSmrg [[List of archive names. First name is the real one, the rest are links. 2864b85037dbSmrg The last name is the one that the linker finds with -lNAME]]) 2865b85037dbSmrg_LT_DECL([], [soname_spec], [1], 2866b85037dbSmrg [[The coded name of the library, if different from the real name]]) 2867b85037dbSmrg_LT_DECL([], [install_override_mode], [1], 2868b85037dbSmrg [Permission mode override for installation of shared libraries]) 2869b85037dbSmrg_LT_DECL([], [postinstall_cmds], [2], 2870b85037dbSmrg [Command to use after installation of a shared archive]) 2871b85037dbSmrg_LT_DECL([], [postuninstall_cmds], [2], 2872b85037dbSmrg [Command to use after uninstallation of a shared archive]) 2873b85037dbSmrg_LT_DECL([], [finish_cmds], [2], 2874b85037dbSmrg [Commands used to finish a libtool library installation in a directory]) 2875b85037dbSmrg_LT_DECL([], [finish_eval], [1], 2876b85037dbSmrg [[As "finish_cmds", except a single script fragment to be evaled but 2877b85037dbSmrg not shown]]) 2878b85037dbSmrg_LT_DECL([], [hardcode_into_libs], [0], 2879b85037dbSmrg [Whether we should hardcode library paths into libraries]) 2880b85037dbSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2881b85037dbSmrg [Compile-time system search path for libraries]) 2882b85037dbSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2883b85037dbSmrg [Run-time system search path for libraries]) 2884b85037dbSmrg])# _LT_SYS_DYNAMIC_LINKER 2885b85037dbSmrg 2886b85037dbSmrg 2887b85037dbSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 2888b85037dbSmrg# -------------------------- 2889b85037dbSmrg# find a file program which can recognize shared library 2890b85037dbSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2891b85037dbSmrg[m4_require([_LT_DECL_EGREP])dnl 2892b85037dbSmrgAC_MSG_CHECKING([for $1]) 2893b85037dbSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2894b85037dbSmrg[case $MAGIC_CMD in 2895b85037dbSmrg[[\\/*] | ?:[\\/]*]) 2896b85037dbSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2897b85037dbSmrg ;; 2898b85037dbSmrg*) 2899b85037dbSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2900b85037dbSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2901b85037dbSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2902b85037dbSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2903b85037dbSmrgdnl not every word. This closes a longstanding sh security hole. 2904b85037dbSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 2905b85037dbSmrg for ac_dir in $ac_dummy; do 2906b85037dbSmrg IFS="$lt_save_ifs" 2907b85037dbSmrg test -z "$ac_dir" && ac_dir=. 2908b85037dbSmrg if test -f $ac_dir/$1; then 2909b85037dbSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2910b85037dbSmrg if test -n "$file_magic_test_file"; then 2911b85037dbSmrg case $deplibs_check_method in 2912b85037dbSmrg "file_magic "*) 2913b85037dbSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2914b85037dbSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2915b85037dbSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2916b85037dbSmrg $EGREP "$file_magic_regex" > /dev/null; then 2917b85037dbSmrg : 2918b85037dbSmrg else 2919b85037dbSmrg cat <<_LT_EOF 1>&2 2920b85037dbSmrg 2921b85037dbSmrg*** Warning: the command libtool uses to detect shared libraries, 2922b85037dbSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2923b85037dbSmrg*** The result is that libtool may fail to recognize shared libraries 2924b85037dbSmrg*** as such. This will affect the creation of libtool libraries that 2925b85037dbSmrg*** depend on shared libraries, but programs linked with such libtool 2926b85037dbSmrg*** libraries will work regardless of this problem. Nevertheless, you 2927b85037dbSmrg*** may want to report the problem to your system manager and/or to 2928b85037dbSmrg*** bug-libtool@gnu.org 2929b85037dbSmrg 2930b85037dbSmrg_LT_EOF 2931b85037dbSmrg fi ;; 2932b85037dbSmrg esac 2933b85037dbSmrg fi 2934b85037dbSmrg break 2935b85037dbSmrg fi 2936b85037dbSmrg done 2937b85037dbSmrg IFS="$lt_save_ifs" 2938b85037dbSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 2939b85037dbSmrg ;; 2940b85037dbSmrgesac]) 2941b85037dbSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2942b85037dbSmrgif test -n "$MAGIC_CMD"; then 2943b85037dbSmrg AC_MSG_RESULT($MAGIC_CMD) 2944b85037dbSmrgelse 2945b85037dbSmrg AC_MSG_RESULT(no) 2946b85037dbSmrgfi 2947b85037dbSmrg_LT_DECL([], [MAGIC_CMD], [0], 2948b85037dbSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2949b85037dbSmrg])# _LT_PATH_TOOL_PREFIX 2950b85037dbSmrg 2951b85037dbSmrg# Old name: 2952b85037dbSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2953b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 2954b85037dbSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 2955b85037dbSmrg 2956b85037dbSmrg 2957b85037dbSmrg# _LT_PATH_MAGIC 2958b85037dbSmrg# -------------- 2959b85037dbSmrg# find a file program which can recognize a shared library 2960b85037dbSmrgm4_defun([_LT_PATH_MAGIC], 2961b85037dbSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2962b85037dbSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 2963b85037dbSmrg if test -n "$ac_tool_prefix"; then 2964b85037dbSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2965b85037dbSmrg else 2966b85037dbSmrg MAGIC_CMD=: 2967b85037dbSmrg fi 2968b85037dbSmrgfi 2969b85037dbSmrg])# _LT_PATH_MAGIC 2970b85037dbSmrg 2971b85037dbSmrg 2972b85037dbSmrg# LT_PATH_LD 2973b85037dbSmrg# ---------- 2974b85037dbSmrg# find the pathname to the GNU or non-GNU linker 2975b85037dbSmrgAC_DEFUN([LT_PATH_LD], 2976b85037dbSmrg[AC_REQUIRE([AC_PROG_CC])dnl 2977b85037dbSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2978b85037dbSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2979b85037dbSmrgm4_require([_LT_DECL_SED])dnl 2980b85037dbSmrgm4_require([_LT_DECL_EGREP])dnl 2981b85037dbSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 2982b85037dbSmrg 2983b85037dbSmrgAC_ARG_WITH([gnu-ld], 2984b85037dbSmrg [AS_HELP_STRING([--with-gnu-ld], 2985b85037dbSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2986b85037dbSmrg [test "$withval" = no || with_gnu_ld=yes], 2987b85037dbSmrg [with_gnu_ld=no])dnl 2988b85037dbSmrg 2989b85037dbSmrgac_prog=ld 2990b85037dbSmrgif test "$GCC" = yes; then 2991b85037dbSmrg # Check if gcc -print-prog-name=ld gives a path. 2992b85037dbSmrg AC_MSG_CHECKING([for ld used by $CC]) 2993b85037dbSmrg case $host in 2994b85037dbSmrg *-*-mingw*) 2995b85037dbSmrg # gcc leaves a trailing carriage return which upsets mingw 2996b85037dbSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2997b85037dbSmrg *) 2998b85037dbSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2999b85037dbSmrg esac 3000b85037dbSmrg case $ac_prog in 3001b85037dbSmrg # Accept absolute paths. 3002b85037dbSmrg [[\\/]]* | ?:[[\\/]]*) 3003b85037dbSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3004b85037dbSmrg # Canonicalize the pathname of ld 3005b85037dbSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3006b85037dbSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3007b85037dbSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3008b85037dbSmrg done 3009b85037dbSmrg test -z "$LD" && LD="$ac_prog" 3010b85037dbSmrg ;; 3011b85037dbSmrg "") 3012b85037dbSmrg # If it fails, then pretend we aren't using GCC. 3013b85037dbSmrg ac_prog=ld 3014b85037dbSmrg ;; 3015b85037dbSmrg *) 3016b85037dbSmrg # If it is relative, then search for the first ld in PATH. 3017b85037dbSmrg with_gnu_ld=unknown 3018b85037dbSmrg ;; 3019b85037dbSmrg esac 3020b85037dbSmrgelif test "$with_gnu_ld" = yes; then 3021b85037dbSmrg AC_MSG_CHECKING([for GNU ld]) 3022b85037dbSmrgelse 3023b85037dbSmrg AC_MSG_CHECKING([for non-GNU ld]) 3024b85037dbSmrgfi 3025b85037dbSmrgAC_CACHE_VAL(lt_cv_path_LD, 3026b85037dbSmrg[if test -z "$LD"; then 3027b85037dbSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3028b85037dbSmrg for ac_dir in $PATH; do 3029b85037dbSmrg IFS="$lt_save_ifs" 3030b85037dbSmrg test -z "$ac_dir" && ac_dir=. 3031b85037dbSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3032b85037dbSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 3033b85037dbSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3034b85037dbSmrg # but apparently some variants of GNU ld only accept -v. 3035b85037dbSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3036b85037dbSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3037b85037dbSmrg *GNU* | *'with BFD'*) 3038b85037dbSmrg test "$with_gnu_ld" != no && break 3039b85037dbSmrg ;; 3040b85037dbSmrg *) 3041b85037dbSmrg test "$with_gnu_ld" != yes && break 3042b85037dbSmrg ;; 3043b85037dbSmrg esac 3044b85037dbSmrg fi 3045b85037dbSmrg done 3046b85037dbSmrg IFS="$lt_save_ifs" 3047b85037dbSmrgelse 3048b85037dbSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 3049b85037dbSmrgfi]) 3050b85037dbSmrgLD="$lt_cv_path_LD" 3051b85037dbSmrgif test -n "$LD"; then 3052b85037dbSmrg AC_MSG_RESULT($LD) 3053b85037dbSmrgelse 3054b85037dbSmrg AC_MSG_RESULT(no) 3055b85037dbSmrgfi 3056b85037dbSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3057b85037dbSmrg_LT_PATH_LD_GNU 3058b85037dbSmrgAC_SUBST([LD]) 3059b85037dbSmrg 3060b85037dbSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3061b85037dbSmrg])# LT_PATH_LD 3062b85037dbSmrg 3063b85037dbSmrg# Old names: 3064b85037dbSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3065b85037dbSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3066b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 3067b85037dbSmrgdnl AC_DEFUN([AM_PROG_LD], []) 3068b85037dbSmrgdnl AC_DEFUN([AC_PROG_LD], []) 3069b85037dbSmrg 3070b85037dbSmrg 3071b85037dbSmrg# _LT_PATH_LD_GNU 3072b85037dbSmrg#- -------------- 3073b85037dbSmrgm4_defun([_LT_PATH_LD_GNU], 3074b85037dbSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3075b85037dbSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3076b85037dbSmrgcase `$LD -v 2>&1 </dev/null` in 3077b85037dbSmrg*GNU* | *'with BFD'*) 3078b85037dbSmrg lt_cv_prog_gnu_ld=yes 3079b85037dbSmrg ;; 3080b85037dbSmrg*) 3081b85037dbSmrg lt_cv_prog_gnu_ld=no 3082b85037dbSmrg ;; 3083b85037dbSmrgesac]) 3084b85037dbSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3085b85037dbSmrg])# _LT_PATH_LD_GNU 3086b85037dbSmrg 3087b85037dbSmrg 3088b85037dbSmrg# _LT_CMD_RELOAD 3089b85037dbSmrg# -------------- 3090b85037dbSmrg# find reload flag for linker 3091b85037dbSmrg# -- PORTME Some linkers may need a different reload flag. 3092b85037dbSmrgm4_defun([_LT_CMD_RELOAD], 3093b85037dbSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3094b85037dbSmrg lt_cv_ld_reload_flag, 3095b85037dbSmrg [lt_cv_ld_reload_flag='-r']) 3096b85037dbSmrgreload_flag=$lt_cv_ld_reload_flag 3097b85037dbSmrgcase $reload_flag in 3098b85037dbSmrg"" | " "*) ;; 3099b85037dbSmrg*) reload_flag=" $reload_flag" ;; 3100b85037dbSmrgesac 3101b85037dbSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3102b85037dbSmrgcase $host_os in 3103302b15bdSmrg cygwin* | mingw* | pw32* | cegcc*) 3104302b15bdSmrg if test "$GCC" != yes; then 3105302b15bdSmrg reload_cmds=false 3106302b15bdSmrg fi 3107302b15bdSmrg ;; 3108b85037dbSmrg darwin*) 3109b85037dbSmrg if test "$GCC" = yes; then 3110b85037dbSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3111b85037dbSmrg else 3112b85037dbSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3113b85037dbSmrg fi 3114b85037dbSmrg ;; 3115b85037dbSmrgesac 3116b85037dbSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3117b85037dbSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3118b85037dbSmrg])# _LT_CMD_RELOAD 3119b85037dbSmrg 3120b85037dbSmrg 3121b85037dbSmrg# _LT_CHECK_MAGIC_METHOD 3122b85037dbSmrg# ---------------------- 3123b85037dbSmrg# how to check for library dependencies 3124b85037dbSmrg# -- PORTME fill in with the dynamic library characteristics 3125b85037dbSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3126b85037dbSmrg[m4_require([_LT_DECL_EGREP]) 3127b85037dbSmrgm4_require([_LT_DECL_OBJDUMP]) 3128b85037dbSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3129b85037dbSmrglt_cv_deplibs_check_method, 3130b85037dbSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3131b85037dbSmrglt_cv_file_magic_test_file= 3132b85037dbSmrglt_cv_deplibs_check_method='unknown' 3133b85037dbSmrg# Need to set the preceding variable on all platforms that support 3134b85037dbSmrg# interlibrary dependencies. 3135b85037dbSmrg# 'none' -- dependencies not supported. 3136b85037dbSmrg# `unknown' -- same as none, but documents that we really don't know. 3137b85037dbSmrg# 'pass_all' -- all dependencies passed with no checks. 3138b85037dbSmrg# 'test_compile' -- check by making test program. 3139b85037dbSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 3140b85037dbSmrg# which responds to the $file_magic_cmd with a given extended regex. 3141b85037dbSmrg# If you have `file' or equivalent on your system and you're not sure 3142b85037dbSmrg# whether `pass_all' will *always* work, you probably want this one. 3143b85037dbSmrg 3144b85037dbSmrgcase $host_os in 3145b85037dbSmrgaix[[4-9]]*) 3146b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3147b85037dbSmrg ;; 3148b85037dbSmrg 3149b85037dbSmrgbeos*) 3150b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3151b85037dbSmrg ;; 3152b85037dbSmrg 3153b85037dbSmrgbsdi[[45]]*) 3154b85037dbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3155b85037dbSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3156b85037dbSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3157b85037dbSmrg ;; 3158b85037dbSmrg 3159b85037dbSmrgcygwin*) 3160b85037dbSmrg # func_win32_libid is a shell function defined in ltmain.sh 3161b85037dbSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3162b85037dbSmrg lt_cv_file_magic_cmd='func_win32_libid' 3163b85037dbSmrg ;; 3164b85037dbSmrg 3165b85037dbSmrgmingw* | pw32*) 3166b85037dbSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3167b85037dbSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3168b85037dbSmrg # unless we find 'file', for example because we are cross-compiling. 3169b85037dbSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3170b85037dbSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3171b85037dbSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3172b85037dbSmrg lt_cv_file_magic_cmd='func_win32_libid' 3173b85037dbSmrg else 3174b85037dbSmrg # Keep this pattern in sync with the one in func_win32_libid. 3175b85037dbSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3176b85037dbSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3177b85037dbSmrg fi 3178b85037dbSmrg ;; 3179b85037dbSmrg 3180b85037dbSmrgcegcc*) 3181b85037dbSmrg # use the weaker test based on 'objdump'. See mingw*. 3182b85037dbSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3183b85037dbSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3184b85037dbSmrg ;; 3185b85037dbSmrg 3186b85037dbSmrgdarwin* | rhapsody*) 3187b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3188b85037dbSmrg ;; 3189b85037dbSmrg 3190b85037dbSmrgfreebsd* | dragonfly*) 3191b85037dbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3192b85037dbSmrg case $host_cpu in 3193b85037dbSmrg i*86 ) 3194b85037dbSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3195b85037dbSmrg # Let's accept both of them until this is cleared up. 3196b85037dbSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3197b85037dbSmrg lt_cv_file_magic_cmd=/usr/bin/file 3198b85037dbSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3199b85037dbSmrg ;; 3200b85037dbSmrg esac 3201b85037dbSmrg else 3202b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3203b85037dbSmrg fi 3204b85037dbSmrg ;; 3205b85037dbSmrg 3206b85037dbSmrggnu*) 3207b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3208b85037dbSmrg ;; 3209b85037dbSmrg 3210b85037dbSmrghaiku*) 3211b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3212b85037dbSmrg ;; 3213b85037dbSmrg 3214b85037dbSmrghpux10.20* | hpux11*) 3215b85037dbSmrg lt_cv_file_magic_cmd=/usr/bin/file 3216b85037dbSmrg case $host_cpu in 3217b85037dbSmrg ia64*) 3218b85037dbSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3219b85037dbSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3220b85037dbSmrg ;; 3221b85037dbSmrg hppa*64*) 3222b85037dbSmrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] 3223b85037dbSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3224b85037dbSmrg ;; 3225b85037dbSmrg *) 3226b85037dbSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3227b85037dbSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3228b85037dbSmrg ;; 3229b85037dbSmrg esac 3230b85037dbSmrg ;; 3231b85037dbSmrg 3232b85037dbSmrginterix[[3-9]]*) 3233b85037dbSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3234b85037dbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3235b85037dbSmrg ;; 3236b85037dbSmrg 3237b85037dbSmrgirix5* | irix6* | nonstopux*) 3238b85037dbSmrg case $LD in 3239b85037dbSmrg *-32|*"-32 ") libmagic=32-bit;; 3240b85037dbSmrg *-n32|*"-n32 ") libmagic=N32;; 3241b85037dbSmrg *-64|*"-64 ") libmagic=64-bit;; 3242b85037dbSmrg *) libmagic=never-match;; 3243b85037dbSmrg esac 3244b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3245b85037dbSmrg ;; 3246b85037dbSmrg 3247b85037dbSmrg# This must be Linux ELF. 3248b85037dbSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 3249b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3250b85037dbSmrg ;; 3251b85037dbSmrg 3252b85037dbSmrgnetbsd*) 3253b85037dbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3254b85037dbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3255b85037dbSmrg else 3256b85037dbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3257b85037dbSmrg fi 3258b85037dbSmrg ;; 3259b85037dbSmrg 3260b85037dbSmrgnewos6*) 3261b85037dbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3262b85037dbSmrg lt_cv_file_magic_cmd=/usr/bin/file 3263b85037dbSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3264b85037dbSmrg ;; 3265b85037dbSmrg 3266b85037dbSmrg*nto* | *qnx*) 3267b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3268b85037dbSmrg ;; 3269b85037dbSmrg 3270b85037dbSmrgopenbsd*) 3271b85037dbSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3272b85037dbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3273b85037dbSmrg else 3274b85037dbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3275b85037dbSmrg fi 3276b85037dbSmrg ;; 3277b85037dbSmrg 3278b85037dbSmrgosf3* | osf4* | osf5*) 3279b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3280b85037dbSmrg ;; 3281b85037dbSmrg 3282b85037dbSmrgrdos*) 3283b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3284b85037dbSmrg ;; 3285b85037dbSmrg 3286b85037dbSmrgsolaris*) 3287b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3288b85037dbSmrg ;; 3289b85037dbSmrg 3290b85037dbSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3291b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3292b85037dbSmrg ;; 3293b85037dbSmrg 3294b85037dbSmrgsysv4 | sysv4.3*) 3295b85037dbSmrg case $host_vendor in 3296b85037dbSmrg motorola) 3297b85037dbSmrg 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]]' 3298b85037dbSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3299b85037dbSmrg ;; 3300b85037dbSmrg ncr) 3301b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3302b85037dbSmrg ;; 3303b85037dbSmrg sequent) 3304b85037dbSmrg lt_cv_file_magic_cmd='/bin/file' 3305b85037dbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3306b85037dbSmrg ;; 3307b85037dbSmrg sni) 3308b85037dbSmrg lt_cv_file_magic_cmd='/bin/file' 3309b85037dbSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3310b85037dbSmrg lt_cv_file_magic_test_file=/lib/libc.so 3311b85037dbSmrg ;; 3312b85037dbSmrg siemens) 3313b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3314b85037dbSmrg ;; 3315b85037dbSmrg pc) 3316b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3317b85037dbSmrg ;; 3318b85037dbSmrg esac 3319b85037dbSmrg ;; 3320b85037dbSmrg 3321b85037dbSmrgtpf*) 3322b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3323b85037dbSmrg ;; 3324b85037dbSmrgesac 3325b85037dbSmrg]) 3326302b15bdSmrg 3327302b15bdSmrgfile_magic_glob= 3328302b15bdSmrgwant_nocaseglob=no 3329302b15bdSmrgif test "$build" = "$host"; then 3330302b15bdSmrg case $host_os in 3331302b15bdSmrg mingw* | pw32*) 3332302b15bdSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3333302b15bdSmrg want_nocaseglob=yes 3334302b15bdSmrg else 3335302b15bdSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3336302b15bdSmrg fi 3337302b15bdSmrg ;; 3338302b15bdSmrg esac 3339302b15bdSmrgfi 3340302b15bdSmrg 3341b85037dbSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3342b85037dbSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3343b85037dbSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3344b85037dbSmrg 3345b85037dbSmrg_LT_DECL([], [deplibs_check_method], [1], 3346b85037dbSmrg [Method to check whether dependent libraries are shared objects]) 3347b85037dbSmrg_LT_DECL([], [file_magic_cmd], [1], 3348302b15bdSmrg [Command to use when deplibs_check_method = "file_magic"]) 3349302b15bdSmrg_LT_DECL([], [file_magic_glob], [1], 3350302b15bdSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 3351302b15bdSmrg_LT_DECL([], [want_nocaseglob], [1], 3352302b15bdSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3353b85037dbSmrg])# _LT_CHECK_MAGIC_METHOD 3354b85037dbSmrg 3355b85037dbSmrg 3356b85037dbSmrg# LT_PATH_NM 3357b85037dbSmrg# ---------- 3358b85037dbSmrg# find the pathname to a BSD- or MS-compatible name lister 3359b85037dbSmrgAC_DEFUN([LT_PATH_NM], 3360b85037dbSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3361b85037dbSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3362b85037dbSmrg[if test -n "$NM"; then 3363b85037dbSmrg # Let the user override the test. 3364b85037dbSmrg lt_cv_path_NM="$NM" 3365b85037dbSmrgelse 3366b85037dbSmrg lt_nm_to_check="${ac_tool_prefix}nm" 3367b85037dbSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3368b85037dbSmrg lt_nm_to_check="$lt_nm_to_check nm" 3369b85037dbSmrg fi 3370b85037dbSmrg for lt_tmp_nm in $lt_nm_to_check; do 3371b85037dbSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3372b85037dbSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3373b85037dbSmrg IFS="$lt_save_ifs" 3374b85037dbSmrg test -z "$ac_dir" && ac_dir=. 3375b85037dbSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 3376b85037dbSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3377b85037dbSmrg # Check to see if the nm accepts a BSD-compat flag. 3378b85037dbSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3379b85037dbSmrg # nm: unknown option "B" ignored 3380b85037dbSmrg # Tru64's nm complains that /dev/null is an invalid object file 3381b85037dbSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3382b85037dbSmrg */dev/null* | *'Invalid file or object type'*) 3383b85037dbSmrg lt_cv_path_NM="$tmp_nm -B" 3384b85037dbSmrg break 3385b85037dbSmrg ;; 3386b85037dbSmrg *) 3387b85037dbSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3388b85037dbSmrg */dev/null*) 3389b85037dbSmrg lt_cv_path_NM="$tmp_nm -p" 3390b85037dbSmrg break 3391b85037dbSmrg ;; 3392b85037dbSmrg *) 3393b85037dbSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3394b85037dbSmrg continue # so that we can try to find one that supports BSD flags 3395b85037dbSmrg ;; 3396b85037dbSmrg esac 3397b85037dbSmrg ;; 3398b85037dbSmrg esac 3399b85037dbSmrg fi 3400b85037dbSmrg done 3401b85037dbSmrg IFS="$lt_save_ifs" 3402b85037dbSmrg done 3403b85037dbSmrg : ${lt_cv_path_NM=no} 3404b85037dbSmrgfi]) 3405b85037dbSmrgif test "$lt_cv_path_NM" != "no"; then 3406b85037dbSmrg NM="$lt_cv_path_NM" 3407b85037dbSmrgelse 3408b85037dbSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 3409b85037dbSmrg if test -n "$DUMPBIN"; then : 3410b85037dbSmrg # Let the user override the test. 3411b85037dbSmrg else 3412b85037dbSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3413b85037dbSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3414b85037dbSmrg *COFF*) 3415b85037dbSmrg DUMPBIN="$DUMPBIN -symbols" 3416b85037dbSmrg ;; 3417b85037dbSmrg *) 3418b85037dbSmrg DUMPBIN=: 3419b85037dbSmrg ;; 3420b85037dbSmrg esac 3421b85037dbSmrg fi 3422b85037dbSmrg AC_SUBST([DUMPBIN]) 3423b85037dbSmrg if test "$DUMPBIN" != ":"; then 3424b85037dbSmrg NM="$DUMPBIN" 3425b85037dbSmrg fi 3426b85037dbSmrgfi 3427b85037dbSmrgtest -z "$NM" && NM=nm 3428b85037dbSmrgAC_SUBST([NM]) 3429b85037dbSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3430b85037dbSmrg 3431b85037dbSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3432b85037dbSmrg [lt_cv_nm_interface="BSD nm" 3433b85037dbSmrg echo "int some_variable = 0;" > conftest.$ac_ext 3434b85037dbSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3435b85037dbSmrg (eval "$ac_compile" 2>conftest.err) 3436b85037dbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3437b85037dbSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3438b85037dbSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3439b85037dbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3440b85037dbSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3441b85037dbSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 3442b85037dbSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3443b85037dbSmrg lt_cv_nm_interface="MS dumpbin" 3444b85037dbSmrg fi 3445b85037dbSmrg rm -f conftest*]) 3446b85037dbSmrg])# LT_PATH_NM 3447b85037dbSmrg 3448b85037dbSmrg# Old names: 3449b85037dbSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3450b85037dbSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3451b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 3452b85037dbSmrgdnl AC_DEFUN([AM_PROG_NM], []) 3453b85037dbSmrgdnl AC_DEFUN([AC_PROG_NM], []) 3454b85037dbSmrg 3455302b15bdSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3456302b15bdSmrg# -------------------------------- 3457302b15bdSmrg# how to determine the name of the shared library 3458302b15bdSmrg# associated with a specific link library. 3459302b15bdSmrg# -- PORTME fill in with the dynamic library characteristics 3460302b15bdSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3461302b15bdSmrg[m4_require([_LT_DECL_EGREP]) 3462302b15bdSmrgm4_require([_LT_DECL_OBJDUMP]) 3463302b15bdSmrgm4_require([_LT_DECL_DLLTOOL]) 3464302b15bdSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3465302b15bdSmrglt_cv_sharedlib_from_linklib_cmd, 3466302b15bdSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3467302b15bdSmrg 3468302b15bdSmrgcase $host_os in 3469302b15bdSmrgcygwin* | mingw* | pw32* | cegcc*) 3470302b15bdSmrg # two different shell functions defined in ltmain.sh 3471302b15bdSmrg # decide which to use based on capabilities of $DLLTOOL 3472302b15bdSmrg case `$DLLTOOL --help 2>&1` in 3473302b15bdSmrg *--identify-strict*) 3474302b15bdSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3475302b15bdSmrg ;; 3476302b15bdSmrg *) 3477302b15bdSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3478302b15bdSmrg ;; 3479302b15bdSmrg esac 3480302b15bdSmrg ;; 3481302b15bdSmrg*) 3482302b15bdSmrg # fallback: assume linklib IS sharedlib 3483302b15bdSmrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3484302b15bdSmrg ;; 3485302b15bdSmrgesac 3486302b15bdSmrg]) 3487302b15bdSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3488302b15bdSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3489302b15bdSmrg 3490302b15bdSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3491302b15bdSmrg [Command to associate shared and link libraries]) 3492302b15bdSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3493302b15bdSmrg 3494302b15bdSmrg 3495302b15bdSmrg# _LT_PATH_MANIFEST_TOOL 3496302b15bdSmrg# ---------------------- 3497302b15bdSmrg# locate the manifest tool 3498302b15bdSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3499302b15bdSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3500302b15bdSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3501302b15bdSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3502302b15bdSmrg [lt_cv_path_mainfest_tool=no 3503302b15bdSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3504302b15bdSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3505302b15bdSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3506302b15bdSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3507302b15bdSmrg lt_cv_path_mainfest_tool=yes 3508302b15bdSmrg fi 3509302b15bdSmrg rm -f conftest*]) 3510302b15bdSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 3511302b15bdSmrg MANIFEST_TOOL=: 3512302b15bdSmrgfi 3513302b15bdSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3514302b15bdSmrg])# _LT_PATH_MANIFEST_TOOL 3515302b15bdSmrg 3516b85037dbSmrg 3517b85037dbSmrg# LT_LIB_M 3518b85037dbSmrg# -------- 3519b85037dbSmrg# check for math library 3520b85037dbSmrgAC_DEFUN([LT_LIB_M], 3521b85037dbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3522b85037dbSmrgLIBM= 3523b85037dbSmrgcase $host in 3524b85037dbSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3525b85037dbSmrg # These system don't have libm, or don't need it 3526b85037dbSmrg ;; 3527b85037dbSmrg*-ncr-sysv4.3*) 3528b85037dbSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3529b85037dbSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3530b85037dbSmrg ;; 3531b85037dbSmrg*) 3532b85037dbSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3533b85037dbSmrg ;; 3534b85037dbSmrgesac 3535b85037dbSmrgAC_SUBST([LIBM]) 3536b85037dbSmrg])# LT_LIB_M 3537b85037dbSmrg 3538b85037dbSmrg# Old name: 3539b85037dbSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3540b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 3541b85037dbSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3542b85037dbSmrg 3543b85037dbSmrg 3544b85037dbSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3545b85037dbSmrg# ------------------------------- 3546b85037dbSmrgm4_defun([_LT_COMPILER_NO_RTTI], 3547b85037dbSmrg[m4_require([_LT_TAG_COMPILER])dnl 3548b85037dbSmrg 3549b85037dbSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3550b85037dbSmrg 3551b85037dbSmrgif test "$GCC" = yes; then 3552b85037dbSmrg case $cc_basename in 3553b85037dbSmrg nvcc*) 3554b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3555b85037dbSmrg *) 3556b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3557b85037dbSmrg esac 3558b85037dbSmrg 3559b85037dbSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3560b85037dbSmrg lt_cv_prog_compiler_rtti_exceptions, 3561b85037dbSmrg [-fno-rtti -fno-exceptions], [], 3562b85037dbSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3563b85037dbSmrgfi 3564b85037dbSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3565b85037dbSmrg [Compiler flag to turn off builtin functions]) 3566b85037dbSmrg])# _LT_COMPILER_NO_RTTI 3567b85037dbSmrg 3568b85037dbSmrg 3569b85037dbSmrg# _LT_CMD_GLOBAL_SYMBOLS 3570b85037dbSmrg# ---------------------- 3571b85037dbSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3572b85037dbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3573b85037dbSmrgAC_REQUIRE([AC_PROG_CC])dnl 3574b85037dbSmrgAC_REQUIRE([AC_PROG_AWK])dnl 3575b85037dbSmrgAC_REQUIRE([LT_PATH_NM])dnl 3576b85037dbSmrgAC_REQUIRE([LT_PATH_LD])dnl 3577b85037dbSmrgm4_require([_LT_DECL_SED])dnl 3578b85037dbSmrgm4_require([_LT_DECL_EGREP])dnl 3579b85037dbSmrgm4_require([_LT_TAG_COMPILER])dnl 3580b85037dbSmrg 3581b85037dbSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3582b85037dbSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3583b85037dbSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3584b85037dbSmrg[ 3585b85037dbSmrg# These are sane defaults that work on at least a few old systems. 3586b85037dbSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3587b85037dbSmrg 3588b85037dbSmrg# Character class describing NM global symbol codes. 3589b85037dbSmrgsymcode='[[BCDEGRST]]' 3590b85037dbSmrg 3591b85037dbSmrg# Regexp to match symbols that can be accessed directly from C. 3592b85037dbSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3593b85037dbSmrg 3594b85037dbSmrg# Define system-specific variables. 3595b85037dbSmrgcase $host_os in 3596b85037dbSmrgaix*) 3597b85037dbSmrg symcode='[[BCDT]]' 3598b85037dbSmrg ;; 3599b85037dbSmrgcygwin* | mingw* | pw32* | cegcc*) 3600b85037dbSmrg symcode='[[ABCDGISTW]]' 3601b85037dbSmrg ;; 3602b85037dbSmrghpux*) 3603b85037dbSmrg if test "$host_cpu" = ia64; then 3604b85037dbSmrg symcode='[[ABCDEGRST]]' 3605b85037dbSmrg fi 3606b85037dbSmrg ;; 3607b85037dbSmrgirix* | nonstopux*) 3608b85037dbSmrg symcode='[[BCDEGRST]]' 3609b85037dbSmrg ;; 3610b85037dbSmrgosf*) 3611b85037dbSmrg symcode='[[BCDEGQRST]]' 3612b85037dbSmrg ;; 3613b85037dbSmrgsolaris*) 3614b85037dbSmrg symcode='[[BDRT]]' 3615b85037dbSmrg ;; 3616b85037dbSmrgsco3.2v5*) 3617b85037dbSmrg symcode='[[DT]]' 3618b85037dbSmrg ;; 3619b85037dbSmrgsysv4.2uw2*) 3620b85037dbSmrg symcode='[[DT]]' 3621b85037dbSmrg ;; 3622b85037dbSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3623b85037dbSmrg symcode='[[ABDT]]' 3624b85037dbSmrg ;; 3625b85037dbSmrgsysv4) 3626b85037dbSmrg symcode='[[DFNSTU]]' 3627b85037dbSmrg ;; 3628b85037dbSmrgesac 3629b85037dbSmrg 3630b85037dbSmrg# If we're using GNU nm, then use its standard symbol codes. 3631b85037dbSmrgcase `$NM -V 2>&1` in 3632b85037dbSmrg*GNU* | *'with BFD'*) 3633b85037dbSmrg symcode='[[ABCDGIRSTW]]' ;; 3634b85037dbSmrgesac 3635b85037dbSmrg 3636b85037dbSmrg# Transform an extracted symbol line into a proper C declaration. 3637b85037dbSmrg# Some systems (esp. on ia64) link data and code symbols differently, 3638b85037dbSmrg# so use this general approach. 3639b85037dbSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3640b85037dbSmrg 3641b85037dbSmrg# Transform an extracted symbol line into symbol name and symbol address 3642302b15bdSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3643302b15bdSmrglt_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'" 3644b85037dbSmrg 3645b85037dbSmrg# Handle CRLF in mingw tool chain 3646b85037dbSmrgopt_cr= 3647b85037dbSmrgcase $build_os in 3648b85037dbSmrgmingw*) 3649b85037dbSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3650b85037dbSmrg ;; 3651b85037dbSmrgesac 3652b85037dbSmrg 3653b85037dbSmrg# Try without a prefix underscore, then with it. 3654b85037dbSmrgfor ac_symprfx in "" "_"; do 3655b85037dbSmrg 3656b85037dbSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3657b85037dbSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3658b85037dbSmrg 3659b85037dbSmrg # Write the raw and C identifiers. 3660b85037dbSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3661b85037dbSmrg # Fake it for dumpbin and say T for any non-static function 3662b85037dbSmrg # and D for any global variable. 3663b85037dbSmrg # Also find C++ and __fastcall symbols from MSVC++, 3664b85037dbSmrg # which start with @ or ?. 3665b85037dbSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3666b85037dbSmrg" {last_section=section; section=\$ 3};"\ 3667b85037dbSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3668b85037dbSmrg" \$ 0!~/External *\|/{next};"\ 3669b85037dbSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3670b85037dbSmrg" {if(hide[section]) next};"\ 3671b85037dbSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3672b85037dbSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3673b85037dbSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3674b85037dbSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3675b85037dbSmrg" ' prfx=^$ac_symprfx]" 3676b85037dbSmrg else 3677b85037dbSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3678b85037dbSmrg fi 3679302b15bdSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3680b85037dbSmrg 3681b85037dbSmrg # Check to see that the pipe works correctly. 3682b85037dbSmrg pipe_works=no 3683b85037dbSmrg 3684b85037dbSmrg rm -f conftest* 3685b85037dbSmrg cat > conftest.$ac_ext <<_LT_EOF 3686b85037dbSmrg#ifdef __cplusplus 3687b85037dbSmrgextern "C" { 3688b85037dbSmrg#endif 3689b85037dbSmrgchar nm_test_var; 3690b85037dbSmrgvoid nm_test_func(void); 3691b85037dbSmrgvoid nm_test_func(void){} 3692b85037dbSmrg#ifdef __cplusplus 3693b85037dbSmrg} 3694b85037dbSmrg#endif 3695b85037dbSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 3696b85037dbSmrg_LT_EOF 3697b85037dbSmrg 3698b85037dbSmrg if AC_TRY_EVAL(ac_compile); then 3699b85037dbSmrg # Now try to grab the symbols. 3700b85037dbSmrg nlist=conftest.nm 3701b85037dbSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3702b85037dbSmrg # Try sorting and uniquifying the output. 3703b85037dbSmrg if sort "$nlist" | uniq > "$nlist"T; then 3704b85037dbSmrg mv -f "$nlist"T "$nlist" 3705b85037dbSmrg else 3706b85037dbSmrg rm -f "$nlist"T 3707b85037dbSmrg fi 3708b85037dbSmrg 3709b85037dbSmrg # Make sure that we snagged all the symbols we need. 3710b85037dbSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3711b85037dbSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3712b85037dbSmrg cat <<_LT_EOF > conftest.$ac_ext 3713302b15bdSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3714302b15bdSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3715302b15bdSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 3716302b15bdSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 3717302b15bdSmrg# define LT@&t@_DLSYM_CONST 3718302b15bdSmrg#elif defined(__osf__) 3719302b15bdSmrg/* This system does not cope well with relocations in const data. */ 3720302b15bdSmrg# define LT@&t@_DLSYM_CONST 3721302b15bdSmrg#else 3722302b15bdSmrg# define LT@&t@_DLSYM_CONST const 3723302b15bdSmrg#endif 3724302b15bdSmrg 3725b85037dbSmrg#ifdef __cplusplus 3726b85037dbSmrgextern "C" { 3727b85037dbSmrg#endif 3728b85037dbSmrg 3729b85037dbSmrg_LT_EOF 3730b85037dbSmrg # Now generate the symbol file. 3731b85037dbSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3732b85037dbSmrg 3733b85037dbSmrg cat <<_LT_EOF >> conftest.$ac_ext 3734b85037dbSmrg 3735b85037dbSmrg/* The mapping between symbol names and symbols. */ 3736302b15bdSmrgLT@&t@_DLSYM_CONST struct { 3737b85037dbSmrg const char *name; 3738b85037dbSmrg void *address; 3739b85037dbSmrg} 3740b85037dbSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3741b85037dbSmrg{ 3742b85037dbSmrg { "@PROGRAM@", (void *) 0 }, 3743b85037dbSmrg_LT_EOF 3744b85037dbSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3745b85037dbSmrg cat <<\_LT_EOF >> conftest.$ac_ext 3746b85037dbSmrg {0, (void *) 0} 3747b85037dbSmrg}; 3748b85037dbSmrg 3749b85037dbSmrg/* This works around a problem in FreeBSD linker */ 3750b85037dbSmrg#ifdef FREEBSD_WORKAROUND 3751b85037dbSmrgstatic const void *lt_preloaded_setup() { 3752b85037dbSmrg return lt__PROGRAM__LTX_preloaded_symbols; 3753b85037dbSmrg} 3754b85037dbSmrg#endif 3755b85037dbSmrg 3756b85037dbSmrg#ifdef __cplusplus 3757b85037dbSmrg} 3758b85037dbSmrg#endif 3759b85037dbSmrg_LT_EOF 3760b85037dbSmrg # Now try linking the two files. 3761b85037dbSmrg mv conftest.$ac_objext conftstm.$ac_objext 3762302b15bdSmrg lt_globsym_save_LIBS=$LIBS 3763302b15bdSmrg lt_globsym_save_CFLAGS=$CFLAGS 3764b85037dbSmrg LIBS="conftstm.$ac_objext" 3765b85037dbSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3766b85037dbSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3767b85037dbSmrg pipe_works=yes 3768b85037dbSmrg fi 3769302b15bdSmrg LIBS=$lt_globsym_save_LIBS 3770302b15bdSmrg CFLAGS=$lt_globsym_save_CFLAGS 3771b85037dbSmrg else 3772b85037dbSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3773b85037dbSmrg fi 3774b85037dbSmrg else 3775b85037dbSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3776b85037dbSmrg fi 3777b85037dbSmrg else 3778b85037dbSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3779b85037dbSmrg fi 3780b85037dbSmrg else 3781b85037dbSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3782b85037dbSmrg cat conftest.$ac_ext >&5 3783b85037dbSmrg fi 3784b85037dbSmrg rm -rf conftest* conftst* 3785b85037dbSmrg 3786b85037dbSmrg # Do not use the global_symbol_pipe unless it works. 3787b85037dbSmrg if test "$pipe_works" = yes; then 3788b85037dbSmrg break 3789b85037dbSmrg else 3790b85037dbSmrg lt_cv_sys_global_symbol_pipe= 3791b85037dbSmrg fi 3792b85037dbSmrgdone 3793b85037dbSmrg]) 3794b85037dbSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3795b85037dbSmrg lt_cv_sys_global_symbol_to_cdecl= 3796b85037dbSmrgfi 3797b85037dbSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3798b85037dbSmrg AC_MSG_RESULT(failed) 3799b85037dbSmrgelse 3800b85037dbSmrg AC_MSG_RESULT(ok) 3801b85037dbSmrgfi 3802b85037dbSmrg 3803302b15bdSmrg# Response file support. 3804302b15bdSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3805302b15bdSmrg nm_file_list_spec='@' 3806302b15bdSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3807302b15bdSmrg nm_file_list_spec='@' 3808302b15bdSmrgfi 3809302b15bdSmrg 3810b85037dbSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3811b85037dbSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 3812b85037dbSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3813b85037dbSmrg [Transform the output of nm in a proper C declaration]) 3814b85037dbSmrg_LT_DECL([global_symbol_to_c_name_address], 3815b85037dbSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3816b85037dbSmrg [Transform the output of nm in a C name address pair]) 3817b85037dbSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3818b85037dbSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3819b85037dbSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3820302b15bdSmrg_LT_DECL([], [nm_file_list_spec], [1], 3821302b15bdSmrg [Specify filename containing input files for $NM]) 3822b85037dbSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 3823b85037dbSmrg 3824b85037dbSmrg 3825b85037dbSmrg# _LT_COMPILER_PIC([TAGNAME]) 3826b85037dbSmrg# --------------------------- 3827b85037dbSmrgm4_defun([_LT_COMPILER_PIC], 3828b85037dbSmrg[m4_require([_LT_TAG_COMPILER])dnl 3829b85037dbSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3830b85037dbSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3831b85037dbSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3832b85037dbSmrg 3833b85037dbSmrgm4_if([$1], [CXX], [ 3834b85037dbSmrg # C++ specific cases for pic, static, wl, etc. 3835b85037dbSmrg if test "$GXX" = yes; then 3836b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3837b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3838b85037dbSmrg 3839b85037dbSmrg case $host_os in 3840b85037dbSmrg aix*) 3841b85037dbSmrg # All AIX code is PIC. 3842b85037dbSmrg if test "$host_cpu" = ia64; then 3843b85037dbSmrg # AIX 5 now supports IA64 processor 3844b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3845b85037dbSmrg fi 3846b85037dbSmrg ;; 3847b85037dbSmrg 3848b85037dbSmrg amigaos*) 3849b85037dbSmrg case $host_cpu in 3850b85037dbSmrg powerpc) 3851b85037dbSmrg # see comment about AmigaOS4 .so support 3852b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3853b85037dbSmrg ;; 3854b85037dbSmrg m68k) 3855b85037dbSmrg # FIXME: we need at least 68020 code to build shared libraries, but 3856b85037dbSmrg # adding the `-m68020' flag to GCC prevents building anything better, 3857b85037dbSmrg # like `-m68040'. 3858b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3859b85037dbSmrg ;; 3860b85037dbSmrg esac 3861b85037dbSmrg ;; 3862b85037dbSmrg 3863b85037dbSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3864b85037dbSmrg # PIC is the default for these OSes. 3865b85037dbSmrg ;; 3866b85037dbSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3867b85037dbSmrg # This hack is so that the source file can tell whether it is being 3868b85037dbSmrg # built for inclusion in a dll (and should export symbols for example). 3869b85037dbSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3870b85037dbSmrg # (--disable-auto-import) libraries 3871b85037dbSmrg m4_if([$1], [GCJ], [], 3872b85037dbSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3873b85037dbSmrg ;; 3874b85037dbSmrg darwin* | rhapsody*) 3875b85037dbSmrg # PIC is the default on this platform 3876b85037dbSmrg # Common symbols not allowed in MH_DYLIB files 3877b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3878b85037dbSmrg ;; 3879b85037dbSmrg *djgpp*) 3880b85037dbSmrg # DJGPP does not support shared libraries at all 3881b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3882b85037dbSmrg ;; 3883b85037dbSmrg haiku*) 3884b85037dbSmrg # PIC is the default for Haiku. 3885b85037dbSmrg # The "-static" flag exists, but is broken. 3886b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 3887b85037dbSmrg ;; 3888b85037dbSmrg interix[[3-9]]*) 3889b85037dbSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3890b85037dbSmrg # Instead, we relocate shared libraries at runtime. 3891b85037dbSmrg ;; 3892b85037dbSmrg sysv4*MP*) 3893b85037dbSmrg if test -d /usr/nec; then 3894b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3895b85037dbSmrg fi 3896b85037dbSmrg ;; 3897b85037dbSmrg hpux*) 3898b85037dbSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3899b85037dbSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3900b85037dbSmrg # sets the default TLS model and affects inlining. 3901b85037dbSmrg case $host_cpu in 3902b85037dbSmrg hppa*64*) 3903b85037dbSmrg ;; 3904b85037dbSmrg *) 3905b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3906b85037dbSmrg ;; 3907b85037dbSmrg esac 3908b85037dbSmrg ;; 3909b85037dbSmrg *qnx* | *nto*) 3910b85037dbSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3911b85037dbSmrg # it will coredump. 3912b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3913b85037dbSmrg ;; 3914b85037dbSmrg *) 3915b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3916b85037dbSmrg ;; 3917b85037dbSmrg esac 3918b85037dbSmrg else 3919b85037dbSmrg case $host_os in 3920b85037dbSmrg aix[[4-9]]*) 3921b85037dbSmrg # All AIX code is PIC. 3922b85037dbSmrg if test "$host_cpu" = ia64; then 3923b85037dbSmrg # AIX 5 now supports IA64 processor 3924b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3925b85037dbSmrg else 3926b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3927b85037dbSmrg fi 3928b85037dbSmrg ;; 3929b85037dbSmrg chorus*) 3930b85037dbSmrg case $cc_basename in 3931b85037dbSmrg cxch68*) 3932b85037dbSmrg # Green Hills C++ Compiler 3933b85037dbSmrg # _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" 3934b85037dbSmrg ;; 3935b85037dbSmrg esac 3936b85037dbSmrg ;; 3937302b15bdSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3938302b15bdSmrg # This hack is so that the source file can tell whether it is being 3939302b15bdSmrg # built for inclusion in a dll (and should export symbols for example). 3940302b15bdSmrg m4_if([$1], [GCJ], [], 3941302b15bdSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3942302b15bdSmrg ;; 3943b85037dbSmrg dgux*) 3944b85037dbSmrg case $cc_basename in 3945b85037dbSmrg ec++*) 3946b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3947b85037dbSmrg ;; 3948b85037dbSmrg ghcx*) 3949b85037dbSmrg # Green Hills C++ Compiler 3950b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3951b85037dbSmrg ;; 3952b85037dbSmrg *) 3953b85037dbSmrg ;; 3954b85037dbSmrg esac 3955b85037dbSmrg ;; 3956b85037dbSmrg freebsd* | dragonfly*) 3957b85037dbSmrg # FreeBSD uses GNU C++ 3958b85037dbSmrg ;; 3959b85037dbSmrg hpux9* | hpux10* | hpux11*) 3960b85037dbSmrg case $cc_basename in 3961b85037dbSmrg CC*) 3962b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3963b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3964b85037dbSmrg if test "$host_cpu" != ia64; then 3965b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3966b85037dbSmrg fi 3967b85037dbSmrg ;; 3968b85037dbSmrg aCC*) 3969b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3970b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3971b85037dbSmrg case $host_cpu in 3972b85037dbSmrg hppa*64*|ia64*) 3973b85037dbSmrg # +Z the default 3974b85037dbSmrg ;; 3975b85037dbSmrg *) 3976b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3977b85037dbSmrg ;; 3978b85037dbSmrg esac 3979b85037dbSmrg ;; 3980b85037dbSmrg *) 3981b85037dbSmrg ;; 3982b85037dbSmrg esac 3983b85037dbSmrg ;; 3984b85037dbSmrg interix*) 3985b85037dbSmrg # This is c89, which is MS Visual C++ (no shared libs) 3986b85037dbSmrg # Anyone wants to do a port? 3987b85037dbSmrg ;; 3988b85037dbSmrg irix5* | irix6* | nonstopux*) 3989b85037dbSmrg case $cc_basename in 3990b85037dbSmrg CC*) 3991b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3992b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3993b85037dbSmrg # CC pic flag -KPIC is the default. 3994b85037dbSmrg ;; 3995b85037dbSmrg *) 3996b85037dbSmrg ;; 3997b85037dbSmrg esac 3998b85037dbSmrg ;; 3999b85037dbSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4000b85037dbSmrg case $cc_basename in 4001b85037dbSmrg KCC*) 4002b85037dbSmrg # KAI C++ Compiler 4003b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4004b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4005b85037dbSmrg ;; 4006b85037dbSmrg ecpc* ) 4007b85037dbSmrg # old Intel C++ for x86_64 which still supported -KPIC. 4008b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4009b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4010b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4011b85037dbSmrg ;; 4012b85037dbSmrg icpc* ) 4013b85037dbSmrg # Intel C++, used to be incompatible with GCC. 4014b85037dbSmrg # ICC 10 doesn't accept -KPIC any more. 4015b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4016b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4017b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4018b85037dbSmrg ;; 4019b85037dbSmrg pgCC* | pgcpp*) 4020b85037dbSmrg # Portland Group C++ compiler 4021b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4022b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4023b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4024b85037dbSmrg ;; 4025b85037dbSmrg cxx*) 4026b85037dbSmrg # Compaq C++ 4027b85037dbSmrg # Make sure the PIC flag is empty. It appears that all Alpha 4028b85037dbSmrg # Linux and Compaq Tru64 Unix objects are PIC. 4029b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4030b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4031b85037dbSmrg ;; 4032b85037dbSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4033b85037dbSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4034b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4035b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4036b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4037b85037dbSmrg ;; 4038b85037dbSmrg *) 4039b85037dbSmrg case `$CC -V 2>&1 | sed 5q` in 4040b85037dbSmrg *Sun\ C*) 4041b85037dbSmrg # Sun C++ 5.9 4042b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4043b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4044b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4045b85037dbSmrg ;; 4046b85037dbSmrg esac 4047b85037dbSmrg ;; 4048b85037dbSmrg esac 4049b85037dbSmrg ;; 4050b85037dbSmrg lynxos*) 4051b85037dbSmrg ;; 4052b85037dbSmrg m88k*) 4053b85037dbSmrg ;; 4054b85037dbSmrg mvs*) 4055b85037dbSmrg case $cc_basename in 4056b85037dbSmrg cxx*) 4057b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4058b85037dbSmrg ;; 4059b85037dbSmrg *) 4060b85037dbSmrg ;; 4061b85037dbSmrg esac 4062b85037dbSmrg ;; 4063b85037dbSmrg netbsd*) 4064b85037dbSmrg ;; 4065b85037dbSmrg *qnx* | *nto*) 4066b85037dbSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4067b85037dbSmrg # it will coredump. 4068b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4069b85037dbSmrg ;; 4070b85037dbSmrg osf3* | osf4* | osf5*) 4071b85037dbSmrg case $cc_basename in 4072b85037dbSmrg KCC*) 4073b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4074b85037dbSmrg ;; 4075b85037dbSmrg RCC*) 4076b85037dbSmrg # Rational C++ 2.4.1 4077b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4078b85037dbSmrg ;; 4079b85037dbSmrg cxx*) 4080b85037dbSmrg # Digital/Compaq C++ 4081b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4082b85037dbSmrg # Make sure the PIC flag is empty. It appears that all Alpha 4083b85037dbSmrg # Linux and Compaq Tru64 Unix objects are PIC. 4084b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4085b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4086b85037dbSmrg ;; 4087b85037dbSmrg *) 4088b85037dbSmrg ;; 4089b85037dbSmrg esac 4090b85037dbSmrg ;; 4091b85037dbSmrg psos*) 4092b85037dbSmrg ;; 4093b85037dbSmrg solaris*) 4094b85037dbSmrg case $cc_basename in 4095b85037dbSmrg CC* | sunCC*) 4096b85037dbSmrg # Sun C++ 4.2, 5.x and Centerline C++ 4097b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4098b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4099b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4100b85037dbSmrg ;; 4101b85037dbSmrg gcx*) 4102b85037dbSmrg # Green Hills C++ Compiler 4103b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4104b85037dbSmrg ;; 4105b85037dbSmrg *) 4106b85037dbSmrg ;; 4107b85037dbSmrg esac 4108b85037dbSmrg ;; 4109b85037dbSmrg sunos4*) 4110b85037dbSmrg case $cc_basename in 4111b85037dbSmrg CC*) 4112b85037dbSmrg # Sun C++ 4.x 4113b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4114b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4115b85037dbSmrg ;; 4116b85037dbSmrg lcc*) 4117b85037dbSmrg # Lucid 4118b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4119b85037dbSmrg ;; 4120b85037dbSmrg *) 4121b85037dbSmrg ;; 4122b85037dbSmrg esac 4123b85037dbSmrg ;; 4124b85037dbSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4125b85037dbSmrg case $cc_basename in 4126b85037dbSmrg CC*) 4127b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4128b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4129b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4130b85037dbSmrg ;; 4131b85037dbSmrg esac 4132b85037dbSmrg ;; 4133b85037dbSmrg tandem*) 4134b85037dbSmrg case $cc_basename in 4135b85037dbSmrg NCC*) 4136b85037dbSmrg # NonStop-UX NCC 3.20 4137b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4138b85037dbSmrg ;; 4139b85037dbSmrg *) 4140b85037dbSmrg ;; 4141b85037dbSmrg esac 4142b85037dbSmrg ;; 4143b85037dbSmrg vxworks*) 4144b85037dbSmrg ;; 4145b85037dbSmrg *) 4146b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4147b85037dbSmrg ;; 4148b85037dbSmrg esac 4149b85037dbSmrg fi 4150b85037dbSmrg], 4151b85037dbSmrg[ 4152b85037dbSmrg if test "$GCC" = yes; then 4153b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4154b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4155b85037dbSmrg 4156b85037dbSmrg case $host_os in 4157b85037dbSmrg aix*) 4158b85037dbSmrg # All AIX code is PIC. 4159b85037dbSmrg if test "$host_cpu" = ia64; then 4160b85037dbSmrg # AIX 5 now supports IA64 processor 4161b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4162b85037dbSmrg fi 4163b85037dbSmrg ;; 4164b85037dbSmrg 4165b85037dbSmrg amigaos*) 4166b85037dbSmrg case $host_cpu in 4167b85037dbSmrg powerpc) 4168b85037dbSmrg # see comment about AmigaOS4 .so support 4169b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4170b85037dbSmrg ;; 4171b85037dbSmrg m68k) 4172b85037dbSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4173b85037dbSmrg # adding the `-m68020' flag to GCC prevents building anything better, 4174b85037dbSmrg # like `-m68040'. 4175b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4176b85037dbSmrg ;; 4177b85037dbSmrg esac 4178b85037dbSmrg ;; 4179b85037dbSmrg 4180b85037dbSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4181b85037dbSmrg # PIC is the default for these OSes. 4182b85037dbSmrg ;; 4183b85037dbSmrg 4184b85037dbSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4185b85037dbSmrg # This hack is so that the source file can tell whether it is being 4186b85037dbSmrg # built for inclusion in a dll (and should export symbols for example). 4187b85037dbSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4188b85037dbSmrg # (--disable-auto-import) libraries 4189b85037dbSmrg m4_if([$1], [GCJ], [], 4190b85037dbSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4191b85037dbSmrg ;; 4192b85037dbSmrg 4193b85037dbSmrg darwin* | rhapsody*) 4194b85037dbSmrg # PIC is the default on this platform 4195b85037dbSmrg # Common symbols not allowed in MH_DYLIB files 4196b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4197b85037dbSmrg ;; 4198b85037dbSmrg 4199b85037dbSmrg haiku*) 4200b85037dbSmrg # PIC is the default for Haiku. 4201b85037dbSmrg # The "-static" flag exists, but is broken. 4202b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4203b85037dbSmrg ;; 4204b85037dbSmrg 4205b85037dbSmrg hpux*) 4206b85037dbSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4207b85037dbSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4208b85037dbSmrg # sets the default TLS model and affects inlining. 4209b85037dbSmrg case $host_cpu in 4210b85037dbSmrg hppa*64*) 4211b85037dbSmrg # +Z the default 4212b85037dbSmrg ;; 4213b85037dbSmrg *) 4214b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4215b85037dbSmrg ;; 4216b85037dbSmrg esac 4217b85037dbSmrg ;; 4218b85037dbSmrg 4219b85037dbSmrg interix[[3-9]]*) 4220b85037dbSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4221b85037dbSmrg # Instead, we relocate shared libraries at runtime. 4222b85037dbSmrg ;; 4223b85037dbSmrg 4224b85037dbSmrg msdosdjgpp*) 4225b85037dbSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4226b85037dbSmrg # on systems that don't support them. 4227b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4228b85037dbSmrg enable_shared=no 4229b85037dbSmrg ;; 4230b85037dbSmrg 4231b85037dbSmrg *nto* | *qnx*) 4232b85037dbSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4233b85037dbSmrg # it will coredump. 4234b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4235b85037dbSmrg ;; 4236b85037dbSmrg 4237b85037dbSmrg sysv4*MP*) 4238b85037dbSmrg if test -d /usr/nec; then 4239b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4240b85037dbSmrg fi 4241b85037dbSmrg ;; 4242b85037dbSmrg 4243b85037dbSmrg *) 4244b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4245b85037dbSmrg ;; 4246b85037dbSmrg esac 4247b85037dbSmrg 4248b85037dbSmrg case $cc_basename in 4249b85037dbSmrg nvcc*) # Cuda Compiler Driver 2.2 4250b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4251b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 4252b85037dbSmrg ;; 4253b85037dbSmrg esac 4254b85037dbSmrg else 4255b85037dbSmrg # PORTME Check for flag to pass linker flags through the system compiler. 4256b85037dbSmrg case $host_os in 4257b85037dbSmrg aix*) 4258b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4259b85037dbSmrg if test "$host_cpu" = ia64; then 4260b85037dbSmrg # AIX 5 now supports IA64 processor 4261b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4262b85037dbSmrg else 4263b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4264b85037dbSmrg fi 4265b85037dbSmrg ;; 4266b85037dbSmrg 4267b85037dbSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4268b85037dbSmrg # This hack is so that the source file can tell whether it is being 4269b85037dbSmrg # built for inclusion in a dll (and should export symbols for example). 4270b85037dbSmrg m4_if([$1], [GCJ], [], 4271b85037dbSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4272b85037dbSmrg ;; 4273b85037dbSmrg 4274b85037dbSmrg hpux9* | hpux10* | hpux11*) 4275b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4276b85037dbSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4277b85037dbSmrg # not for PA HP-UX. 4278b85037dbSmrg case $host_cpu in 4279b85037dbSmrg hppa*64*|ia64*) 4280b85037dbSmrg # +Z the default 4281b85037dbSmrg ;; 4282b85037dbSmrg *) 4283b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4284b85037dbSmrg ;; 4285b85037dbSmrg esac 4286b85037dbSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4287b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4288b85037dbSmrg ;; 4289b85037dbSmrg 4290b85037dbSmrg irix5* | irix6* | nonstopux*) 4291b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4292b85037dbSmrg # PIC (with -KPIC) is the default. 4293b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4294b85037dbSmrg ;; 4295b85037dbSmrg 4296b85037dbSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4297b85037dbSmrg case $cc_basename in 4298b85037dbSmrg # old Intel for x86_64 which still supported -KPIC. 4299b85037dbSmrg ecc*) 4300b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4301b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4302b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4303b85037dbSmrg ;; 4304b85037dbSmrg # icc used to be incompatible with GCC. 4305b85037dbSmrg # ICC 10 doesn't accept -KPIC any more. 4306b85037dbSmrg icc* | ifort*) 4307b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4308b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4309b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4310b85037dbSmrg ;; 4311b85037dbSmrg # Lahey Fortran 8.1. 4312b85037dbSmrg lf95*) 4313b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4314b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4315b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4316b85037dbSmrg ;; 4317302b15bdSmrg nagfor*) 4318302b15bdSmrg # NAG Fortran compiler 4319302b15bdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4320302b15bdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4321302b15bdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4322302b15bdSmrg ;; 4323b85037dbSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4324b85037dbSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 4325b85037dbSmrg # which looks to be a dead project) 4326b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4327b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4328b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4329b85037dbSmrg ;; 4330b85037dbSmrg ccc*) 4331b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4332b85037dbSmrg # All Alpha code is PIC. 4333b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4334b85037dbSmrg ;; 4335b85037dbSmrg xl* | bgxl* | bgf* | mpixl*) 4336b85037dbSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4337b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4338b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4339b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4340b85037dbSmrg ;; 4341b85037dbSmrg *) 4342b85037dbSmrg case `$CC -V 2>&1 | sed 5q` in 4343b85037dbSmrg *Sun\ F* | *Sun*Fortran*) 4344b85037dbSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4345b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4346b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4347b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4348b85037dbSmrg ;; 4349b85037dbSmrg *Sun\ C*) 4350b85037dbSmrg # Sun C 5.9 4351b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4352b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4353b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4354b85037dbSmrg ;; 4355b85037dbSmrg esac 4356b85037dbSmrg ;; 4357b85037dbSmrg esac 4358b85037dbSmrg ;; 4359b85037dbSmrg 4360b85037dbSmrg newsos6) 4361b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4362b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4363b85037dbSmrg ;; 4364b85037dbSmrg 4365b85037dbSmrg *nto* | *qnx*) 4366b85037dbSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4367b85037dbSmrg # it will coredump. 4368b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4369b85037dbSmrg ;; 4370b85037dbSmrg 4371b85037dbSmrg osf3* | osf4* | osf5*) 4372b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4373b85037dbSmrg # All OSF/1 code is PIC. 4374b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4375b85037dbSmrg ;; 4376b85037dbSmrg 4377b85037dbSmrg rdos*) 4378b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4379b85037dbSmrg ;; 4380b85037dbSmrg 4381b85037dbSmrg solaris*) 4382b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4383b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4384b85037dbSmrg case $cc_basename in 4385b85037dbSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4386b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4387b85037dbSmrg *) 4388b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4389b85037dbSmrg esac 4390b85037dbSmrg ;; 4391b85037dbSmrg 4392b85037dbSmrg sunos4*) 4393b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4394b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4395b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4396b85037dbSmrg ;; 4397b85037dbSmrg 4398b85037dbSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 4399b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4400b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4401b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4402b85037dbSmrg ;; 4403b85037dbSmrg 4404b85037dbSmrg sysv4*MP*) 4405b85037dbSmrg if test -d /usr/nec ;then 4406b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4407b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4408b85037dbSmrg fi 4409b85037dbSmrg ;; 4410b85037dbSmrg 4411b85037dbSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4412b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4413b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4414b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4415b85037dbSmrg ;; 4416b85037dbSmrg 4417b85037dbSmrg unicos*) 4418b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4419b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4420b85037dbSmrg ;; 4421b85037dbSmrg 4422b85037dbSmrg uts4*) 4423b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4424b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4425b85037dbSmrg ;; 4426b85037dbSmrg 4427b85037dbSmrg *) 4428b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4429b85037dbSmrg ;; 4430b85037dbSmrg esac 4431b85037dbSmrg fi 4432b85037dbSmrg]) 4433b85037dbSmrgcase $host_os in 4434b85037dbSmrg # For platforms which do not support PIC, -DPIC is meaningless: 4435b85037dbSmrg *djgpp*) 4436b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4437b85037dbSmrg ;; 4438b85037dbSmrg *) 4439b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4440b85037dbSmrg ;; 4441b85037dbSmrgesac 4442302b15bdSmrg 4443302b15bdSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4444302b15bdSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4445302b15bdSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4446302b15bdSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4447b85037dbSmrg 4448b85037dbSmrg# 4449b85037dbSmrg# Check to make sure the PIC flag actually works. 4450b85037dbSmrg# 4451b85037dbSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4452b85037dbSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4453b85037dbSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4454b85037dbSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4455b85037dbSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4456b85037dbSmrg "" | " "*) ;; 4457b85037dbSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4458b85037dbSmrg esac], 4459b85037dbSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4460b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4461b85037dbSmrgfi 4462b85037dbSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4463b85037dbSmrg [Additional compiler flags for building library objects]) 4464b85037dbSmrg 4465302b15bdSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4466302b15bdSmrg [How to pass a linker flag through the compiler]) 4467b85037dbSmrg# 4468b85037dbSmrg# Check to make sure the static flag actually works. 4469b85037dbSmrg# 4470b85037dbSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4471b85037dbSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4472b85037dbSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4473b85037dbSmrg $lt_tmp_static_flag, 4474b85037dbSmrg [], 4475b85037dbSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4476b85037dbSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4477b85037dbSmrg [Compiler flag to prevent dynamic linking]) 4478b85037dbSmrg])# _LT_COMPILER_PIC 4479b85037dbSmrg 4480b85037dbSmrg 4481b85037dbSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 4482b85037dbSmrg# ---------------------------- 4483b85037dbSmrg# See if the linker supports building shared libraries. 4484b85037dbSmrgm4_defun([_LT_LINKER_SHLIBS], 4485b85037dbSmrg[AC_REQUIRE([LT_PATH_LD])dnl 4486b85037dbSmrgAC_REQUIRE([LT_PATH_NM])dnl 4487302b15bdSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4488b85037dbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4489b85037dbSmrgm4_require([_LT_DECL_EGREP])dnl 4490b85037dbSmrgm4_require([_LT_DECL_SED])dnl 4491b85037dbSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4492b85037dbSmrgm4_require([_LT_TAG_COMPILER])dnl 4493b85037dbSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4494b85037dbSmrgm4_if([$1], [CXX], [ 4495b85037dbSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4496302b15bdSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4497b85037dbSmrg case $host_os in 4498b85037dbSmrg aix[[4-9]]*) 4499b85037dbSmrg # If we're using GNU nm, then we don't want the "-C" option. 4500b85037dbSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4501b85037dbSmrg # Also, AIX nm treats weak defined symbols like other global defined 4502b85037dbSmrg # symbols, whereas GNU nm marks them as "W". 4503b85037dbSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4504b85037dbSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4505b85037dbSmrg else 4506b85037dbSmrg _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' 4507b85037dbSmrg fi 4508b85037dbSmrg ;; 4509b85037dbSmrg pw32*) 4510b85037dbSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4511302b15bdSmrg ;; 4512b85037dbSmrg cygwin* | mingw* | cegcc*) 4513302b15bdSmrg case $cc_basename in 4514302b15bdSmrg cl*) ;; 4515302b15bdSmrg *) 4516302b15bdSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 4517302b15bdSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4518302b15bdSmrg ;; 4519302b15bdSmrg esac 4520302b15bdSmrg ;; 4521b85037dbSmrg *) 4522b85037dbSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4523302b15bdSmrg ;; 4524b85037dbSmrg esac 4525b85037dbSmrg], [ 4526b85037dbSmrg runpath_var= 4527b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 4528b85037dbSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4529b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)= 4530b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4531b85037dbSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 4532b85037dbSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4533b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4534b85037dbSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4535b85037dbSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 4536b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4537b85037dbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4538b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4539b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4540b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4541b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4542b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4543b85037dbSmrg _LT_TAGVAR(inherit_rpath, $1)=no 4544b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4545b85037dbSmrg _LT_TAGVAR(module_cmds, $1)= 4546b85037dbSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 4547b85037dbSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4548b85037dbSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4549b85037dbSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4550b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4551b85037dbSmrg # include_expsyms should be a list of space-separated symbols to be *always* 4552b85037dbSmrg # included in the symbol list 4553b85037dbSmrg _LT_TAGVAR(include_expsyms, $1)= 4554b85037dbSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 4555b85037dbSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4556b85037dbSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4557b85037dbSmrg # as well as any symbol that contains `d'. 4558b85037dbSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4559b85037dbSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4560b85037dbSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 4561b85037dbSmrg # the symbol is explicitly referenced. Since portable code cannot 4562b85037dbSmrg # rely on this symbol name, it's probably fine to never include it in 4563b85037dbSmrg # preloaded symbol tables. 4564b85037dbSmrg # Exclude shared library initialization/finalization symbols. 4565b85037dbSmrgdnl Note also adjust exclude_expsyms for C++ above. 4566b85037dbSmrg extract_expsyms_cmds= 4567b85037dbSmrg 4568b85037dbSmrg case $host_os in 4569b85037dbSmrg cygwin* | mingw* | pw32* | cegcc*) 4570b85037dbSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4571b85037dbSmrg # When not using gcc, we currently assume that we are using 4572b85037dbSmrg # Microsoft Visual C++. 4573b85037dbSmrg if test "$GCC" != yes; then 4574b85037dbSmrg with_gnu_ld=no 4575b85037dbSmrg fi 4576b85037dbSmrg ;; 4577b85037dbSmrg interix*) 4578b85037dbSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4579b85037dbSmrg with_gnu_ld=yes 4580b85037dbSmrg ;; 4581b85037dbSmrg openbsd*) 4582b85037dbSmrg with_gnu_ld=no 4583b85037dbSmrg ;; 4584b85037dbSmrg esac 4585b85037dbSmrg 4586b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 4587b85037dbSmrg 4588b85037dbSmrg # On some targets, GNU ld is compatible enough with the native linker 4589b85037dbSmrg # that we're better off using the native interface for both. 4590b85037dbSmrg lt_use_gnu_ld_interface=no 4591b85037dbSmrg if test "$with_gnu_ld" = yes; then 4592b85037dbSmrg case $host_os in 4593b85037dbSmrg aix*) 4594b85037dbSmrg # The AIX port of GNU ld has always aspired to compatibility 4595b85037dbSmrg # with the native linker. However, as the warning in the GNU ld 4596b85037dbSmrg # block says, versions before 2.19.5* couldn't really create working 4597b85037dbSmrg # shared libraries, regardless of the interface used. 4598b85037dbSmrg case `$LD -v 2>&1` in 4599b85037dbSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4600b85037dbSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4601b85037dbSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4602b85037dbSmrg *) 4603b85037dbSmrg lt_use_gnu_ld_interface=yes 4604b85037dbSmrg ;; 4605b85037dbSmrg esac 4606b85037dbSmrg ;; 4607b85037dbSmrg *) 4608b85037dbSmrg lt_use_gnu_ld_interface=yes 4609b85037dbSmrg ;; 4610b85037dbSmrg esac 4611b85037dbSmrg fi 4612b85037dbSmrg 4613b85037dbSmrg if test "$lt_use_gnu_ld_interface" = yes; then 4614b85037dbSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 4615b85037dbSmrg wlarc='${wl}' 4616b85037dbSmrg 4617b85037dbSmrg # Set some defaults for GNU ld with shared library support. These 4618b85037dbSmrg # are reset later if shared libraries are not supported. Putting them 4619b85037dbSmrg # here allows them to be overridden if necessary. 4620b85037dbSmrg runpath_var=LD_RUN_PATH 4621b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4622b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4623b85037dbSmrg # ancient GNU ld didn't support --whole-archive et. al. 4624b85037dbSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4625b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4626b85037dbSmrg else 4627b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4628b85037dbSmrg fi 4629b85037dbSmrg supports_anon_versioning=no 4630b85037dbSmrg case `$LD -v 2>&1` in 4631b85037dbSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 4632b85037dbSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4633b85037dbSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4634b85037dbSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4635b85037dbSmrg *\ 2.11.*) ;; # other 2.11 versions 4636b85037dbSmrg *) supports_anon_versioning=yes ;; 4637b85037dbSmrg esac 4638b85037dbSmrg 4639b85037dbSmrg # See if GNU ld supports shared libraries. 4640b85037dbSmrg case $host_os in 4641b85037dbSmrg aix[[3-9]]*) 4642b85037dbSmrg # On AIX/PPC, the GNU linker is very broken 4643b85037dbSmrg if test "$host_cpu" != ia64; then 4644b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4645b85037dbSmrg cat <<_LT_EOF 1>&2 4646b85037dbSmrg 4647b85037dbSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 4648b85037dbSmrg*** to be unable to reliably create shared libraries on AIX. 4649b85037dbSmrg*** Therefore, libtool is disabling shared libraries support. If you 4650b85037dbSmrg*** really care for shared libraries, you may want to install binutils 4651b85037dbSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4652b85037dbSmrg*** You will then need to restart the configuration process. 4653b85037dbSmrg 4654b85037dbSmrg_LT_EOF 4655b85037dbSmrg fi 4656b85037dbSmrg ;; 4657b85037dbSmrg 4658b85037dbSmrg amigaos*) 4659b85037dbSmrg case $host_cpu in 4660b85037dbSmrg powerpc) 4661b85037dbSmrg # see comment about AmigaOS4 .so support 4662b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4663b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4664b85037dbSmrg ;; 4665b85037dbSmrg m68k) 4666b85037dbSmrg _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)' 4667b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4668b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4669b85037dbSmrg ;; 4670b85037dbSmrg esac 4671b85037dbSmrg ;; 4672b85037dbSmrg 4673b85037dbSmrg beos*) 4674b85037dbSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4675b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4676b85037dbSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4677b85037dbSmrg # support --undefined. This deserves some investigation. FIXME 4678b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4679b85037dbSmrg else 4680b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4681b85037dbSmrg fi 4682b85037dbSmrg ;; 4683b85037dbSmrg 4684b85037dbSmrg cygwin* | mingw* | pw32* | cegcc*) 4685b85037dbSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4686b85037dbSmrg # as there is no search path for DLLs. 4687b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4688b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4689b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4690b85037dbSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4691b85037dbSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4692302b15bdSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 4693302b15bdSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4694b85037dbSmrg 4695b85037dbSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4696b85037dbSmrg _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' 4697b85037dbSmrg # If the export-symbols file already is a .def file (1st line 4698b85037dbSmrg # is EXPORTS), use it as is; otherwise, prepend... 4699b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4700b85037dbSmrg cp $export_symbols $output_objdir/$soname.def; 4701b85037dbSmrg else 4702b85037dbSmrg echo EXPORTS > $output_objdir/$soname.def; 4703b85037dbSmrg cat $export_symbols >> $output_objdir/$soname.def; 4704b85037dbSmrg fi~ 4705b85037dbSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4706b85037dbSmrg else 4707b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4708b85037dbSmrg fi 4709b85037dbSmrg ;; 4710b85037dbSmrg 4711b85037dbSmrg haiku*) 4712b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4713b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4714b85037dbSmrg ;; 4715b85037dbSmrg 4716b85037dbSmrg interix[[3-9]]*) 4717b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4718b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4719b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4720b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4721b85037dbSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4722b85037dbSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4723b85037dbSmrg # default) and relocated if they conflict, which is a slow very memory 4724b85037dbSmrg # consuming and fragmenting process. To avoid this, we pick a random, 4725b85037dbSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4726b85037dbSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4727b85037dbSmrg _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' 4728b85037dbSmrg _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' 4729b85037dbSmrg ;; 4730b85037dbSmrg 4731b85037dbSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4732b85037dbSmrg tmp_diet=no 4733b85037dbSmrg if test "$host_os" = linux-dietlibc; then 4734b85037dbSmrg case $cc_basename in 4735b85037dbSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4736b85037dbSmrg esac 4737b85037dbSmrg fi 4738b85037dbSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4739b85037dbSmrg && test "$tmp_diet" = no 4740b85037dbSmrg then 4741302b15bdSmrg tmp_addflag=' $pic_flag' 4742b85037dbSmrg tmp_sharedflag='-shared' 4743b85037dbSmrg case $cc_basename,$host_cpu in 4744b85037dbSmrg pgcc*) # Portland Group C compiler 4745b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 4746b85037dbSmrg tmp_addflag=' $pic_flag' 4747b85037dbSmrg ;; 4748b85037dbSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 4749b85037dbSmrg # Portland Group f77 and f90 compilers 4750b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 4751b85037dbSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 4752b85037dbSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4753b85037dbSmrg tmp_addflag=' -i_dynamic' ;; 4754b85037dbSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4755b85037dbSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4756b85037dbSmrg ifc* | ifort*) # Intel Fortran compiler 4757b85037dbSmrg tmp_addflag=' -nofor_main' ;; 4758b85037dbSmrg lf95*) # Lahey Fortran 8.1 4759b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4760b85037dbSmrg tmp_sharedflag='--shared' ;; 4761b85037dbSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4762b85037dbSmrg tmp_sharedflag='-qmkshrobj' 4763b85037dbSmrg tmp_addflag= ;; 4764b85037dbSmrg nvcc*) # Cuda Compiler Driver 2.2 4765b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 4766b85037dbSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4767b85037dbSmrg ;; 4768b85037dbSmrg esac 4769b85037dbSmrg case `$CC -V 2>&1 | sed 5q` in 4770b85037dbSmrg *Sun\ C*) # Sun C 5.9 4771b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 4772b85037dbSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4773b85037dbSmrg tmp_sharedflag='-G' ;; 4774b85037dbSmrg *Sun\ F*) # Sun Fortran 8.3 4775b85037dbSmrg tmp_sharedflag='-G' ;; 4776b85037dbSmrg esac 4777b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4778b85037dbSmrg 4779b85037dbSmrg if test "x$supports_anon_versioning" = xyes; then 4780b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4781b85037dbSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4782b85037dbSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4783b85037dbSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4784b85037dbSmrg fi 4785b85037dbSmrg 4786b85037dbSmrg case $cc_basename in 4787b85037dbSmrg xlf* | bgf* | bgxlf* | mpixlf*) 4788b85037dbSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4789b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4790b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4791b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 4792b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4793b85037dbSmrg if test "x$supports_anon_versioning" = xyes; then 4794b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4795b85037dbSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4796b85037dbSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4797b85037dbSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4798b85037dbSmrg fi 4799b85037dbSmrg ;; 4800b85037dbSmrg esac 4801b85037dbSmrg else 4802b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4803b85037dbSmrg fi 4804b85037dbSmrg ;; 4805b85037dbSmrg 4806b85037dbSmrg netbsd*) 4807b85037dbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4808b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4809b85037dbSmrg wlarc= 4810b85037dbSmrg else 4811302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4812302b15bdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 4813b85037dbSmrg fi 4814b85037dbSmrg ;; 4815b85037dbSmrg 4816b85037dbSmrg solaris*) 4817b85037dbSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4818b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4819b85037dbSmrg cat <<_LT_EOF 1>&2 4820b85037dbSmrg 4821b85037dbSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4822b85037dbSmrg*** create shared libraries on Solaris systems. Therefore, libtool 4823b85037dbSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 4824b85037dbSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 4825b85037dbSmrg*** your PATH or compiler configuration so that the native linker is 4826b85037dbSmrg*** used, and then restart. 4827b85037dbSmrg 4828b85037dbSmrg_LT_EOF 4829b85037dbSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4830302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4831302b15bdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 4832b85037dbSmrg else 4833b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4834b85037dbSmrg fi 4835b85037dbSmrg ;; 4836b85037dbSmrg 4837b85037dbSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4838b85037dbSmrg case `$LD -v 2>&1` in 4839b85037dbSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4840b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4841b85037dbSmrg cat <<_LT_EOF 1>&2 4842b85037dbSmrg 4843b85037dbSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4844b85037dbSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4845b85037dbSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 4846b85037dbSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4847b85037dbSmrg*** your PATH or compiler configuration so that the native linker is 4848b85037dbSmrg*** used, and then restart. 4849b85037dbSmrg 4850b85037dbSmrg_LT_EOF 4851b85037dbSmrg ;; 4852b85037dbSmrg *) 4853b85037dbSmrg # For security reasons, it is highly recommended that you always 4854b85037dbSmrg # use absolute paths for naming shared libraries, and exclude the 4855b85037dbSmrg # DT_RUNPATH tag from executables and libraries. But doing so 4856b85037dbSmrg # requires that you compile everything twice, which is a pain. 4857b85037dbSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4858b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4859b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4860b85037dbSmrg _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' 4861b85037dbSmrg else 4862b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4863b85037dbSmrg fi 4864b85037dbSmrg ;; 4865b85037dbSmrg esac 4866b85037dbSmrg ;; 4867b85037dbSmrg 4868b85037dbSmrg sunos4*) 4869b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4870b85037dbSmrg wlarc= 4871b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4872b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4873b85037dbSmrg ;; 4874b85037dbSmrg 4875b85037dbSmrg *) 4876b85037dbSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4877302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4878302b15bdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 4879b85037dbSmrg else 4880b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4881b85037dbSmrg fi 4882b85037dbSmrg ;; 4883b85037dbSmrg esac 4884b85037dbSmrg 4885b85037dbSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4886b85037dbSmrg runpath_var= 4887b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4888b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4889b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4890b85037dbSmrg fi 4891b85037dbSmrg else 4892b85037dbSmrg # PORTME fill in a description of your system's linker (not GNU ld) 4893b85037dbSmrg case $host_os in 4894b85037dbSmrg aix3*) 4895b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4896b85037dbSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 4897b85037dbSmrg _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' 4898b85037dbSmrg # Note: this linker hardcodes the directories in LIBPATH if there 4899b85037dbSmrg # are no directories specified by -L. 4900b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4901b85037dbSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4902b85037dbSmrg # Neither direct hardcoding nor static linking is supported with a 4903b85037dbSmrg # broken collect2. 4904b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4905b85037dbSmrg fi 4906b85037dbSmrg ;; 4907b85037dbSmrg 4908b85037dbSmrg aix[[4-9]]*) 4909b85037dbSmrg if test "$host_cpu" = ia64; then 4910b85037dbSmrg # On IA64, the linker does run time linking by default, so we don't 4911b85037dbSmrg # have to do anything special. 4912b85037dbSmrg aix_use_runtimelinking=no 4913b85037dbSmrg exp_sym_flag='-Bexport' 4914b85037dbSmrg no_entry_flag="" 4915b85037dbSmrg else 4916b85037dbSmrg # If we're using GNU nm, then we don't want the "-C" option. 4917b85037dbSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4918b85037dbSmrg # Also, AIX nm treats weak defined symbols like other global 4919b85037dbSmrg # defined symbols, whereas GNU nm marks them as "W". 4920b85037dbSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4921b85037dbSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4922b85037dbSmrg else 4923b85037dbSmrg _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' 4924b85037dbSmrg fi 4925b85037dbSmrg aix_use_runtimelinking=no 4926b85037dbSmrg 4927b85037dbSmrg # Test if we are trying to use run time linking or normal 4928b85037dbSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4929b85037dbSmrg # need to do runtime linking. 4930b85037dbSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4931b85037dbSmrg for ld_flag in $LDFLAGS; do 4932b85037dbSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4933b85037dbSmrg aix_use_runtimelinking=yes 4934b85037dbSmrg break 4935b85037dbSmrg fi 4936b85037dbSmrg done 4937b85037dbSmrg ;; 4938b85037dbSmrg esac 4939b85037dbSmrg 4940b85037dbSmrg exp_sym_flag='-bexport' 4941b85037dbSmrg no_entry_flag='-bnoentry' 4942b85037dbSmrg fi 4943b85037dbSmrg 4944b85037dbSmrg # When large executables or shared objects are built, AIX ld can 4945b85037dbSmrg # have problems creating the table of contents. If linking a library 4946b85037dbSmrg # or program results in "error TOC overflow" add -mminimal-toc to 4947b85037dbSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4948b85037dbSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4949b85037dbSmrg 4950b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='' 4951b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4952b85037dbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4953b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 4954b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4955b85037dbSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 4956b85037dbSmrg 4957b85037dbSmrg if test "$GCC" = yes; then 4958b85037dbSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 4959b85037dbSmrg # We only want to do this on AIX 4.2 and lower, the check 4960b85037dbSmrg # below for broken collect2 doesn't work under 4.3+ 4961b85037dbSmrg collect2name=`${CC} -print-prog-name=collect2` 4962b85037dbSmrg if test -f "$collect2name" && 4963b85037dbSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 4964b85037dbSmrg then 4965b85037dbSmrg # We have reworked collect2 4966b85037dbSmrg : 4967b85037dbSmrg else 4968b85037dbSmrg # We have old collect2 4969b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4970b85037dbSmrg # It fails to find uninstalled libraries when the uninstalled 4971b85037dbSmrg # path is not listed in the libpath. Setting hardcode_minus_L 4972b85037dbSmrg # to unsupported forces relinking 4973b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4974b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4975b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4976b85037dbSmrg fi 4977b85037dbSmrg ;; 4978b85037dbSmrg esac 4979b85037dbSmrg shared_flag='-shared' 4980b85037dbSmrg if test "$aix_use_runtimelinking" = yes; then 4981b85037dbSmrg shared_flag="$shared_flag "'${wl}-G' 4982b85037dbSmrg fi 4983b85037dbSmrg else 4984b85037dbSmrg # not using gcc 4985b85037dbSmrg if test "$host_cpu" = ia64; then 4986b85037dbSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4987b85037dbSmrg # chokes on -Wl,-G. The following line is correct: 4988b85037dbSmrg shared_flag='-G' 4989b85037dbSmrg else 4990b85037dbSmrg if test "$aix_use_runtimelinking" = yes; then 4991b85037dbSmrg shared_flag='${wl}-G' 4992b85037dbSmrg else 4993b85037dbSmrg shared_flag='${wl}-bM:SRE' 4994b85037dbSmrg fi 4995b85037dbSmrg fi 4996b85037dbSmrg fi 4997b85037dbSmrg 4998b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 4999b85037dbSmrg # It seems that -bexpall does not export symbols beginning with 5000b85037dbSmrg # underscore (_), so it is better to generate a list of symbols to export. 5001b85037dbSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5002b85037dbSmrg if test "$aix_use_runtimelinking" = yes; then 5003b85037dbSmrg # Warning - without using the other runtime loading flags (-brtl), 5004b85037dbSmrg # -berok will link without error, but may produce a broken library. 5005b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5006b85037dbSmrg # Determine the default libpath from the value encoded in an 5007b85037dbSmrg # empty executable. 5008302b15bdSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5009b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5010b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5011b85037dbSmrg else 5012b85037dbSmrg if test "$host_cpu" = ia64; then 5013b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5014b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5015b85037dbSmrg _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" 5016b85037dbSmrg else 5017b85037dbSmrg # Determine the default libpath from the value encoded in an 5018b85037dbSmrg # empty executable. 5019302b15bdSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5020b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5021b85037dbSmrg # Warning - without using the other run time loading flags, 5022b85037dbSmrg # -berok will link without error, but may produce a broken library. 5023b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5024b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5025b85037dbSmrg if test "$with_gnu_ld" = yes; then 5026b85037dbSmrg # We only use this code for GNU lds that support --whole-archive. 5027b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5028b85037dbSmrg else 5029b85037dbSmrg # Exported symbols can be pulled into shared objects from archives 5030b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5031b85037dbSmrg fi 5032b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5033b85037dbSmrg # This is similar to how AIX traditionally builds its shared libraries. 5034b85037dbSmrg _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' 5035b85037dbSmrg fi 5036b85037dbSmrg fi 5037b85037dbSmrg ;; 5038b85037dbSmrg 5039b85037dbSmrg amigaos*) 5040b85037dbSmrg case $host_cpu in 5041b85037dbSmrg powerpc) 5042b85037dbSmrg # see comment about AmigaOS4 .so support 5043b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5044b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5045b85037dbSmrg ;; 5046b85037dbSmrg m68k) 5047b85037dbSmrg _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)' 5048b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5049b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5050b85037dbSmrg ;; 5051b85037dbSmrg esac 5052b85037dbSmrg ;; 5053b85037dbSmrg 5054b85037dbSmrg bsdi[[45]]*) 5055b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5056b85037dbSmrg ;; 5057b85037dbSmrg 5058b85037dbSmrg cygwin* | mingw* | pw32* | cegcc*) 5059b85037dbSmrg # When not using gcc, we currently assume that we are using 5060b85037dbSmrg # Microsoft Visual C++. 5061b85037dbSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5062b85037dbSmrg # no search path for DLLs. 5063302b15bdSmrg case $cc_basename in 5064302b15bdSmrg cl*) 5065302b15bdSmrg # Native MSVC 5066302b15bdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5067302b15bdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5068302b15bdSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5069302b15bdSmrg _LT_TAGVAR(file_list_spec, $1)='@' 5070302b15bdSmrg # Tell ltmain to make .lib files, not .a files. 5071302b15bdSmrg libext=lib 5072302b15bdSmrg # Tell ltmain to make .dll files, not .so files. 5073302b15bdSmrg shrext_cmds=".dll" 5074302b15bdSmrg # FIXME: Setting linknames here is a bad hack. 5075302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5076302b15bdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5077302b15bdSmrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5078302b15bdSmrg else 5079302b15bdSmrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5080302b15bdSmrg fi~ 5081302b15bdSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5082302b15bdSmrg linknames=' 5083302b15bdSmrg # The linker will not automatically build a static lib if we build a DLL. 5084302b15bdSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5085302b15bdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5086302b15bdSmrg _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' 5087302b15bdSmrg # Don't use ranlib 5088302b15bdSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5089302b15bdSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5090302b15bdSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5091302b15bdSmrg case $lt_outputfile in 5092302b15bdSmrg *.exe|*.EXE) ;; 5093302b15bdSmrg *) 5094302b15bdSmrg lt_outputfile="$lt_outputfile.exe" 5095302b15bdSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 5096302b15bdSmrg ;; 5097302b15bdSmrg esac~ 5098302b15bdSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5099302b15bdSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5100302b15bdSmrg $RM "$lt_outputfile.manifest"; 5101302b15bdSmrg fi' 5102302b15bdSmrg ;; 5103302b15bdSmrg *) 5104302b15bdSmrg # Assume MSVC wrapper 5105302b15bdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5106302b15bdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5107302b15bdSmrg # Tell ltmain to make .lib files, not .a files. 5108302b15bdSmrg libext=lib 5109302b15bdSmrg # Tell ltmain to make .dll files, not .so files. 5110302b15bdSmrg shrext_cmds=".dll" 5111302b15bdSmrg # FIXME: Setting linknames here is a bad hack. 5112302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5113302b15bdSmrg # The linker will automatically build a .lib file if we build a DLL. 5114302b15bdSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5115302b15bdSmrg # FIXME: Should let the user specify the lib program. 5116302b15bdSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5117302b15bdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5118302b15bdSmrg ;; 5119302b15bdSmrg esac 5120b85037dbSmrg ;; 5121b85037dbSmrg 5122b85037dbSmrg darwin* | rhapsody*) 5123b85037dbSmrg _LT_DARWIN_LINKER_FEATURES($1) 5124b85037dbSmrg ;; 5125b85037dbSmrg 5126b85037dbSmrg dgux*) 5127b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5128b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5129b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5130b85037dbSmrg ;; 5131b85037dbSmrg 5132b85037dbSmrg freebsd1*) 5133b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5134b85037dbSmrg ;; 5135b85037dbSmrg 5136b85037dbSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5137b85037dbSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 5138b85037dbSmrg # does not break anything, and helps significantly (at the cost of a little 5139b85037dbSmrg # extra space). 5140b85037dbSmrg freebsd2.2*) 5141b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5142b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5143b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5144b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5145b85037dbSmrg ;; 5146b85037dbSmrg 5147b85037dbSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5148b85037dbSmrg freebsd2*) 5149b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5150b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5151b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5152b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5153b85037dbSmrg ;; 5154b85037dbSmrg 5155b85037dbSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5156b85037dbSmrg freebsd* | dragonfly*) 5157302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5158b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5159b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5160b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5161b85037dbSmrg ;; 5162b85037dbSmrg 5163b85037dbSmrg hpux9*) 5164b85037dbSmrg if test "$GCC" = yes; then 5165302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5166b85037dbSmrg else 5167b85037dbSmrg _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' 5168b85037dbSmrg fi 5169b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5170b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5171b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5172b85037dbSmrg 5173b85037dbSmrg # hardcode_minus_L: Not really in the search PATH, 5174b85037dbSmrg # but as the default location of the library. 5175b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5176b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5177b85037dbSmrg ;; 5178b85037dbSmrg 5179b85037dbSmrg hpux10*) 5180b85037dbSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5181302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5182b85037dbSmrg else 5183b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5184b85037dbSmrg fi 5185b85037dbSmrg if test "$with_gnu_ld" = no; then 5186b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5187b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 5188b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5189b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5190b85037dbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5191b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5192b85037dbSmrg # hardcode_minus_L: Not really in the search PATH, 5193b85037dbSmrg # but as the default location of the library. 5194b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5195b85037dbSmrg fi 5196b85037dbSmrg ;; 5197b85037dbSmrg 5198b85037dbSmrg hpux11*) 5199b85037dbSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5200b85037dbSmrg case $host_cpu in 5201b85037dbSmrg hppa*64*) 5202b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5203b85037dbSmrg ;; 5204b85037dbSmrg ia64*) 5205302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5206b85037dbSmrg ;; 5207b85037dbSmrg *) 5208302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5209b85037dbSmrg ;; 5210b85037dbSmrg esac 5211b85037dbSmrg else 5212b85037dbSmrg case $host_cpu in 5213b85037dbSmrg hppa*64*) 5214b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5215b85037dbSmrg ;; 5216b85037dbSmrg ia64*) 5217b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5218b85037dbSmrg ;; 5219b85037dbSmrg *) 5220b85037dbSmrg m4_if($1, [], [ 5221b85037dbSmrg # Older versions of the 11.00 compiler do not understand -b yet 5222b85037dbSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5223b85037dbSmrg _LT_LINKER_OPTION([if $CC understands -b], 5224b85037dbSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5225b85037dbSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5226b85037dbSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5227b85037dbSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5228b85037dbSmrg ;; 5229b85037dbSmrg esac 5230b85037dbSmrg fi 5231b85037dbSmrg if test "$with_gnu_ld" = no; then 5232b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5233b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5234b85037dbSmrg 5235b85037dbSmrg case $host_cpu in 5236b85037dbSmrg hppa*64*|ia64*) 5237b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5238b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5239b85037dbSmrg ;; 5240b85037dbSmrg *) 5241b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5242b85037dbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5243b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5244b85037dbSmrg 5245b85037dbSmrg # hardcode_minus_L: Not really in the search PATH, 5246b85037dbSmrg # but as the default location of the library. 5247b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5248b85037dbSmrg ;; 5249b85037dbSmrg esac 5250b85037dbSmrg fi 5251b85037dbSmrg ;; 5252b85037dbSmrg 5253b85037dbSmrg irix5* | irix6* | nonstopux*) 5254b85037dbSmrg if test "$GCC" = yes; then 5255302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 5256b85037dbSmrg # Try to use the -exported_symbol ld option, if it does not 5257b85037dbSmrg # work, assume that -exports_file does not work either and 5258b85037dbSmrg # implicitly export all symbols. 5259302b15bdSmrg # This should be the same for all languages, so no per-tag cache variable. 5260302b15bdSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5261302b15bdSmrg [lt_cv_irix_exported_symbol], 5262302b15bdSmrg [save_LDFLAGS="$LDFLAGS" 5263302b15bdSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5264302b15bdSmrg AC_LINK_IFELSE( 5265302b15bdSmrg [AC_LANG_SOURCE( 5266302b15bdSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5267302b15bdSmrg [C++], [[int foo (void) { return 0; }]], 5268302b15bdSmrg [Fortran 77], [[ 5269302b15bdSmrg subroutine foo 5270302b15bdSmrg end]], 5271302b15bdSmrg [Fortran], [[ 5272302b15bdSmrg subroutine foo 5273302b15bdSmrg end]])])], 5274302b15bdSmrg [lt_cv_irix_exported_symbol=yes], 5275302b15bdSmrg [lt_cv_irix_exported_symbol=no]) 5276302b15bdSmrg LDFLAGS="$save_LDFLAGS"]) 5277302b15bdSmrg if test "$lt_cv_irix_exported_symbol" = yes; then 5278302b15bdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 5279302b15bdSmrg fi 5280b85037dbSmrg else 5281b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 5282b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 5283b85037dbSmrg fi 5284b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5285b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5286b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5287b85037dbSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 5288b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5289b85037dbSmrg ;; 5290b85037dbSmrg 5291b85037dbSmrg netbsd*) 5292b85037dbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5293b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5294b85037dbSmrg else 5295b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5296b85037dbSmrg fi 5297b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5298b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5299b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5300b85037dbSmrg ;; 5301b85037dbSmrg 5302b85037dbSmrg newsos6) 5303b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5304b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5305b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5306b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5307b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5308b85037dbSmrg ;; 5309b85037dbSmrg 5310b85037dbSmrg *nto* | *qnx*) 5311b85037dbSmrg ;; 5312b85037dbSmrg 5313b85037dbSmrg openbsd*) 5314b85037dbSmrg if test -f /usr/libexec/ld.so; then 5315b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5316b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5317b85037dbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5318b85037dbSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5319b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5320b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5321b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5322b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5323b85037dbSmrg else 5324b85037dbSmrg case $host_os in 5325b85037dbSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5326b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5327b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5328b85037dbSmrg ;; 5329b85037dbSmrg *) 5330b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5331b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5332b85037dbSmrg ;; 5333b85037dbSmrg esac 5334b85037dbSmrg fi 5335b85037dbSmrg else 5336b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5337b85037dbSmrg fi 5338b85037dbSmrg ;; 5339b85037dbSmrg 5340b85037dbSmrg os2*) 5341b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5342b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5343b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5344b85037dbSmrg _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' 5345b85037dbSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5346b85037dbSmrg ;; 5347b85037dbSmrg 5348b85037dbSmrg osf3*) 5349b85037dbSmrg if test "$GCC" = yes; then 5350b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5351b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 5352b85037dbSmrg else 5353b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5354b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 5355b85037dbSmrg fi 5356b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5357b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5358b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5359b85037dbSmrg ;; 5360b85037dbSmrg 5361b85037dbSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5362b85037dbSmrg if test "$GCC" = yes; then 5363b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5364302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 5365b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5366b85037dbSmrg else 5367b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5368b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 5369b85037dbSmrg _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~ 5370b85037dbSmrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 5371b85037dbSmrg 5372b85037dbSmrg # Both c and cxx compiler support -rpath directly 5373b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5374b85037dbSmrg fi 5375b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5376b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5377b85037dbSmrg ;; 5378b85037dbSmrg 5379b85037dbSmrg solaris*) 5380b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5381b85037dbSmrg if test "$GCC" = yes; then 5382b85037dbSmrg wlarc='${wl}' 5383302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5384b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5385302b15bdSmrg $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5386b85037dbSmrg else 5387b85037dbSmrg case `$CC -V 2>&1` in 5388b85037dbSmrg *"Compilers 5.0"*) 5389b85037dbSmrg wlarc='' 5390b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5391b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5392b85037dbSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5393b85037dbSmrg ;; 5394b85037dbSmrg *) 5395b85037dbSmrg wlarc='${wl}' 5396b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5397b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5398b85037dbSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5399b85037dbSmrg ;; 5400b85037dbSmrg esac 5401b85037dbSmrg fi 5402b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5403b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5404b85037dbSmrg case $host_os in 5405b85037dbSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5406b85037dbSmrg *) 5407b85037dbSmrg # The compiler driver will combine and reorder linker options, 5408b85037dbSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 5409b85037dbSmrg # but is careful enough not to reorder. 5410b85037dbSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5411b85037dbSmrg if test "$GCC" = yes; then 5412b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5413b85037dbSmrg else 5414b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5415b85037dbSmrg fi 5416b85037dbSmrg ;; 5417b85037dbSmrg esac 5418b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5419b85037dbSmrg ;; 5420b85037dbSmrg 5421b85037dbSmrg sunos4*) 5422b85037dbSmrg if test "x$host_vendor" = xsequent; then 5423b85037dbSmrg # Use $CC to link under sequent, because it throws in some extra .o 5424b85037dbSmrg # files that make .init and .fini sections work. 5425b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5426b85037dbSmrg else 5427b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5428b85037dbSmrg fi 5429b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5430b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5431b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5432b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5433b85037dbSmrg ;; 5434b85037dbSmrg 5435b85037dbSmrg sysv4) 5436b85037dbSmrg case $host_vendor in 5437b85037dbSmrg sni) 5438b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5439b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5440b85037dbSmrg ;; 5441b85037dbSmrg siemens) 5442b85037dbSmrg ## LD is ld it makes a PLAMLIB 5443b85037dbSmrg ## CC just makes a GrossModule. 5444b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5445b85037dbSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5446b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5447b85037dbSmrg ;; 5448b85037dbSmrg motorola) 5449b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5450b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5451b85037dbSmrg ;; 5452b85037dbSmrg esac 5453b85037dbSmrg runpath_var='LD_RUN_PATH' 5454b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5455b85037dbSmrg ;; 5456b85037dbSmrg 5457b85037dbSmrg sysv4.3*) 5458b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5459b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5460b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5461b85037dbSmrg ;; 5462b85037dbSmrg 5463b85037dbSmrg sysv4*MP*) 5464b85037dbSmrg if test -d /usr/nec; then 5465b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5466b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5467b85037dbSmrg runpath_var=LD_RUN_PATH 5468b85037dbSmrg hardcode_runpath_var=yes 5469b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5470b85037dbSmrg fi 5471b85037dbSmrg ;; 5472b85037dbSmrg 5473b85037dbSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5474b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5475b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5476b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5477b85037dbSmrg runpath_var='LD_RUN_PATH' 5478b85037dbSmrg 5479b85037dbSmrg if test "$GCC" = yes; then 5480b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5481b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5482b85037dbSmrg else 5483b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5484b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5485b85037dbSmrg fi 5486b85037dbSmrg ;; 5487b85037dbSmrg 5488b85037dbSmrg sysv5* | sco3.2v5* | sco5v6*) 5489b85037dbSmrg # Note: We can NOT use -z defs as we might desire, because we do not 5490b85037dbSmrg # link with -lc, and that would cause any symbols used from libc to 5491b85037dbSmrg # always be unresolved, which means just about no library would 5492b85037dbSmrg # ever link correctly. If we're not using GNU ld we use -z text 5493b85037dbSmrg # though, which does catch some bad symbols but isn't as heavy-handed 5494b85037dbSmrg # as -z defs. 5495b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5496b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5497b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5498b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5499b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5500b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5501b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5502b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5503b85037dbSmrg runpath_var='LD_RUN_PATH' 5504b85037dbSmrg 5505b85037dbSmrg if test "$GCC" = yes; then 5506b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5507b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5508b85037dbSmrg else 5509b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5510b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5511b85037dbSmrg fi 5512b85037dbSmrg ;; 5513b85037dbSmrg 5514b85037dbSmrg uts4*) 5515b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5516b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5517b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5518b85037dbSmrg ;; 5519b85037dbSmrg 5520b85037dbSmrg *) 5521b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5522b85037dbSmrg ;; 5523b85037dbSmrg esac 5524b85037dbSmrg 5525b85037dbSmrg if test x$host_vendor = xsni; then 5526b85037dbSmrg case $host in 5527b85037dbSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5528b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5529b85037dbSmrg ;; 5530b85037dbSmrg esac 5531b85037dbSmrg fi 5532b85037dbSmrg fi 5533b85037dbSmrg]) 5534b85037dbSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5535b85037dbSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5536b85037dbSmrg 5537b85037dbSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5538b85037dbSmrg 5539b85037dbSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5540b85037dbSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5541b85037dbSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 5542b85037dbSmrg [The commands to extract the exported symbol list from a shared archive]) 5543b85037dbSmrg 5544b85037dbSmrg# 5545b85037dbSmrg# Do we need to explicitly link libc? 5546b85037dbSmrg# 5547b85037dbSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5548b85037dbSmrgx|xyes) 5549b85037dbSmrg # Assume -lc should be added 5550b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5551b85037dbSmrg 5552b85037dbSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5553b85037dbSmrg case $_LT_TAGVAR(archive_cmds, $1) in 5554b85037dbSmrg *'~'*) 5555b85037dbSmrg # FIXME: we may have to deal with multi-command sequences. 5556b85037dbSmrg ;; 5557b85037dbSmrg '$CC '*) 5558b85037dbSmrg # Test whether the compiler implicitly links with -lc since on some 5559b85037dbSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5560b85037dbSmrg # to ld, don't add -lc before -lgcc. 5561b85037dbSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5562b85037dbSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5563b85037dbSmrg [$RM conftest* 5564b85037dbSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5565b85037dbSmrg 5566b85037dbSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5567b85037dbSmrg soname=conftest 5568b85037dbSmrg lib=conftest 5569b85037dbSmrg libobjs=conftest.$ac_objext 5570b85037dbSmrg deplibs= 5571b85037dbSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5572b85037dbSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5573b85037dbSmrg compiler_flags=-v 5574b85037dbSmrg linker_flags=-v 5575b85037dbSmrg verstring= 5576b85037dbSmrg output_objdir=. 5577b85037dbSmrg libname=conftest 5578b85037dbSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5579b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 5580b85037dbSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5581b85037dbSmrg then 5582b85037dbSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5583b85037dbSmrg else 5584b85037dbSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5585b85037dbSmrg fi 5586b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5587b85037dbSmrg else 5588b85037dbSmrg cat conftest.err 1>&5 5589b85037dbSmrg fi 5590b85037dbSmrg $RM conftest* 5591b85037dbSmrg ]) 5592b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5593b85037dbSmrg ;; 5594b85037dbSmrg esac 5595b85037dbSmrg fi 5596b85037dbSmrg ;; 5597b85037dbSmrgesac 5598b85037dbSmrg 5599b85037dbSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5600b85037dbSmrg [Whether or not to add -lc for building shared libraries]) 5601b85037dbSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5602b85037dbSmrg [enable_shared_with_static_runtimes], [0], 5603b85037dbSmrg [Whether or not to disallow shared libs when runtime libs are static]) 5604b85037dbSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5605b85037dbSmrg [Compiler flag to allow reflexive dlopens]) 5606b85037dbSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5607b85037dbSmrg [Compiler flag to generate shared objects directly from archives]) 5608b85037dbSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 5609b85037dbSmrg [Whether the compiler copes with passing no objects directly]) 5610b85037dbSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5611b85037dbSmrg [Create an old-style archive from a shared archive]) 5612b85037dbSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5613b85037dbSmrg [Create a temporary old-style archive to link instead of a shared archive]) 5614b85037dbSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5615b85037dbSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5616b85037dbSmrg_LT_TAGDECL([], [module_cmds], [2], 5617b85037dbSmrg [Commands used to build a loadable module if different from building 5618b85037dbSmrg a shared archive.]) 5619b85037dbSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5620b85037dbSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 5621b85037dbSmrg [Whether we are building with GNU ld or not]) 5622b85037dbSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5623b85037dbSmrg [Flag that allows shared libraries with undefined symbols to be built]) 5624b85037dbSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 5625b85037dbSmrg [Flag that enforces no undefined symbols]) 5626b85037dbSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5627b85037dbSmrg [Flag to hardcode $libdir into a binary during linking. 5628b85037dbSmrg This must work even if $libdir does not exist]) 5629b85037dbSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 5630b85037dbSmrg [[If ld is used when linking, flag to hardcode $libdir into a binary 5631b85037dbSmrg during linking. This must work even if $libdir does not exist]]) 5632b85037dbSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5633b85037dbSmrg [Whether we need a single "-rpath" flag with a separated argument]) 5634b85037dbSmrg_LT_TAGDECL([], [hardcode_direct], [0], 5635b85037dbSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5636b85037dbSmrg DIR into the resulting binary]) 5637b85037dbSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5638b85037dbSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5639b85037dbSmrg DIR into the resulting binary and the resulting library dependency is 5640b85037dbSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5641b85037dbSmrg library is relocated]) 5642b85037dbSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5643b85037dbSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5644b85037dbSmrg into the resulting binary]) 5645b85037dbSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5646b85037dbSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5647b85037dbSmrg into the resulting binary]) 5648b85037dbSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 5649b85037dbSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 5650b85037dbSmrg into the library and all subsequent libraries and executables linked 5651b85037dbSmrg against it]) 5652b85037dbSmrg_LT_TAGDECL([], [inherit_rpath], [0], 5653b85037dbSmrg [Set to yes if linker adds runtime paths of dependent libraries 5654b85037dbSmrg to runtime path list]) 5655b85037dbSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 5656b85037dbSmrg [Whether libtool must link a program against all its dependency libraries]) 5657b85037dbSmrg_LT_TAGDECL([], [always_export_symbols], [0], 5658b85037dbSmrg [Set to "yes" if exported symbols are required]) 5659b85037dbSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5660b85037dbSmrg [The commands to list exported symbols]) 5661b85037dbSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 5662b85037dbSmrg [Symbols that should not be listed in the preloaded symbols]) 5663b85037dbSmrg_LT_TAGDECL([], [include_expsyms], [1], 5664b85037dbSmrg [Symbols that must always be exported]) 5665b85037dbSmrg_LT_TAGDECL([], [prelink_cmds], [2], 5666b85037dbSmrg [Commands necessary for linking programs (against libraries) with templates]) 5667302b15bdSmrg_LT_TAGDECL([], [postlink_cmds], [2], 5668302b15bdSmrg [Commands necessary for finishing linking programs]) 5669b85037dbSmrg_LT_TAGDECL([], [file_list_spec], [1], 5670b85037dbSmrg [Specify filename containing input files]) 5671b85037dbSmrgdnl FIXME: Not yet implemented 5672b85037dbSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5673b85037dbSmrgdnl [Compiler flag to generate thread safe objects]) 5674b85037dbSmrg])# _LT_LINKER_SHLIBS 5675b85037dbSmrg 5676b85037dbSmrg 5677b85037dbSmrg# _LT_LANG_C_CONFIG([TAG]) 5678b85037dbSmrg# ------------------------ 5679b85037dbSmrg# Ensure that the configuration variables for a C compiler are suitably 5680b85037dbSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 5681b85037dbSmrg# the compiler configuration to `libtool'. 5682b85037dbSmrgm4_defun([_LT_LANG_C_CONFIG], 5683b85037dbSmrg[m4_require([_LT_DECL_EGREP])dnl 5684b85037dbSmrglt_save_CC="$CC" 5685b85037dbSmrgAC_LANG_PUSH(C) 5686b85037dbSmrg 5687b85037dbSmrg# Source file extension for C test sources. 5688b85037dbSmrgac_ext=c 5689b85037dbSmrg 5690b85037dbSmrg# Object file extension for compiled C test sources. 5691b85037dbSmrgobjext=o 5692b85037dbSmrg_LT_TAGVAR(objext, $1)=$objext 5693b85037dbSmrg 5694b85037dbSmrg# Code to be used in simple compile tests 5695b85037dbSmrglt_simple_compile_test_code="int some_variable = 0;" 5696b85037dbSmrg 5697b85037dbSmrg# Code to be used in simple link tests 5698b85037dbSmrglt_simple_link_test_code='int main(){return(0);}' 5699b85037dbSmrg 5700b85037dbSmrg_LT_TAG_COMPILER 5701b85037dbSmrg# Save the default compiler, since it gets overwritten when the other 5702b85037dbSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5703b85037dbSmrgcompiler_DEFAULT=$CC 5704b85037dbSmrg 5705b85037dbSmrg# save warnings/boilerplate of simple test code 5706b85037dbSmrg_LT_COMPILER_BOILERPLATE 5707b85037dbSmrg_LT_LINKER_BOILERPLATE 5708b85037dbSmrg 5709b85037dbSmrgif test -n "$compiler"; then 5710b85037dbSmrg _LT_COMPILER_NO_RTTI($1) 5711b85037dbSmrg _LT_COMPILER_PIC($1) 5712b85037dbSmrg _LT_COMPILER_C_O($1) 5713b85037dbSmrg _LT_COMPILER_FILE_LOCKS($1) 5714b85037dbSmrg _LT_LINKER_SHLIBS($1) 5715b85037dbSmrg _LT_SYS_DYNAMIC_LINKER($1) 5716b85037dbSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 5717b85037dbSmrg LT_SYS_DLOPEN_SELF 5718b85037dbSmrg _LT_CMD_STRIPLIB 5719b85037dbSmrg 5720b85037dbSmrg # Report which library types will actually be built 5721b85037dbSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5722b85037dbSmrg AC_MSG_RESULT([$can_build_shared]) 5723b85037dbSmrg 5724b85037dbSmrg AC_MSG_CHECKING([whether to build shared libraries]) 5725b85037dbSmrg test "$can_build_shared" = "no" && enable_shared=no 5726b85037dbSmrg 5727b85037dbSmrg # On AIX, shared libraries and static libraries use the same namespace, and 5728b85037dbSmrg # are all built from PIC. 5729b85037dbSmrg case $host_os in 5730b85037dbSmrg aix3*) 5731b85037dbSmrg test "$enable_shared" = yes && enable_static=no 5732b85037dbSmrg if test -n "$RANLIB"; then 5733b85037dbSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5734b85037dbSmrg postinstall_cmds='$RANLIB $lib' 5735b85037dbSmrg fi 5736b85037dbSmrg ;; 5737b85037dbSmrg 5738b85037dbSmrg aix[[4-9]]*) 5739b85037dbSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5740b85037dbSmrg test "$enable_shared" = yes && enable_static=no 5741b85037dbSmrg fi 5742b85037dbSmrg ;; 5743b85037dbSmrg esac 5744b85037dbSmrg AC_MSG_RESULT([$enable_shared]) 5745b85037dbSmrg 5746b85037dbSmrg AC_MSG_CHECKING([whether to build static libraries]) 5747b85037dbSmrg # Make sure either enable_shared or enable_static is yes. 5748b85037dbSmrg test "$enable_shared" = yes || enable_static=yes 5749b85037dbSmrg AC_MSG_RESULT([$enable_static]) 5750b85037dbSmrg 5751b85037dbSmrg _LT_CONFIG($1) 5752b85037dbSmrgfi 5753b85037dbSmrgAC_LANG_POP 5754b85037dbSmrgCC="$lt_save_CC" 5755b85037dbSmrg])# _LT_LANG_C_CONFIG 5756b85037dbSmrg 5757b85037dbSmrg 5758b85037dbSmrg# _LT_LANG_CXX_CONFIG([TAG]) 5759b85037dbSmrg# -------------------------- 5760b85037dbSmrg# Ensure that the configuration variables for a C++ compiler are suitably 5761b85037dbSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 5762b85037dbSmrg# the compiler configuration to `libtool'. 5763b85037dbSmrgm4_defun([_LT_LANG_CXX_CONFIG], 5764b85037dbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5765b85037dbSmrgm4_require([_LT_DECL_EGREP])dnl 5766302b15bdSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5767b85037dbSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5768b85037dbSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5769b85037dbSmrg (test "X$CXX" != "Xg++"))) ; then 5770b85037dbSmrg AC_PROG_CXXCPP 5771b85037dbSmrgelse 5772b85037dbSmrg _lt_caught_CXX_error=yes 5773b85037dbSmrgfi 5774b85037dbSmrg 5775b85037dbSmrgAC_LANG_PUSH(C++) 5776b85037dbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5777b85037dbSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 5778b85037dbSmrg_LT_TAGVAR(always_export_symbols, $1)=no 5779b85037dbSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5780b85037dbSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 5781b85037dbSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5782b85037dbSmrg_LT_TAGVAR(hardcode_direct, $1)=no 5783b85037dbSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5784b85037dbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5785b85037dbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5786b85037dbSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5787b85037dbSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5788b85037dbSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5789b85037dbSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 5790b85037dbSmrg_LT_TAGVAR(inherit_rpath, $1)=no 5791b85037dbSmrg_LT_TAGVAR(module_cmds, $1)= 5792b85037dbSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 5793b85037dbSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5794b85037dbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5795b85037dbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 5796b85037dbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5797b85037dbSmrg_LT_TAGVAR(no_undefined_flag, $1)= 5798b85037dbSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5799b85037dbSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5800b85037dbSmrg 5801b85037dbSmrg# Source file extension for C++ test sources. 5802b85037dbSmrgac_ext=cpp 5803b85037dbSmrg 5804b85037dbSmrg# Object file extension for compiled C++ test sources. 5805b85037dbSmrgobjext=o 5806b85037dbSmrg_LT_TAGVAR(objext, $1)=$objext 5807b85037dbSmrg 5808b85037dbSmrg# No sense in running all these tests if we already determined that 5809b85037dbSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 5810b85037dbSmrg# are currently assumed to apply to all compilers on this platform, 5811b85037dbSmrg# and will be corrupted by setting them based on a non-working compiler. 5812b85037dbSmrgif test "$_lt_caught_CXX_error" != yes; then 5813b85037dbSmrg # Code to be used in simple compile tests 5814b85037dbSmrg lt_simple_compile_test_code="int some_variable = 0;" 5815b85037dbSmrg 5816b85037dbSmrg # Code to be used in simple link tests 5817b85037dbSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5818b85037dbSmrg 5819b85037dbSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5820b85037dbSmrg _LT_TAG_COMPILER 5821b85037dbSmrg 5822b85037dbSmrg # save warnings/boilerplate of simple test code 5823b85037dbSmrg _LT_COMPILER_BOILERPLATE 5824b85037dbSmrg _LT_LINKER_BOILERPLATE 5825b85037dbSmrg 5826b85037dbSmrg # Allow CC to be a program name with arguments. 5827b85037dbSmrg lt_save_CC=$CC 5828302b15bdSmrg lt_save_CFLAGS=$CFLAGS 5829b85037dbSmrg lt_save_LD=$LD 5830b85037dbSmrg lt_save_GCC=$GCC 5831b85037dbSmrg GCC=$GXX 5832b85037dbSmrg lt_save_with_gnu_ld=$with_gnu_ld 5833b85037dbSmrg lt_save_path_LD=$lt_cv_path_LD 5834b85037dbSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5835b85037dbSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5836b85037dbSmrg else 5837b85037dbSmrg $as_unset lt_cv_prog_gnu_ld 5838b85037dbSmrg fi 5839b85037dbSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 5840b85037dbSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 5841b85037dbSmrg else 5842b85037dbSmrg $as_unset lt_cv_path_LD 5843b85037dbSmrg fi 5844b85037dbSmrg test -z "${LDCXX+set}" || LD=$LDCXX 5845b85037dbSmrg CC=${CXX-"c++"} 5846302b15bdSmrg CFLAGS=$CXXFLAGS 5847b85037dbSmrg compiler=$CC 5848b85037dbSmrg _LT_TAGVAR(compiler, $1)=$CC 5849b85037dbSmrg _LT_CC_BASENAME([$compiler]) 5850b85037dbSmrg 5851b85037dbSmrg if test -n "$compiler"; then 5852b85037dbSmrg # We don't want -fno-exception when compiling C++ code, so set the 5853b85037dbSmrg # no_builtin_flag separately 5854b85037dbSmrg if test "$GXX" = yes; then 5855b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5856b85037dbSmrg else 5857b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5858b85037dbSmrg fi 5859b85037dbSmrg 5860b85037dbSmrg if test "$GXX" = yes; then 5861b85037dbSmrg # Set up default GNU C++ configuration 5862b85037dbSmrg 5863b85037dbSmrg LT_PATH_LD 5864b85037dbSmrg 5865b85037dbSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5866b85037dbSmrg # archiving commands below assume that GNU ld is being used. 5867b85037dbSmrg if test "$with_gnu_ld" = yes; then 5868302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5869302b15bdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 5870b85037dbSmrg 5871b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5872b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5873b85037dbSmrg 5874b85037dbSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5875b85037dbSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5876b85037dbSmrg # investigate it a little bit more. (MM) 5877b85037dbSmrg wlarc='${wl}' 5878b85037dbSmrg 5879b85037dbSmrg # ancient GNU ld didn't support --whole-archive et. al. 5880b85037dbSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5881b85037dbSmrg $GREP 'no-whole-archive' > /dev/null; then 5882b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5883b85037dbSmrg else 5884b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5885b85037dbSmrg fi 5886b85037dbSmrg else 5887b85037dbSmrg with_gnu_ld=no 5888b85037dbSmrg wlarc= 5889b85037dbSmrg 5890b85037dbSmrg # A generic and very simple default shared library creation 5891b85037dbSmrg # command for GNU C++ for the case where it uses the native 5892b85037dbSmrg # linker, instead of GNU ld. If possible, this setting should 5893b85037dbSmrg # overridden to take advantage of the native linker features on 5894b85037dbSmrg # the platform it is being used on. 5895b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5896b85037dbSmrg fi 5897b85037dbSmrg 5898b85037dbSmrg # Commands to make compiler produce verbose output that lists 5899b85037dbSmrg # what "hidden" libraries, object files and flags are used when 5900b85037dbSmrg # linking a shared library. 5901b85037dbSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5902b85037dbSmrg 5903b85037dbSmrg else 5904b85037dbSmrg GXX=no 5905b85037dbSmrg with_gnu_ld=no 5906b85037dbSmrg wlarc= 5907b85037dbSmrg fi 5908b85037dbSmrg 5909b85037dbSmrg # PORTME: fill in a description of your system's C++ link characteristics 5910b85037dbSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5911b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5912b85037dbSmrg case $host_os in 5913b85037dbSmrg aix3*) 5914b85037dbSmrg # FIXME: insert proper C++ library support 5915b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5916b85037dbSmrg ;; 5917b85037dbSmrg aix[[4-9]]*) 5918b85037dbSmrg if test "$host_cpu" = ia64; then 5919b85037dbSmrg # On IA64, the linker does run time linking by default, so we don't 5920b85037dbSmrg # have to do anything special. 5921b85037dbSmrg aix_use_runtimelinking=no 5922b85037dbSmrg exp_sym_flag='-Bexport' 5923b85037dbSmrg no_entry_flag="" 5924b85037dbSmrg else 5925b85037dbSmrg aix_use_runtimelinking=no 5926b85037dbSmrg 5927b85037dbSmrg # Test if we are trying to use run time linking or normal 5928b85037dbSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5929b85037dbSmrg # need to do runtime linking. 5930b85037dbSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5931b85037dbSmrg for ld_flag in $LDFLAGS; do 5932b85037dbSmrg case $ld_flag in 5933b85037dbSmrg *-brtl*) 5934b85037dbSmrg aix_use_runtimelinking=yes 5935b85037dbSmrg break 5936b85037dbSmrg ;; 5937b85037dbSmrg esac 5938b85037dbSmrg done 5939b85037dbSmrg ;; 5940b85037dbSmrg esac 5941b85037dbSmrg 5942b85037dbSmrg exp_sym_flag='-bexport' 5943b85037dbSmrg no_entry_flag='-bnoentry' 5944b85037dbSmrg fi 5945b85037dbSmrg 5946b85037dbSmrg # When large executables or shared objects are built, AIX ld can 5947b85037dbSmrg # have problems creating the table of contents. If linking a library 5948b85037dbSmrg # or program results in "error TOC overflow" add -mminimal-toc to 5949b85037dbSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5950b85037dbSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5951b85037dbSmrg 5952b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='' 5953b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5954b85037dbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5955b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5956b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5957b85037dbSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5958b85037dbSmrg 5959b85037dbSmrg if test "$GXX" = yes; then 5960b85037dbSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5961b85037dbSmrg # We only want to do this on AIX 4.2 and lower, the check 5962b85037dbSmrg # below for broken collect2 doesn't work under 4.3+ 5963b85037dbSmrg collect2name=`${CC} -print-prog-name=collect2` 5964b85037dbSmrg if test -f "$collect2name" && 5965b85037dbSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5966b85037dbSmrg then 5967b85037dbSmrg # We have reworked collect2 5968b85037dbSmrg : 5969b85037dbSmrg else 5970b85037dbSmrg # We have old collect2 5971b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5972b85037dbSmrg # It fails to find uninstalled libraries when the uninstalled 5973b85037dbSmrg # path is not listed in the libpath. Setting hardcode_minus_L 5974b85037dbSmrg # to unsupported forces relinking 5975b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5976b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5977b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5978b85037dbSmrg fi 5979b85037dbSmrg esac 5980b85037dbSmrg shared_flag='-shared' 5981b85037dbSmrg if test "$aix_use_runtimelinking" = yes; then 5982b85037dbSmrg shared_flag="$shared_flag "'${wl}-G' 5983b85037dbSmrg fi 5984b85037dbSmrg else 5985b85037dbSmrg # not using gcc 5986b85037dbSmrg if test "$host_cpu" = ia64; then 5987b85037dbSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5988b85037dbSmrg # chokes on -Wl,-G. The following line is correct: 5989b85037dbSmrg shared_flag='-G' 5990b85037dbSmrg else 5991b85037dbSmrg if test "$aix_use_runtimelinking" = yes; then 5992b85037dbSmrg shared_flag='${wl}-G' 5993b85037dbSmrg else 5994b85037dbSmrg shared_flag='${wl}-bM:SRE' 5995b85037dbSmrg fi 5996b85037dbSmrg fi 5997b85037dbSmrg fi 5998b85037dbSmrg 5999b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6000b85037dbSmrg # It seems that -bexpall does not export symbols beginning with 6001b85037dbSmrg # underscore (_), so it is better to generate a list of symbols to 6002b85037dbSmrg # export. 6003b85037dbSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6004b85037dbSmrg if test "$aix_use_runtimelinking" = yes; then 6005b85037dbSmrg # Warning - without using the other runtime loading flags (-brtl), 6006b85037dbSmrg # -berok will link without error, but may produce a broken library. 6007b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6008b85037dbSmrg # Determine the default libpath from the value encoded in an empty 6009b85037dbSmrg # executable. 6010302b15bdSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6011b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6012b85037dbSmrg 6013b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 6014b85037dbSmrg else 6015b85037dbSmrg if test "$host_cpu" = ia64; then 6016b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6017b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6018b85037dbSmrg _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" 6019b85037dbSmrg else 6020b85037dbSmrg # Determine the default libpath from the value encoded in an 6021b85037dbSmrg # empty executable. 6022302b15bdSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6023b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6024b85037dbSmrg # Warning - without using the other run time loading flags, 6025b85037dbSmrg # -berok will link without error, but may produce a broken library. 6026b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6027b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6028b85037dbSmrg if test "$with_gnu_ld" = yes; then 6029b85037dbSmrg # We only use this code for GNU lds that support --whole-archive. 6030b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6031b85037dbSmrg else 6032b85037dbSmrg # Exported symbols can be pulled into shared objects from archives 6033b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6034b85037dbSmrg fi 6035b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6036b85037dbSmrg # This is similar to how AIX traditionally builds its shared 6037b85037dbSmrg # libraries. 6038b85037dbSmrg _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' 6039b85037dbSmrg fi 6040b85037dbSmrg fi 6041b85037dbSmrg ;; 6042b85037dbSmrg 6043b85037dbSmrg beos*) 6044b85037dbSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6045b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6046b85037dbSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6047b85037dbSmrg # support --undefined. This deserves some investigation. FIXME 6048b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6049b85037dbSmrg else 6050b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6051b85037dbSmrg fi 6052b85037dbSmrg ;; 6053b85037dbSmrg 6054b85037dbSmrg chorus*) 6055b85037dbSmrg case $cc_basename in 6056b85037dbSmrg *) 6057b85037dbSmrg # FIXME: insert proper C++ library support 6058b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6059b85037dbSmrg ;; 6060b85037dbSmrg esac 6061b85037dbSmrg ;; 6062b85037dbSmrg 6063b85037dbSmrg cygwin* | mingw* | pw32* | cegcc*) 6064302b15bdSmrg case $GXX,$cc_basename in 6065302b15bdSmrg ,cl* | no,cl*) 6066302b15bdSmrg # Native MSVC 6067302b15bdSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6068302b15bdSmrg # no search path for DLLs. 6069302b15bdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6070302b15bdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6071302b15bdSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6072302b15bdSmrg _LT_TAGVAR(file_list_spec, $1)='@' 6073302b15bdSmrg # Tell ltmain to make .lib files, not .a files. 6074302b15bdSmrg libext=lib 6075302b15bdSmrg # Tell ltmain to make .dll files, not .so files. 6076302b15bdSmrg shrext_cmds=".dll" 6077302b15bdSmrg # FIXME: Setting linknames here is a bad hack. 6078302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6079302b15bdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6080302b15bdSmrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6081302b15bdSmrg else 6082302b15bdSmrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6083302b15bdSmrg fi~ 6084302b15bdSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6085302b15bdSmrg linknames=' 6086302b15bdSmrg # The linker will not automatically build a static lib if we build a DLL. 6087302b15bdSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6088302b15bdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6089302b15bdSmrg # Don't use ranlib 6090302b15bdSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6091302b15bdSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6092302b15bdSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6093302b15bdSmrg case $lt_outputfile in 6094302b15bdSmrg *.exe|*.EXE) ;; 6095302b15bdSmrg *) 6096302b15bdSmrg lt_outputfile="$lt_outputfile.exe" 6097302b15bdSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6098302b15bdSmrg ;; 6099302b15bdSmrg esac~ 6100302b15bdSmrg func_to_tool_file "$lt_outputfile"~ 6101302b15bdSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6102302b15bdSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6103302b15bdSmrg $RM "$lt_outputfile.manifest"; 6104302b15bdSmrg fi' 6105302b15bdSmrg ;; 6106302b15bdSmrg *) 6107302b15bdSmrg # g++ 6108302b15bdSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6109302b15bdSmrg # as there is no search path for DLLs. 6110302b15bdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6111302b15bdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6112302b15bdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6113302b15bdSmrg _LT_TAGVAR(always_export_symbols, $1)=no 6114302b15bdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6115302b15bdSmrg 6116302b15bdSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6117302b15bdSmrg _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' 6118302b15bdSmrg # If the export-symbols file already is a .def file (1st line 6119302b15bdSmrg # is EXPORTS), use it as is; otherwise, prepend... 6120302b15bdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6121302b15bdSmrg cp $export_symbols $output_objdir/$soname.def; 6122302b15bdSmrg else 6123302b15bdSmrg echo EXPORTS > $output_objdir/$soname.def; 6124302b15bdSmrg cat $export_symbols >> $output_objdir/$soname.def; 6125302b15bdSmrg fi~ 6126302b15bdSmrg $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' 6127302b15bdSmrg else 6128302b15bdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6129302b15bdSmrg fi 6130302b15bdSmrg ;; 6131302b15bdSmrg esac 6132302b15bdSmrg ;; 6133b85037dbSmrg darwin* | rhapsody*) 6134b85037dbSmrg _LT_DARWIN_LINKER_FEATURES($1) 6135b85037dbSmrg ;; 6136b85037dbSmrg 6137b85037dbSmrg dgux*) 6138b85037dbSmrg case $cc_basename in 6139b85037dbSmrg ec++*) 6140b85037dbSmrg # FIXME: insert proper C++ library support 6141b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6142b85037dbSmrg ;; 6143b85037dbSmrg ghcx*) 6144b85037dbSmrg # Green Hills C++ Compiler 6145b85037dbSmrg # FIXME: insert proper C++ library support 6146b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6147b85037dbSmrg ;; 6148b85037dbSmrg *) 6149b85037dbSmrg # FIXME: insert proper C++ library support 6150b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6151b85037dbSmrg ;; 6152b85037dbSmrg esac 6153b85037dbSmrg ;; 6154b85037dbSmrg 6155b85037dbSmrg freebsd[[12]]*) 6156b85037dbSmrg # C++ shared libraries reported to be fairly broken before 6157b85037dbSmrg # switch to ELF 6158b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6159b85037dbSmrg ;; 6160b85037dbSmrg 6161b85037dbSmrg freebsd-elf*) 6162b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6163b85037dbSmrg ;; 6164b85037dbSmrg 6165b85037dbSmrg freebsd* | dragonfly*) 6166b85037dbSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6167b85037dbSmrg # conventions 6168b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6169b85037dbSmrg ;; 6170b85037dbSmrg 6171b85037dbSmrg gnu*) 6172b85037dbSmrg ;; 6173b85037dbSmrg 6174b85037dbSmrg haiku*) 6175b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6176b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6177b85037dbSmrg ;; 6178b85037dbSmrg 6179b85037dbSmrg hpux9*) 6180b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6181b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6182b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6183b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6184b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6185b85037dbSmrg # but as the default 6186b85037dbSmrg # location of the library. 6187b85037dbSmrg 6188b85037dbSmrg case $cc_basename in 6189b85037dbSmrg CC*) 6190b85037dbSmrg # FIXME: insert proper C++ library support 6191b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6192b85037dbSmrg ;; 6193b85037dbSmrg aCC*) 6194b85037dbSmrg _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' 6195b85037dbSmrg # Commands to make compiler produce verbose output that lists 6196b85037dbSmrg # what "hidden" libraries, object files and flags are used when 6197b85037dbSmrg # linking a shared library. 6198b85037dbSmrg # 6199b85037dbSmrg # There doesn't appear to be a way to prevent this compiler from 6200b85037dbSmrg # explicitly linking system object files so we need to strip them 6201b85037dbSmrg # from the output so that they don't get included in the library 6202b85037dbSmrg # dependencies. 6203b85037dbSmrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 6204b85037dbSmrg ;; 6205b85037dbSmrg *) 6206b85037dbSmrg if test "$GXX" = yes; then 6207302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6208b85037dbSmrg else 6209b85037dbSmrg # FIXME: insert proper C++ library support 6210b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6211b85037dbSmrg fi 6212b85037dbSmrg ;; 6213b85037dbSmrg esac 6214b85037dbSmrg ;; 6215b85037dbSmrg 6216b85037dbSmrg hpux10*|hpux11*) 6217b85037dbSmrg if test $with_gnu_ld = no; then 6218b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6219b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6220b85037dbSmrg 6221b85037dbSmrg case $host_cpu in 6222b85037dbSmrg hppa*64*|ia64*) 6223b85037dbSmrg ;; 6224b85037dbSmrg *) 6225b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6226b85037dbSmrg ;; 6227b85037dbSmrg esac 6228b85037dbSmrg fi 6229b85037dbSmrg case $host_cpu in 6230b85037dbSmrg hppa*64*|ia64*) 6231b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6232b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6233b85037dbSmrg ;; 6234b85037dbSmrg *) 6235b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6236b85037dbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6237b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6238b85037dbSmrg # but as the default 6239b85037dbSmrg # location of the library. 6240b85037dbSmrg ;; 6241b85037dbSmrg esac 6242b85037dbSmrg 6243b85037dbSmrg case $cc_basename in 6244b85037dbSmrg CC*) 6245b85037dbSmrg # FIXME: insert proper C++ library support 6246b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6247b85037dbSmrg ;; 6248b85037dbSmrg aCC*) 6249b85037dbSmrg case $host_cpu in 6250b85037dbSmrg hppa*64*) 6251b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6252b85037dbSmrg ;; 6253b85037dbSmrg ia64*) 6254b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6255b85037dbSmrg ;; 6256b85037dbSmrg *) 6257b85037dbSmrg _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' 6258b85037dbSmrg ;; 6259b85037dbSmrg esac 6260b85037dbSmrg # Commands to make compiler produce verbose output that lists 6261b85037dbSmrg # what "hidden" libraries, object files and flags are used when 6262b85037dbSmrg # linking a shared library. 6263b85037dbSmrg # 6264b85037dbSmrg # There doesn't appear to be a way to prevent this compiler from 6265b85037dbSmrg # explicitly linking system object files so we need to strip them 6266b85037dbSmrg # from the output so that they don't get included in the library 6267b85037dbSmrg # dependencies. 6268b85037dbSmrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 6269b85037dbSmrg ;; 6270b85037dbSmrg *) 6271b85037dbSmrg if test "$GXX" = yes; then 6272b85037dbSmrg if test $with_gnu_ld = no; then 6273b85037dbSmrg case $host_cpu in 6274b85037dbSmrg hppa*64*) 6275b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6276b85037dbSmrg ;; 6277b85037dbSmrg ia64*) 6278302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6279b85037dbSmrg ;; 6280b85037dbSmrg *) 6281302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6282b85037dbSmrg ;; 6283b85037dbSmrg esac 6284b85037dbSmrg fi 6285b85037dbSmrg else 6286b85037dbSmrg # FIXME: insert proper C++ library support 6287b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6288b85037dbSmrg fi 6289b85037dbSmrg ;; 6290b85037dbSmrg esac 6291b85037dbSmrg ;; 6292b85037dbSmrg 6293b85037dbSmrg interix[[3-9]]*) 6294b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6295b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6296b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6297b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6298b85037dbSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6299b85037dbSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6300b85037dbSmrg # default) and relocated if they conflict, which is a slow very memory 6301b85037dbSmrg # consuming and fragmenting process. To avoid this, we pick a random, 6302b85037dbSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6303b85037dbSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6304b85037dbSmrg _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' 6305b85037dbSmrg _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' 6306b85037dbSmrg ;; 6307b85037dbSmrg irix5* | irix6*) 6308b85037dbSmrg case $cc_basename in 6309b85037dbSmrg CC*) 6310b85037dbSmrg # SGI C++ 6311b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 6312b85037dbSmrg 6313b85037dbSmrg # Archives containing C++ object files must be created using 6314b85037dbSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6315b85037dbSmrg # necessary to make sure instantiated templates are included 6316b85037dbSmrg # in the archive. 6317b85037dbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6318b85037dbSmrg ;; 6319b85037dbSmrg *) 6320b85037dbSmrg if test "$GXX" = yes; then 6321b85037dbSmrg if test "$with_gnu_ld" = no; then 6322302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6323b85037dbSmrg else 6324302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' 6325b85037dbSmrg fi 6326b85037dbSmrg fi 6327b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6328b85037dbSmrg ;; 6329b85037dbSmrg esac 6330b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6331b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6332b85037dbSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 6333b85037dbSmrg ;; 6334b85037dbSmrg 6335b85037dbSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6336b85037dbSmrg case $cc_basename in 6337b85037dbSmrg KCC*) 6338b85037dbSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6339b85037dbSmrg 6340b85037dbSmrg # KCC will only create a shared library if the output file 6341b85037dbSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6342b85037dbSmrg # to its proper name (with version) after linking. 6343b85037dbSmrg _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' 6344b85037dbSmrg _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' 6345b85037dbSmrg # Commands to make compiler produce verbose output that lists 6346b85037dbSmrg # what "hidden" libraries, object files and flags are used when 6347b85037dbSmrg # linking a shared library. 6348b85037dbSmrg # 6349b85037dbSmrg # There doesn't appear to be a way to prevent this compiler from 6350b85037dbSmrg # explicitly linking system object files so we need to strip them 6351b85037dbSmrg # from the output so that they don't get included in the library 6352b85037dbSmrg # dependencies. 6353b85037dbSmrg output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 6354b85037dbSmrg 6355b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6356b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6357b85037dbSmrg 6358b85037dbSmrg # Archives containing C++ object files must be created using 6359b85037dbSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6360b85037dbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6361b85037dbSmrg ;; 6362b85037dbSmrg icpc* | ecpc* ) 6363b85037dbSmrg # Intel C++ 6364b85037dbSmrg with_gnu_ld=yes 6365b85037dbSmrg # version 8.0 and above of icpc choke on multiply defined symbols 6366b85037dbSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6367b85037dbSmrg # earlier do not add the objects themselves. 6368b85037dbSmrg case `$CC -V 2>&1` in 6369b85037dbSmrg *"Version 7."*) 6370b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6371b85037dbSmrg _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' 6372b85037dbSmrg ;; 6373b85037dbSmrg *) # Version 8.0 or newer 6374b85037dbSmrg tmp_idyn= 6375b85037dbSmrg case $host_cpu in 6376b85037dbSmrg ia64*) tmp_idyn=' -i_dynamic';; 6377b85037dbSmrg esac 6378b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6379b85037dbSmrg _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' 6380b85037dbSmrg ;; 6381b85037dbSmrg esac 6382b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6383b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6384b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6385b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6386b85037dbSmrg ;; 6387b85037dbSmrg pgCC* | pgcpp*) 6388b85037dbSmrg # Portland Group C++ compiler 6389b85037dbSmrg case `$CC -V` in 6390b85037dbSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6391b85037dbSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6392b85037dbSmrg rm -rf $tpldir~ 6393b85037dbSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6394b85037dbSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6395b85037dbSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6396b85037dbSmrg rm -rf $tpldir~ 6397b85037dbSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6398b85037dbSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6399b85037dbSmrg $RANLIB $oldlib' 6400b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6401b85037dbSmrg rm -rf $tpldir~ 6402b85037dbSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6403b85037dbSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6404b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6405b85037dbSmrg rm -rf $tpldir~ 6406b85037dbSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6407b85037dbSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 6408b85037dbSmrg ;; 6409b85037dbSmrg *) # Version 6 and above use weak symbols 6410b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6411b85037dbSmrg _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' 6412b85037dbSmrg ;; 6413b85037dbSmrg esac 6414b85037dbSmrg 6415b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6416b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6417b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 6418b85037dbSmrg ;; 6419b85037dbSmrg cxx*) 6420b85037dbSmrg # Compaq C++ 6421b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6422b85037dbSmrg _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' 6423b85037dbSmrg 6424b85037dbSmrg runpath_var=LD_RUN_PATH 6425b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6426b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6427b85037dbSmrg 6428b85037dbSmrg # Commands to make compiler produce verbose output that lists 6429b85037dbSmrg # what "hidden" libraries, object files and flags are used when 6430b85037dbSmrg # linking a shared library. 6431b85037dbSmrg # 6432b85037dbSmrg # There doesn't appear to be a way to prevent this compiler from 6433b85037dbSmrg # explicitly linking system object files so we need to strip them 6434b85037dbSmrg # from the output so that they don't get included in the library 6435b85037dbSmrg # dependencies. 6436b85037dbSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' 6437b85037dbSmrg ;; 6438b85037dbSmrg xl* | mpixl* | bgxl*) 6439b85037dbSmrg # IBM XL 8.0 on PPC, with GNU ld 6440b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6441b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6442b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6443b85037dbSmrg if test "x$supports_anon_versioning" = xyes; then 6444b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6445b85037dbSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6446b85037dbSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6447b85037dbSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6448b85037dbSmrg fi 6449b85037dbSmrg ;; 6450b85037dbSmrg *) 6451b85037dbSmrg case `$CC -V 2>&1 | sed 5q` in 6452b85037dbSmrg *Sun\ C*) 6453b85037dbSmrg # Sun C++ 5.9 6454b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6455b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6456b85037dbSmrg _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' 6457b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6458b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 6459b85037dbSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6460b85037dbSmrg 6461b85037dbSmrg # Not sure whether something based on 6462b85037dbSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6463b85037dbSmrg # would be better. 6464b85037dbSmrg output_verbose_link_cmd='func_echo_all' 6465b85037dbSmrg 6466b85037dbSmrg # Archives containing C++ object files must be created using 6467b85037dbSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6468b85037dbSmrg # necessary to make sure instantiated templates are included 6469b85037dbSmrg # in the archive. 6470b85037dbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6471b85037dbSmrg ;; 6472b85037dbSmrg esac 6473b85037dbSmrg ;; 6474b85037dbSmrg esac 6475b85037dbSmrg ;; 6476b85037dbSmrg 6477b85037dbSmrg lynxos*) 6478b85037dbSmrg # FIXME: insert proper C++ library support 6479b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6480b85037dbSmrg ;; 6481b85037dbSmrg 6482b85037dbSmrg m88k*) 6483b85037dbSmrg # FIXME: insert proper C++ library support 6484b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6485b85037dbSmrg ;; 6486b85037dbSmrg 6487b85037dbSmrg mvs*) 6488b85037dbSmrg case $cc_basename in 6489b85037dbSmrg cxx*) 6490b85037dbSmrg # FIXME: insert proper C++ library support 6491b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6492b85037dbSmrg ;; 6493b85037dbSmrg *) 6494b85037dbSmrg # FIXME: insert proper C++ library support 6495b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6496b85037dbSmrg ;; 6497b85037dbSmrg esac 6498b85037dbSmrg ;; 6499b85037dbSmrg 6500b85037dbSmrg netbsd*) 6501b85037dbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6502b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6503b85037dbSmrg wlarc= 6504b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6505b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6506b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6507b85037dbSmrg fi 6508b85037dbSmrg # Workaround some broken pre-1.5 toolchains 6509b85037dbSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6510b85037dbSmrg ;; 6511b85037dbSmrg 6512b85037dbSmrg *nto* | *qnx*) 6513b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6514b85037dbSmrg ;; 6515b85037dbSmrg 6516b85037dbSmrg openbsd2*) 6517b85037dbSmrg # C++ shared libraries are fairly broken 6518b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6519b85037dbSmrg ;; 6520b85037dbSmrg 6521b85037dbSmrg openbsd*) 6522b85037dbSmrg if test -f /usr/libexec/ld.so; then 6523b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6524b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6525b85037dbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6526b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6527b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6528b85037dbSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6529b85037dbSmrg _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' 6530b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6531b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6532b85037dbSmrg fi 6533b85037dbSmrg output_verbose_link_cmd=func_echo_all 6534b85037dbSmrg else 6535b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6536b85037dbSmrg fi 6537b85037dbSmrg ;; 6538b85037dbSmrg 6539b85037dbSmrg osf3* | osf4* | osf5*) 6540b85037dbSmrg case $cc_basename in 6541b85037dbSmrg KCC*) 6542b85037dbSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6543b85037dbSmrg 6544b85037dbSmrg # KCC will only create a shared library if the output file 6545b85037dbSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6546b85037dbSmrg # to its proper name (with version) after linking. 6547b85037dbSmrg _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' 6548b85037dbSmrg 6549b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6550b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6551b85037dbSmrg 6552b85037dbSmrg # Archives containing C++ object files must be created using 6553b85037dbSmrg # the KAI C++ compiler. 6554b85037dbSmrg case $host in 6555b85037dbSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6556b85037dbSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6557b85037dbSmrg esac 6558b85037dbSmrg ;; 6559b85037dbSmrg RCC*) 6560b85037dbSmrg # Rational C++ 2.4.1 6561b85037dbSmrg # FIXME: insert proper C++ library support 6562b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6563b85037dbSmrg ;; 6564b85037dbSmrg cxx*) 6565b85037dbSmrg case $host in 6566b85037dbSmrg osf3*) 6567b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6568b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 6569b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6570b85037dbSmrg ;; 6571b85037dbSmrg *) 6572b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6573b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 6574b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6575b85037dbSmrg echo "-hidden">> $lib.exp~ 6576b85037dbSmrg $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ 6577b85037dbSmrg $RM $lib.exp' 6578b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6579b85037dbSmrg ;; 6580b85037dbSmrg esac 6581b85037dbSmrg 6582b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6583b85037dbSmrg 6584b85037dbSmrg # Commands to make compiler produce verbose output that lists 6585b85037dbSmrg # what "hidden" libraries, object files and flags are used when 6586b85037dbSmrg # linking a shared library. 6587b85037dbSmrg # 6588b85037dbSmrg # There doesn't appear to be a way to prevent this compiler from 6589b85037dbSmrg # explicitly linking system object files so we need to strip them 6590b85037dbSmrg # from the output so that they don't get included in the library 6591b85037dbSmrg # dependencies. 6592b85037dbSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 6593b85037dbSmrg ;; 6594b85037dbSmrg *) 6595b85037dbSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6596b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6597b85037dbSmrg case $host in 6598b85037dbSmrg osf3*) 6599b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6600b85037dbSmrg ;; 6601b85037dbSmrg *) 6602302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6603b85037dbSmrg ;; 6604b85037dbSmrg esac 6605b85037dbSmrg 6606b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6607b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6608b85037dbSmrg 6609b85037dbSmrg # Commands to make compiler produce verbose output that lists 6610b85037dbSmrg # what "hidden" libraries, object files and flags are used when 6611b85037dbSmrg # linking a shared library. 6612b85037dbSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6613b85037dbSmrg 6614b85037dbSmrg else 6615b85037dbSmrg # FIXME: insert proper C++ library support 6616b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6617b85037dbSmrg fi 6618b85037dbSmrg ;; 6619b85037dbSmrg esac 6620b85037dbSmrg ;; 6621b85037dbSmrg 6622b85037dbSmrg psos*) 6623b85037dbSmrg # FIXME: insert proper C++ library support 6624b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6625b85037dbSmrg ;; 6626b85037dbSmrg 6627b85037dbSmrg sunos4*) 6628b85037dbSmrg case $cc_basename in 6629b85037dbSmrg CC*) 6630b85037dbSmrg # Sun C++ 4.x 6631b85037dbSmrg # FIXME: insert proper C++ library support 6632b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6633b85037dbSmrg ;; 6634b85037dbSmrg lcc*) 6635b85037dbSmrg # Lucid 6636b85037dbSmrg # FIXME: insert proper C++ library support 6637b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6638b85037dbSmrg ;; 6639b85037dbSmrg *) 6640b85037dbSmrg # FIXME: insert proper C++ library support 6641b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6642b85037dbSmrg ;; 6643b85037dbSmrg esac 6644b85037dbSmrg ;; 6645b85037dbSmrg 6646b85037dbSmrg solaris*) 6647b85037dbSmrg case $cc_basename in 6648b85037dbSmrg CC* | sunCC*) 6649b85037dbSmrg # Sun C++ 4.2, 5.x and Centerline C++ 6650b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6651b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6652b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6653b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6654b85037dbSmrg $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' 6655b85037dbSmrg 6656b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6657b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6658b85037dbSmrg case $host_os in 6659b85037dbSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6660b85037dbSmrg *) 6661b85037dbSmrg # The compiler driver will combine and reorder linker options, 6662b85037dbSmrg # but understands `-z linker_flag'. 6663b85037dbSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6664b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6665b85037dbSmrg ;; 6666b85037dbSmrg esac 6667b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6668b85037dbSmrg 6669b85037dbSmrg output_verbose_link_cmd='func_echo_all' 6670b85037dbSmrg 6671b85037dbSmrg # Archives containing C++ object files must be created using 6672b85037dbSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6673b85037dbSmrg # necessary to make sure instantiated templates are included 6674b85037dbSmrg # in the archive. 6675b85037dbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6676b85037dbSmrg ;; 6677b85037dbSmrg gcx*) 6678b85037dbSmrg # Green Hills C++ Compiler 6679b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6680b85037dbSmrg 6681b85037dbSmrg # The C++ compiler must be used to create the archive. 6682b85037dbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6683b85037dbSmrg ;; 6684b85037dbSmrg *) 6685b85037dbSmrg # GNU C++ compiler with Solaris linker 6686b85037dbSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6687b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6688b85037dbSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6689302b15bdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6690b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6691302b15bdSmrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6692b85037dbSmrg 6693b85037dbSmrg # Commands to make compiler produce verbose output that lists 6694b85037dbSmrg # what "hidden" libraries, object files and flags are used when 6695b85037dbSmrg # linking a shared library. 6696b85037dbSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6697b85037dbSmrg else 6698b85037dbSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6699b85037dbSmrg # platform. 6700b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6701b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6702b85037dbSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6703b85037dbSmrg 6704b85037dbSmrg # Commands to make compiler produce verbose output that lists 6705b85037dbSmrg # what "hidden" libraries, object files and flags are used when 6706b85037dbSmrg # linking a shared library. 6707b85037dbSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6708b85037dbSmrg fi 6709b85037dbSmrg 6710b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6711b85037dbSmrg case $host_os in 6712b85037dbSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6713b85037dbSmrg *) 6714b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6715b85037dbSmrg ;; 6716b85037dbSmrg esac 6717b85037dbSmrg fi 6718b85037dbSmrg ;; 6719b85037dbSmrg esac 6720b85037dbSmrg ;; 6721b85037dbSmrg 6722b85037dbSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6723b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6724b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6725b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6726b85037dbSmrg runpath_var='LD_RUN_PATH' 6727b85037dbSmrg 6728b85037dbSmrg case $cc_basename in 6729b85037dbSmrg CC*) 6730b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6731b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6732b85037dbSmrg ;; 6733b85037dbSmrg *) 6734b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6735b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6736b85037dbSmrg ;; 6737b85037dbSmrg esac 6738b85037dbSmrg ;; 6739b85037dbSmrg 6740b85037dbSmrg sysv5* | sco3.2v5* | sco5v6*) 6741b85037dbSmrg # Note: We can NOT use -z defs as we might desire, because we do not 6742b85037dbSmrg # link with -lc, and that would cause any symbols used from libc to 6743b85037dbSmrg # always be unresolved, which means just about no library would 6744b85037dbSmrg # ever link correctly. If we're not using GNU ld we use -z text 6745b85037dbSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6746b85037dbSmrg # as -z defs. 6747b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6748b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6749b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6750b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6751b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6752b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6753b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6754b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6755b85037dbSmrg runpath_var='LD_RUN_PATH' 6756b85037dbSmrg 6757b85037dbSmrg case $cc_basename in 6758b85037dbSmrg CC*) 6759b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6760b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6761b85037dbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6762b85037dbSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 6763b85037dbSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6764b85037dbSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 6765b85037dbSmrg ;; 6766b85037dbSmrg *) 6767b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6768b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6769b85037dbSmrg ;; 6770b85037dbSmrg esac 6771b85037dbSmrg ;; 6772b85037dbSmrg 6773b85037dbSmrg tandem*) 6774b85037dbSmrg case $cc_basename in 6775b85037dbSmrg NCC*) 6776b85037dbSmrg # NonStop-UX NCC 3.20 6777b85037dbSmrg # FIXME: insert proper C++ library support 6778b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6779b85037dbSmrg ;; 6780b85037dbSmrg *) 6781b85037dbSmrg # FIXME: insert proper C++ library support 6782b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6783b85037dbSmrg ;; 6784b85037dbSmrg esac 6785b85037dbSmrg ;; 6786b85037dbSmrg 6787b85037dbSmrg vxworks*) 6788b85037dbSmrg # FIXME: insert proper C++ library support 6789b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6790b85037dbSmrg ;; 6791b85037dbSmrg 6792b85037dbSmrg *) 6793b85037dbSmrg # FIXME: insert proper C++ library support 6794b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6795b85037dbSmrg ;; 6796b85037dbSmrg esac 6797b85037dbSmrg 6798b85037dbSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6799b85037dbSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6800b85037dbSmrg 6801b85037dbSmrg _LT_TAGVAR(GCC, $1)="$GXX" 6802b85037dbSmrg _LT_TAGVAR(LD, $1)="$LD" 6803b85037dbSmrg 6804b85037dbSmrg ## CAVEAT EMPTOR: 6805b85037dbSmrg ## There is no encapsulation within the following macros, do not change 6806b85037dbSmrg ## the running order or otherwise move them around unless you know exactly 6807b85037dbSmrg ## what you are doing... 6808b85037dbSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 6809b85037dbSmrg _LT_COMPILER_PIC($1) 6810b85037dbSmrg _LT_COMPILER_C_O($1) 6811b85037dbSmrg _LT_COMPILER_FILE_LOCKS($1) 6812b85037dbSmrg _LT_LINKER_SHLIBS($1) 6813b85037dbSmrg _LT_SYS_DYNAMIC_LINKER($1) 6814b85037dbSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6815b85037dbSmrg 6816b85037dbSmrg _LT_CONFIG($1) 6817b85037dbSmrg fi # test -n "$compiler" 6818b85037dbSmrg 6819b85037dbSmrg CC=$lt_save_CC 6820302b15bdSmrg CFLAGS=$lt_save_CFLAGS 6821b85037dbSmrg LDCXX=$LD 6822b85037dbSmrg LD=$lt_save_LD 6823b85037dbSmrg GCC=$lt_save_GCC 6824b85037dbSmrg with_gnu_ld=$lt_save_with_gnu_ld 6825b85037dbSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 6826b85037dbSmrg lt_cv_path_LD=$lt_save_path_LD 6827b85037dbSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6828b85037dbSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6829b85037dbSmrgfi # test "$_lt_caught_CXX_error" != yes 6830b85037dbSmrg 6831b85037dbSmrgAC_LANG_POP 6832b85037dbSmrg])# _LT_LANG_CXX_CONFIG 6833b85037dbSmrg 6834b85037dbSmrg 6835302b15bdSmrg# _LT_FUNC_STRIPNAME_CNF 6836302b15bdSmrg# ---------------------- 6837302b15bdSmrg# func_stripname_cnf prefix suffix name 6838302b15bdSmrg# strip PREFIX and SUFFIX off of NAME. 6839302b15bdSmrg# PREFIX and SUFFIX must not contain globbing or regex special 6840302b15bdSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 6841302b15bdSmrg# dot (in which case that matches only a dot). 6842302b15bdSmrg# 6843302b15bdSmrg# This function is identical to the (non-XSI) version of func_stripname, 6844302b15bdSmrg# except this one can be used by m4 code that may be executed by configure, 6845302b15bdSmrg# rather than the libtool script. 6846302b15bdSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6847302b15bdSmrgAC_REQUIRE([_LT_DECL_SED]) 6848302b15bdSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6849302b15bdSmrgfunc_stripname_cnf () 6850302b15bdSmrg{ 6851302b15bdSmrg case ${2} in 6852302b15bdSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6853302b15bdSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6854302b15bdSmrg esac 6855302b15bdSmrg} # func_stripname_cnf 6856302b15bdSmrg])# _LT_FUNC_STRIPNAME_CNF 6857302b15bdSmrg 6858b85037dbSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6859b85037dbSmrg# --------------------------------- 6860b85037dbSmrg# Figure out "hidden" library dependencies from verbose 6861b85037dbSmrg# compiler output when linking a shared library. 6862b85037dbSmrg# Parse the compiler output and extract the necessary 6863b85037dbSmrg# objects, libraries and library flags. 6864b85037dbSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6865b85037dbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6866302b15bdSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6867b85037dbSmrg# Dependencies to place before and after the object being linked: 6868b85037dbSmrg_LT_TAGVAR(predep_objects, $1)= 6869b85037dbSmrg_LT_TAGVAR(postdep_objects, $1)= 6870b85037dbSmrg_LT_TAGVAR(predeps, $1)= 6871b85037dbSmrg_LT_TAGVAR(postdeps, $1)= 6872b85037dbSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6873b85037dbSmrg 6874b85037dbSmrgdnl we can't use the lt_simple_compile_test_code here, 6875b85037dbSmrgdnl because it contains code intended for an executable, 6876b85037dbSmrgdnl not a library. It's possible we should let each 6877b85037dbSmrgdnl tag define a new lt_????_link_test_code variable, 6878b85037dbSmrgdnl but it's only used here... 6879b85037dbSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6880b85037dbSmrgint a; 6881b85037dbSmrgvoid foo (void) { a = 0; } 6882b85037dbSmrg_LT_EOF 6883b85037dbSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6884b85037dbSmrgclass Foo 6885b85037dbSmrg{ 6886b85037dbSmrgpublic: 6887b85037dbSmrg Foo (void) { a = 0; } 6888b85037dbSmrgprivate: 6889b85037dbSmrg int a; 6890b85037dbSmrg}; 6891b85037dbSmrg_LT_EOF 6892b85037dbSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6893b85037dbSmrg subroutine foo 6894b85037dbSmrg implicit none 6895b85037dbSmrg integer*4 a 6896b85037dbSmrg a=0 6897b85037dbSmrg return 6898b85037dbSmrg end 6899b85037dbSmrg_LT_EOF 6900b85037dbSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6901b85037dbSmrg subroutine foo 6902b85037dbSmrg implicit none 6903b85037dbSmrg integer a 6904b85037dbSmrg a=0 6905b85037dbSmrg return 6906b85037dbSmrg end 6907b85037dbSmrg_LT_EOF 6908b85037dbSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6909b85037dbSmrgpublic class foo { 6910b85037dbSmrg private int a; 6911b85037dbSmrg public void bar (void) { 6912b85037dbSmrg a = 0; 6913b85037dbSmrg } 6914b85037dbSmrg}; 6915b85037dbSmrg_LT_EOF 6916b85037dbSmrg]) 6917302b15bdSmrg 6918302b15bdSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 6919302b15bdSmrgcase "$CC $CFLAGS " in #( 6920302b15bdSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6921302b15bdSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 6922302b15bdSmrgesac 6923302b15bdSmrg 6924b85037dbSmrgdnl Parse the compiler output and extract the necessary 6925b85037dbSmrgdnl objects, libraries and library flags. 6926b85037dbSmrgif AC_TRY_EVAL(ac_compile); then 6927b85037dbSmrg # Parse the compiler output and extract the necessary 6928b85037dbSmrg # objects, libraries and library flags. 6929b85037dbSmrg 6930b85037dbSmrg # Sentinel used to keep track of whether or not we are before 6931b85037dbSmrg # the conftest object file. 6932b85037dbSmrg pre_test_object_deps_done=no 6933b85037dbSmrg 6934b85037dbSmrg for p in `eval "$output_verbose_link_cmd"`; do 6935302b15bdSmrg case ${prev}${p} in 6936b85037dbSmrg 6937b85037dbSmrg -L* | -R* | -l*) 6938b85037dbSmrg # Some compilers place space between "-{L,R}" and the path. 6939b85037dbSmrg # Remove the space. 6940b85037dbSmrg if test $p = "-L" || 6941b85037dbSmrg test $p = "-R"; then 6942b85037dbSmrg prev=$p 6943b85037dbSmrg continue 6944b85037dbSmrg fi 6945b85037dbSmrg 6946302b15bdSmrg # Expand the sysroot to ease extracting the directories later. 6947302b15bdSmrg if test -z "$prev"; then 6948302b15bdSmrg case $p in 6949302b15bdSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 6950302b15bdSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 6951302b15bdSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 6952302b15bdSmrg esac 6953302b15bdSmrg fi 6954302b15bdSmrg case $p in 6955302b15bdSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 6956302b15bdSmrg esac 6957b85037dbSmrg if test "$pre_test_object_deps_done" = no; then 6958302b15bdSmrg case ${prev} in 6959302b15bdSmrg -L | -R) 6960b85037dbSmrg # Internal compiler library paths should come after those 6961b85037dbSmrg # provided the user. The postdeps already come after the 6962b85037dbSmrg # user supplied libs so there is no need to process them. 6963b85037dbSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 6964b85037dbSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 6965b85037dbSmrg else 6966b85037dbSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 6967b85037dbSmrg fi 6968b85037dbSmrg ;; 6969b85037dbSmrg # The "-l" case would never come before the object being 6970b85037dbSmrg # linked, so don't bother handling this case. 6971b85037dbSmrg esac 6972b85037dbSmrg else 6973b85037dbSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 6974b85037dbSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 6975b85037dbSmrg else 6976b85037dbSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 6977b85037dbSmrg fi 6978b85037dbSmrg fi 6979302b15bdSmrg prev= 6980b85037dbSmrg ;; 6981b85037dbSmrg 6982302b15bdSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 6983b85037dbSmrg *.$objext) 6984b85037dbSmrg # This assumes that the test object file only shows up 6985b85037dbSmrg # once in the compiler output. 6986b85037dbSmrg if test "$p" = "conftest.$objext"; then 6987b85037dbSmrg pre_test_object_deps_done=yes 6988b85037dbSmrg continue 6989b85037dbSmrg fi 6990b85037dbSmrg 6991b85037dbSmrg if test "$pre_test_object_deps_done" = no; then 6992b85037dbSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 6993b85037dbSmrg _LT_TAGVAR(predep_objects, $1)="$p" 6994b85037dbSmrg else 6995b85037dbSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 6996b85037dbSmrg fi 6997b85037dbSmrg else 6998b85037dbSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 6999b85037dbSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 7000b85037dbSmrg else 7001b85037dbSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7002b85037dbSmrg fi 7003b85037dbSmrg fi 7004b85037dbSmrg ;; 7005b85037dbSmrg 7006b85037dbSmrg *) ;; # Ignore the rest. 7007b85037dbSmrg 7008b85037dbSmrg esac 7009b85037dbSmrg done 7010b85037dbSmrg 7011b85037dbSmrg # Clean up. 7012b85037dbSmrg rm -f a.out a.exe 7013b85037dbSmrgelse 7014b85037dbSmrg echo "libtool.m4: error: problem compiling $1 test program" 7015b85037dbSmrgfi 7016b85037dbSmrg 7017b85037dbSmrg$RM -f confest.$objext 7018302b15bdSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 7019b85037dbSmrg 7020b85037dbSmrg# PORTME: override above test on systems where it is broken 7021b85037dbSmrgm4_if([$1], [CXX], 7022b85037dbSmrg[case $host_os in 7023b85037dbSmrginterix[[3-9]]*) 7024b85037dbSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7025b85037dbSmrg # hack all around it, let's just trust "g++" to DTRT. 7026b85037dbSmrg _LT_TAGVAR(predep_objects,$1)= 7027b85037dbSmrg _LT_TAGVAR(postdep_objects,$1)= 7028b85037dbSmrg _LT_TAGVAR(postdeps,$1)= 7029b85037dbSmrg ;; 7030b85037dbSmrg 7031b85037dbSmrglinux*) 7032b85037dbSmrg case `$CC -V 2>&1 | sed 5q` in 7033b85037dbSmrg *Sun\ C*) 7034b85037dbSmrg # Sun C++ 5.9 7035b85037dbSmrg 7036b85037dbSmrg # The more standards-conforming stlport4 library is 7037b85037dbSmrg # incompatible with the Cstd library. Avoid specifying 7038b85037dbSmrg # it if it's in CXXFLAGS. Ignore libCrun as 7039b85037dbSmrg # -library=stlport4 depends on it. 7040b85037dbSmrg case " $CXX $CXXFLAGS " in 7041b85037dbSmrg *" -library=stlport4 "*) 7042b85037dbSmrg solaris_use_stlport4=yes 7043b85037dbSmrg ;; 7044b85037dbSmrg esac 7045b85037dbSmrg 7046b85037dbSmrg if test "$solaris_use_stlport4" != yes; then 7047b85037dbSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7048b85037dbSmrg fi 7049b85037dbSmrg ;; 7050b85037dbSmrg esac 7051b85037dbSmrg ;; 7052b85037dbSmrg 7053b85037dbSmrgsolaris*) 7054b85037dbSmrg case $cc_basename in 7055b85037dbSmrg CC* | sunCC*) 7056b85037dbSmrg # The more standards-conforming stlport4 library is 7057b85037dbSmrg # incompatible with the Cstd library. Avoid specifying 7058b85037dbSmrg # it if it's in CXXFLAGS. Ignore libCrun as 7059b85037dbSmrg # -library=stlport4 depends on it. 7060b85037dbSmrg case " $CXX $CXXFLAGS " in 7061b85037dbSmrg *" -library=stlport4 "*) 7062b85037dbSmrg solaris_use_stlport4=yes 7063b85037dbSmrg ;; 7064b85037dbSmrg esac 7065b85037dbSmrg 7066b85037dbSmrg # Adding this requires a known-good setup of shared libraries for 7067b85037dbSmrg # Sun compiler versions before 5.6, else PIC objects from an old 7068b85037dbSmrg # archive will be linked into the output, leading to subtle bugs. 7069b85037dbSmrg if test "$solaris_use_stlport4" != yes; then 7070b85037dbSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7071b85037dbSmrg fi 7072b85037dbSmrg ;; 7073b85037dbSmrg esac 7074b85037dbSmrg ;; 7075b85037dbSmrgesac 7076b85037dbSmrg]) 7077b85037dbSmrg 7078b85037dbSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 7079b85037dbSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7080b85037dbSmrgesac 7081b85037dbSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7082b85037dbSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7083b85037dbSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7084b85037dbSmrgfi 7085b85037dbSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7086b85037dbSmrg [The directories searched by this compiler when creating a shared library]) 7087b85037dbSmrg_LT_TAGDECL([], [predep_objects], [1], 7088b85037dbSmrg [Dependencies to place before and after the objects being linked to 7089b85037dbSmrg create a shared library]) 7090b85037dbSmrg_LT_TAGDECL([], [postdep_objects], [1]) 7091b85037dbSmrg_LT_TAGDECL([], [predeps], [1]) 7092b85037dbSmrg_LT_TAGDECL([], [postdeps], [1]) 7093b85037dbSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7094b85037dbSmrg [The library search path used internally by the compiler when linking 7095b85037dbSmrg a shared library]) 7096b85037dbSmrg])# _LT_SYS_HIDDEN_LIBDEPS 7097b85037dbSmrg 7098b85037dbSmrg 7099b85037dbSmrg# _LT_LANG_F77_CONFIG([TAG]) 7100b85037dbSmrg# -------------------------- 7101b85037dbSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 7102b85037dbSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7103b85037dbSmrg# to write the compiler configuration to `libtool'. 7104b85037dbSmrgm4_defun([_LT_LANG_F77_CONFIG], 7105b85037dbSmrg[AC_LANG_PUSH(Fortran 77) 7106b85037dbSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 7107b85037dbSmrg _lt_disable_F77=yes 7108b85037dbSmrgfi 7109b85037dbSmrg 7110b85037dbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7111b85037dbSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7112b85037dbSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7113b85037dbSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7114b85037dbSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7115b85037dbSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7116b85037dbSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7117b85037dbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7118b85037dbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7119b85037dbSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7120b85037dbSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7121b85037dbSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7122b85037dbSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7123b85037dbSmrg_LT_TAGVAR(module_cmds, $1)= 7124b85037dbSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7125b85037dbSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7126b85037dbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7127b85037dbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7128b85037dbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7129b85037dbSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7130b85037dbSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7131b85037dbSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7132b85037dbSmrg 7133b85037dbSmrg# Source file extension for f77 test sources. 7134b85037dbSmrgac_ext=f 7135b85037dbSmrg 7136b85037dbSmrg# Object file extension for compiled f77 test sources. 7137b85037dbSmrgobjext=o 7138b85037dbSmrg_LT_TAGVAR(objext, $1)=$objext 7139b85037dbSmrg 7140b85037dbSmrg# No sense in running all these tests if we already determined that 7141b85037dbSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 7142b85037dbSmrg# are currently assumed to apply to all compilers on this platform, 7143b85037dbSmrg# and will be corrupted by setting them based on a non-working compiler. 7144b85037dbSmrgif test "$_lt_disable_F77" != yes; then 7145b85037dbSmrg # Code to be used in simple compile tests 7146b85037dbSmrg lt_simple_compile_test_code="\ 7147b85037dbSmrg subroutine t 7148b85037dbSmrg return 7149b85037dbSmrg end 7150b85037dbSmrg" 7151b85037dbSmrg 7152b85037dbSmrg # Code to be used in simple link tests 7153b85037dbSmrg lt_simple_link_test_code="\ 7154b85037dbSmrg program t 7155b85037dbSmrg end 7156b85037dbSmrg" 7157b85037dbSmrg 7158b85037dbSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7159b85037dbSmrg _LT_TAG_COMPILER 7160b85037dbSmrg 7161b85037dbSmrg # save warnings/boilerplate of simple test code 7162b85037dbSmrg _LT_COMPILER_BOILERPLATE 7163b85037dbSmrg _LT_LINKER_BOILERPLATE 7164b85037dbSmrg 7165b85037dbSmrg # Allow CC to be a program name with arguments. 7166b85037dbSmrg lt_save_CC="$CC" 7167b85037dbSmrg lt_save_GCC=$GCC 7168302b15bdSmrg lt_save_CFLAGS=$CFLAGS 7169b85037dbSmrg CC=${F77-"f77"} 7170302b15bdSmrg CFLAGS=$FFLAGS 7171b85037dbSmrg compiler=$CC 7172b85037dbSmrg _LT_TAGVAR(compiler, $1)=$CC 7173b85037dbSmrg _LT_CC_BASENAME([$compiler]) 7174b85037dbSmrg GCC=$G77 7175b85037dbSmrg if test -n "$compiler"; then 7176b85037dbSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7177b85037dbSmrg AC_MSG_RESULT([$can_build_shared]) 7178b85037dbSmrg 7179b85037dbSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7180b85037dbSmrg test "$can_build_shared" = "no" && enable_shared=no 7181b85037dbSmrg 7182b85037dbSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7183b85037dbSmrg # are all built from PIC. 7184b85037dbSmrg case $host_os in 7185b85037dbSmrg aix3*) 7186b85037dbSmrg test "$enable_shared" = yes && enable_static=no 7187b85037dbSmrg if test -n "$RANLIB"; then 7188b85037dbSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7189b85037dbSmrg postinstall_cmds='$RANLIB $lib' 7190b85037dbSmrg fi 7191b85037dbSmrg ;; 7192b85037dbSmrg aix[[4-9]]*) 7193b85037dbSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7194b85037dbSmrg test "$enable_shared" = yes && enable_static=no 7195b85037dbSmrg fi 7196b85037dbSmrg ;; 7197b85037dbSmrg esac 7198b85037dbSmrg AC_MSG_RESULT([$enable_shared]) 7199b85037dbSmrg 7200b85037dbSmrg AC_MSG_CHECKING([whether to build static libraries]) 7201b85037dbSmrg # Make sure either enable_shared or enable_static is yes. 7202b85037dbSmrg test "$enable_shared" = yes || enable_static=yes 7203b85037dbSmrg AC_MSG_RESULT([$enable_static]) 7204b85037dbSmrg 7205b85037dbSmrg _LT_TAGVAR(GCC, $1)="$G77" 7206b85037dbSmrg _LT_TAGVAR(LD, $1)="$LD" 7207b85037dbSmrg 7208b85037dbSmrg ## CAVEAT EMPTOR: 7209b85037dbSmrg ## There is no encapsulation within the following macros, do not change 7210b85037dbSmrg ## the running order or otherwise move them around unless you know exactly 7211b85037dbSmrg ## what you are doing... 7212b85037dbSmrg _LT_COMPILER_PIC($1) 7213b85037dbSmrg _LT_COMPILER_C_O($1) 7214b85037dbSmrg _LT_COMPILER_FILE_LOCKS($1) 7215b85037dbSmrg _LT_LINKER_SHLIBS($1) 7216b85037dbSmrg _LT_SYS_DYNAMIC_LINKER($1) 7217b85037dbSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7218b85037dbSmrg 7219b85037dbSmrg _LT_CONFIG($1) 7220b85037dbSmrg fi # test -n "$compiler" 7221b85037dbSmrg 7222b85037dbSmrg GCC=$lt_save_GCC 7223b85037dbSmrg CC="$lt_save_CC" 7224302b15bdSmrg CFLAGS="$lt_save_CFLAGS" 7225b85037dbSmrgfi # test "$_lt_disable_F77" != yes 7226b85037dbSmrg 7227b85037dbSmrgAC_LANG_POP 7228b85037dbSmrg])# _LT_LANG_F77_CONFIG 7229b85037dbSmrg 7230b85037dbSmrg 7231b85037dbSmrg# _LT_LANG_FC_CONFIG([TAG]) 7232b85037dbSmrg# ------------------------- 7233b85037dbSmrg# Ensure that the configuration variables for a Fortran compiler are 7234b85037dbSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7235b85037dbSmrg# to write the compiler configuration to `libtool'. 7236b85037dbSmrgm4_defun([_LT_LANG_FC_CONFIG], 7237b85037dbSmrg[AC_LANG_PUSH(Fortran) 7238b85037dbSmrg 7239b85037dbSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 7240b85037dbSmrg _lt_disable_FC=yes 7241b85037dbSmrgfi 7242b85037dbSmrg 7243b85037dbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7244b85037dbSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7245b85037dbSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7246b85037dbSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7247b85037dbSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7248b85037dbSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7249b85037dbSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7250b85037dbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7251b85037dbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7252b85037dbSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7253b85037dbSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7254b85037dbSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7255b85037dbSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7256b85037dbSmrg_LT_TAGVAR(module_cmds, $1)= 7257b85037dbSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7258b85037dbSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7259b85037dbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7260b85037dbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7261b85037dbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7262b85037dbSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7263b85037dbSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7264b85037dbSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7265b85037dbSmrg 7266b85037dbSmrg# Source file extension for fc test sources. 7267b85037dbSmrgac_ext=${ac_fc_srcext-f} 7268b85037dbSmrg 7269b85037dbSmrg# Object file extension for compiled fc test sources. 7270b85037dbSmrgobjext=o 7271b85037dbSmrg_LT_TAGVAR(objext, $1)=$objext 7272b85037dbSmrg 7273b85037dbSmrg# No sense in running all these tests if we already determined that 7274b85037dbSmrg# the FC compiler isn't working. Some variables (like enable_shared) 7275b85037dbSmrg# are currently assumed to apply to all compilers on this platform, 7276b85037dbSmrg# and will be corrupted by setting them based on a non-working compiler. 7277b85037dbSmrgif test "$_lt_disable_FC" != yes; then 7278b85037dbSmrg # Code to be used in simple compile tests 7279b85037dbSmrg lt_simple_compile_test_code="\ 7280b85037dbSmrg subroutine t 7281b85037dbSmrg return 7282b85037dbSmrg end 7283b85037dbSmrg" 7284b85037dbSmrg 7285b85037dbSmrg # Code to be used in simple link tests 7286b85037dbSmrg lt_simple_link_test_code="\ 7287b85037dbSmrg program t 7288b85037dbSmrg end 7289b85037dbSmrg" 7290b85037dbSmrg 7291b85037dbSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7292b85037dbSmrg _LT_TAG_COMPILER 7293b85037dbSmrg 7294b85037dbSmrg # save warnings/boilerplate of simple test code 7295b85037dbSmrg _LT_COMPILER_BOILERPLATE 7296b85037dbSmrg _LT_LINKER_BOILERPLATE 7297b85037dbSmrg 7298b85037dbSmrg # Allow CC to be a program name with arguments. 7299b85037dbSmrg lt_save_CC="$CC" 7300b85037dbSmrg lt_save_GCC=$GCC 7301302b15bdSmrg lt_save_CFLAGS=$CFLAGS 7302b85037dbSmrg CC=${FC-"f95"} 7303302b15bdSmrg CFLAGS=$FCFLAGS 7304b85037dbSmrg compiler=$CC 7305b85037dbSmrg GCC=$ac_cv_fc_compiler_gnu 7306b85037dbSmrg 7307b85037dbSmrg _LT_TAGVAR(compiler, $1)=$CC 7308b85037dbSmrg _LT_CC_BASENAME([$compiler]) 7309b85037dbSmrg 7310b85037dbSmrg if test -n "$compiler"; then 7311b85037dbSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7312b85037dbSmrg AC_MSG_RESULT([$can_build_shared]) 7313b85037dbSmrg 7314b85037dbSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7315b85037dbSmrg test "$can_build_shared" = "no" && enable_shared=no 7316b85037dbSmrg 7317b85037dbSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7318b85037dbSmrg # are all built from PIC. 7319b85037dbSmrg case $host_os in 7320b85037dbSmrg aix3*) 7321b85037dbSmrg test "$enable_shared" = yes && enable_static=no 7322b85037dbSmrg if test -n "$RANLIB"; then 7323b85037dbSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7324b85037dbSmrg postinstall_cmds='$RANLIB $lib' 7325b85037dbSmrg fi 7326b85037dbSmrg ;; 7327b85037dbSmrg aix[[4-9]]*) 7328b85037dbSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7329b85037dbSmrg test "$enable_shared" = yes && enable_static=no 7330b85037dbSmrg fi 7331b85037dbSmrg ;; 7332b85037dbSmrg esac 7333b85037dbSmrg AC_MSG_RESULT([$enable_shared]) 7334b85037dbSmrg 7335b85037dbSmrg AC_MSG_CHECKING([whether to build static libraries]) 7336b85037dbSmrg # Make sure either enable_shared or enable_static is yes. 7337b85037dbSmrg test "$enable_shared" = yes || enable_static=yes 7338b85037dbSmrg AC_MSG_RESULT([$enable_static]) 7339b85037dbSmrg 7340b85037dbSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7341b85037dbSmrg _LT_TAGVAR(LD, $1)="$LD" 7342b85037dbSmrg 7343b85037dbSmrg ## CAVEAT EMPTOR: 7344b85037dbSmrg ## There is no encapsulation within the following macros, do not change 7345b85037dbSmrg ## the running order or otherwise move them around unless you know exactly 7346b85037dbSmrg ## what you are doing... 7347b85037dbSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 7348b85037dbSmrg _LT_COMPILER_PIC($1) 7349b85037dbSmrg _LT_COMPILER_C_O($1) 7350b85037dbSmrg _LT_COMPILER_FILE_LOCKS($1) 7351b85037dbSmrg _LT_LINKER_SHLIBS($1) 7352b85037dbSmrg _LT_SYS_DYNAMIC_LINKER($1) 7353b85037dbSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7354b85037dbSmrg 7355b85037dbSmrg _LT_CONFIG($1) 7356b85037dbSmrg fi # test -n "$compiler" 7357b85037dbSmrg 7358b85037dbSmrg GCC=$lt_save_GCC 7359302b15bdSmrg CC=$lt_save_CC 7360302b15bdSmrg CFLAGS=$lt_save_CFLAGS 7361b85037dbSmrgfi # test "$_lt_disable_FC" != yes 7362b85037dbSmrg 7363b85037dbSmrgAC_LANG_POP 7364b85037dbSmrg])# _LT_LANG_FC_CONFIG 7365b85037dbSmrg 7366b85037dbSmrg 7367b85037dbSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 7368b85037dbSmrg# -------------------------- 7369b85037dbSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7370b85037dbSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7371b85037dbSmrg# to write the compiler configuration to `libtool'. 7372b85037dbSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 7373b85037dbSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7374b85037dbSmrgAC_LANG_SAVE 7375b85037dbSmrg 7376b85037dbSmrg# Source file extension for Java test sources. 7377b85037dbSmrgac_ext=java 7378b85037dbSmrg 7379b85037dbSmrg# Object file extension for compiled Java test sources. 7380b85037dbSmrgobjext=o 7381b85037dbSmrg_LT_TAGVAR(objext, $1)=$objext 7382b85037dbSmrg 7383b85037dbSmrg# Code to be used in simple compile tests 7384b85037dbSmrglt_simple_compile_test_code="class foo {}" 7385b85037dbSmrg 7386b85037dbSmrg# Code to be used in simple link tests 7387b85037dbSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7388b85037dbSmrg 7389b85037dbSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7390b85037dbSmrg_LT_TAG_COMPILER 7391b85037dbSmrg 7392b85037dbSmrg# save warnings/boilerplate of simple test code 7393b85037dbSmrg_LT_COMPILER_BOILERPLATE 7394b85037dbSmrg_LT_LINKER_BOILERPLATE 7395b85037dbSmrg 7396b85037dbSmrg# Allow CC to be a program name with arguments. 7397302b15bdSmrglt_save_CC=$CC 7398302b15bdSmrglt_save_CFLAGS=$CFLAGS 7399b85037dbSmrglt_save_GCC=$GCC 7400b85037dbSmrgGCC=yes 7401b85037dbSmrgCC=${GCJ-"gcj"} 7402302b15bdSmrgCFLAGS=$GCJFLAGS 7403b85037dbSmrgcompiler=$CC 7404b85037dbSmrg_LT_TAGVAR(compiler, $1)=$CC 7405b85037dbSmrg_LT_TAGVAR(LD, $1)="$LD" 7406b85037dbSmrg_LT_CC_BASENAME([$compiler]) 7407b85037dbSmrg 7408b85037dbSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7409b85037dbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7410b85037dbSmrg 7411b85037dbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7412b85037dbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7413b85037dbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7414b85037dbSmrg 7415b85037dbSmrgif test -n "$compiler"; then 7416b85037dbSmrg _LT_COMPILER_NO_RTTI($1) 7417b85037dbSmrg _LT_COMPILER_PIC($1) 7418b85037dbSmrg _LT_COMPILER_C_O($1) 7419b85037dbSmrg _LT_COMPILER_FILE_LOCKS($1) 7420b85037dbSmrg _LT_LINKER_SHLIBS($1) 7421b85037dbSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7422b85037dbSmrg 7423b85037dbSmrg _LT_CONFIG($1) 7424b85037dbSmrgfi 7425b85037dbSmrg 7426b85037dbSmrgAC_LANG_RESTORE 7427b85037dbSmrg 7428b85037dbSmrgGCC=$lt_save_GCC 7429302b15bdSmrgCC=$lt_save_CC 7430302b15bdSmrgCFLAGS=$lt_save_CFLAGS 7431b85037dbSmrg])# _LT_LANG_GCJ_CONFIG 7432b85037dbSmrg 7433b85037dbSmrg 7434b85037dbSmrg# _LT_LANG_RC_CONFIG([TAG]) 7435b85037dbSmrg# ------------------------- 7436b85037dbSmrg# Ensure that the configuration variables for the Windows resource compiler 7437b85037dbSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7438b85037dbSmrg# to write the compiler configuration to `libtool'. 7439b85037dbSmrgm4_defun([_LT_LANG_RC_CONFIG], 7440b85037dbSmrg[AC_REQUIRE([LT_PROG_RC])dnl 7441b85037dbSmrgAC_LANG_SAVE 7442b85037dbSmrg 7443b85037dbSmrg# Source file extension for RC test sources. 7444b85037dbSmrgac_ext=rc 7445b85037dbSmrg 7446b85037dbSmrg# Object file extension for compiled RC test sources. 7447b85037dbSmrgobjext=o 7448b85037dbSmrg_LT_TAGVAR(objext, $1)=$objext 7449b85037dbSmrg 7450b85037dbSmrg# Code to be used in simple compile tests 7451b85037dbSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7452b85037dbSmrg 7453b85037dbSmrg# Code to be used in simple link tests 7454b85037dbSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 7455b85037dbSmrg 7456b85037dbSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7457b85037dbSmrg_LT_TAG_COMPILER 7458b85037dbSmrg 7459b85037dbSmrg# save warnings/boilerplate of simple test code 7460b85037dbSmrg_LT_COMPILER_BOILERPLATE 7461b85037dbSmrg_LT_LINKER_BOILERPLATE 7462b85037dbSmrg 7463b85037dbSmrg# Allow CC to be a program name with arguments. 7464b85037dbSmrglt_save_CC="$CC" 7465302b15bdSmrglt_save_CFLAGS=$CFLAGS 7466b85037dbSmrglt_save_GCC=$GCC 7467b85037dbSmrgGCC= 7468b85037dbSmrgCC=${RC-"windres"} 7469302b15bdSmrgCFLAGS= 7470b85037dbSmrgcompiler=$CC 7471b85037dbSmrg_LT_TAGVAR(compiler, $1)=$CC 7472b85037dbSmrg_LT_CC_BASENAME([$compiler]) 7473b85037dbSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7474b85037dbSmrg 7475b85037dbSmrgif test -n "$compiler"; then 7476b85037dbSmrg : 7477b85037dbSmrg _LT_CONFIG($1) 7478b85037dbSmrgfi 7479b85037dbSmrg 7480b85037dbSmrgGCC=$lt_save_GCC 7481b85037dbSmrgAC_LANG_RESTORE 7482302b15bdSmrgCC=$lt_save_CC 7483302b15bdSmrgCFLAGS=$lt_save_CFLAGS 7484b85037dbSmrg])# _LT_LANG_RC_CONFIG 7485b85037dbSmrg 7486b85037dbSmrg 7487b85037dbSmrg# LT_PROG_GCJ 7488b85037dbSmrg# ----------- 7489b85037dbSmrgAC_DEFUN([LT_PROG_GCJ], 7490b85037dbSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7491b85037dbSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7492b85037dbSmrg [AC_CHECK_TOOL(GCJ, gcj,) 7493b85037dbSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7494b85037dbSmrg AC_SUBST(GCJFLAGS)])])[]dnl 7495b85037dbSmrg]) 7496b85037dbSmrg 7497b85037dbSmrg# Old name: 7498b85037dbSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7499b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 7500b85037dbSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7501b85037dbSmrg 7502b85037dbSmrg 7503b85037dbSmrg# LT_PROG_RC 7504b85037dbSmrg# ---------- 7505b85037dbSmrgAC_DEFUN([LT_PROG_RC], 7506b85037dbSmrg[AC_CHECK_TOOL(RC, windres,) 7507b85037dbSmrg]) 7508b85037dbSmrg 7509b85037dbSmrg# Old name: 7510b85037dbSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7511b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 7512b85037dbSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 7513b85037dbSmrg 7514b85037dbSmrg 7515b85037dbSmrg# _LT_DECL_EGREP 7516b85037dbSmrg# -------------- 7517b85037dbSmrg# If we don't have a new enough Autoconf to choose the best grep 7518b85037dbSmrg# available, choose the one first in the user's PATH. 7519b85037dbSmrgm4_defun([_LT_DECL_EGREP], 7520b85037dbSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7521b85037dbSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7522b85037dbSmrgtest -z "$GREP" && GREP=grep 7523b85037dbSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7524b85037dbSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7525b85037dbSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7526b85037dbSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7527b85037dbSmrgAC_SUBST([GREP]) 7528b85037dbSmrg]) 7529b85037dbSmrg 7530b85037dbSmrg 7531b85037dbSmrg# _LT_DECL_OBJDUMP 7532b85037dbSmrg# -------------- 7533b85037dbSmrg# If we don't have a new enough Autoconf to choose the best objdump 7534b85037dbSmrg# available, choose the one first in the user's PATH. 7535b85037dbSmrgm4_defun([_LT_DECL_OBJDUMP], 7536b85037dbSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7537b85037dbSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7538b85037dbSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7539b85037dbSmrgAC_SUBST([OBJDUMP]) 7540b85037dbSmrg]) 7541b85037dbSmrg 7542302b15bdSmrg# _LT_DECL_DLLTOOL 7543302b15bdSmrg# ---------------- 7544302b15bdSmrg# Ensure DLLTOOL variable is set. 7545302b15bdSmrgm4_defun([_LT_DECL_DLLTOOL], 7546302b15bdSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7547302b15bdSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7548302b15bdSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7549302b15bdSmrgAC_SUBST([DLLTOOL]) 7550302b15bdSmrg]) 7551b85037dbSmrg 7552b85037dbSmrg# _LT_DECL_SED 7553b85037dbSmrg# ------------ 7554b85037dbSmrg# Check for a fully-functional sed program, that truncates 7555b85037dbSmrg# as few characters as possible. Prefer GNU sed if found. 7556b85037dbSmrgm4_defun([_LT_DECL_SED], 7557b85037dbSmrg[AC_PROG_SED 7558b85037dbSmrgtest -z "$SED" && SED=sed 7559b85037dbSmrgXsed="$SED -e 1s/^X//" 7560b85037dbSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7561b85037dbSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7562b85037dbSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7563b85037dbSmrg])# _LT_DECL_SED 7564b85037dbSmrg 7565b85037dbSmrgm4_ifndef([AC_PROG_SED], [ 7566b85037dbSmrg# NOTE: This macro has been submitted for inclusion into # 7567b85037dbSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7568b85037dbSmrg# a released version of Autoconf we should remove this # 7569b85037dbSmrg# macro and use it instead. # 7570b85037dbSmrg 7571b85037dbSmrgm4_defun([AC_PROG_SED], 7572b85037dbSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7573b85037dbSmrgAC_CACHE_VAL(lt_cv_path_SED, 7574b85037dbSmrg[# Loop through the user's path and test for sed and gsed. 7575b85037dbSmrg# Then use that list of sed's as ones to test for truncation. 7576b85037dbSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7577b85037dbSmrgfor as_dir in $PATH 7578b85037dbSmrgdo 7579b85037dbSmrg IFS=$as_save_IFS 7580b85037dbSmrg test -z "$as_dir" && as_dir=. 7581b85037dbSmrg for lt_ac_prog in sed gsed; do 7582b85037dbSmrg for ac_exec_ext in '' $ac_executable_extensions; do 7583b85037dbSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7584b85037dbSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7585b85037dbSmrg fi 7586b85037dbSmrg done 7587b85037dbSmrg done 7588b85037dbSmrgdone 7589b85037dbSmrgIFS=$as_save_IFS 7590b85037dbSmrglt_ac_max=0 7591b85037dbSmrglt_ac_count=0 7592b85037dbSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7593b85037dbSmrg# along with /bin/sed that truncates output. 7594b85037dbSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7595b85037dbSmrg test ! -f $lt_ac_sed && continue 7596b85037dbSmrg cat /dev/null > conftest.in 7597b85037dbSmrg lt_ac_count=0 7598b85037dbSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7599b85037dbSmrg # Check for GNU sed and select it if it is found. 7600b85037dbSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7601b85037dbSmrg lt_cv_path_SED=$lt_ac_sed 7602b85037dbSmrg break 7603b85037dbSmrg fi 7604b85037dbSmrg while true; do 7605b85037dbSmrg cat conftest.in conftest.in >conftest.tmp 7606b85037dbSmrg mv conftest.tmp conftest.in 7607b85037dbSmrg cp conftest.in conftest.nl 7608b85037dbSmrg echo >>conftest.nl 7609b85037dbSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7610b85037dbSmrg cmp -s conftest.out conftest.nl || break 7611b85037dbSmrg # 10000 chars as input seems more than enough 7612b85037dbSmrg test $lt_ac_count -gt 10 && break 7613b85037dbSmrg lt_ac_count=`expr $lt_ac_count + 1` 7614b85037dbSmrg if test $lt_ac_count -gt $lt_ac_max; then 7615b85037dbSmrg lt_ac_max=$lt_ac_count 7616b85037dbSmrg lt_cv_path_SED=$lt_ac_sed 7617b85037dbSmrg fi 7618b85037dbSmrg done 7619b85037dbSmrgdone 7620b85037dbSmrg]) 7621b85037dbSmrgSED=$lt_cv_path_SED 7622b85037dbSmrgAC_SUBST([SED]) 7623b85037dbSmrgAC_MSG_RESULT([$SED]) 7624b85037dbSmrg])#AC_PROG_SED 7625b85037dbSmrg])#m4_ifndef 7626b85037dbSmrg 7627b85037dbSmrg# Old name: 7628b85037dbSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7629b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 7630b85037dbSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7631b85037dbSmrg 7632b85037dbSmrg 7633b85037dbSmrg# _LT_CHECK_SHELL_FEATURES 7634b85037dbSmrg# ------------------------ 7635b85037dbSmrg# Find out whether the shell is Bourne or XSI compatible, 7636b85037dbSmrg# or has some other useful features. 7637b85037dbSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7638b85037dbSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7639b85037dbSmrg# Try some XSI features 7640b85037dbSmrgxsi_shell=no 7641b85037dbSmrg( _lt_dummy="a/b/c" 7642302b15bdSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7643302b15bdSmrg = c,a/b,b/c, \ 7644b85037dbSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7645b85037dbSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7646b85037dbSmrg && xsi_shell=yes 7647b85037dbSmrgAC_MSG_RESULT([$xsi_shell]) 7648b85037dbSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7649b85037dbSmrg 7650b85037dbSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7651b85037dbSmrglt_shell_append=no 7652b85037dbSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7653b85037dbSmrg >/dev/null 2>&1 \ 7654b85037dbSmrg && lt_shell_append=yes 7655b85037dbSmrgAC_MSG_RESULT([$lt_shell_append]) 7656b85037dbSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7657b85037dbSmrg 7658b85037dbSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7659b85037dbSmrg lt_unset=unset 7660b85037dbSmrgelse 7661b85037dbSmrg lt_unset=false 7662b85037dbSmrgfi 7663b85037dbSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7664b85037dbSmrg 7665b85037dbSmrg# test EBCDIC or ASCII 7666b85037dbSmrgcase `echo X|tr X '\101'` in 7667b85037dbSmrg A) # ASCII based system 7668b85037dbSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7669b85037dbSmrg lt_SP2NL='tr \040 \012' 7670b85037dbSmrg lt_NL2SP='tr \015\012 \040\040' 7671b85037dbSmrg ;; 7672b85037dbSmrg *) # EBCDIC based system 7673b85037dbSmrg lt_SP2NL='tr \100 \n' 7674b85037dbSmrg lt_NL2SP='tr \r\n \100\100' 7675b85037dbSmrg ;; 7676b85037dbSmrgesac 7677b85037dbSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7678b85037dbSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7679b85037dbSmrg])# _LT_CHECK_SHELL_FEATURES 7680b85037dbSmrg 7681b85037dbSmrg 7682302b15bdSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7683302b15bdSmrg# ------------------------------------------------------ 7684302b15bdSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7685302b15bdSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7686302b15bdSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 7687302b15bdSmrg[dnl { 7688302b15bdSmrgsed -e '/^$1 ()$/,/^} # $1 /c\ 7689302b15bdSmrg$1 ()\ 7690302b15bdSmrg{\ 7691302b15bdSmrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7692302b15bdSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7693302b15bdSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7694302b15bdSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7695302b15bdSmrgtest 0 -eq $? || _lt_function_replace_fail=: 7696302b15bdSmrg]) 7697b85037dbSmrg 7698b85037dbSmrg 7699302b15bdSmrg# _LT_PROG_REPLACE_SHELLFNS 7700302b15bdSmrg# ------------------------- 7701302b15bdSmrg# Replace existing portable implementations of several shell functions with 7702302b15bdSmrg# equivalent extended shell implementations where those features are available.. 7703302b15bdSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7704302b15bdSmrg[if test x"$xsi_shell" = xyes; then 7705302b15bdSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7706302b15bdSmrg case ${1} in 7707302b15bdSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7708302b15bdSmrg * ) func_dirname_result="${3}" ;; 7709302b15bdSmrg esac]) 7710302b15bdSmrg 7711302b15bdSmrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7712302b15bdSmrg func_basename_result="${1##*/}"]) 7713302b15bdSmrg 7714302b15bdSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7715302b15bdSmrg case ${1} in 7716302b15bdSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7717302b15bdSmrg * ) func_dirname_result="${3}" ;; 7718302b15bdSmrg esac 7719302b15bdSmrg func_basename_result="${1##*/}"]) 7720b85037dbSmrg 7721302b15bdSmrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7722302b15bdSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7723302b15bdSmrg # positional parameters, so assign one to ordinary parameter first. 7724302b15bdSmrg func_stripname_result=${3} 7725302b15bdSmrg func_stripname_result=${func_stripname_result#"${1}"} 7726302b15bdSmrg func_stripname_result=${func_stripname_result%"${2}"}]) 7727b85037dbSmrg 7728302b15bdSmrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7729302b15bdSmrg func_split_long_opt_name=${1%%=*} 7730302b15bdSmrg func_split_long_opt_arg=${1#*=}]) 7731b85037dbSmrg 7732302b15bdSmrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7733302b15bdSmrg func_split_short_opt_arg=${1#??} 7734302b15bdSmrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 7735b85037dbSmrg 7736302b15bdSmrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7737302b15bdSmrg case ${1} in 7738302b15bdSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7739302b15bdSmrg *) func_lo2o_result=${1} ;; 7740302b15bdSmrg esac]) 7741b85037dbSmrg 7742302b15bdSmrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 7743b85037dbSmrg 7744302b15bdSmrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7745b85037dbSmrg 7746302b15bdSmrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7747302b15bdSmrgfi 7748b85037dbSmrg 7749302b15bdSmrgif test x"$lt_shell_append" = xyes; then 7750302b15bdSmrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7751b85037dbSmrg 7752302b15bdSmrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7753302b15bdSmrg func_quote_for_eval "${2}" 7754302b15bdSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7755302b15bdSmrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 7756b85037dbSmrg 7757302b15bdSmrg # Save a `func_append' function call where possible by direct use of '+=' 7758302b15bdSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7759302b15bdSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7760302b15bdSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7761302b15bdSmrg test 0 -eq $? || _lt_function_replace_fail=: 7762302b15bdSmrgelse 7763302b15bdSmrg # Save a `func_append' function call even when '+=' is not available 7764302b15bdSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7765302b15bdSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7766302b15bdSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7767302b15bdSmrg test 0 -eq $? || _lt_function_replace_fail=: 7768302b15bdSmrgfi 7769b85037dbSmrg 7770302b15bdSmrgif test x"$_lt_function_replace_fail" = x":"; then 7771302b15bdSmrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7772302b15bdSmrgfi 7773302b15bdSmrg]) 7774b85037dbSmrg 7775302b15bdSmrg# _LT_PATH_CONVERSION_FUNCTIONS 7776302b15bdSmrg# ----------------------------- 7777302b15bdSmrg# Determine which file name conversion functions should be used by 7778302b15bdSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7779302b15bdSmrg# for certain cross-compile configurations and native mingw. 7780302b15bdSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7781302b15bdSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7782302b15bdSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7783302b15bdSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 7784302b15bdSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7785302b15bdSmrg[case $host in 7786302b15bdSmrg *-*-mingw* ) 7787302b15bdSmrg case $build in 7788302b15bdSmrg *-*-mingw* ) # actually msys 7789302b15bdSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7790302b15bdSmrg ;; 7791302b15bdSmrg *-*-cygwin* ) 7792302b15bdSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7793302b15bdSmrg ;; 7794302b15bdSmrg * ) # otherwise, assume *nix 7795302b15bdSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7796302b15bdSmrg ;; 7797302b15bdSmrg esac 7798b85037dbSmrg ;; 7799302b15bdSmrg *-*-cygwin* ) 7800302b15bdSmrg case $build in 7801302b15bdSmrg *-*-mingw* ) # actually msys 7802302b15bdSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7803302b15bdSmrg ;; 7804302b15bdSmrg *-*-cygwin* ) 7805302b15bdSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 7806302b15bdSmrg ;; 7807302b15bdSmrg * ) # otherwise, assume *nix 7808302b15bdSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7809302b15bdSmrg ;; 7810302b15bdSmrg esac 7811b85037dbSmrg ;; 7812302b15bdSmrg * ) # unhandled hosts (and "normal" native builds) 7813302b15bdSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 7814302b15bdSmrg ;; 7815302b15bdSmrgesac 7816b85037dbSmrg]) 7817302b15bdSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 7818302b15bdSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7819302b15bdSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7820302b15bdSmrg [0], [convert $build file names to $host format])dnl 7821302b15bdSmrg 7822302b15bdSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7823302b15bdSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7824302b15bdSmrg[#assume ordinary cross tools, or native build. 7825302b15bdSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 7826302b15bdSmrgcase $host in 7827302b15bdSmrg *-*-mingw* ) 7828302b15bdSmrg case $build in 7829302b15bdSmrg *-*-mingw* ) # actually msys 7830302b15bdSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7831302b15bdSmrg ;; 7832302b15bdSmrg esac 7833302b15bdSmrg ;; 7834302b15bdSmrgesac 7835302b15bdSmrg]) 7836302b15bdSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7837302b15bdSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7838302b15bdSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7839302b15bdSmrg [0], [convert $build files to toolchain format])dnl 7840302b15bdSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 7841b85037dbSmrg 7842b85037dbSmrg# Helper functions for option handling. -*- Autoconf -*- 7843b85037dbSmrg# 7844b85037dbSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 7845b85037dbSmrg# Inc. 7846b85037dbSmrg# Written by Gary V. Vaughan, 2004 7847b85037dbSmrg# 7848b85037dbSmrg# This file is free software; the Free Software Foundation gives 7849b85037dbSmrg# unlimited permission to copy and/or distribute it, with or without 7850b85037dbSmrg# modifications, as long as this notice is preserved. 7851b85037dbSmrg 7852b85037dbSmrg# serial 7 ltoptions.m4 7853b85037dbSmrg 7854b85037dbSmrg# This is to help aclocal find these macros, as it can't see m4_define. 7855b85037dbSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 7856b85037dbSmrg 7857b85037dbSmrg 7858b85037dbSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 7859b85037dbSmrg# ------------------------------------------ 7860b85037dbSmrgm4_define([_LT_MANGLE_OPTION], 7861b85037dbSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 7862b85037dbSmrg 7863b85037dbSmrg 7864b85037dbSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 7865b85037dbSmrg# --------------------------------------- 7866b85037dbSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 7867b85037dbSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 7868b85037dbSmrg# saved as a flag. 7869b85037dbSmrgm4_define([_LT_SET_OPTION], 7870b85037dbSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 7871b85037dbSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 7872b85037dbSmrg _LT_MANGLE_DEFUN([$1], [$2]), 7873b85037dbSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 7874b85037dbSmrg]) 7875b85037dbSmrg 7876b85037dbSmrg 7877b85037dbSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 7878b85037dbSmrg# ------------------------------------------------------------ 7879b85037dbSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7880b85037dbSmrgm4_define([_LT_IF_OPTION], 7881b85037dbSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 7882b85037dbSmrg 7883b85037dbSmrg 7884b85037dbSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 7885b85037dbSmrg# ------------------------------------------------------- 7886b85037dbSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 7887b85037dbSmrg# are set. 7888b85037dbSmrgm4_define([_LT_UNLESS_OPTIONS], 7889b85037dbSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7890b85037dbSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 7891b85037dbSmrg [m4_define([$0_found])])])[]dnl 7892b85037dbSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 7893b85037dbSmrg])[]dnl 7894b85037dbSmrg]) 7895b85037dbSmrg 7896b85037dbSmrg 7897b85037dbSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 7898b85037dbSmrg# ---------------------------------------- 7899b85037dbSmrg# OPTION-LIST is a space-separated list of Libtool options associated 7900b85037dbSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 7901b85037dbSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 7902b85037dbSmrg# the unknown option and exit. 7903b85037dbSmrgm4_defun([_LT_SET_OPTIONS], 7904b85037dbSmrg[# Set options 7905b85037dbSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7906b85037dbSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 7907b85037dbSmrg 7908b85037dbSmrgm4_if([$1],[LT_INIT],[ 7909b85037dbSmrg dnl 7910b85037dbSmrg dnl Simply set some default values (i.e off) if boolean options were not 7911b85037dbSmrg dnl specified: 7912b85037dbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 7913b85037dbSmrg ]) 7914b85037dbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 7915b85037dbSmrg ]) 7916b85037dbSmrg dnl 7917b85037dbSmrg dnl If no reference was made to various pairs of opposing options, then 7918b85037dbSmrg dnl we run the default mode handler for the pair. For example, if neither 7919b85037dbSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 7920b85037dbSmrg dnl archives by default: 7921b85037dbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 7922b85037dbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 7923b85037dbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 7924b85037dbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 7925b85037dbSmrg [_LT_ENABLE_FAST_INSTALL]) 7926b85037dbSmrg ]) 7927b85037dbSmrg])# _LT_SET_OPTIONS 7928b85037dbSmrg 7929b85037dbSmrg 7930b85037dbSmrg 7931b85037dbSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 7932b85037dbSmrg# ----------------------------------------- 7933b85037dbSmrgm4_define([_LT_MANGLE_DEFUN], 7934b85037dbSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 7935b85037dbSmrg 7936b85037dbSmrg 7937b85037dbSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 7938b85037dbSmrg# ----------------------------------------------- 7939b85037dbSmrgm4_define([LT_OPTION_DEFINE], 7940b85037dbSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 7941b85037dbSmrg])# LT_OPTION_DEFINE 7942b85037dbSmrg 7943b85037dbSmrg 7944b85037dbSmrg# dlopen 7945b85037dbSmrg# ------ 7946b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 7947b85037dbSmrg]) 7948b85037dbSmrg 7949b85037dbSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 7950b85037dbSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 7951b85037dbSmrgAC_DIAGNOSE([obsolete], 7952b85037dbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7953b85037dbSmrgput the `dlopen' option into LT_INIT's first parameter.]) 7954b85037dbSmrg]) 7955b85037dbSmrg 7956b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 7957b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 7958b85037dbSmrg 7959b85037dbSmrg 7960b85037dbSmrg# win32-dll 7961b85037dbSmrg# --------- 7962b85037dbSmrg# Declare package support for building win32 dll's. 7963b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 7964b85037dbSmrg[enable_win32_dll=yes 7965b85037dbSmrg 7966b85037dbSmrgcase $host in 7967b85037dbSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 7968b85037dbSmrg AC_CHECK_TOOL(AS, as, false) 7969b85037dbSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7970b85037dbSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7971b85037dbSmrg ;; 7972b85037dbSmrgesac 7973b85037dbSmrg 7974b85037dbSmrgtest -z "$AS" && AS=as 7975b85037dbSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 7976b85037dbSmrg 7977b85037dbSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7978b85037dbSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 7979b85037dbSmrg 7980b85037dbSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7981b85037dbSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 7982b85037dbSmrg])# win32-dll 7983b85037dbSmrg 7984b85037dbSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 7985b85037dbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7986b85037dbSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 7987b85037dbSmrgAC_DIAGNOSE([obsolete], 7988b85037dbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7989b85037dbSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 7990b85037dbSmrg]) 7991b85037dbSmrg 7992b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 7993b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 7994b85037dbSmrg 7995b85037dbSmrg 7996b85037dbSmrg# _LT_ENABLE_SHARED([DEFAULT]) 7997b85037dbSmrg# ---------------------------- 7998b85037dbSmrg# implement the --enable-shared flag, and supports the `shared' and 7999b85037dbSmrg# `disable-shared' LT_INIT options. 8000b85037dbSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8001b85037dbSmrgm4_define([_LT_ENABLE_SHARED], 8002b85037dbSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8003b85037dbSmrgAC_ARG_ENABLE([shared], 8004b85037dbSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8005b85037dbSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8006b85037dbSmrg [p=${PACKAGE-default} 8007b85037dbSmrg case $enableval in 8008b85037dbSmrg yes) enable_shared=yes ;; 8009b85037dbSmrg no) enable_shared=no ;; 8010b85037dbSmrg *) 8011b85037dbSmrg enable_shared=no 8012b85037dbSmrg # Look at the argument we got. We use all the common list separators. 8013b85037dbSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8014b85037dbSmrg for pkg in $enableval; do 8015b85037dbSmrg IFS="$lt_save_ifs" 8016b85037dbSmrg if test "X$pkg" = "X$p"; then 8017b85037dbSmrg enable_shared=yes 8018b85037dbSmrg fi 8019b85037dbSmrg done 8020b85037dbSmrg IFS="$lt_save_ifs" 8021b85037dbSmrg ;; 8022b85037dbSmrg esac], 8023b85037dbSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8024b85037dbSmrg 8025b85037dbSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8026b85037dbSmrg [Whether or not to build shared libraries]) 8027b85037dbSmrg])# _LT_ENABLE_SHARED 8028b85037dbSmrg 8029b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8030b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8031b85037dbSmrg 8032b85037dbSmrg# Old names: 8033b85037dbSmrgAC_DEFUN([AC_ENABLE_SHARED], 8034b85037dbSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8035b85037dbSmrg]) 8036b85037dbSmrg 8037b85037dbSmrgAC_DEFUN([AC_DISABLE_SHARED], 8038b85037dbSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8039b85037dbSmrg]) 8040b85037dbSmrg 8041b85037dbSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8042b85037dbSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8043b85037dbSmrg 8044b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 8045b85037dbSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8046b85037dbSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8047b85037dbSmrg 8048b85037dbSmrg 8049b85037dbSmrg 8050b85037dbSmrg# _LT_ENABLE_STATIC([DEFAULT]) 8051b85037dbSmrg# ---------------------------- 8052b85037dbSmrg# implement the --enable-static flag, and support the `static' and 8053b85037dbSmrg# `disable-static' LT_INIT options. 8054b85037dbSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8055b85037dbSmrgm4_define([_LT_ENABLE_STATIC], 8056b85037dbSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8057b85037dbSmrgAC_ARG_ENABLE([static], 8058b85037dbSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8059b85037dbSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8060b85037dbSmrg [p=${PACKAGE-default} 8061b85037dbSmrg case $enableval in 8062b85037dbSmrg yes) enable_static=yes ;; 8063b85037dbSmrg no) enable_static=no ;; 8064b85037dbSmrg *) 8065b85037dbSmrg enable_static=no 8066b85037dbSmrg # Look at the argument we got. We use all the common list separators. 8067b85037dbSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8068b85037dbSmrg for pkg in $enableval; do 8069b85037dbSmrg IFS="$lt_save_ifs" 8070b85037dbSmrg if test "X$pkg" = "X$p"; then 8071b85037dbSmrg enable_static=yes 8072b85037dbSmrg fi 8073b85037dbSmrg done 8074b85037dbSmrg IFS="$lt_save_ifs" 8075b85037dbSmrg ;; 8076b85037dbSmrg esac], 8077b85037dbSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8078b85037dbSmrg 8079b85037dbSmrg _LT_DECL([build_old_libs], [enable_static], [0], 8080b85037dbSmrg [Whether or not to build static libraries]) 8081b85037dbSmrg])# _LT_ENABLE_STATIC 8082b85037dbSmrg 8083b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8084b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8085b85037dbSmrg 8086b85037dbSmrg# Old names: 8087b85037dbSmrgAC_DEFUN([AC_ENABLE_STATIC], 8088b85037dbSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8089b85037dbSmrg]) 8090b85037dbSmrg 8091b85037dbSmrgAC_DEFUN([AC_DISABLE_STATIC], 8092b85037dbSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8093b85037dbSmrg]) 8094b85037dbSmrg 8095b85037dbSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8096b85037dbSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8097b85037dbSmrg 8098b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 8099b85037dbSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8100b85037dbSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8101b85037dbSmrg 8102b85037dbSmrg 8103b85037dbSmrg 8104b85037dbSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8105b85037dbSmrg# ---------------------------------- 8106b85037dbSmrg# implement the --enable-fast-install flag, and support the `fast-install' 8107b85037dbSmrg# and `disable-fast-install' LT_INIT options. 8108b85037dbSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8109b85037dbSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 8110b85037dbSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8111b85037dbSmrgAC_ARG_ENABLE([fast-install], 8112b85037dbSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8113b85037dbSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8114b85037dbSmrg [p=${PACKAGE-default} 8115b85037dbSmrg case $enableval in 8116b85037dbSmrg yes) enable_fast_install=yes ;; 8117b85037dbSmrg no) enable_fast_install=no ;; 8118b85037dbSmrg *) 8119b85037dbSmrg enable_fast_install=no 8120b85037dbSmrg # Look at the argument we got. We use all the common list separators. 8121b85037dbSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8122b85037dbSmrg for pkg in $enableval; do 8123b85037dbSmrg IFS="$lt_save_ifs" 8124b85037dbSmrg if test "X$pkg" = "X$p"; then 8125b85037dbSmrg enable_fast_install=yes 8126b85037dbSmrg fi 8127b85037dbSmrg done 8128b85037dbSmrg IFS="$lt_save_ifs" 8129b85037dbSmrg ;; 8130b85037dbSmrg esac], 8131b85037dbSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8132b85037dbSmrg 8133b85037dbSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 8134b85037dbSmrg [Whether or not to optimize for fast installation])dnl 8135b85037dbSmrg])# _LT_ENABLE_FAST_INSTALL 8136b85037dbSmrg 8137b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8138b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8139b85037dbSmrg 8140b85037dbSmrg# Old names: 8141b85037dbSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8142b85037dbSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8143b85037dbSmrgAC_DIAGNOSE([obsolete], 8144b85037dbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8145b85037dbSmrgthe `fast-install' option into LT_INIT's first parameter.]) 8146b85037dbSmrg]) 8147b85037dbSmrg 8148b85037dbSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8149b85037dbSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8150b85037dbSmrgAC_DIAGNOSE([obsolete], 8151b85037dbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8152b85037dbSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 8153b85037dbSmrg]) 8154b85037dbSmrg 8155b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 8156b85037dbSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8157b85037dbSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8158b85037dbSmrg 8159b85037dbSmrg 8160b85037dbSmrg# _LT_WITH_PIC([MODE]) 8161b85037dbSmrg# -------------------- 8162b85037dbSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 8163b85037dbSmrg# LT_INIT options. 8164b85037dbSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 8165b85037dbSmrgm4_define([_LT_WITH_PIC], 8166b85037dbSmrg[AC_ARG_WITH([pic], 8167b85037dbSmrg [AS_HELP_STRING([--with-pic], 8168b85037dbSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8169b85037dbSmrg [pic_mode="$withval"], 8170b85037dbSmrg [pic_mode=default]) 8171b85037dbSmrg 8172b85037dbSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 8173b85037dbSmrg 8174b85037dbSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8175b85037dbSmrg])# _LT_WITH_PIC 8176b85037dbSmrg 8177b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8178b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8179b85037dbSmrg 8180b85037dbSmrg# Old name: 8181b85037dbSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8182b85037dbSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8183b85037dbSmrgAC_DIAGNOSE([obsolete], 8184b85037dbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8185b85037dbSmrgput the `pic-only' option into LT_INIT's first parameter.]) 8186b85037dbSmrg]) 8187b85037dbSmrg 8188b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 8189b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8190b85037dbSmrg 8191b85037dbSmrg 8192b85037dbSmrgm4_define([_LTDL_MODE], []) 8193b85037dbSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8194b85037dbSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8195b85037dbSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8196b85037dbSmrg [m4_define([_LTDL_MODE], [recursive])]) 8197b85037dbSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8198b85037dbSmrg [m4_define([_LTDL_MODE], [subproject])]) 8199b85037dbSmrg 8200b85037dbSmrgm4_define([_LTDL_TYPE], []) 8201b85037dbSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8202b85037dbSmrg [m4_define([_LTDL_TYPE], [installable])]) 8203b85037dbSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8204b85037dbSmrg [m4_define([_LTDL_TYPE], [convenience])]) 8205b85037dbSmrg 8206b85037dbSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8207b85037dbSmrg# 8208b85037dbSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 8209b85037dbSmrg# Written by Gary V. Vaughan, 2004 8210b85037dbSmrg# 8211b85037dbSmrg# This file is free software; the Free Software Foundation gives 8212b85037dbSmrg# unlimited permission to copy and/or distribute it, with or without 8213b85037dbSmrg# modifications, as long as this notice is preserved. 8214b85037dbSmrg 8215b85037dbSmrg# serial 6 ltsugar.m4 8216b85037dbSmrg 8217b85037dbSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8218b85037dbSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8219b85037dbSmrg 8220b85037dbSmrg 8221b85037dbSmrg# lt_join(SEP, ARG1, [ARG2...]) 8222b85037dbSmrg# ----------------------------- 8223b85037dbSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8224b85037dbSmrg# associated separator. 8225b85037dbSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8226b85037dbSmrg# versions in m4sugar had bugs. 8227b85037dbSmrgm4_define([lt_join], 8228b85037dbSmrg[m4_if([$#], [1], [], 8229b85037dbSmrg [$#], [2], [[$2]], 8230b85037dbSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8231b85037dbSmrgm4_define([_lt_join], 8232b85037dbSmrg[m4_if([$#$2], [2], [], 8233b85037dbSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8234b85037dbSmrg 8235b85037dbSmrg 8236b85037dbSmrg# lt_car(LIST) 8237b85037dbSmrg# lt_cdr(LIST) 8238b85037dbSmrg# ------------ 8239b85037dbSmrg# Manipulate m4 lists. 8240b85037dbSmrg# These macros are necessary as long as will still need to support 8241b85037dbSmrg# Autoconf-2.59 which quotes differently. 8242b85037dbSmrgm4_define([lt_car], [[$1]]) 8243b85037dbSmrgm4_define([lt_cdr], 8244b85037dbSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8245b85037dbSmrg [$#], 1, [], 8246b85037dbSmrg [m4_dquote(m4_shift($@))])]) 8247b85037dbSmrgm4_define([lt_unquote], $1) 8248b85037dbSmrg 8249b85037dbSmrg 8250b85037dbSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8251b85037dbSmrg# ------------------------------------------ 8252b85037dbSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 8253b85037dbSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8254b85037dbSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8255b85037dbSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8256b85037dbSmrg# than defined and empty). 8257b85037dbSmrg# 8258b85037dbSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8259b85037dbSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8260b85037dbSmrgm4_define([lt_append], 8261b85037dbSmrg[m4_define([$1], 8262b85037dbSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8263b85037dbSmrg 8264b85037dbSmrg 8265b85037dbSmrg 8266b85037dbSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8267b85037dbSmrg# ---------------------------------------------------------- 8268b85037dbSmrg# Produce a SEP delimited list of all paired combinations of elements of 8269b85037dbSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8270b85037dbSmrg# has the form PREFIXmINFIXSUFFIXn. 8271b85037dbSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8272b85037dbSmrgm4_define([lt_combine], 8273b85037dbSmrg[m4_if(m4_eval([$# > 3]), [1], 8274b85037dbSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8275b85037dbSmrg[[m4_foreach([_Lt_prefix], [$2], 8276b85037dbSmrg [m4_foreach([_Lt_suffix], 8277b85037dbSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8278b85037dbSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8279b85037dbSmrg 8280b85037dbSmrg 8281b85037dbSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8282b85037dbSmrg# ----------------------------------------------------------------------- 8283b85037dbSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8284b85037dbSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8285b85037dbSmrgm4_define([lt_if_append_uniq], 8286b85037dbSmrg[m4_ifdef([$1], 8287b85037dbSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8288b85037dbSmrg [lt_append([$1], [$2], [$3])$4], 8289b85037dbSmrg [$5])], 8290b85037dbSmrg [lt_append([$1], [$2], [$3])$4])]) 8291b85037dbSmrg 8292b85037dbSmrg 8293b85037dbSmrg# lt_dict_add(DICT, KEY, VALUE) 8294b85037dbSmrg# ----------------------------- 8295b85037dbSmrgm4_define([lt_dict_add], 8296b85037dbSmrg[m4_define([$1($2)], [$3])]) 8297b85037dbSmrg 8298b85037dbSmrg 8299b85037dbSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8300b85037dbSmrg# -------------------------------------------- 8301b85037dbSmrgm4_define([lt_dict_add_subkey], 8302b85037dbSmrg[m4_define([$1($2:$3)], [$4])]) 8303b85037dbSmrg 8304b85037dbSmrg 8305b85037dbSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8306b85037dbSmrg# ---------------------------------- 8307b85037dbSmrgm4_define([lt_dict_fetch], 8308b85037dbSmrg[m4_ifval([$3], 8309b85037dbSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8310b85037dbSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8311b85037dbSmrg 8312b85037dbSmrg 8313b85037dbSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8314b85037dbSmrg# ----------------------------------------------------------------- 8315b85037dbSmrgm4_define([lt_if_dict_fetch], 8316b85037dbSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8317b85037dbSmrg [$5], 8318b85037dbSmrg [$6])]) 8319b85037dbSmrg 8320b85037dbSmrg 8321b85037dbSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8322b85037dbSmrg# -------------------------------------------------------------- 8323b85037dbSmrgm4_define([lt_dict_filter], 8324b85037dbSmrg[m4_if([$5], [], [], 8325b85037dbSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8326b85037dbSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8327b85037dbSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8328b85037dbSmrg]) 8329b85037dbSmrg 8330b85037dbSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8331b85037dbSmrg# 8332b85037dbSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 8333b85037dbSmrg# Written by Scott James Remnant, 2004 8334b85037dbSmrg# 8335b85037dbSmrg# This file is free software; the Free Software Foundation gives 8336b85037dbSmrg# unlimited permission to copy and/or distribute it, with or without 8337b85037dbSmrg# modifications, as long as this notice is preserved. 8338b85037dbSmrg 8339302b15bdSmrg# @configure_input@ 8340b85037dbSmrg 8341302b15bdSmrg# serial 3293 ltversion.m4 8342b85037dbSmrg# This file is part of GNU Libtool 8343b85037dbSmrg 8344302b15bdSmrgm4_define([LT_PACKAGE_VERSION], [2.4]) 8345302b15bdSmrgm4_define([LT_PACKAGE_REVISION], [1.3293]) 8346b85037dbSmrg 8347b85037dbSmrgAC_DEFUN([LTVERSION_VERSION], 8348302b15bdSmrg[macro_version='2.4' 8349302b15bdSmrgmacro_revision='1.3293' 8350b85037dbSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8351b85037dbSmrg_LT_DECL(, macro_revision, 0) 8352b85037dbSmrg]) 8353b85037dbSmrg 8354b85037dbSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8355b85037dbSmrg# 8356b85037dbSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 8357b85037dbSmrg# Written by Scott James Remnant, 2004. 8358b85037dbSmrg# 8359b85037dbSmrg# This file is free software; the Free Software Foundation gives 8360b85037dbSmrg# unlimited permission to copy and/or distribute it, with or without 8361b85037dbSmrg# modifications, as long as this notice is preserved. 8362b85037dbSmrg 8363b85037dbSmrg# serial 5 lt~obsolete.m4 8364b85037dbSmrg 8365b85037dbSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 8366b85037dbSmrg# 8367b85037dbSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 8368b85037dbSmrg# which have later been changed to m4_define as they aren't part of the 8369b85037dbSmrg# exported API, or moved to Autoconf or Automake where they belong. 8370b85037dbSmrg# 8371b85037dbSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8372b85037dbSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8373b85037dbSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 8374b85037dbSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8375b85037dbSmrg# and doesn't know about Autoconf macros at all.) 8376b85037dbSmrg# 8377b85037dbSmrg# So we provide this file, which has a silly filename so it's always 8378b85037dbSmrg# included after everything else. This provides aclocal with the 8379b85037dbSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8380b85037dbSmrg# because those macros already exist, or will be overwritten later. 8381b85037dbSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8382b85037dbSmrg# 8383b85037dbSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8384b85037dbSmrg# Yes, that means every name once taken will need to remain here until 8385b85037dbSmrg# we give up compatibility with versions before 1.7, at which point 8386b85037dbSmrg# we need to keep only those names which we still refer to. 8387b85037dbSmrg 8388b85037dbSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8389b85037dbSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8390b85037dbSmrg 8391b85037dbSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8392b85037dbSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8393b85037dbSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8394b85037dbSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8395b85037dbSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8396b85037dbSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8397b85037dbSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8398b85037dbSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8399b85037dbSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8400b85037dbSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8401b85037dbSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8402b85037dbSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8403b85037dbSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8404b85037dbSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8405b85037dbSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8406b85037dbSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8407b85037dbSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8408b85037dbSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8409b85037dbSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8410b85037dbSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8411b85037dbSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8412b85037dbSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8413b85037dbSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8414b85037dbSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8415b85037dbSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8416b85037dbSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8417b85037dbSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8418b85037dbSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8419b85037dbSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8420b85037dbSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8421b85037dbSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8422b85037dbSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8423b85037dbSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8424b85037dbSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8425b85037dbSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8426b85037dbSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8427b85037dbSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8428b85037dbSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8429b85037dbSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8430b85037dbSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8431b85037dbSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8432b85037dbSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8433b85037dbSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8434b85037dbSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8435b85037dbSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8436b85037dbSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8437b85037dbSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8438b85037dbSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8439b85037dbSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8440b85037dbSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8441b85037dbSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8442b85037dbSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8443b85037dbSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8444b85037dbSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8445b85037dbSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8446b85037dbSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8447b85037dbSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8448b85037dbSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8449b85037dbSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8450b85037dbSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8451b85037dbSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 8452b85037dbSmrg 8453b85037dbSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 8454b85037dbSmrg# serial 1 (pkg-config-0.24) 8455b85037dbSmrg# 8456b85037dbSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 8457b85037dbSmrg# 8458b85037dbSmrg# This program is free software; you can redistribute it and/or modify 8459b85037dbSmrg# it under the terms of the GNU General Public License as published by 8460b85037dbSmrg# the Free Software Foundation; either version 2 of the License, or 8461b85037dbSmrg# (at your option) any later version. 8462b85037dbSmrg# 8463b85037dbSmrg# This program is distributed in the hope that it will be useful, but 8464b85037dbSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 8465b85037dbSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8466b85037dbSmrg# General Public License for more details. 8467b85037dbSmrg# 8468b85037dbSmrg# You should have received a copy of the GNU General Public License 8469b85037dbSmrg# along with this program; if not, write to the Free Software 8470b85037dbSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 8471b85037dbSmrg# 8472b85037dbSmrg# As a special exception to the GNU General Public License, if you 8473b85037dbSmrg# distribute this file as part of a program that contains a 8474b85037dbSmrg# configuration script generated by Autoconf, you may include it under 8475b85037dbSmrg# the same distribution terms that you use for the rest of that program. 8476b85037dbSmrg 8477b85037dbSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 8478b85037dbSmrg# ---------------------------------- 8479b85037dbSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 8480b85037dbSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 8481b85037dbSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 8482b85037dbSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 8483b85037dbSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 8484b85037dbSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 8485b85037dbSmrg 8486b85037dbSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8487b85037dbSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8488b85037dbSmrgfi 8489b85037dbSmrgif test -n "$PKG_CONFIG"; then 8490b85037dbSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 8491b85037dbSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8492b85037dbSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8493b85037dbSmrg AC_MSG_RESULT([yes]) 8494b85037dbSmrg else 8495b85037dbSmrg AC_MSG_RESULT([no]) 8496b85037dbSmrg PKG_CONFIG="" 8497b85037dbSmrg fi 8498b85037dbSmrgfi[]dnl 8499b85037dbSmrg])# PKG_PROG_PKG_CONFIG 8500b85037dbSmrg 8501b85037dbSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8502b85037dbSmrg# 8503b85037dbSmrg# Check to see whether a particular set of modules exists. Similar 8504b85037dbSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8505b85037dbSmrg# 8506b85037dbSmrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8507b85037dbSmrg# only at the first occurence in configure.ac, so if the first place 8508b85037dbSmrg# it's called might be skipped (such as if it is within an "if", you 8509b85037dbSmrg# have to call PKG_CHECK_EXISTS manually 8510b85037dbSmrg# -------------------------------------------------------------- 8511b85037dbSmrgAC_DEFUN([PKG_CHECK_EXISTS], 8512b85037dbSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8513b85037dbSmrgif test -n "$PKG_CONFIG" && \ 8514b85037dbSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8515b85037dbSmrg m4_default([$2], [:]) 8516b85037dbSmrgm4_ifvaln([$3], [else 8517b85037dbSmrg $3])dnl 8518b85037dbSmrgfi]) 8519b85037dbSmrg 8520b85037dbSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8521b85037dbSmrg# --------------------------------------------- 8522b85037dbSmrgm4_define([_PKG_CONFIG], 8523b85037dbSmrg[if test -n "$$1"; then 8524b85037dbSmrg pkg_cv_[]$1="$$1" 8525b85037dbSmrg elif test -n "$PKG_CONFIG"; then 8526b85037dbSmrg PKG_CHECK_EXISTS([$3], 8527b85037dbSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 8528b85037dbSmrg [pkg_failed=yes]) 8529b85037dbSmrg else 8530b85037dbSmrg pkg_failed=untried 8531b85037dbSmrgfi[]dnl 8532b85037dbSmrg])# _PKG_CONFIG 8533b85037dbSmrg 8534b85037dbSmrg# _PKG_SHORT_ERRORS_SUPPORTED 8535b85037dbSmrg# ----------------------------- 8536b85037dbSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8537b85037dbSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8538b85037dbSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8539b85037dbSmrg _pkg_short_errors_supported=yes 8540b85037dbSmrgelse 8541b85037dbSmrg _pkg_short_errors_supported=no 8542b85037dbSmrgfi[]dnl 8543b85037dbSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 8544b85037dbSmrg 8545b85037dbSmrg 8546b85037dbSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8547b85037dbSmrg# [ACTION-IF-NOT-FOUND]) 8548b85037dbSmrg# 8549b85037dbSmrg# 8550b85037dbSmrg# Note that if there is a possibility the first call to 8551b85037dbSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8552b85037dbSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8553b85037dbSmrg# 8554b85037dbSmrg# 8555b85037dbSmrg# -------------------------------------------------------------- 8556b85037dbSmrgAC_DEFUN([PKG_CHECK_MODULES], 8557b85037dbSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8558b85037dbSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8559b85037dbSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8560b85037dbSmrg 8561b85037dbSmrgpkg_failed=no 8562b85037dbSmrgAC_MSG_CHECKING([for $1]) 8563b85037dbSmrg 8564b85037dbSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8565b85037dbSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8566b85037dbSmrg 8567b85037dbSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8568b85037dbSmrgand $1[]_LIBS to avoid the need to call pkg-config. 8569b85037dbSmrgSee the pkg-config man page for more details.]) 8570b85037dbSmrg 8571b85037dbSmrgif test $pkg_failed = yes; then 8572b85037dbSmrg AC_MSG_RESULT([no]) 8573b85037dbSmrg _PKG_SHORT_ERRORS_SUPPORTED 8574b85037dbSmrg if test $_pkg_short_errors_supported = yes; then 8575b85037dbSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 8576b85037dbSmrg else 8577b85037dbSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 8578b85037dbSmrg fi 8579b85037dbSmrg # Put the nasty error message in config.log where it belongs 8580b85037dbSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8581b85037dbSmrg 8582b85037dbSmrg m4_default([$4], [AC_MSG_ERROR( 8583b85037dbSmrg[Package requirements ($2) were not met: 8584b85037dbSmrg 8585b85037dbSmrg$$1_PKG_ERRORS 8586b85037dbSmrg 8587b85037dbSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8588b85037dbSmrginstalled software in a non-standard prefix. 8589b85037dbSmrg 8590b85037dbSmrg_PKG_TEXT]) 8591b85037dbSmrg ]) 8592b85037dbSmrgelif test $pkg_failed = untried; then 8593b85037dbSmrg AC_MSG_RESULT([no]) 8594b85037dbSmrg m4_default([$4], [AC_MSG_FAILURE( 8595b85037dbSmrg[The pkg-config script could not be found or is too old. Make sure it 8596b85037dbSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 8597b85037dbSmrgpath to pkg-config. 8598b85037dbSmrg 8599b85037dbSmrg_PKG_TEXT 8600b85037dbSmrg 8601b85037dbSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 8602b85037dbSmrg ]) 8603b85037dbSmrgelse 8604b85037dbSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8605b85037dbSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8606b85037dbSmrg AC_MSG_RESULT([yes]) 8607b85037dbSmrg $3 8608b85037dbSmrgfi[]dnl 8609b85037dbSmrg])# PKG_CHECK_MODULES 8610b85037dbSmrg 8611b85037dbSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 8612b85037dbSmrg# 8613b85037dbSmrg# This file is free software; the Free Software Foundation 8614b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8615b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8616b85037dbSmrg 8617b85037dbSmrg# AM_AUTOMAKE_VERSION(VERSION) 8618b85037dbSmrg# ---------------------------- 8619b85037dbSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 8620b85037dbSmrg# generated from the m4 files accompanying Automake X.Y. 8621b85037dbSmrg# (This private macro should not be called outside this file.) 8622b85037dbSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 8623b85037dbSmrg[am__api_version='1.11' 8624b85037dbSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 8625b85037dbSmrgdnl require some minimum version. Point them to the right macro. 8626b85037dbSmrgm4_if([$1], [1.11.1], [], 8627b85037dbSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 8628b85037dbSmrg]) 8629b85037dbSmrg 8630b85037dbSmrg# _AM_AUTOCONF_VERSION(VERSION) 8631b85037dbSmrg# ----------------------------- 8632b85037dbSmrg# aclocal traces this macro to find the Autoconf version. 8633b85037dbSmrg# This is a private macro too. Using m4_define simplifies 8634b85037dbSmrg# the logic in aclocal, which can simply ignore this definition. 8635b85037dbSmrgm4_define([_AM_AUTOCONF_VERSION], []) 8636b85037dbSmrg 8637b85037dbSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 8638b85037dbSmrg# ------------------------------- 8639b85037dbSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 8640b85037dbSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 8641b85037dbSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 8642b85037dbSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 8643b85037dbSmrgm4_ifndef([AC_AUTOCONF_VERSION], 8644b85037dbSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 8645b85037dbSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 8646b85037dbSmrg 8647b85037dbSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 8648b85037dbSmrg 8649b85037dbSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8650b85037dbSmrg# 8651b85037dbSmrg# This file is free software; the Free Software Foundation 8652b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8653b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8654b85037dbSmrg 8655b85037dbSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 8656b85037dbSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 8657b85037dbSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 8658b85037dbSmrg# 8659b85037dbSmrg# Of course, Automake must honor this variable whenever it calls a 8660b85037dbSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 8661b85037dbSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 8662b85037dbSmrg# depending on how configure is run. This is pretty annoying, since 8663b85037dbSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 8664b85037dbSmrg# source directory, any form will work fine, but in subdirectories a 8665b85037dbSmrg# relative path needs to be adjusted first. 8666b85037dbSmrg# 8667b85037dbSmrg# $ac_aux_dir/missing 8668b85037dbSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 8669b85037dbSmrg# $top_srcdir/$ac_aux_dir/missing 8670b85037dbSmrg# fails if $ac_aux_dir is absolute, 8671b85037dbSmrg# fails when called from a subdirectory in a VPATH build with 8672b85037dbSmrg# a relative $ac_aux_dir 8673b85037dbSmrg# 8674b85037dbSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8675b85037dbSmrg# are both prefixed by $srcdir. In an in-source build this is usually 8676b85037dbSmrg# harmless because $srcdir is `.', but things will broke when you 8677b85037dbSmrg# start a VPATH build or use an absolute $srcdir. 8678b85037dbSmrg# 8679b85037dbSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 8680b85037dbSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 8681b85037dbSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 8682b85037dbSmrg# and then we would define $MISSING as 8683b85037dbSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 8684b85037dbSmrg# This will work as long as MISSING is not called from configure, because 8685b85037dbSmrg# unfortunately $(top_srcdir) has no meaning in configure. 8686b85037dbSmrg# However there are other variables, like CC, which are often used in 8687b85037dbSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 8688b85037dbSmrg# 8689b85037dbSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 8690b85037dbSmrg# absolute PATH. The drawback is that using absolute paths prevent a 8691b85037dbSmrg# configured tree to be moved without reconfiguration. 8692b85037dbSmrg 8693b85037dbSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 8694b85037dbSmrg[dnl Rely on autoconf to set up CDPATH properly. 8695b85037dbSmrgAC_PREREQ([2.50])dnl 8696b85037dbSmrg# expand $ac_aux_dir to an absolute path 8697b85037dbSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 8698b85037dbSmrg]) 8699b85037dbSmrg 8700b85037dbSmrg# AM_CONDITIONAL -*- Autoconf -*- 8701b85037dbSmrg 8702b85037dbSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 8703b85037dbSmrg# Free Software Foundation, Inc. 8704b85037dbSmrg# 8705b85037dbSmrg# This file is free software; the Free Software Foundation 8706b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8707b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8708b85037dbSmrg 8709b85037dbSmrg# serial 9 8710b85037dbSmrg 8711b85037dbSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 8712b85037dbSmrg# ------------------------------------- 8713b85037dbSmrg# Define a conditional. 8714b85037dbSmrgAC_DEFUN([AM_CONDITIONAL], 8715b85037dbSmrg[AC_PREREQ(2.52)dnl 8716b85037dbSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 8717b85037dbSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 8718b85037dbSmrgAC_SUBST([$1_TRUE])dnl 8719b85037dbSmrgAC_SUBST([$1_FALSE])dnl 8720b85037dbSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 8721b85037dbSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 8722b85037dbSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 8723b85037dbSmrgif $2; then 8724b85037dbSmrg $1_TRUE= 8725b85037dbSmrg $1_FALSE='#' 8726b85037dbSmrgelse 8727b85037dbSmrg $1_TRUE='#' 8728b85037dbSmrg $1_FALSE= 8729b85037dbSmrgfi 8730b85037dbSmrgAC_CONFIG_COMMANDS_PRE( 8731b85037dbSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 8732b85037dbSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 8733b85037dbSmrgUsually this means the macro was only invoked conditionally.]]) 8734b85037dbSmrgfi])]) 8735b85037dbSmrg 8736b85037dbSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 8737b85037dbSmrg# Free Software Foundation, Inc. 8738b85037dbSmrg# 8739b85037dbSmrg# This file is free software; the Free Software Foundation 8740b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8741b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8742b85037dbSmrg 8743b85037dbSmrg# serial 10 8744b85037dbSmrg 8745b85037dbSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 8746b85037dbSmrg# written in clear, in which case automake, when reading aclocal.m4, 8747b85037dbSmrg# will think it sees a *use*, and therefore will trigger all it's 8748b85037dbSmrg# C support machinery. Also note that it means that autoscan, seeing 8749b85037dbSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 8750b85037dbSmrg 8751b85037dbSmrg 8752b85037dbSmrg# _AM_DEPENDENCIES(NAME) 8753b85037dbSmrg# ---------------------- 8754b85037dbSmrg# See how the compiler implements dependency checking. 8755b85037dbSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 8756b85037dbSmrg# We try a few techniques and use that to set a single cache variable. 8757b85037dbSmrg# 8758b85037dbSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 8759b85037dbSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 8760b85037dbSmrg# dependency, and given that the user is not expected to run this macro, 8761b85037dbSmrg# just rely on AC_PROG_CC. 8762b85037dbSmrgAC_DEFUN([_AM_DEPENDENCIES], 8763b85037dbSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 8764b85037dbSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 8765b85037dbSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 8766b85037dbSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 8767b85037dbSmrg 8768b85037dbSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 8769b85037dbSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 8770b85037dbSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 8771b85037dbSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 8772b85037dbSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 8773b85037dbSmrg [depcc="$$1" am_compiler_list=]) 8774b85037dbSmrg 8775b85037dbSmrgAC_CACHE_CHECK([dependency style of $depcc], 8776b85037dbSmrg [am_cv_$1_dependencies_compiler_type], 8777b85037dbSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 8778b85037dbSmrg # We make a subdir and do the tests there. Otherwise we can end up 8779b85037dbSmrg # making bogus files that we don't know about and never remove. For 8780b85037dbSmrg # instance it was reported that on HP-UX the gcc test will end up 8781b85037dbSmrg # making a dummy file named `D' -- because `-MD' means `put the output 8782b85037dbSmrg # in D'. 8783b85037dbSmrg mkdir conftest.dir 8784b85037dbSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 8785b85037dbSmrg # using a relative directory. 8786b85037dbSmrg cp "$am_depcomp" conftest.dir 8787b85037dbSmrg cd conftest.dir 8788b85037dbSmrg # We will build objects and dependencies in a subdirectory because 8789b85037dbSmrg # it helps to detect inapplicable dependency modes. For instance 8790b85037dbSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 8791b85037dbSmrg # side effect of compilation, but ICC will put the dependencies in 8792b85037dbSmrg # the current directory while Tru64 will put them in the object 8793b85037dbSmrg # directory. 8794b85037dbSmrg mkdir sub 8795b85037dbSmrg 8796b85037dbSmrg am_cv_$1_dependencies_compiler_type=none 8797b85037dbSmrg if test "$am_compiler_list" = ""; then 8798b85037dbSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 8799b85037dbSmrg fi 8800b85037dbSmrg am__universal=false 8801b85037dbSmrg m4_case([$1], [CC], 8802b85037dbSmrg [case " $depcc " in #( 8803b85037dbSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 8804b85037dbSmrg esac], 8805b85037dbSmrg [CXX], 8806b85037dbSmrg [case " $depcc " in #( 8807b85037dbSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 8808b85037dbSmrg esac]) 8809b85037dbSmrg 8810b85037dbSmrg for depmode in $am_compiler_list; do 8811b85037dbSmrg # Setup a source with many dependencies, because some compilers 8812b85037dbSmrg # like to wrap large dependency lists on column 80 (with \), and 8813b85037dbSmrg # we should not choose a depcomp mode which is confused by this. 8814b85037dbSmrg # 8815b85037dbSmrg # We need to recreate these files for each test, as the compiler may 8816b85037dbSmrg # overwrite some of them when testing with obscure command lines. 8817b85037dbSmrg # This happens at least with the AIX C compiler. 8818b85037dbSmrg : > sub/conftest.c 8819b85037dbSmrg for i in 1 2 3 4 5 6; do 8820b85037dbSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 8821b85037dbSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 8822b85037dbSmrg # Solaris 8's {/usr,}/bin/sh. 8823b85037dbSmrg touch sub/conftst$i.h 8824b85037dbSmrg done 8825b85037dbSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 8826b85037dbSmrg 8827b85037dbSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 8828b85037dbSmrg # mode. It turns out that the SunPro C++ compiler does not properly 8829b85037dbSmrg # handle `-M -o', and we need to detect this. Also, some Intel 8830b85037dbSmrg # versions had trouble with output in subdirs 8831b85037dbSmrg am__obj=sub/conftest.${OBJEXT-o} 8832b85037dbSmrg am__minus_obj="-o $am__obj" 8833b85037dbSmrg case $depmode in 8834b85037dbSmrg gcc) 8835b85037dbSmrg # This depmode causes a compiler race in universal mode. 8836b85037dbSmrg test "$am__universal" = false || continue 8837b85037dbSmrg ;; 8838b85037dbSmrg nosideeffect) 8839b85037dbSmrg # after this tag, mechanisms are not by side-effect, so they'll 8840b85037dbSmrg # only be used when explicitly requested 8841b85037dbSmrg if test "x$enable_dependency_tracking" = xyes; then 8842b85037dbSmrg continue 8843b85037dbSmrg else 8844b85037dbSmrg break 8845b85037dbSmrg fi 8846b85037dbSmrg ;; 8847b85037dbSmrg msvisualcpp | msvcmsys) 8848b85037dbSmrg # This compiler won't grok `-c -o', but also, the minuso test has 8849b85037dbSmrg # not run yet. These depmodes are late enough in the game, and 8850b85037dbSmrg # so weak that their functioning should not be impacted. 8851b85037dbSmrg am__obj=conftest.${OBJEXT-o} 8852b85037dbSmrg am__minus_obj= 8853b85037dbSmrg ;; 8854b85037dbSmrg none) break ;; 8855b85037dbSmrg esac 8856b85037dbSmrg if depmode=$depmode \ 8857b85037dbSmrg source=sub/conftest.c object=$am__obj \ 8858b85037dbSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 8859b85037dbSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 8860b85037dbSmrg >/dev/null 2>conftest.err && 8861b85037dbSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 8862b85037dbSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 8863b85037dbSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 8864b85037dbSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 8865b85037dbSmrg # icc doesn't choke on unknown options, it will just issue warnings 8866b85037dbSmrg # or remarks (even with -Werror). So we grep stderr for any message 8867b85037dbSmrg # that says an option was ignored or not supported. 8868b85037dbSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 8869b85037dbSmrg # icc: Command line warning: ignoring option '-M'; no argument required 8870b85037dbSmrg # The diagnosis changed in icc 8.0: 8871b85037dbSmrg # icc: Command line remark: option '-MP' not supported 8872b85037dbSmrg if (grep 'ignoring option' conftest.err || 8873b85037dbSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 8874b85037dbSmrg am_cv_$1_dependencies_compiler_type=$depmode 8875b85037dbSmrg break 8876b85037dbSmrg fi 8877b85037dbSmrg fi 8878b85037dbSmrg done 8879b85037dbSmrg 8880b85037dbSmrg cd .. 8881b85037dbSmrg rm -rf conftest.dir 8882b85037dbSmrgelse 8883b85037dbSmrg am_cv_$1_dependencies_compiler_type=none 8884b85037dbSmrgfi 8885b85037dbSmrg]) 8886b85037dbSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 8887b85037dbSmrgAM_CONDITIONAL([am__fastdep$1], [ 8888b85037dbSmrg test "x$enable_dependency_tracking" != xno \ 8889b85037dbSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 8890b85037dbSmrg]) 8891b85037dbSmrg 8892b85037dbSmrg 8893b85037dbSmrg# AM_SET_DEPDIR 8894b85037dbSmrg# ------------- 8895b85037dbSmrg# Choose a directory name for dependency files. 8896b85037dbSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 8897b85037dbSmrgAC_DEFUN([AM_SET_DEPDIR], 8898b85037dbSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 8899b85037dbSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 8900b85037dbSmrg]) 8901b85037dbSmrg 8902b85037dbSmrg 8903b85037dbSmrg# AM_DEP_TRACK 8904b85037dbSmrg# ------------ 8905b85037dbSmrgAC_DEFUN([AM_DEP_TRACK], 8906b85037dbSmrg[AC_ARG_ENABLE(dependency-tracking, 8907b85037dbSmrg[ --disable-dependency-tracking speeds up one-time build 8908b85037dbSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 8909b85037dbSmrgif test "x$enable_dependency_tracking" != xno; then 8910b85037dbSmrg am_depcomp="$ac_aux_dir/depcomp" 8911b85037dbSmrg AMDEPBACKSLASH='\' 8912b85037dbSmrgfi 8913b85037dbSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 8914b85037dbSmrgAC_SUBST([AMDEPBACKSLASH])dnl 8915b85037dbSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 8916b85037dbSmrg]) 8917b85037dbSmrg 8918b85037dbSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 8919b85037dbSmrg 8920b85037dbSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 8921b85037dbSmrg# Free Software Foundation, Inc. 8922b85037dbSmrg# 8923b85037dbSmrg# This file is free software; the Free Software Foundation 8924b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8925b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8926b85037dbSmrg 8927b85037dbSmrg#serial 5 8928b85037dbSmrg 8929b85037dbSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 8930b85037dbSmrg# ------------------------------ 8931b85037dbSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 8932b85037dbSmrg[{ 8933b85037dbSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 8934b85037dbSmrg # are listed without --file. Let's play safe and only enable the eval 8935b85037dbSmrg # if we detect the quoting. 8936b85037dbSmrg case $CONFIG_FILES in 8937b85037dbSmrg *\'*) eval set x "$CONFIG_FILES" ;; 8938b85037dbSmrg *) set x $CONFIG_FILES ;; 8939b85037dbSmrg esac 8940b85037dbSmrg shift 8941b85037dbSmrg for mf 8942b85037dbSmrg do 8943b85037dbSmrg # Strip MF so we end up with the name of the file. 8944b85037dbSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 8945b85037dbSmrg # Check whether this is an Automake generated Makefile or not. 8946b85037dbSmrg # We used to match only the files named `Makefile.in', but 8947b85037dbSmrg # some people rename them; so instead we look at the file content. 8948b85037dbSmrg # Grep'ing the first line is not enough: some people post-process 8949b85037dbSmrg # each Makefile.in and add a new line on top of each file to say so. 8950b85037dbSmrg # Grep'ing the whole file is not good either: AIX grep has a line 8951b85037dbSmrg # limit of 2048, but all sed's we know have understand at least 4000. 8952b85037dbSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 8953b85037dbSmrg dirpart=`AS_DIRNAME("$mf")` 8954b85037dbSmrg else 8955b85037dbSmrg continue 8956b85037dbSmrg fi 8957b85037dbSmrg # Extract the definition of DEPDIR, am__include, and am__quote 8958b85037dbSmrg # from the Makefile without running `make'. 8959b85037dbSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 8960b85037dbSmrg test -z "$DEPDIR" && continue 8961b85037dbSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 8962b85037dbSmrg test -z "am__include" && continue 8963b85037dbSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 8964b85037dbSmrg # When using ansi2knr, U may be empty or an underscore; expand it 8965b85037dbSmrg U=`sed -n 's/^U = //p' < "$mf"` 8966b85037dbSmrg # Find all dependency output files, they are included files with 8967b85037dbSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 8968b85037dbSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 8969b85037dbSmrg # expansion. 8970b85037dbSmrg for file in `sed -n " 8971b85037dbSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 8972b85037dbSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 8973b85037dbSmrg # Make sure the directory exists. 8974b85037dbSmrg test -f "$dirpart/$file" && continue 8975b85037dbSmrg fdir=`AS_DIRNAME(["$file"])` 8976b85037dbSmrg AS_MKDIR_P([$dirpart/$fdir]) 8977b85037dbSmrg # echo "creating $dirpart/$file" 8978b85037dbSmrg echo '# dummy' > "$dirpart/$file" 8979b85037dbSmrg done 8980b85037dbSmrg done 8981b85037dbSmrg} 8982b85037dbSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 8983b85037dbSmrg 8984b85037dbSmrg 8985b85037dbSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 8986b85037dbSmrg# ----------------------------- 8987b85037dbSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 8988b85037dbSmrg# 8989b85037dbSmrg# This code is only required when automatic dependency tracking 8990b85037dbSmrg# is enabled. FIXME. This creates each `.P' file that we will 8991b85037dbSmrg# need in order to bootstrap the dependency handling code. 8992b85037dbSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 8993b85037dbSmrg[AC_CONFIG_COMMANDS([depfiles], 8994b85037dbSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 8995b85037dbSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 8996b85037dbSmrg]) 8997b85037dbSmrg 8998b85037dbSmrg# Do all the work for Automake. -*- Autoconf -*- 8999b85037dbSmrg 9000b85037dbSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 9001b85037dbSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 9002b85037dbSmrg# 9003b85037dbSmrg# This file is free software; the Free Software Foundation 9004b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9005b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9006b85037dbSmrg 9007b85037dbSmrg# serial 16 9008b85037dbSmrg 9009b85037dbSmrg# This macro actually does too much. Some checks are only needed if 9010b85037dbSmrg# your package does certain things. But this isn't really a big deal. 9011b85037dbSmrg 9012b85037dbSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 9013b85037dbSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 9014b85037dbSmrg# ----------------------------------------------- 9015b85037dbSmrg# The call with PACKAGE and VERSION arguments is the old style 9016b85037dbSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 9017b85037dbSmrg# and VERSION should now be passed to AC_INIT and removed from 9018b85037dbSmrg# the call to AM_INIT_AUTOMAKE. 9019b85037dbSmrg# We support both call styles for the transition. After 9020b85037dbSmrg# the next Automake release, Autoconf can make the AC_INIT 9021b85037dbSmrg# arguments mandatory, and then we can depend on a new Autoconf 9022b85037dbSmrg# release and drop the old call support. 9023b85037dbSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 9024b85037dbSmrg[AC_PREREQ([2.62])dnl 9025b85037dbSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 9026b85037dbSmrgdnl the ones we care about. 9027b85037dbSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 9028b85037dbSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 9029b85037dbSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 9030b85037dbSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 9031b85037dbSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 9032b85037dbSmrg # is not polluted with repeated "-I." 9033b85037dbSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 9034b85037dbSmrg # test to see if srcdir already configured 9035b85037dbSmrg if test -f $srcdir/config.status; then 9036b85037dbSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 9037b85037dbSmrg fi 9038b85037dbSmrgfi 9039b85037dbSmrg 9040b85037dbSmrg# test whether we have cygpath 9041b85037dbSmrgif test -z "$CYGPATH_W"; then 9042b85037dbSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 9043b85037dbSmrg CYGPATH_W='cygpath -w' 9044b85037dbSmrg else 9045b85037dbSmrg CYGPATH_W=echo 9046b85037dbSmrg fi 9047b85037dbSmrgfi 9048b85037dbSmrgAC_SUBST([CYGPATH_W]) 9049b85037dbSmrg 9050b85037dbSmrg# Define the identity of the package. 9051b85037dbSmrgdnl Distinguish between old-style and new-style calls. 9052b85037dbSmrgm4_ifval([$2], 9053b85037dbSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 9054b85037dbSmrg AC_SUBST([PACKAGE], [$1])dnl 9055b85037dbSmrg AC_SUBST([VERSION], [$2])], 9056b85037dbSmrg[_AM_SET_OPTIONS([$1])dnl 9057b85037dbSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 9058b85037dbSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 9059b85037dbSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 9060b85037dbSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 9061b85037dbSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 9062b85037dbSmrg 9063b85037dbSmrg_AM_IF_OPTION([no-define],, 9064b85037dbSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 9065b85037dbSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 9066b85037dbSmrg 9067b85037dbSmrg# Some tools Automake needs. 9068b85037dbSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 9069b85037dbSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 9070b85037dbSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 9071b85037dbSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 9072b85037dbSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 9073b85037dbSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 9074b85037dbSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 9075b85037dbSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9076b85037dbSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 9077b85037dbSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 9078b85037dbSmrg# We need awk for the "check" target. The system "awk" is bad on 9079b85037dbSmrg# some platforms. 9080b85037dbSmrgAC_REQUIRE([AC_PROG_AWK])dnl 9081b85037dbSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 9082b85037dbSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 9083b85037dbSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 9084b85037dbSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 9085b85037dbSmrg [_AM_PROG_TAR([v7])])]) 9086b85037dbSmrg_AM_IF_OPTION([no-dependencies],, 9087b85037dbSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 9088b85037dbSmrg [_AM_DEPENDENCIES(CC)], 9089b85037dbSmrg [define([AC_PROG_CC], 9090b85037dbSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 9091b85037dbSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 9092b85037dbSmrg [_AM_DEPENDENCIES(CXX)], 9093b85037dbSmrg [define([AC_PROG_CXX], 9094b85037dbSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 9095b85037dbSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 9096b85037dbSmrg [_AM_DEPENDENCIES(OBJC)], 9097b85037dbSmrg [define([AC_PROG_OBJC], 9098b85037dbSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 9099b85037dbSmrg]) 9100b85037dbSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 9101b85037dbSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 9102b85037dbSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 9103b85037dbSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 9104b85037dbSmrgAC_CONFIG_COMMANDS_PRE(dnl 9105b85037dbSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 9106b85037dbSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 9107b85037dbSmrg]) 9108b85037dbSmrg 9109b85037dbSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 9110b85037dbSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 9111b85037dbSmrgdnl mangled by Autoconf and run in a shell conditional statement. 9112b85037dbSmrgm4_define([_AC_COMPILER_EXEEXT], 9113b85037dbSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 9114b85037dbSmrg 9115b85037dbSmrg 9116b85037dbSmrg# When config.status generates a header, we must update the stamp-h file. 9117b85037dbSmrg# This file resides in the same directory as the config header 9118b85037dbSmrg# that is generated. The stamp files are numbered to have different names. 9119b85037dbSmrg 9120b85037dbSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 9121b85037dbSmrg# loop where config.status creates the headers, so we can generate 9122b85037dbSmrg# our stamp files there. 9123b85037dbSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 9124b85037dbSmrg[# Compute $1's index in $config_headers. 9125b85037dbSmrg_am_arg=$1 9126b85037dbSmrg_am_stamp_count=1 9127b85037dbSmrgfor _am_header in $config_headers :; do 9128b85037dbSmrg case $_am_header in 9129b85037dbSmrg $_am_arg | $_am_arg:* ) 9130b85037dbSmrg break ;; 9131b85037dbSmrg * ) 9132b85037dbSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 9133b85037dbSmrg esac 9134b85037dbSmrgdone 9135b85037dbSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 9136b85037dbSmrg 9137b85037dbSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 9138b85037dbSmrg# 9139b85037dbSmrg# This file is free software; the Free Software Foundation 9140b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9141b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9142b85037dbSmrg 9143b85037dbSmrg# AM_PROG_INSTALL_SH 9144b85037dbSmrg# ------------------ 9145b85037dbSmrg# Define $install_sh. 9146b85037dbSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 9147b85037dbSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9148b85037dbSmrgif test x"${install_sh}" != xset; then 9149b85037dbSmrg case $am_aux_dir in 9150b85037dbSmrg *\ * | *\ *) 9151b85037dbSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 9152b85037dbSmrg *) 9153b85037dbSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 9154b85037dbSmrg esac 9155b85037dbSmrgfi 9156b85037dbSmrgAC_SUBST(install_sh)]) 9157b85037dbSmrg 9158b85037dbSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 9159b85037dbSmrg# 9160b85037dbSmrg# This file is free software; the Free Software Foundation 9161b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9162b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9163b85037dbSmrg 9164b85037dbSmrg# serial 2 9165b85037dbSmrg 9166b85037dbSmrg# Check whether the underlying file-system supports filenames 9167b85037dbSmrg# with a leading dot. For instance MS-DOS doesn't. 9168b85037dbSmrgAC_DEFUN([AM_SET_LEADING_DOT], 9169b85037dbSmrg[rm -rf .tst 2>/dev/null 9170b85037dbSmrgmkdir .tst 2>/dev/null 9171b85037dbSmrgif test -d .tst; then 9172b85037dbSmrg am__leading_dot=. 9173b85037dbSmrgelse 9174b85037dbSmrg am__leading_dot=_ 9175b85037dbSmrgfi 9176b85037dbSmrgrmdir .tst 2>/dev/null 9177b85037dbSmrgAC_SUBST([am__leading_dot])]) 9178b85037dbSmrg 9179b85037dbSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 9180b85037dbSmrg# From Jim Meyering 9181b85037dbSmrg 9182b85037dbSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 9183b85037dbSmrg# Free Software Foundation, Inc. 9184b85037dbSmrg# 9185b85037dbSmrg# This file is free software; the Free Software Foundation 9186b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9187b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9188b85037dbSmrg 9189b85037dbSmrg# serial 5 9190b85037dbSmrg 9191b85037dbSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 9192b85037dbSmrg# ---------------------------------- 9193b85037dbSmrg# Control maintainer-specific portions of Makefiles. 9194b85037dbSmrg# Default is to disable them, unless `enable' is passed literally. 9195b85037dbSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 9196b85037dbSmrg# can override the default with the --enable/--disable switch. 9197b85037dbSmrgAC_DEFUN([AM_MAINTAINER_MODE], 9198b85037dbSmrg[m4_case(m4_default([$1], [disable]), 9199b85037dbSmrg [enable], [m4_define([am_maintainer_other], [disable])], 9200b85037dbSmrg [disable], [m4_define([am_maintainer_other], [enable])], 9201b85037dbSmrg [m4_define([am_maintainer_other], [enable]) 9202b85037dbSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 9203b85037dbSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 9204b85037dbSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 9205b85037dbSmrg AC_ARG_ENABLE([maintainer-mode], 9206b85037dbSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 9207b85037dbSmrg (and sometimes confusing) to the casual installer], 9208b85037dbSmrg [USE_MAINTAINER_MODE=$enableval], 9209b85037dbSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 9210b85037dbSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 9211b85037dbSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 9212b85037dbSmrg MAINT=$MAINTAINER_MODE_TRUE 9213b85037dbSmrg AC_SUBST([MAINT])dnl 9214b85037dbSmrg] 9215b85037dbSmrg) 9216b85037dbSmrg 9217b85037dbSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 9218b85037dbSmrg 9219b85037dbSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 9220b85037dbSmrg 9221b85037dbSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 9222b85037dbSmrg# 9223b85037dbSmrg# This file is free software; the Free Software Foundation 9224b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9225b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9226b85037dbSmrg 9227b85037dbSmrg# serial 4 9228b85037dbSmrg 9229b85037dbSmrg# AM_MAKE_INCLUDE() 9230b85037dbSmrg# ----------------- 9231b85037dbSmrg# Check to see how make treats includes. 9232b85037dbSmrgAC_DEFUN([AM_MAKE_INCLUDE], 9233b85037dbSmrg[am_make=${MAKE-make} 9234b85037dbSmrgcat > confinc << 'END' 9235b85037dbSmrgam__doit: 9236b85037dbSmrg @echo this is the am__doit target 9237b85037dbSmrg.PHONY: am__doit 9238b85037dbSmrgEND 9239b85037dbSmrg# If we don't find an include directive, just comment out the code. 9240b85037dbSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 9241b85037dbSmrgam__include="#" 9242b85037dbSmrgam__quote= 9243b85037dbSmrg_am_result=none 9244b85037dbSmrg# First try GNU make style include. 9245b85037dbSmrgecho "include confinc" > confmf 9246b85037dbSmrg# Ignore all kinds of additional output from `make'. 9247b85037dbSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 9248b85037dbSmrg*the\ am__doit\ target*) 9249b85037dbSmrg am__include=include 9250b85037dbSmrg am__quote= 9251b85037dbSmrg _am_result=GNU 9252b85037dbSmrg ;; 9253b85037dbSmrgesac 9254b85037dbSmrg# Now try BSD make style include. 9255b85037dbSmrgif test "$am__include" = "#"; then 9256b85037dbSmrg echo '.include "confinc"' > confmf 9257b85037dbSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 9258b85037dbSmrg *the\ am__doit\ target*) 9259b85037dbSmrg am__include=.include 9260b85037dbSmrg am__quote="\"" 9261b85037dbSmrg _am_result=BSD 9262b85037dbSmrg ;; 9263b85037dbSmrg esac 9264b85037dbSmrgfi 9265b85037dbSmrgAC_SUBST([am__include]) 9266b85037dbSmrgAC_SUBST([am__quote]) 9267b85037dbSmrgAC_MSG_RESULT([$_am_result]) 9268b85037dbSmrgrm -f confinc confmf 9269b85037dbSmrg]) 9270b85037dbSmrg 9271b85037dbSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 9272b85037dbSmrg 9273b85037dbSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 9274b85037dbSmrg# Free Software Foundation, Inc. 9275b85037dbSmrg# 9276b85037dbSmrg# This file is free software; the Free Software Foundation 9277b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9278b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9279b85037dbSmrg 9280b85037dbSmrg# serial 6 9281b85037dbSmrg 9282b85037dbSmrg# AM_MISSING_PROG(NAME, PROGRAM) 9283b85037dbSmrg# ------------------------------ 9284b85037dbSmrgAC_DEFUN([AM_MISSING_PROG], 9285b85037dbSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 9286b85037dbSmrg$1=${$1-"${am_missing_run}$2"} 9287b85037dbSmrgAC_SUBST($1)]) 9288b85037dbSmrg 9289b85037dbSmrg 9290b85037dbSmrg# AM_MISSING_HAS_RUN 9291b85037dbSmrg# ------------------ 9292b85037dbSmrg# Define MISSING if not defined so far and test if it supports --run. 9293b85037dbSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 9294b85037dbSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 9295b85037dbSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9296b85037dbSmrgAC_REQUIRE_AUX_FILE([missing])dnl 9297b85037dbSmrgif test x"${MISSING+set}" != xset; then 9298b85037dbSmrg case $am_aux_dir in 9299b85037dbSmrg *\ * | *\ *) 9300b85037dbSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 9301b85037dbSmrg *) 9302b85037dbSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 9303b85037dbSmrg esac 9304b85037dbSmrgfi 9305b85037dbSmrg# Use eval to expand $SHELL 9306b85037dbSmrgif eval "$MISSING --run true"; then 9307b85037dbSmrg am_missing_run="$MISSING --run " 9308b85037dbSmrgelse 9309b85037dbSmrg am_missing_run= 9310b85037dbSmrg AC_MSG_WARN([`missing' script is too old or missing]) 9311b85037dbSmrgfi 9312b85037dbSmrg]) 9313b85037dbSmrg 9314b85037dbSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 9315b85037dbSmrg# 9316b85037dbSmrg# This file is free software; the Free Software Foundation 9317b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9318b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9319b85037dbSmrg 9320b85037dbSmrg# AM_PROG_MKDIR_P 9321b85037dbSmrg# --------------- 9322b85037dbSmrg# Check for `mkdir -p'. 9323b85037dbSmrgAC_DEFUN([AM_PROG_MKDIR_P], 9324b85037dbSmrg[AC_PREREQ([2.60])dnl 9325b85037dbSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 9326b85037dbSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 9327b85037dbSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 9328b85037dbSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 9329b85037dbSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 9330b85037dbSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 9331b85037dbSmrgdnl adjustment using top_builddir (which is defined more often than 9332b85037dbSmrgdnl MKDIR_P). 9333b85037dbSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 9334b85037dbSmrgcase $mkdir_p in 9335b85037dbSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 9336b85037dbSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 9337b85037dbSmrgesac 9338b85037dbSmrg]) 9339b85037dbSmrg 9340b85037dbSmrg# Helper functions for option handling. -*- Autoconf -*- 9341b85037dbSmrg 9342b85037dbSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 9343b85037dbSmrg# 9344b85037dbSmrg# This file is free software; the Free Software Foundation 9345b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9346b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9347b85037dbSmrg 9348b85037dbSmrg# serial 4 9349b85037dbSmrg 9350b85037dbSmrg# _AM_MANGLE_OPTION(NAME) 9351b85037dbSmrg# ----------------------- 9352b85037dbSmrgAC_DEFUN([_AM_MANGLE_OPTION], 9353b85037dbSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 9354b85037dbSmrg 9355b85037dbSmrg# _AM_SET_OPTION(NAME) 9356b85037dbSmrg# ------------------------------ 9357b85037dbSmrg# Set option NAME. Presently that only means defining a flag for this option. 9358b85037dbSmrgAC_DEFUN([_AM_SET_OPTION], 9359b85037dbSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 9360b85037dbSmrg 9361b85037dbSmrg# _AM_SET_OPTIONS(OPTIONS) 9362b85037dbSmrg# ---------------------------------- 9363b85037dbSmrg# OPTIONS is a space-separated list of Automake options. 9364b85037dbSmrgAC_DEFUN([_AM_SET_OPTIONS], 9365b85037dbSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 9366b85037dbSmrg 9367b85037dbSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 9368b85037dbSmrg# ------------------------------------------- 9369b85037dbSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9370b85037dbSmrgAC_DEFUN([_AM_IF_OPTION], 9371b85037dbSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 9372b85037dbSmrg 9373b85037dbSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 9374b85037dbSmrg 9375b85037dbSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 9376b85037dbSmrg# Free Software Foundation, Inc. 9377b85037dbSmrg# 9378b85037dbSmrg# This file is free software; the Free Software Foundation 9379b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9380b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9381b85037dbSmrg 9382b85037dbSmrg# serial 5 9383b85037dbSmrg 9384b85037dbSmrg# AM_SANITY_CHECK 9385b85037dbSmrg# --------------- 9386b85037dbSmrgAC_DEFUN([AM_SANITY_CHECK], 9387b85037dbSmrg[AC_MSG_CHECKING([whether build environment is sane]) 9388b85037dbSmrg# Just in case 9389b85037dbSmrgsleep 1 9390b85037dbSmrgecho timestamp > conftest.file 9391b85037dbSmrg# Reject unsafe characters in $srcdir or the absolute working directory 9392b85037dbSmrg# name. Accept space and tab only in the latter. 9393b85037dbSmrgam_lf=' 9394b85037dbSmrg' 9395b85037dbSmrgcase `pwd` in 9396b85037dbSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 9397b85037dbSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 9398b85037dbSmrgesac 9399b85037dbSmrgcase $srcdir in 9400b85037dbSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 9401b85037dbSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 9402b85037dbSmrgesac 9403b85037dbSmrg 9404b85037dbSmrg# Do `set' in a subshell so we don't clobber the current shell's 9405b85037dbSmrg# arguments. Must try -L first in case configure is actually a 9406b85037dbSmrg# symlink; some systems play weird games with the mod time of symlinks 9407b85037dbSmrg# (eg FreeBSD returns the mod time of the symlink's containing 9408b85037dbSmrg# directory). 9409b85037dbSmrgif ( 9410b85037dbSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 9411b85037dbSmrg if test "$[*]" = "X"; then 9412b85037dbSmrg # -L didn't work. 9413b85037dbSmrg set X `ls -t "$srcdir/configure" conftest.file` 9414b85037dbSmrg fi 9415b85037dbSmrg rm -f conftest.file 9416b85037dbSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 9417b85037dbSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 9418b85037dbSmrg 9419b85037dbSmrg # If neither matched, then we have a broken ls. This can happen 9420b85037dbSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 9421b85037dbSmrg # broken ls alias from the environment. This has actually 9422b85037dbSmrg # happened. Such a system could not be considered "sane". 9423b85037dbSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 9424b85037dbSmrgalias in your environment]) 9425b85037dbSmrg fi 9426b85037dbSmrg 9427b85037dbSmrg test "$[2]" = conftest.file 9428b85037dbSmrg ) 9429b85037dbSmrgthen 9430b85037dbSmrg # Ok. 9431b85037dbSmrg : 9432b85037dbSmrgelse 9433b85037dbSmrg AC_MSG_ERROR([newly created file is older than distributed files! 9434b85037dbSmrgCheck your system clock]) 9435b85037dbSmrgfi 9436b85037dbSmrgAC_MSG_RESULT(yes)]) 9437b85037dbSmrg 9438b85037dbSmrg# Copyright (C) 2009 Free Software Foundation, Inc. 9439b85037dbSmrg# 9440b85037dbSmrg# This file is free software; the Free Software Foundation 9441b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9442b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9443b85037dbSmrg 9444b85037dbSmrg# serial 1 9445b85037dbSmrg 9446b85037dbSmrg# AM_SILENT_RULES([DEFAULT]) 9447b85037dbSmrg# -------------------------- 9448b85037dbSmrg# Enable less verbose build rules; with the default set to DEFAULT 9449b85037dbSmrg# (`yes' being less verbose, `no' or empty being verbose). 9450b85037dbSmrgAC_DEFUN([AM_SILENT_RULES], 9451b85037dbSmrg[AC_ARG_ENABLE([silent-rules], 9452b85037dbSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 9453b85037dbSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 9454b85037dbSmrgcase $enable_silent_rules in 9455b85037dbSmrgyes) AM_DEFAULT_VERBOSITY=0;; 9456b85037dbSmrgno) AM_DEFAULT_VERBOSITY=1;; 9457b85037dbSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 9458b85037dbSmrgesac 9459b85037dbSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 9460b85037dbSmrgAM_BACKSLASH='\' 9461b85037dbSmrgAC_SUBST([AM_BACKSLASH])dnl 9462b85037dbSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 9463b85037dbSmrg]) 9464b85037dbSmrg 9465b85037dbSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 9466b85037dbSmrg# 9467b85037dbSmrg# This file is free software; the Free Software Foundation 9468b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9469b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9470b85037dbSmrg 9471b85037dbSmrg# AM_PROG_INSTALL_STRIP 9472b85037dbSmrg# --------------------- 9473b85037dbSmrg# One issue with vendor `install' (even GNU) is that you can't 9474b85037dbSmrg# specify the program used to strip binaries. This is especially 9475b85037dbSmrg# annoying in cross-compiling environments, where the build's strip 9476b85037dbSmrg# is unlikely to handle the host's binaries. 9477b85037dbSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9478b85037dbSmrg# always use install-sh in `make install-strip', and initialize 9479b85037dbSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 9480b85037dbSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9481b85037dbSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9482b85037dbSmrg# Installed binaries are usually stripped using `strip' when the user 9483b85037dbSmrg# run `make install-strip'. However `strip' might not be the right 9484b85037dbSmrg# tool to use in cross-compilation environments, therefore Automake 9485b85037dbSmrg# will honor the `STRIP' environment variable to overrule this program. 9486b85037dbSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 9487b85037dbSmrgif test "$cross_compiling" != no; then 9488b85037dbSmrg AC_CHECK_TOOL([STRIP], [strip], :) 9489b85037dbSmrgfi 9490b85037dbSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9491b85037dbSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9492b85037dbSmrg 9493b85037dbSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 9494b85037dbSmrg# 9495b85037dbSmrg# This file is free software; the Free Software Foundation 9496b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9497b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9498b85037dbSmrg 9499b85037dbSmrg# serial 2 9500b85037dbSmrg 9501b85037dbSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 9502b85037dbSmrg# --------------------------- 9503b85037dbSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9504b85037dbSmrg# This macro is traced by Automake. 9505b85037dbSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9506b85037dbSmrg 9507b85037dbSmrg# AM_SUBST_NOTMAKE(VARIABLE) 9508b85037dbSmrg# --------------------------- 9509b85037dbSmrg# Public sister of _AM_SUBST_NOTMAKE. 9510b85037dbSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9511b85037dbSmrg 9512b85037dbSmrg# Check how to create a tarball. -*- Autoconf -*- 9513b85037dbSmrg 9514b85037dbSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 9515b85037dbSmrg# 9516b85037dbSmrg# This file is free software; the Free Software Foundation 9517b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9518b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9519b85037dbSmrg 9520b85037dbSmrg# serial 2 9521b85037dbSmrg 9522b85037dbSmrg# _AM_PROG_TAR(FORMAT) 9523b85037dbSmrg# -------------------- 9524b85037dbSmrg# Check how to create a tarball in format FORMAT. 9525b85037dbSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 9526b85037dbSmrg# 9527b85037dbSmrg# Substitute a variable $(am__tar) that is a command 9528b85037dbSmrg# writing to stdout a FORMAT-tarball containing the directory 9529b85037dbSmrg# $tardir. 9530b85037dbSmrg# tardir=directory && $(am__tar) > result.tar 9531b85037dbSmrg# 9532b85037dbSmrg# Substitute a variable $(am__untar) that extract such 9533b85037dbSmrg# a tarball read from stdin. 9534b85037dbSmrg# $(am__untar) < result.tar 9535b85037dbSmrgAC_DEFUN([_AM_PROG_TAR], 9536b85037dbSmrg[# Always define AMTAR for backward compatibility. 9537b85037dbSmrgAM_MISSING_PROG([AMTAR], [tar]) 9538b85037dbSmrgm4_if([$1], [v7], 9539b85037dbSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 9540b85037dbSmrg [m4_case([$1], [ustar],, [pax],, 9541b85037dbSmrg [m4_fatal([Unknown tar format])]) 9542b85037dbSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 9543b85037dbSmrg# Loop over all known methods to create a tar archive until one works. 9544b85037dbSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9545b85037dbSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9546b85037dbSmrg# Do not fold the above two line into one, because Tru64 sh and 9547b85037dbSmrg# Solaris sh will not grok spaces in the rhs of `-'. 9548b85037dbSmrgfor _am_tool in $_am_tools 9549b85037dbSmrgdo 9550b85037dbSmrg case $_am_tool in 9551b85037dbSmrg gnutar) 9552b85037dbSmrg for _am_tar in tar gnutar gtar; 9553b85037dbSmrg do 9554b85037dbSmrg AM_RUN_LOG([$_am_tar --version]) && break 9555b85037dbSmrg done 9556b85037dbSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9557b85037dbSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9558b85037dbSmrg am__untar="$_am_tar -xf -" 9559b85037dbSmrg ;; 9560b85037dbSmrg plaintar) 9561b85037dbSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 9562b85037dbSmrg # ustar tarball either. 9563b85037dbSmrg (tar --version) >/dev/null 2>&1 && continue 9564b85037dbSmrg am__tar='tar chf - "$$tardir"' 9565b85037dbSmrg am__tar_='tar chf - "$tardir"' 9566b85037dbSmrg am__untar='tar xf -' 9567b85037dbSmrg ;; 9568b85037dbSmrg pax) 9569b85037dbSmrg am__tar='pax -L -x $1 -w "$$tardir"' 9570b85037dbSmrg am__tar_='pax -L -x $1 -w "$tardir"' 9571b85037dbSmrg am__untar='pax -r' 9572b85037dbSmrg ;; 9573b85037dbSmrg cpio) 9574b85037dbSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9575b85037dbSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9576b85037dbSmrg am__untar='cpio -i -H $1 -d' 9577b85037dbSmrg ;; 9578b85037dbSmrg none) 9579b85037dbSmrg am__tar=false 9580b85037dbSmrg am__tar_=false 9581b85037dbSmrg am__untar=false 9582b85037dbSmrg ;; 9583b85037dbSmrg esac 9584b85037dbSmrg 9585b85037dbSmrg # If the value was cached, stop now. We just wanted to have am__tar 9586b85037dbSmrg # and am__untar set. 9587b85037dbSmrg test -n "${am_cv_prog_tar_$1}" && break 9588b85037dbSmrg 9589b85037dbSmrg # tar/untar a dummy directory, and stop if the command works 9590b85037dbSmrg rm -rf conftest.dir 9591b85037dbSmrg mkdir conftest.dir 9592b85037dbSmrg echo GrepMe > conftest.dir/file 9593b85037dbSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 9594b85037dbSmrg rm -rf conftest.dir 9595b85037dbSmrg if test -s conftest.tar; then 9596b85037dbSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 9597b85037dbSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 9598b85037dbSmrg fi 9599b85037dbSmrgdone 9600b85037dbSmrgrm -rf conftest.dir 9601b85037dbSmrg 9602b85037dbSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 9603b85037dbSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 9604b85037dbSmrgAC_SUBST([am__tar]) 9605b85037dbSmrgAC_SUBST([am__untar]) 9606b85037dbSmrg]) # _AM_PROG_TAR 9607b85037dbSmrg 9608b85037dbSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9609b85037dbSmrgdnl 9610302b15bdSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9611b85037dbSmrgdnl 9612b85037dbSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9613b85037dbSmrgdnl copy of this software and associated documentation files (the "Software"), 9614b85037dbSmrgdnl to deal in the Software without restriction, including without limitation 9615b85037dbSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9616b85037dbSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 9617b85037dbSmrgdnl Software is furnished to do so, subject to the following conditions: 9618b85037dbSmrgdnl 9619b85037dbSmrgdnl The above copyright notice and this permission notice (including the next 9620b85037dbSmrgdnl paragraph) shall be included in all copies or substantial portions of the 9621b85037dbSmrgdnl Software. 9622b85037dbSmrgdnl 9623b85037dbSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9624b85037dbSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9625b85037dbSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9626b85037dbSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9627b85037dbSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9628b85037dbSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9629b85037dbSmrgdnl DEALINGS IN THE SOFTWARE. 9630b85037dbSmrg 9631b85037dbSmrg# XORG_MACROS_VERSION(required-version) 9632b85037dbSmrg# ------------------------------------- 9633b85037dbSmrg# Minimum version: 1.1.0 9634b85037dbSmrg# 9635b85037dbSmrg# If you're using a macro added in Version 1.1 or newer, include this in 9636b85037dbSmrg# your configure.ac with the minimum required version, such as: 9637b85037dbSmrg# XORG_MACROS_VERSION(1.1) 9638b85037dbSmrg# 9639b85037dbSmrg# To ensure that this macro is defined, also add: 9640b85037dbSmrg# m4_ifndef([XORG_MACROS_VERSION], 9641b85037dbSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9642b85037dbSmrg# 9643b85037dbSmrg# 9644b85037dbSmrg# See the "minimum version" comment for each macro you use to see what 9645b85037dbSmrg# version you require. 9646b85037dbSmrgm4_defun([XORG_MACROS_VERSION],[ 9647302b15bdSmrgm4_define([vers_have], [1.14.0]) 9648b85037dbSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9649b85037dbSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9650b85037dbSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9651b85037dbSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9652b85037dbSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9653b85037dbSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9654b85037dbSmrgm4_undefine([vers_have]) 9655b85037dbSmrgm4_undefine([maj_have]) 9656b85037dbSmrgm4_undefine([maj_needed]) 9657b85037dbSmrg]) # XORG_MACROS_VERSION 9658b85037dbSmrg 9659b85037dbSmrg# XORG_PROG_RAWCPP() 9660b85037dbSmrg# ------------------ 9661b85037dbSmrg# Minimum version: 1.0.0 9662b85037dbSmrg# 9663b85037dbSmrg# Find cpp program and necessary flags for use in pre-processing text files 9664b85037dbSmrg# such as man pages and config files 9665b85037dbSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9666b85037dbSmrgAC_REQUIRE([AC_PROG_CPP]) 9667b85037dbSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9668b85037dbSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9669b85037dbSmrg 9670b85037dbSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9671b85037dbSmrg# which is not the best choice for supporting other OS'es, but covers most 9672b85037dbSmrg# of the ones we need for now. 9673b85037dbSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9674302b15bdSmrgAC_LANG_CONFTEST([Does cpp redefine unix ? 9675302b15bdSmrg AC_LANG_DEFINES_PROVIDED]) 9676b85037dbSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9677b85037dbSmrg AC_MSG_RESULT([no]) 9678b85037dbSmrgelse 9679b85037dbSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9680b85037dbSmrg RAWCPPFLAGS=-undef 9681b85037dbSmrg AC_MSG_RESULT([yes]) 9682b85037dbSmrg # under Cygwin unix is still defined even with -undef 9683b85037dbSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9684b85037dbSmrg RAWCPPFLAGS="-undef -ansi" 9685b85037dbSmrg AC_MSG_RESULT([yes, with -ansi]) 9686b85037dbSmrg else 9687b85037dbSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9688b85037dbSmrg fi 9689b85037dbSmrgfi 9690b85037dbSmrgrm -f conftest.$ac_ext 9691b85037dbSmrg 9692b85037dbSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9693302b15bdSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"? 9694302b15bdSmrg AC_LANG_DEFINES_PROVIDED]) 9695b85037dbSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9696b85037dbSmrg AC_MSG_RESULT([no]) 9697b85037dbSmrgelse 9698b85037dbSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9699b85037dbSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9700b85037dbSmrg AC_MSG_RESULT([yes]) 9701b85037dbSmrg else 9702b85037dbSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9703b85037dbSmrg fi 9704b85037dbSmrgfi 9705b85037dbSmrgrm -f conftest.$ac_ext 9706b85037dbSmrgAC_SUBST(RAWCPPFLAGS) 9707b85037dbSmrg]) # XORG_PROG_RAWCPP 9708b85037dbSmrg 9709b85037dbSmrg# XORG_MANPAGE_SECTIONS() 9710b85037dbSmrg# ----------------------- 9711b85037dbSmrg# Minimum version: 1.0.0 9712b85037dbSmrg# 9713b85037dbSmrg# Determine which sections man pages go in for the different man page types 9714b85037dbSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9715b85037dbSmrg# Not sure if there's any better way than just hardcoding by OS name. 9716b85037dbSmrg# Override default settings by setting environment variables 9717b85037dbSmrg# Added MAN_SUBSTS in version 1.8 9718b85037dbSmrg# Added AC_PROG_SED in version 1.8 9719b85037dbSmrg 9720b85037dbSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9721b85037dbSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9722b85037dbSmrgAC_REQUIRE([AC_PROG_SED]) 9723b85037dbSmrg 9724b85037dbSmrgif test x$APP_MAN_SUFFIX = x ; then 9725b85037dbSmrg APP_MAN_SUFFIX=1 9726b85037dbSmrgfi 9727b85037dbSmrgif test x$APP_MAN_DIR = x ; then 9728b85037dbSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9729b85037dbSmrgfi 9730b85037dbSmrg 9731b85037dbSmrgif test x$LIB_MAN_SUFFIX = x ; then 9732b85037dbSmrg LIB_MAN_SUFFIX=3 9733b85037dbSmrgfi 9734b85037dbSmrgif test x$LIB_MAN_DIR = x ; then 9735b85037dbSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9736b85037dbSmrgfi 9737b85037dbSmrg 9738b85037dbSmrgif test x$FILE_MAN_SUFFIX = x ; then 9739b85037dbSmrg case $host_os in 9740b85037dbSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 9741b85037dbSmrg *) FILE_MAN_SUFFIX=5 ;; 9742b85037dbSmrg esac 9743b85037dbSmrgfi 9744b85037dbSmrgif test x$FILE_MAN_DIR = x ; then 9745b85037dbSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9746b85037dbSmrgfi 9747b85037dbSmrg 9748b85037dbSmrgif test x$MISC_MAN_SUFFIX = x ; then 9749b85037dbSmrg case $host_os in 9750b85037dbSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 9751b85037dbSmrg *) MISC_MAN_SUFFIX=7 ;; 9752b85037dbSmrg esac 9753b85037dbSmrgfi 9754b85037dbSmrgif test x$MISC_MAN_DIR = x ; then 9755b85037dbSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9756b85037dbSmrgfi 9757b85037dbSmrg 9758b85037dbSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 9759b85037dbSmrg case $host_os in 9760b85037dbSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 9761b85037dbSmrg *) DRIVER_MAN_SUFFIX=4 ;; 9762b85037dbSmrg esac 9763b85037dbSmrgfi 9764b85037dbSmrgif test x$DRIVER_MAN_DIR = x ; then 9765b85037dbSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9766b85037dbSmrgfi 9767b85037dbSmrg 9768b85037dbSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 9769b85037dbSmrg case $host_os in 9770b85037dbSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 9771b85037dbSmrg *) ADMIN_MAN_SUFFIX=8 ;; 9772b85037dbSmrg esac 9773b85037dbSmrgfi 9774b85037dbSmrgif test x$ADMIN_MAN_DIR = x ; then 9775b85037dbSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9776b85037dbSmrgfi 9777b85037dbSmrg 9778b85037dbSmrg 9779b85037dbSmrgAC_SUBST([APP_MAN_SUFFIX]) 9780b85037dbSmrgAC_SUBST([LIB_MAN_SUFFIX]) 9781b85037dbSmrgAC_SUBST([FILE_MAN_SUFFIX]) 9782b85037dbSmrgAC_SUBST([MISC_MAN_SUFFIX]) 9783b85037dbSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 9784b85037dbSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 9785b85037dbSmrgAC_SUBST([APP_MAN_DIR]) 9786b85037dbSmrgAC_SUBST([LIB_MAN_DIR]) 9787b85037dbSmrgAC_SUBST([FILE_MAN_DIR]) 9788b85037dbSmrgAC_SUBST([MISC_MAN_DIR]) 9789b85037dbSmrgAC_SUBST([DRIVER_MAN_DIR]) 9790b85037dbSmrgAC_SUBST([ADMIN_MAN_DIR]) 9791b85037dbSmrg 9792b85037dbSmrgXORG_MAN_PAGE="X Version 11" 9793b85037dbSmrgAC_SUBST([XORG_MAN_PAGE]) 9794b85037dbSmrgMAN_SUBSTS="\ 9795b85037dbSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9796b85037dbSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9797b85037dbSmrg -e 's|__xservername__|Xorg|g' \ 9798b85037dbSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 9799302b15bdSmrg -e 's|__xorgconfdir__|xorg.conf.d|g' \ 9800b85037dbSmrg -e 's|__projectroot__|\$(prefix)|g' \ 9801302b15bdSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9802b85037dbSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9803b85037dbSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9804b85037dbSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9805b85037dbSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9806b85037dbSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9807b85037dbSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9808b85037dbSmrgAC_SUBST([MAN_SUBSTS]) 9809b85037dbSmrg 9810b85037dbSmrg]) # XORG_MANPAGE_SECTIONS 9811b85037dbSmrg 9812b85037dbSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9813b85037dbSmrg# ------------------------ 9814b85037dbSmrg# Minimum version: 1.7.0 9815b85037dbSmrg# 9816b85037dbSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9817b85037dbSmrg# provided by xorg-sgml-doctools, if installed. 9818b85037dbSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9819b85037dbSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9820b85037dbSmrgXORG_SGML_PATH= 9821b85037dbSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9822b85037dbSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9823b85037dbSmrg [m4_ifval([$1],[:], 9824b85037dbSmrg [if test x"$cross_compiling" != x"yes" ; then 9825b85037dbSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9826b85037dbSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 9827b85037dbSmrg fi]) 9828b85037dbSmrg ]) 9829b85037dbSmrg 9830b85037dbSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9831b85037dbSmrg# the path and the name of the doc stylesheet 9832b85037dbSmrgif test "x$XORG_SGML_PATH" != "x" ; then 9833b85037dbSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 9834b85037dbSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9835b85037dbSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9836b85037dbSmrgelse 9837b85037dbSmrg AC_MSG_RESULT([no]) 9838b85037dbSmrgfi 9839b85037dbSmrg 9840b85037dbSmrgAC_SUBST(XORG_SGML_PATH) 9841b85037dbSmrgAC_SUBST(STYLESHEET_SRCDIR) 9842b85037dbSmrgAC_SUBST(XSL_STYLESHEET) 9843b85037dbSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9844b85037dbSmrg]) # XORG_CHECK_SGML_DOCTOOLS 9845b85037dbSmrg 9846b85037dbSmrg# XORG_CHECK_LINUXDOC 9847b85037dbSmrg# ------------------- 9848b85037dbSmrg# Minimum version: 1.0.0 9849b85037dbSmrg# 9850b85037dbSmrg# Defines the variable MAKE_TEXT if the necessary tools and 9851b85037dbSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9852b85037dbSmrg# Whether or not the necessary tools and files are found can be checked 9853b85037dbSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9854b85037dbSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9855b85037dbSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9856b85037dbSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9857b85037dbSmrg 9858b85037dbSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9859b85037dbSmrg 9860b85037dbSmrgAC_MSG_CHECKING([whether to build documentation]) 9861b85037dbSmrg 9862b85037dbSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9863b85037dbSmrg BUILDDOC=yes 9864b85037dbSmrgelse 9865b85037dbSmrg BUILDDOC=no 9866b85037dbSmrgfi 9867b85037dbSmrg 9868b85037dbSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9869b85037dbSmrg 9870b85037dbSmrgAC_MSG_RESULT([$BUILDDOC]) 9871b85037dbSmrg 9872b85037dbSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9873b85037dbSmrg 9874b85037dbSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9875b85037dbSmrg BUILDPDFDOC=yes 9876b85037dbSmrgelse 9877b85037dbSmrg BUILDPDFDOC=no 9878b85037dbSmrgfi 9879b85037dbSmrg 9880b85037dbSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9881b85037dbSmrg 9882b85037dbSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9883b85037dbSmrg 9884b85037dbSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9885b85037dbSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9886b85037dbSmrgMAKE_PDF="$PS2PDF" 9887b85037dbSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9888b85037dbSmrg 9889b85037dbSmrgAC_SUBST(MAKE_TEXT) 9890b85037dbSmrgAC_SUBST(MAKE_PS) 9891b85037dbSmrgAC_SUBST(MAKE_PDF) 9892b85037dbSmrgAC_SUBST(MAKE_HTML) 9893b85037dbSmrg]) # XORG_CHECK_LINUXDOC 9894b85037dbSmrg 9895b85037dbSmrg# XORG_CHECK_DOCBOOK 9896b85037dbSmrg# ------------------- 9897b85037dbSmrg# Minimum version: 1.0.0 9898b85037dbSmrg# 9899b85037dbSmrg# Checks for the ability to build output formats from SGML DocBook source. 9900b85037dbSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9901b85037dbSmrg# indicates whether the necessary tools and files are found and, if set, 9902b85037dbSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9903b85037dbSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9904b85037dbSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9905b85037dbSmrg 9906b85037dbSmrgBUILDTXTDOC=no 9907b85037dbSmrgBUILDPDFDOC=no 9908b85037dbSmrgBUILDPSDOC=no 9909b85037dbSmrgBUILDHTMLDOC=no 9910b85037dbSmrg 9911b85037dbSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9912b85037dbSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9913b85037dbSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9914b85037dbSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9915b85037dbSmrg 9916b85037dbSmrgAC_MSG_CHECKING([whether to build text documentation]) 9917b85037dbSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9918b85037dbSmrg test x$BUILD_TXTDOC != xno; then 9919b85037dbSmrg BUILDTXTDOC=yes 9920b85037dbSmrgfi 9921b85037dbSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9922b85037dbSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9923b85037dbSmrg 9924b85037dbSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9925b85037dbSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9926b85037dbSmrg test x$BUILD_PDFDOC != xno; then 9927b85037dbSmrg BUILDPDFDOC=yes 9928b85037dbSmrgfi 9929b85037dbSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9930b85037dbSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9931b85037dbSmrg 9932b85037dbSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9933b85037dbSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9934b85037dbSmrg test x$BUILD_PSDOC != xno; then 9935b85037dbSmrg BUILDPSDOC=yes 9936b85037dbSmrgfi 9937b85037dbSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9938b85037dbSmrgAC_MSG_RESULT([$BUILDPSDOC]) 9939b85037dbSmrg 9940b85037dbSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9941b85037dbSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9942b85037dbSmrg test x$BUILD_HTMLDOC != xno; then 9943b85037dbSmrg BUILDHTMLDOC=yes 9944b85037dbSmrgfi 9945b85037dbSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9946b85037dbSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9947b85037dbSmrg 9948b85037dbSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9949b85037dbSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9950b85037dbSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9951b85037dbSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9952b85037dbSmrg 9953b85037dbSmrgAC_SUBST(MAKE_TEXT) 9954b85037dbSmrgAC_SUBST(MAKE_PS) 9955b85037dbSmrgAC_SUBST(MAKE_PDF) 9956b85037dbSmrgAC_SUBST(MAKE_HTML) 9957b85037dbSmrg]) # XORG_CHECK_DOCBOOK 9958b85037dbSmrg 9959302b15bdSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9960b85037dbSmrg# ---------------- 9961b85037dbSmrg# Minimum version: 1.5.0 9962302b15bdSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9963b85037dbSmrg# 9964b85037dbSmrg# Documentation tools are not always available on all platforms and sometimes 9965b85037dbSmrg# not at the appropriate level. This macro enables a module to test for the 9966b85037dbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9967b85037dbSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9968302b15bdSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9969302b15bdSmrg# --with-xmlto assumes 'auto'. 9970b85037dbSmrg# 9971b85037dbSmrg# Interface to module: 9972b85037dbSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9973b85037dbSmrg# XMLTO: returns the path of the xmlto program found 9974b85037dbSmrg# returns the path set by the user in the environment 9975b85037dbSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9976b85037dbSmrg# 'no' user instructs the module not to use xmlto 9977b85037dbSmrg# 9978b85037dbSmrg# Added in version 1.10.0 9979b85037dbSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9980b85037dbSmrg# xmlto for text output requires either lynx, links, or w3m browsers 9981b85037dbSmrg# 9982b85037dbSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9983b85037dbSmrg# 9984b85037dbSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9985b85037dbSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9986302b15bdSmrgm4_define([_defopt], m4_default([$2], [auto])) 9987b85037dbSmrgAC_ARG_WITH(xmlto, 9988b85037dbSmrg AS_HELP_STRING([--with-xmlto], 9989302b15bdSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9990302b15bdSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9991302b15bdSmrgm4_undefine([_defopt]) 9992b85037dbSmrg 9993b85037dbSmrgif test "x$use_xmlto" = x"auto"; then 9994b85037dbSmrg AC_PATH_PROG([XMLTO], [xmlto]) 9995b85037dbSmrg if test "x$XMLTO" = "x"; then 9996b85037dbSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9997b85037dbSmrg have_xmlto=no 9998b85037dbSmrg else 9999b85037dbSmrg have_xmlto=yes 10000b85037dbSmrg fi 10001b85037dbSmrgelif test "x$use_xmlto" = x"yes" ; then 10002b85037dbSmrg AC_PATH_PROG([XMLTO], [xmlto]) 10003b85037dbSmrg if test "x$XMLTO" = "x"; then 10004b85037dbSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 10005b85037dbSmrg fi 10006b85037dbSmrg have_xmlto=yes 10007b85037dbSmrgelif test "x$use_xmlto" = x"no" ; then 10008b85037dbSmrg if test "x$XMLTO" != "x"; then 10009b85037dbSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10010b85037dbSmrg fi 10011b85037dbSmrg have_xmlto=no 10012b85037dbSmrgelse 10013b85037dbSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10014b85037dbSmrgfi 10015b85037dbSmrg 10016b85037dbSmrg# Test for a minimum version of xmlto, if provided. 10017b85037dbSmrgm4_ifval([$1], 10018b85037dbSmrg[if test "$have_xmlto" = yes; then 10019b85037dbSmrg # scrape the xmlto version 10020b85037dbSmrg AC_MSG_CHECKING([the xmlto version]) 10021b85037dbSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10022b85037dbSmrg AC_MSG_RESULT([$xmlto_version]) 10023b85037dbSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 10024b85037dbSmrg [if test "x$use_xmlto" = xauto; then 10025b85037dbSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10026b85037dbSmrg have_xmlto=no 10027b85037dbSmrg else 10028b85037dbSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10029b85037dbSmrg fi]) 10030b85037dbSmrgfi]) 10031b85037dbSmrg 10032b85037dbSmrg# Test for the ability of xmlto to generate a text target 10033b85037dbSmrghave_xmlto_text=no 10034b85037dbSmrgcat > conftest.xml << "EOF" 10035b85037dbSmrgEOF 10036b85037dbSmrgAS_IF([test "$have_xmlto" = yes], 10037b85037dbSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10038b85037dbSmrg [have_xmlto_text=yes], 10039b85037dbSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 10040b85037dbSmrgrm -f conftest.xml 10041b85037dbSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10042b85037dbSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10043b85037dbSmrg]) # XORG_WITH_XMLTO 10044b85037dbSmrg 10045302b15bdSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 10046302b15bdSmrg# -------------------------------------------- 10047302b15bdSmrg# Minimum version: 1.12.0 10048302b15bdSmrg# Minimum version for optional DEFAULT argument: 1.12.0 10049302b15bdSmrg# 10050302b15bdSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 10051302b15bdSmrg# XML-based language used for the transformation of XML documents. 10052302b15bdSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 10053302b15bdSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 10054302b15bdSmrg# The XSLT processor is often used as a standalone tool for transformations. 10055302b15bdSmrg# It should not be assumed that this tool is used only to work with documnetation. 10056302b15bdSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10057302b15bdSmrg# 10058302b15bdSmrg# Interface to module: 10059302b15bdSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 10060302b15bdSmrg# XSLTPROC: returns the path of the xsltproc program found 10061302b15bdSmrg# returns the path set by the user in the environment 10062302b15bdSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 10063302b15bdSmrg# 'no' user instructs the module not to use xsltproc 10064302b15bdSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 10065302b15bdSmrg# 10066302b15bdSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10067302b15bdSmrg# 10068302b15bdSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 10069302b15bdSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 10070302b15bdSmrgm4_define([_defopt], m4_default([$2], [auto])) 10071302b15bdSmrgAC_ARG_WITH(xsltproc, 10072302b15bdSmrg AS_HELP_STRING([--with-xsltproc], 10073302b15bdSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 10074302b15bdSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 10075302b15bdSmrgm4_undefine([_defopt]) 10076302b15bdSmrg 10077302b15bdSmrgif test "x$use_xsltproc" = x"auto"; then 10078302b15bdSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 10079302b15bdSmrg if test "x$XSLTPROC" = "x"; then 10080302b15bdSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 10081302b15bdSmrg have_xsltproc=no 10082302b15bdSmrg else 10083302b15bdSmrg have_xsltproc=yes 10084302b15bdSmrg fi 10085302b15bdSmrgelif test "x$use_xsltproc" = x"yes" ; then 10086302b15bdSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 10087302b15bdSmrg if test "x$XSLTPROC" = "x"; then 10088302b15bdSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 10089302b15bdSmrg fi 10090302b15bdSmrg have_xsltproc=yes 10091302b15bdSmrgelif test "x$use_xsltproc" = x"no" ; then 10092302b15bdSmrg if test "x$XSLTPROC" != "x"; then 10093302b15bdSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 10094302b15bdSmrg fi 10095302b15bdSmrg have_xsltproc=no 10096302b15bdSmrgelse 10097302b15bdSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10098302b15bdSmrgfi 10099302b15bdSmrg 10100302b15bdSmrg# Checking for minimum version is not implemented 10101302b15bdSmrg# but we want to keep the interface consistent with other commands 10102302b15bdSmrgm4_ifval([$1],[AC_MSG_WARN(Checking for MIN-VERSION is not implemented.)]) 10103302b15bdSmrg 10104302b15bdSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 10105302b15bdSmrg]) # XORG_WITH_XSLTPROC 10106302b15bdSmrg 10107302b15bdSmrg 10108302b15bdSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10109b85037dbSmrg# ---------------- 10110b85037dbSmrg# Minimum version: 1.5.0 10111302b15bdSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10112b85037dbSmrg# 10113b85037dbSmrg# Documentation tools are not always available on all platforms and sometimes 10114b85037dbSmrg# not at the appropriate level. This macro enables a module to test for the 10115b85037dbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10116b85037dbSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10117302b15bdSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10118302b15bdSmrg# --with-asciidoc assumes 'auto'. 10119b85037dbSmrg# 10120b85037dbSmrg# Interface to module: 10121b85037dbSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10122b85037dbSmrg# ASCIIDOC: returns the path of the asciidoc program found 10123b85037dbSmrg# returns the path set by the user in the environment 10124b85037dbSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10125b85037dbSmrg# 'no' user instructs the module not to use asciidoc 10126b85037dbSmrg# 10127b85037dbSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10128b85037dbSmrg# 10129b85037dbSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 10130b85037dbSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10131302b15bdSmrgm4_define([_defopt], m4_default([$2], [auto])) 10132b85037dbSmrgAC_ARG_WITH(asciidoc, 10133b85037dbSmrg AS_HELP_STRING([--with-asciidoc], 10134302b15bdSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10135302b15bdSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10136302b15bdSmrgm4_undefine([_defopt]) 10137b85037dbSmrg 10138b85037dbSmrgif test "x$use_asciidoc" = x"auto"; then 10139b85037dbSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10140b85037dbSmrg if test "x$ASCIIDOC" = "x"; then 10141b85037dbSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10142b85037dbSmrg have_asciidoc=no 10143b85037dbSmrg else 10144b85037dbSmrg have_asciidoc=yes 10145b85037dbSmrg fi 10146b85037dbSmrgelif test "x$use_asciidoc" = x"yes" ; then 10147b85037dbSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10148b85037dbSmrg if test "x$ASCIIDOC" = "x"; then 10149b85037dbSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10150b85037dbSmrg fi 10151b85037dbSmrg have_asciidoc=yes 10152b85037dbSmrgelif test "x$use_asciidoc" = x"no" ; then 10153b85037dbSmrg if test "x$ASCIIDOC" != "x"; then 10154b85037dbSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10155b85037dbSmrg fi 10156b85037dbSmrg have_asciidoc=no 10157b85037dbSmrgelse 10158b85037dbSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10159b85037dbSmrgfi 10160b85037dbSmrgm4_ifval([$1], 10161b85037dbSmrg[if test "$have_asciidoc" = yes; then 10162b85037dbSmrg # scrape the asciidoc version 10163b85037dbSmrg AC_MSG_CHECKING([the asciidoc version]) 10164b85037dbSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10165b85037dbSmrg AC_MSG_RESULT([$asciidoc_version]) 10166b85037dbSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 10167b85037dbSmrg [if test "x$use_asciidoc" = xauto; then 10168b85037dbSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10169b85037dbSmrg have_asciidoc=no 10170b85037dbSmrg else 10171b85037dbSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10172b85037dbSmrg fi]) 10173b85037dbSmrgfi]) 10174b85037dbSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10175b85037dbSmrg]) # XORG_WITH_ASCIIDOC 10176b85037dbSmrg 10177302b15bdSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10178b85037dbSmrg# -------------------------------- 10179b85037dbSmrg# Minimum version: 1.5.0 10180302b15bdSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10181b85037dbSmrg# 10182b85037dbSmrg# Documentation tools are not always available on all platforms and sometimes 10183b85037dbSmrg# not at the appropriate level. This macro enables a module to test for the 10184b85037dbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10185b85037dbSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 10186302b15bdSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 10187302b15bdSmrg# --with-doxygen assumes 'auto'. 10188b85037dbSmrg# 10189b85037dbSmrg# Interface to module: 10190b85037dbSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10191b85037dbSmrg# DOXYGEN: returns the path of the doxygen program found 10192b85037dbSmrg# returns the path set by the user in the environment 10193b85037dbSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 10194b85037dbSmrg# 'no' user instructs the module not to use doxygen 10195b85037dbSmrg# 10196b85037dbSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10197b85037dbSmrg# 10198b85037dbSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 10199b85037dbSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10200302b15bdSmrgm4_define([_defopt], m4_default([$2], [auto])) 10201b85037dbSmrgAC_ARG_WITH(doxygen, 10202b85037dbSmrg AS_HELP_STRING([--with-doxygen], 10203302b15bdSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10204302b15bdSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 10205302b15bdSmrgm4_undefine([_defopt]) 10206b85037dbSmrg 10207b85037dbSmrgif test "x$use_doxygen" = x"auto"; then 10208b85037dbSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10209b85037dbSmrg if test "x$DOXYGEN" = "x"; then 10210b85037dbSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10211b85037dbSmrg have_doxygen=no 10212b85037dbSmrg else 10213b85037dbSmrg have_doxygen=yes 10214b85037dbSmrg fi 10215b85037dbSmrgelif test "x$use_doxygen" = x"yes" ; then 10216b85037dbSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10217b85037dbSmrg if test "x$DOXYGEN" = "x"; then 10218b85037dbSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10219b85037dbSmrg fi 10220b85037dbSmrg have_doxygen=yes 10221b85037dbSmrgelif test "x$use_doxygen" = x"no" ; then 10222b85037dbSmrg if test "x$DOXYGEN" != "x"; then 10223b85037dbSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10224b85037dbSmrg fi 10225b85037dbSmrg have_doxygen=no 10226b85037dbSmrgelse 10227b85037dbSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10228b85037dbSmrgfi 10229b85037dbSmrgm4_ifval([$1], 10230b85037dbSmrg[if test "$have_doxygen" = yes; then 10231b85037dbSmrg # scrape the doxygen version 10232b85037dbSmrg AC_MSG_CHECKING([the doxygen version]) 10233b85037dbSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 10234b85037dbSmrg AC_MSG_RESULT([$doxygen_version]) 10235b85037dbSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 10236b85037dbSmrg [if test "x$use_doxygen" = xauto; then 10237b85037dbSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10238b85037dbSmrg have_doxygen=no 10239b85037dbSmrg else 10240b85037dbSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10241b85037dbSmrg fi]) 10242b85037dbSmrgfi]) 10243b85037dbSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10244b85037dbSmrg]) # XORG_WITH_DOXYGEN 10245b85037dbSmrg 10246302b15bdSmrg# XORG_WITH_GROFF([DEFAULT]) 10247b85037dbSmrg# ---------------- 10248b85037dbSmrg# Minimum version: 1.6.0 10249302b15bdSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10250b85037dbSmrg# 10251b85037dbSmrg# Documentation tools are not always available on all platforms and sometimes 10252b85037dbSmrg# not at the appropriate level. This macro enables a module to test for the 10253b85037dbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10254b85037dbSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 10255302b15bdSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 10256302b15bdSmrg# --with-groff assumes 'auto'. 10257b85037dbSmrg# 10258b85037dbSmrg# Interface to module: 10259b85037dbSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 10260b85037dbSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 10261b85037dbSmrg# HAVE_GROFF_MS: the -ms macros package 10262b85037dbSmrg# GROFF: returns the path of the groff program found 10263b85037dbSmrg# returns the path set by the user in the environment 10264b85037dbSmrg# --with-groff: 'yes' user instructs the module to use groff 10265b85037dbSmrg# 'no' user instructs the module not to use groff 10266b85037dbSmrg# 10267b85037dbSmrg# Added in version 1.9.0: 10268b85037dbSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10269b85037dbSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10270b85037dbSmrg# psselect from the psutils package. 10271b85037dbSmrg# the ghostcript package. Refer to the grohtml man pages 10272b85037dbSmrg# 10273b85037dbSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10274b85037dbSmrg# 10275b85037dbSmrg# OS and distros often splits groff in a basic and full package, the former 10276b85037dbSmrg# having the groff program and the later having devices, fonts and macros 10277b85037dbSmrg# Checking for the groff executable is not enough. 10278b85037dbSmrg# 10279b85037dbSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 10280b85037dbSmrg# unset HAVE_GROFF or GROFF env variables. 10281b85037dbSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10282b85037dbSmrg# 10283b85037dbSmrgAC_DEFUN([XORG_WITH_GROFF],[ 10284b85037dbSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 10285302b15bdSmrgm4_define([_defopt], m4_default([$1], [auto])) 10286b85037dbSmrgAC_ARG_WITH(groff, 10287b85037dbSmrg AS_HELP_STRING([--with-groff], 10288302b15bdSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 10289302b15bdSmrg [use_groff=$withval], [use_groff=]_defopt) 10290302b15bdSmrgm4_undefine([_defopt]) 10291b85037dbSmrg 10292b85037dbSmrgif test "x$use_groff" = x"auto"; then 10293b85037dbSmrg AC_PATH_PROG([GROFF], [groff]) 10294b85037dbSmrg if test "x$GROFF" = "x"; then 10295b85037dbSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10296b85037dbSmrg have_groff=no 10297b85037dbSmrg else 10298b85037dbSmrg have_groff=yes 10299b85037dbSmrg fi 10300b85037dbSmrgelif test "x$use_groff" = x"yes" ; then 10301b85037dbSmrg AC_PATH_PROG([GROFF], [groff]) 10302b85037dbSmrg if test "x$GROFF" = "x"; then 10303b85037dbSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10304b85037dbSmrg fi 10305b85037dbSmrg have_groff=yes 10306b85037dbSmrgelif test "x$use_groff" = x"no" ; then 10307b85037dbSmrg if test "x$GROFF" != "x"; then 10308b85037dbSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10309b85037dbSmrg fi 10310b85037dbSmrg have_groff=no 10311b85037dbSmrgelse 10312b85037dbSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10313b85037dbSmrgfi 10314b85037dbSmrg 10315b85037dbSmrg# We have groff, test for the presence of the macro packages 10316b85037dbSmrgif test "x$have_groff" = x"yes"; then 10317b85037dbSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10318b85037dbSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10319b85037dbSmrg groff_ms_works=yes 10320b85037dbSmrg else 10321b85037dbSmrg groff_ms_works=no 10322b85037dbSmrg fi 10323b85037dbSmrg AC_MSG_RESULT([$groff_ms_works]) 10324b85037dbSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10325b85037dbSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10326b85037dbSmrg groff_mm_works=yes 10327b85037dbSmrg else 10328b85037dbSmrg groff_mm_works=no 10329b85037dbSmrg fi 10330b85037dbSmrg AC_MSG_RESULT([$groff_mm_works]) 10331b85037dbSmrgfi 10332b85037dbSmrg 10333b85037dbSmrg# We have groff, test for HTML dependencies, one command per package 10334b85037dbSmrgif test "x$have_groff" = x"yes"; then 10335b85037dbSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10336b85037dbSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10337b85037dbSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10338b85037dbSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10339b85037dbSmrg have_groff_html=yes 10340b85037dbSmrg else 10341b85037dbSmrg have_groff_html=no 10342b85037dbSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10343b85037dbSmrg fi 10344b85037dbSmrgfi 10345b85037dbSmrg 10346b85037dbSmrg# Set Automake conditionals for Makefiles 10347b85037dbSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10348b85037dbSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10349b85037dbSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10350b85037dbSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10351b85037dbSmrg]) # XORG_WITH_GROFF 10352b85037dbSmrg 10353302b15bdSmrg# XORG_WITH_FOP([DEFAULT]) 10354b85037dbSmrg# ---------------- 10355b85037dbSmrg# Minimum version: 1.6.0 10356302b15bdSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10357b85037dbSmrg# 10358b85037dbSmrg# Documentation tools are not always available on all platforms and sometimes 10359b85037dbSmrg# not at the appropriate level. This macro enables a module to test for the 10360b85037dbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10361b85037dbSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 10362302b15bdSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 10363302b15bdSmrg# --with-fop assumes 'auto'. 10364b85037dbSmrg# 10365b85037dbSmrg# Interface to module: 10366b85037dbSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10367b85037dbSmrg# FOP: returns the path of the fop program found 10368b85037dbSmrg# returns the path set by the user in the environment 10369b85037dbSmrg# --with-fop: 'yes' user instructs the module to use fop 10370b85037dbSmrg# 'no' user instructs the module not to use fop 10371b85037dbSmrg# 10372b85037dbSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10373b85037dbSmrg# 10374b85037dbSmrgAC_DEFUN([XORG_WITH_FOP],[ 10375b85037dbSmrgAC_ARG_VAR([FOP], [Path to fop command]) 10376302b15bdSmrgm4_define([_defopt], m4_default([$1], [auto])) 10377b85037dbSmrgAC_ARG_WITH(fop, 10378b85037dbSmrg AS_HELP_STRING([--with-fop], 10379302b15bdSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 10380302b15bdSmrg [use_fop=$withval], [use_fop=]_defopt) 10381302b15bdSmrgm4_undefine([_defopt]) 10382b85037dbSmrg 10383b85037dbSmrgif test "x$use_fop" = x"auto"; then 10384b85037dbSmrg AC_PATH_PROG([FOP], [fop]) 10385b85037dbSmrg if test "x$FOP" = "x"; then 10386b85037dbSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10387b85037dbSmrg have_fop=no 10388b85037dbSmrg else 10389b85037dbSmrg have_fop=yes 10390b85037dbSmrg fi 10391b85037dbSmrgelif test "x$use_fop" = x"yes" ; then 10392b85037dbSmrg AC_PATH_PROG([FOP], [fop]) 10393b85037dbSmrg if test "x$FOP" = "x"; then 10394b85037dbSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10395b85037dbSmrg fi 10396b85037dbSmrg have_fop=yes 10397b85037dbSmrgelif test "x$use_fop" = x"no" ; then 10398b85037dbSmrg if test "x$FOP" != "x"; then 10399b85037dbSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10400b85037dbSmrg fi 10401b85037dbSmrg have_fop=no 10402b85037dbSmrgelse 10403b85037dbSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10404b85037dbSmrgfi 10405b85037dbSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10406b85037dbSmrg]) # XORG_WITH_FOP 10407b85037dbSmrg 10408302b15bdSmrg# XORG_WITH_PS2PDF([DEFAULT]) 10409b85037dbSmrg# ---------------- 10410b85037dbSmrg# Minimum version: 1.6.0 10411302b15bdSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10412b85037dbSmrg# 10413b85037dbSmrg# Documentation tools are not always available on all platforms and sometimes 10414b85037dbSmrg# not at the appropriate level. This macro enables a module to test for the 10415b85037dbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10416b85037dbSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10417302b15bdSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10418302b15bdSmrg# --with-ps2pdf assumes 'auto'. 10419b85037dbSmrg# 10420b85037dbSmrg# Interface to module: 10421b85037dbSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10422b85037dbSmrg# PS2PDF: returns the path of the ps2pdf program found 10423b85037dbSmrg# returns the path set by the user in the environment 10424b85037dbSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10425b85037dbSmrg# 'no' user instructs the module not to use ps2pdf 10426b85037dbSmrg# 10427b85037dbSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10428b85037dbSmrg# 10429b85037dbSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10430b85037dbSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10431302b15bdSmrgm4_define([_defopt], m4_default([$1], [auto])) 10432b85037dbSmrgAC_ARG_WITH(ps2pdf, 10433b85037dbSmrg AS_HELP_STRING([--with-ps2pdf], 10434302b15bdSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10435302b15bdSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10436302b15bdSmrgm4_undefine([_defopt]) 10437b85037dbSmrg 10438b85037dbSmrgif test "x$use_ps2pdf" = x"auto"; then 10439b85037dbSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10440b85037dbSmrg if test "x$PS2PDF" = "x"; then 10441b85037dbSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10442b85037dbSmrg have_ps2pdf=no 10443b85037dbSmrg else 10444b85037dbSmrg have_ps2pdf=yes 10445b85037dbSmrg fi 10446b85037dbSmrgelif test "x$use_ps2pdf" = x"yes" ; then 10447b85037dbSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10448b85037dbSmrg if test "x$PS2PDF" = "x"; then 10449b85037dbSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10450b85037dbSmrg fi 10451b85037dbSmrg have_ps2pdf=yes 10452b85037dbSmrgelif test "x$use_ps2pdf" = x"no" ; then 10453b85037dbSmrg if test "x$PS2PDF" != "x"; then 10454b85037dbSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10455b85037dbSmrg fi 10456b85037dbSmrg have_ps2pdf=no 10457b85037dbSmrgelse 10458b85037dbSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10459b85037dbSmrgfi 10460b85037dbSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10461b85037dbSmrg]) # XORG_WITH_PS2PDF 10462b85037dbSmrg 10463b85037dbSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 10464b85037dbSmrg# ---------------- 10465b85037dbSmrg# Minimum version: 1.6.0 10466b85037dbSmrg# 10467b85037dbSmrg# Documentation tools are not always available on all platforms and sometimes 10468b85037dbSmrg# not at the appropriate level. This macro enables a builder to skip all 10469b85037dbSmrg# documentation targets except traditional man pages. 10470b85037dbSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10471b85037dbSmrg# maximum flexibilty in controlling documentation building. 10472b85037dbSmrg# Refer to: 10473b85037dbSmrg# XORG_WITH_XMLTO --with-xmlto 10474b85037dbSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10475b85037dbSmrg# XORG_WITH_DOXYGEN --with-doxygen 10476b85037dbSmrg# XORG_WITH_FOP --with-fop 10477b85037dbSmrg# XORG_WITH_GROFF --with-groff 10478b85037dbSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10479b85037dbSmrg# 10480b85037dbSmrg# Interface to module: 10481b85037dbSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10482b85037dbSmrg# --enable-docs: 'yes' user instructs the module to generate docs 10483b85037dbSmrg# 'no' user instructs the module not to generate docs 10484b85037dbSmrg# parm1: specify the default value, yes or no. 10485b85037dbSmrg# 10486b85037dbSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 10487302b15bdSmrgm4_define([docs_default], m4_default([$1], [yes])) 10488b85037dbSmrgAC_ARG_ENABLE(docs, 10489b85037dbSmrg AS_HELP_STRING([--enable-docs], 10490302b15bdSmrg [Enable building the documentation (default: ]docs_default[)]), 10491302b15bdSmrg [build_docs=$enableval], [build_docs=]docs_default) 10492302b15bdSmrgm4_undefine([docs_default]) 10493b85037dbSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10494b85037dbSmrgAC_MSG_CHECKING([whether to build documentation]) 10495b85037dbSmrgAC_MSG_RESULT([$build_docs]) 10496b85037dbSmrg]) # XORG_ENABLE_DOCS 10497b85037dbSmrg 10498b85037dbSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10499b85037dbSmrg# ---------------- 10500b85037dbSmrg# Minimum version: 1.6.0 10501b85037dbSmrg# 10502b85037dbSmrg# This macro enables a builder to skip all developer documentation. 10503b85037dbSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10504b85037dbSmrg# maximum flexibilty in controlling documentation building. 10505b85037dbSmrg# Refer to: 10506b85037dbSmrg# XORG_WITH_XMLTO --with-xmlto 10507b85037dbSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10508b85037dbSmrg# XORG_WITH_DOXYGEN --with-doxygen 10509b85037dbSmrg# XORG_WITH_FOP --with-fop 10510b85037dbSmrg# XORG_WITH_GROFF --with-groff 10511b85037dbSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10512b85037dbSmrg# 10513b85037dbSmrg# Interface to module: 10514b85037dbSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10515b85037dbSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10516b85037dbSmrg# 'no' user instructs the module not to generate developer docs 10517b85037dbSmrg# parm1: specify the default value, yes or no. 10518b85037dbSmrg# 10519b85037dbSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10520302b15bdSmrgm4_define([devel_default], m4_default([$1], [yes])) 10521b85037dbSmrgAC_ARG_ENABLE(devel-docs, 10522b85037dbSmrg AS_HELP_STRING([--enable-devel-docs], 10523302b15bdSmrg [Enable building the developer documentation (default: ]devel_default[)]), 10524302b15bdSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10525302b15bdSmrgm4_undefine([devel_default]) 10526b85037dbSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10527b85037dbSmrgAC_MSG_CHECKING([whether to build developer documentation]) 10528b85037dbSmrgAC_MSG_RESULT([$build_devel_docs]) 10529b85037dbSmrg]) # XORG_ENABLE_DEVEL_DOCS 10530b85037dbSmrg 10531b85037dbSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 10532b85037dbSmrg# ---------------- 10533b85037dbSmrg# Minimum version: 1.6.0 10534b85037dbSmrg# 10535b85037dbSmrg# This macro enables a builder to skip all functional specification targets. 10536b85037dbSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10537b85037dbSmrg# maximum flexibilty in controlling documentation building. 10538b85037dbSmrg# Refer to: 10539b85037dbSmrg# XORG_WITH_XMLTO --with-xmlto 10540b85037dbSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10541b85037dbSmrg# XORG_WITH_DOXYGEN --with-doxygen 10542b85037dbSmrg# XORG_WITH_FOP --with-fop 10543b85037dbSmrg# XORG_WITH_GROFF --with-groff 10544b85037dbSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10545b85037dbSmrg# 10546b85037dbSmrg# Interface to module: 10547b85037dbSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10548b85037dbSmrg# --enable-specs: 'yes' user instructs the module to generate specs 10549b85037dbSmrg# 'no' user instructs the module not to generate specs 10550b85037dbSmrg# parm1: specify the default value, yes or no. 10551b85037dbSmrg# 10552b85037dbSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 10553302b15bdSmrgm4_define([spec_default], m4_default([$1], [yes])) 10554b85037dbSmrgAC_ARG_ENABLE(specs, 10555b85037dbSmrg AS_HELP_STRING([--enable-specs], 10556302b15bdSmrg [Enable building the specs (default: ]spec_default[)]), 10557302b15bdSmrg [build_specs=$enableval], [build_specs=]spec_default) 10558302b15bdSmrgm4_undefine([spec_default]) 10559b85037dbSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10560b85037dbSmrgAC_MSG_CHECKING([whether to build functional specifications]) 10561b85037dbSmrgAC_MSG_RESULT([$build_specs]) 10562b85037dbSmrg]) # XORG_ENABLE_SPECS 10563b85037dbSmrg 10564302b15bdSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10565302b15bdSmrg# ---------------------------------------------- 10566302b15bdSmrg# Minimum version: 1.13.0 10567302b15bdSmrg# 10568302b15bdSmrg# This macro enables a builder to enable/disable unit testing 10569302b15bdSmrg# It makes no assumption about the test cases implementation 10570302b15bdSmrg# Test cases may or may not use Automake "Support for test suites" 10571302b15bdSmrg# They may or may not use the software utility library GLib 10572302b15bdSmrg# 10573302b15bdSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10574302b15bdSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10575302b15bdSmrg# The variable enable_unit_tests is used by other macros in this file. 10576302b15bdSmrg# 10577302b15bdSmrg# Interface to module: 10578302b15bdSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10579302b15bdSmrg# enable_unit_tests: used in configure.ac for additional configuration 10580302b15bdSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 10581302b15bdSmrg# 'no' user instructs the module not to build tests 10582302b15bdSmrg# parm1: specify the default value, yes or no. 10583302b15bdSmrg# 10584302b15bdSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10585302b15bdSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 10586302b15bdSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 10587302b15bdSmrgm4_define([_defopt], m4_default([$1], [auto])) 10588302b15bdSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10589302b15bdSmrg [Enable building unit test cases (default: ]_defopt[)]), 10590302b15bdSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10591302b15bdSmrgm4_undefine([_defopt]) 10592302b15bdSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10593302b15bdSmrgAC_MSG_CHECKING([whether to build unit test cases]) 10594302b15bdSmrgAC_MSG_RESULT([$enable_unit_tests]) 10595302b15bdSmrg]) # XORG_ENABLE_UNIT_TESTS 10596302b15bdSmrg 10597302b15bdSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10598302b15bdSmrg# ---------------------------------------- 10599302b15bdSmrg# Minimum version: 1.13.0 10600302b15bdSmrg# 10601302b15bdSmrg# GLib is a library which provides advanced data structures and functions. 10602302b15bdSmrg# This macro enables a module to test for the presence of Glib. 10603302b15bdSmrg# 10604302b15bdSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10605302b15bdSmrg# Otherwise the value of $enable_unit_tests is blank. 10606302b15bdSmrg# 10607302b15bdSmrg# Interface to module: 10608302b15bdSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 10609302b15bdSmrg# with_glib: used in configure.ac to know if GLib has been found 10610302b15bdSmrg# --with-glib: 'yes' user instructs the module to use glib 10611302b15bdSmrg# 'no' user instructs the module not to use glib 10612302b15bdSmrg# 10613302b15bdSmrgAC_DEFUN([XORG_WITH_GLIB],[ 10614302b15bdSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10615302b15bdSmrgm4_define([_defopt], m4_default([$2], [auto])) 10616302b15bdSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10617302b15bdSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 10618302b15bdSmrg [with_glib=$withval], [with_glib=]_defopt) 10619302b15bdSmrgm4_undefine([_defopt]) 10620302b15bdSmrg 10621302b15bdSmrghave_glib=no 10622302b15bdSmrg# Do not probe GLib if user explicitly disabled unit testing 10623302b15bdSmrgif test "x$enable_unit_tests" != x"no"; then 10624302b15bdSmrg # Do not probe GLib if user explicitly disabled it 10625302b15bdSmrg if test "x$with_glib" != x"no"; then 10626302b15bdSmrg m4_ifval( 10627302b15bdSmrg [$1], 10628302b15bdSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10629302b15bdSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10630302b15bdSmrg ) 10631302b15bdSmrg fi 10632302b15bdSmrgfi 10633302b15bdSmrg 10634302b15bdSmrg# Not having GLib when unit testing has been explicitly requested is an error 10635302b15bdSmrgif test "x$enable_unit_tests" = x"yes"; then 10636302b15bdSmrg if test "x$have_glib" = x"no"; then 10637302b15bdSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10638302b15bdSmrg fi 10639302b15bdSmrgfi 10640302b15bdSmrg 10641302b15bdSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 10642302b15bdSmrgif test "x$enable_unit_tests" = x"no"; then 10643302b15bdSmrg if test "x$with_glib" = x"yes"; then 10644302b15bdSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10645302b15bdSmrg fi 10646302b15bdSmrgfi 10647302b15bdSmrg 10648302b15bdSmrg# Not having GLib when it has been explicitly requested is an error 10649302b15bdSmrgif test "x$with_glib" = x"yes"; then 10650302b15bdSmrg if test "x$have_glib" = x"no"; then 10651302b15bdSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10652302b15bdSmrg fi 10653302b15bdSmrgfi 10654302b15bdSmrg 10655302b15bdSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10656302b15bdSmrg]) # XORG_WITH_GLIB 10657302b15bdSmrg 10658302b15bdSmrg# XORG_LD_WRAP 10659302b15bdSmrg# ------------ 10660302b15bdSmrg# Minimum version: 1.13.0 10661302b15bdSmrg# 10662302b15bdSmrg# Check if linker supports -wrap, passed via compiler flags 10663302b15bdSmrg# 10664302b15bdSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10665302b15bdSmrg# Otherwise the value of $enable_unit_tests is blank. 10666302b15bdSmrg# 10667302b15bdSmrgAC_DEFUN([XORG_LD_WRAP],[ 10668302b15bdSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no]) 10669302b15bdSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 10670302b15bdSmrgif test "x$enable_unit_tests" = x"yes"; then 10671302b15bdSmrg if test "x$have_ld_wrap" = x"no"; then 10672302b15bdSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10673302b15bdSmrg fi 10674302b15bdSmrgfi 10675302b15bdSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10676302b15bdSmrg# 10677302b15bdSmrg]) # XORG_LD_WRAP 10678302b15bdSmrg 10679302b15bdSmrg# XORG_CHECK_LINKER_FLAGS 10680302b15bdSmrg# ----------------------- 10681302b15bdSmrg# SYNOPSIS 10682302b15bdSmrg# 10683302b15bdSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE]) 10684302b15bdSmrg# 10685302b15bdSmrg# DESCRIPTION 10686302b15bdSmrg# 10687302b15bdSmrg# Check whether the given linker FLAGS work with the current language's 10688302b15bdSmrg# linker, or whether they give an error. 10689302b15bdSmrg# 10690302b15bdSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10691302b15bdSmrg# success/failure. 10692302b15bdSmrg# 10693302b15bdSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10694302b15bdSmrg# 10695302b15bdSmrg# LICENSE 10696302b15bdSmrg# 10697302b15bdSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10698302b15bdSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10699302b15bdSmrg# Copyright (c) 2009 Matteo Frigo 10700302b15bdSmrg# 10701302b15bdSmrg# This program is free software: you can redistribute it and/or modify it 10702302b15bdSmrg# under the terms of the GNU General Public License as published by the 10703302b15bdSmrg# Free Software Foundation, either version 3 of the License, or (at your 10704302b15bdSmrg# option) any later version. 10705302b15bdSmrg# 10706302b15bdSmrg# This program is distributed in the hope that it will be useful, but 10707302b15bdSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10708302b15bdSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10709302b15bdSmrg# Public License for more details. 10710302b15bdSmrg# 10711302b15bdSmrg# You should have received a copy of the GNU General Public License along 10712302b15bdSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 10713302b15bdSmrg# 10714302b15bdSmrg# As a special exception, the respective Autoconf Macro's copyright owner 10715302b15bdSmrg# gives unlimited permission to copy, distribute and modify the configure 10716302b15bdSmrg# scripts that are the output of Autoconf when processing the Macro. You 10717302b15bdSmrg# need not follow the terms of the GNU General Public License when using 10718302b15bdSmrg# or distributing such scripts, even though portions of the text of the 10719302b15bdSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 10720302b15bdSmrg# all other use of the material that constitutes the Autoconf Macro. 10721302b15bdSmrg# 10722302b15bdSmrg# This special exception to the GPL applies to versions of the Autoconf 10723302b15bdSmrg# Macro released by the Autoconf Archive. When you make and distribute a 10724302b15bdSmrg# modified version of the Autoconf Macro, you may extend this special 10725302b15bdSmrg# exception to the GPL to apply to your modified version as well.# 10726302b15bdSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10727302b15bdSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10728302b15bdSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10729302b15bdSmrgAS_LITERAL_IF([$1], 10730302b15bdSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10731302b15bdSmrg ax_save_FLAGS=$LDFLAGS 10732302b15bdSmrg LDFLAGS="$1" 10733302b15bdSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10734302b15bdSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10735302b15bdSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10736302b15bdSmrg LDFLAGS=$ax_save_FLAGS])], 10737302b15bdSmrg [ax_save_FLAGS=$LDFLAGS 10738302b15bdSmrg LDFLAGS="$1" 10739302b15bdSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10740302b15bdSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10741302b15bdSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10742302b15bdSmrg LDFLAGS=$ax_save_FLAGS]) 10743302b15bdSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10744302b15bdSmrgAC_MSG_RESULT($xorg_check_linker_flags) 10745302b15bdSmrgif test "x$xorg_check_linker_flags" = xyes; then 10746302b15bdSmrg m4_default([$2], :) 10747302b15bdSmrgelse 10748302b15bdSmrg m4_default([$3], :) 10749302b15bdSmrgfi 10750302b15bdSmrg]) # XORG_CHECK_LINKER_FLAGS 10751302b15bdSmrg 10752b85037dbSmrg# XORG_CHECK_MALLOC_ZERO 10753b85037dbSmrg# ---------------------- 10754b85037dbSmrg# Minimum version: 1.0.0 10755b85037dbSmrg# 10756b85037dbSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10757b85037dbSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 10758b85037dbSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10759b85037dbSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10760b85037dbSmrgAC_ARG_ENABLE(malloc0returnsnull, 10761b85037dbSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 10762b85037dbSmrg [malloc(0) returns NULL (default: auto)]), 10763b85037dbSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 10764b85037dbSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10765b85037dbSmrg 10766b85037dbSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 10767b85037dbSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10768302b15bdSmrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10769302b15bdSmrg#include <stdlib.h> 10770302b15bdSmrg],[ 10771b85037dbSmrg char *m0, *r0, *c0, *p; 10772b85037dbSmrg m0 = malloc(0); 10773b85037dbSmrg p = malloc(10); 10774b85037dbSmrg r0 = realloc(p,0); 10775302b15bdSmrg c0 = calloc(0,10); 10776302b15bdSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10777302b15bdSmrg])], 10778b85037dbSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 10779b85037dbSmrg [MALLOC_ZERO_RETURNS_NULL=no], 10780b85037dbSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 10781b85037dbSmrgfi 10782b85037dbSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10783b85037dbSmrg 10784b85037dbSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10785b85037dbSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10786b85037dbSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10787b85037dbSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10788b85037dbSmrgelse 10789b85037dbSmrg MALLOC_ZERO_CFLAGS="" 10790b85037dbSmrg XMALLOC_ZERO_CFLAGS="" 10791b85037dbSmrg XTMALLOC_ZERO_CFLAGS="" 10792b85037dbSmrgfi 10793b85037dbSmrg 10794b85037dbSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 10795b85037dbSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 10796b85037dbSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10797b85037dbSmrg]) # XORG_CHECK_MALLOC_ZERO 10798b85037dbSmrg 10799b85037dbSmrg# XORG_WITH_LINT() 10800b85037dbSmrg# ---------------- 10801b85037dbSmrg# Minimum version: 1.1.0 10802b85037dbSmrg# 10803b85037dbSmrg# This macro enables the use of a tool that flags some suspicious and 10804b85037dbSmrg# non-portable constructs (likely to be bugs) in C language source code. 10805b85037dbSmrg# It will attempt to locate the tool and use appropriate options. 10806b85037dbSmrg# There are various lint type tools on different platforms. 10807b85037dbSmrg# 10808b85037dbSmrg# Interface to module: 10809b85037dbSmrg# LINT: returns the path to the tool found on the platform 10810b85037dbSmrg# or the value set to LINT on the configure cmd line 10811b85037dbSmrg# also an Automake conditional 10812b85037dbSmrg# LINT_FLAGS: an Automake variable with appropriate flags 10813b85037dbSmrg# 10814b85037dbSmrg# --with-lint: 'yes' user instructs the module to use lint 10815b85037dbSmrg# 'no' user instructs the module not to use lint (default) 10816b85037dbSmrg# 10817b85037dbSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10818b85037dbSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 10819b85037dbSmrg# 10820b85037dbSmrgAC_DEFUN([XORG_WITH_LINT],[ 10821b85037dbSmrg 10822b85037dbSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10823b85037dbSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10824b85037dbSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10825b85037dbSmrg [Use a lint-style source code checker (default: disabled)])], 10826b85037dbSmrg [use_lint=$withval], [use_lint=no]) 10827b85037dbSmrg 10828b85037dbSmrg# Obtain platform specific info like program name and options 10829b85037dbSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10830b85037dbSmrgcase $host_os in 10831b85037dbSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10832b85037dbSmrg lint_name=splint 10833b85037dbSmrg lint_options="-badflag" 10834b85037dbSmrg ;; 10835b85037dbSmrg *freebsd* | *netbsd*) 10836b85037dbSmrg lint_name=lint 10837b85037dbSmrg lint_options="-u -b" 10838b85037dbSmrg ;; 10839b85037dbSmrg *solaris*) 10840b85037dbSmrg lint_name=lint 10841b85037dbSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10842b85037dbSmrg ;; 10843b85037dbSmrgesac 10844b85037dbSmrg 10845b85037dbSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10846b85037dbSmrgif test "x$use_lint" = x"yes" ; then 10847b85037dbSmrg AC_PATH_PROG([LINT], [$lint_name]) 10848b85037dbSmrg if test "x$LINT" = "x"; then 10849b85037dbSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10850b85037dbSmrg fi 10851b85037dbSmrgelif test "x$use_lint" = x"no" ; then 10852b85037dbSmrg if test "x$LINT" != "x"; then 10853b85037dbSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10854b85037dbSmrg fi 10855b85037dbSmrgelse 10856b85037dbSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10857b85037dbSmrgfi 10858b85037dbSmrg 10859b85037dbSmrg# User supplied flags override default flags 10860b85037dbSmrgif test "x$LINT_FLAGS" != "x"; then 10861b85037dbSmrg lint_options=$LINT_FLAGS 10862b85037dbSmrgfi 10863b85037dbSmrg 10864b85037dbSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10865b85037dbSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10866b85037dbSmrg 10867b85037dbSmrg]) # XORG_WITH_LINT 10868b85037dbSmrg 10869b85037dbSmrg# XORG_LINT_LIBRARY(LIBNAME) 10870b85037dbSmrg# -------------------------- 10871b85037dbSmrg# Minimum version: 1.1.0 10872b85037dbSmrg# 10873b85037dbSmrg# Sets up flags for building lint libraries for checking programs that call 10874b85037dbSmrg# functions in the library. 10875b85037dbSmrg# 10876b85037dbSmrg# Interface to module: 10877b85037dbSmrg# LINTLIB - Automake variable with the name of lint library file to make 10878b85037dbSmrg# MAKE_LINT_LIB - Automake conditional 10879b85037dbSmrg# 10880b85037dbSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10881b85037dbSmrg# - 'no' user instructs the module not to create a lint library (default) 10882b85037dbSmrg 10883b85037dbSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 10884b85037dbSmrgAC_REQUIRE([XORG_WITH_LINT]) 10885b85037dbSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10886b85037dbSmrg [Create lint library (default: disabled)])], 10887b85037dbSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10888b85037dbSmrg 10889b85037dbSmrgif test "x$make_lint_lib" = x"yes" ; then 10890b85037dbSmrg LINTLIB=llib-l$1.ln 10891b85037dbSmrg if test "x$LINT" = "x"; then 10892b85037dbSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10893b85037dbSmrg fi 10894b85037dbSmrgelif test "x$make_lint_lib" != x"no" ; then 10895b85037dbSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10896b85037dbSmrgfi 10897b85037dbSmrg 10898b85037dbSmrgAC_SUBST(LINTLIB) 10899b85037dbSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10900b85037dbSmrg 10901b85037dbSmrg]) # XORG_LINT_LIBRARY 10902b85037dbSmrg 10903302b15bdSmrg# XORG_COMPILER_BRAND 10904302b15bdSmrg# ------------------- 10905302b15bdSmrg# Minimum version: 1.14.0 10906302b15bdSmrg# 10907302b15bdSmrg# Checks for various brands of compilers and sets flags as appropriate: 10908302b15bdSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10909302b15bdSmrg# clang compiler - sets CLANGCC to "yes" 10910302b15bdSmrg# Intel compiler - sets INTELCC to "yes" 10911302b15bdSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10912302b15bdSmrg# 10913302b15bdSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10914302b15bdSmrgAC_REQUIRE([AC_PROG_CC_C99]) 10915302b15bdSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10916302b15bdSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10917302b15bdSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10918302b15bdSmrg]) # XORG_COMPILER_BRAND 10919302b15bdSmrg 10920b85037dbSmrg# XORG_CWARNFLAGS 10921b85037dbSmrg# --------------- 10922b85037dbSmrg# Minimum version: 1.2.0 10923b85037dbSmrg# 10924b85037dbSmrg# Defines CWARNFLAGS to enable C compiler warnings. 10925b85037dbSmrg# 10926b85037dbSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 10927b85037dbSmrgAC_REQUIRE([AC_PROG_CC_C99]) 10928302b15bdSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10929b85037dbSmrgif test "x$GCC" = xyes ; then 10930b85037dbSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 10931b85037dbSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 10932b85037dbSmrg-Wbad-function-cast -Wformat=2" 10933b85037dbSmrg case `$CC -dumpversion` in 10934b85037dbSmrg 3.4.* | 4.*) 10935b85037dbSmrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 10936b85037dbSmrg ;; 10937b85037dbSmrg esac 10938b85037dbSmrgelse 10939b85037dbSmrg if test "x$SUNCC" = "xyes"; then 10940b85037dbSmrg CWARNFLAGS="-v" 10941b85037dbSmrg fi 10942b85037dbSmrgfi 10943b85037dbSmrgAC_SUBST(CWARNFLAGS) 10944b85037dbSmrg]) # XORG_CWARNFLAGS 10945b85037dbSmrg 10946b85037dbSmrg# XORG_STRICT_OPTION 10947b85037dbSmrg# ----------------------- 10948b85037dbSmrg# Minimum version: 1.3.0 10949b85037dbSmrg# 10950302b15bdSmrg# Add configure option to enable strict compilation flags, such as treating 10951302b15bdSmrg# warnings as fatal errors. 10952302b15bdSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 10953302b15bdSmrg# $CWARNFLAGS. 10954302b15bdSmrg# 10955302b15bdSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 10956302b15bdSmrg# when strict compilation is unconditionally desired. 10957b85037dbSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 10958b85037dbSmrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 10959b85037dbSmrgAC_REQUIRE([AC_PROG_CC_C99]) 10960302b15bdSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10961b85037dbSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 10962b85037dbSmrg 10963b85037dbSmrgAC_ARG_ENABLE(strict-compilation, 10964b85037dbSmrg AS_HELP_STRING([--enable-strict-compilation], 10965b85037dbSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 10966b85037dbSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 10967302b15bdSmrgif test "x$GCC" = xyes ; then 10968302b15bdSmrg STRICT_CFLAGS="-pedantic -Werror" 10969302b15bdSmrg # Add -Werror=attributes if supported (gcc 4.2 & later) 10970302b15bdSmrg AC_MSG_CHECKING([if $CC supports -Werror=attributes]) 10971302b15bdSmrg save_CFLAGS="$CFLAGS" 10972302b15bdSmrg CFLAGS="$CFLAGS $STRICT_CFLAGS -Werror=attributes" 10973302b15bdSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([return 0;])], 10974302b15bdSmrg [STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes" 10975302b15bdSmrg AC_MSG_RESULT([yes])], 10976302b15bdSmrg [AC_MSG_RESULT([no])]) 10977302b15bdSmrg CFLAGS="$save_CFLAGS" 10978302b15bdSmrgelif test "x$SUNCC" = "xyes"; then 10979302b15bdSmrg STRICT_CFLAGS="-errwarn" 10980302b15bdSmrgelif test "x$INTELCC" = "xyes"; then 10981302b15bdSmrg STRICT_CFLAGS="-Werror" 10982302b15bdSmrgfi 10983b85037dbSmrgif test "x$STRICT_COMPILE" = "xyes"; then 10984302b15bdSmrg CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 10985b85037dbSmrgfi 10986302b15bdSmrgAC_SUBST([STRICT_CFLAGS]) 10987b85037dbSmrgAC_SUBST([CWARNFLAGS]) 10988b85037dbSmrg]) # XORG_STRICT_OPTION 10989b85037dbSmrg 10990b85037dbSmrg# XORG_DEFAULT_OPTIONS 10991b85037dbSmrg# -------------------- 10992b85037dbSmrg# Minimum version: 1.3.0 10993b85037dbSmrg# 10994b85037dbSmrg# Defines default options for X.Org modules. 10995b85037dbSmrg# 10996b85037dbSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 10997b85037dbSmrgAC_REQUIRE([AC_PROG_INSTALL]) 10998b85037dbSmrgXORG_CWARNFLAGS 10999b85037dbSmrgXORG_STRICT_OPTION 11000b85037dbSmrgXORG_RELEASE_VERSION 11001b85037dbSmrgXORG_CHANGELOG 11002b85037dbSmrgXORG_INSTALL 11003b85037dbSmrgXORG_MANPAGE_SECTIONS 11004b85037dbSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11005b85037dbSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11006b85037dbSmrg]) # XORG_DEFAULT_OPTIONS 11007b85037dbSmrg 11008b85037dbSmrg# XORG_INSTALL() 11009b85037dbSmrg# ---------------- 11010b85037dbSmrg# Minimum version: 1.4.0 11011b85037dbSmrg# 11012b85037dbSmrg# Defines the variable INSTALL_CMD as the command to copy 11013b85037dbSmrg# INSTALL from $prefix/share/util-macros. 11014b85037dbSmrg# 11015b85037dbSmrgAC_DEFUN([XORG_INSTALL], [ 11016b85037dbSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11017b85037dbSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11018b85037dbSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11019b85037dbSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11020b85037dbSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11021b85037dbSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11022b85037dbSmrgAC_SUBST([INSTALL_CMD]) 11023b85037dbSmrg]) # XORG_INSTALL 11024b85037dbSmrgdnl Copyright 2005 Red Hat, Inc 11025b85037dbSmrgdnl 11026b85037dbSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11027b85037dbSmrgdnl documentation for any purpose is hereby granted without fee, provided that 11028b85037dbSmrgdnl the above copyright notice appear in all copies and that both that 11029b85037dbSmrgdnl copyright notice and this permission notice appear in supporting 11030b85037dbSmrgdnl documentation. 11031b85037dbSmrgdnl 11032b85037dbSmrgdnl The above copyright notice and this permission notice shall be included 11033b85037dbSmrgdnl in all copies or substantial portions of the Software. 11034b85037dbSmrgdnl 11035b85037dbSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11036b85037dbSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11037b85037dbSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11038b85037dbSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11039b85037dbSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11040b85037dbSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11041b85037dbSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 11042b85037dbSmrgdnl 11043b85037dbSmrgdnl Except as contained in this notice, the name of the copyright holders shall 11044b85037dbSmrgdnl not be used in advertising or otherwise to promote the sale, use or 11045b85037dbSmrgdnl other dealings in this Software without prior written authorization 11046b85037dbSmrgdnl from the copyright holders. 11047b85037dbSmrgdnl 11048b85037dbSmrg 11049b85037dbSmrg# XORG_RELEASE_VERSION 11050b85037dbSmrg# -------------------- 11051b85037dbSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11052b85037dbSmrg 11053b85037dbSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 11054b85037dbSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11055b85037dbSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11056b85037dbSmrg [Major version of this package]) 11057b85037dbSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11058b85037dbSmrg if test "x$PVM" = "x"; then 11059b85037dbSmrg PVM="0" 11060b85037dbSmrg fi 11061b85037dbSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11062b85037dbSmrg [$PVM], 11063b85037dbSmrg [Minor version of this package]) 11064b85037dbSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11065b85037dbSmrg if test "x$PVP" = "x"; then 11066b85037dbSmrg PVP="0" 11067b85037dbSmrg fi 11068b85037dbSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11069b85037dbSmrg [$PVP], 11070b85037dbSmrg [Patch version of this package]) 11071b85037dbSmrg]) 11072b85037dbSmrg 11073b85037dbSmrg# XORG_CHANGELOG() 11074b85037dbSmrg# ---------------- 11075b85037dbSmrg# Minimum version: 1.2.0 11076b85037dbSmrg# 11077b85037dbSmrg# Defines the variable CHANGELOG_CMD as the command to generate 11078b85037dbSmrg# ChangeLog from git. 11079b85037dbSmrg# 11080b85037dbSmrg# 11081b85037dbSmrgAC_DEFUN([XORG_CHANGELOG], [ 11082b85037dbSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11083b85037dbSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11084b85037dbSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11085b85037dbSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 11086b85037dbSmrgAC_SUBST([CHANGELOG_CMD]) 11087b85037dbSmrg]) # XORG_CHANGELOG 11088b85037dbSmrg 11089b85037dbSmrgdnl Copyright 2005 Red Hat, Inc 11090b85037dbSmrgdnl 11091b85037dbSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11092b85037dbSmrgdnl documentation for any purpose is hereby granted without fee, provided that 11093b85037dbSmrgdnl the above copyright notice appear in all copies and that both that 11094b85037dbSmrgdnl copyright notice and this permission notice appear in supporting 11095b85037dbSmrgdnl documentation. 11096b85037dbSmrgdnl 11097b85037dbSmrgdnl The above copyright notice and this permission notice shall be included 11098b85037dbSmrgdnl in all copies or substantial portions of the Software. 11099b85037dbSmrgdnl 11100b85037dbSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11101b85037dbSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11102b85037dbSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11103b85037dbSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11104b85037dbSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11105b85037dbSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11106b85037dbSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 11107b85037dbSmrgdnl 11108b85037dbSmrgdnl Except as contained in this notice, the name of the copyright holders shall 11109b85037dbSmrgdnl not be used in advertising or otherwise to promote the sale, use or 11110b85037dbSmrgdnl other dealings in this Software without prior written authorization 11111b85037dbSmrgdnl from the copyright holders. 11112b85037dbSmrgdnl 11113b85037dbSmrg 11114b85037dbSmrg# XORG_DRIVER_CHECK_EXT() 11115b85037dbSmrg# -------------------------- 11116b85037dbSmrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 11117b85037dbSmrg# is defined, then add $1 to $REQUIRED_MODULES. 11118b85037dbSmrg 11119b85037dbSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 11120b85037dbSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11121b85037dbSmrg SAVE_CFLAGS="$CFLAGS" 11122b85037dbSmrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 11123b85037dbSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 11124b85037dbSmrg#include "xorg-server.h" 11125b85037dbSmrg#if !defined $1 11126b85037dbSmrg#error $1 not defined 11127b85037dbSmrg#endif 11128b85037dbSmrg ]])], 11129b85037dbSmrg [_EXT_CHECK=yes], 11130b85037dbSmrg [_EXT_CHECK=no]) 11131b85037dbSmrg CFLAGS="$SAVE_CFLAGS" 11132b85037dbSmrg AC_MSG_CHECKING([if $1 is defined]) 11133b85037dbSmrg AC_MSG_RESULT([$_EXT_CHECK]) 11134b85037dbSmrg if test "$_EXT_CHECK" != no; then 11135b85037dbSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 11136b85037dbSmrg fi 11137b85037dbSmrg]) 11138b85037dbSmrg 11139