aclocal.m4 revision b85037db
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 16b85037dbSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.66],, 17b85037dbSmrg[m4_warning([this file was generated for autoconf 2.66. 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 192b85037dbSmrgm4_require([_LT_CMD_RELOAD])dnl 193b85037dbSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 194b85037dbSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 195b85037dbSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 196b85037dbSmrg 197b85037dbSmrg_LT_CONFIG_LIBTOOL_INIT([ 198b85037dbSmrg# See if we are running on zsh, and set the options which allow our 199b85037dbSmrg# commands through without removal of \ escapes INIT. 200b85037dbSmrgif test -n "\${ZSH_VERSION+set}" ; then 201b85037dbSmrg setopt NO_GLOB_SUBST 202b85037dbSmrgfi 203b85037dbSmrg]) 204b85037dbSmrgif test -n "${ZSH_VERSION+set}" ; then 205b85037dbSmrg setopt NO_GLOB_SUBST 206b85037dbSmrgfi 207b85037dbSmrg 208b85037dbSmrg_LT_CHECK_OBJDIR 209b85037dbSmrg 210b85037dbSmrgm4_require([_LT_TAG_COMPILER])dnl 211b85037dbSmrg 212b85037dbSmrgcase $host_os in 213b85037dbSmrgaix3*) 214b85037dbSmrg # AIX sometimes has problems with the GCC collect2 program. For some 215b85037dbSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 216b85037dbSmrg # vanish in a puff of smoke. 217b85037dbSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 218b85037dbSmrg COLLECT_NAMES= 219b85037dbSmrg export COLLECT_NAMES 220b85037dbSmrg fi 221b85037dbSmrg ;; 222b85037dbSmrgesac 223b85037dbSmrg 224b85037dbSmrg# Global variables: 225b85037dbSmrgofile=libtool 226b85037dbSmrgcan_build_shared=yes 227b85037dbSmrg 228b85037dbSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 229b85037dbSmrg# which needs '.lib'). 230b85037dbSmrglibext=a 231b85037dbSmrg 232b85037dbSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 233b85037dbSmrg 234b85037dbSmrgold_CC="$CC" 235b85037dbSmrgold_CFLAGS="$CFLAGS" 236b85037dbSmrg 237b85037dbSmrg# Set sane defaults for various variables 238b85037dbSmrgtest -z "$CC" && CC=cc 239b85037dbSmrgtest -z "$LTCC" && LTCC=$CC 240b85037dbSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 241b85037dbSmrgtest -z "$LD" && LD=ld 242b85037dbSmrgtest -z "$ac_objext" && ac_objext=o 243b85037dbSmrg 244b85037dbSmrg_LT_CC_BASENAME([$compiler]) 245b85037dbSmrg 246b85037dbSmrg# Only perform the check for file, if the check method requires it 247b85037dbSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 248b85037dbSmrgcase $deplibs_check_method in 249b85037dbSmrgfile_magic*) 250b85037dbSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 251b85037dbSmrg _LT_PATH_MAGIC 252b85037dbSmrg fi 253b85037dbSmrg ;; 254b85037dbSmrgesac 255b85037dbSmrg 256b85037dbSmrg# Use C for the default configuration in the libtool script 257b85037dbSmrgLT_SUPPORTED_TAG([CC]) 258b85037dbSmrg_LT_LANG_C_CONFIG 259b85037dbSmrg_LT_LANG_DEFAULT_CONFIG 260b85037dbSmrg_LT_CONFIG_COMMANDS 261b85037dbSmrg])# _LT_SETUP 262b85037dbSmrg 263b85037dbSmrg 264b85037dbSmrg# _LT_PREPARE_SED_QUOTE_VARS 265b85037dbSmrg# -------------------------- 266b85037dbSmrg# Define a few sed substitution that help us do robust quoting. 267b85037dbSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 268b85037dbSmrg[# Backslashify metacharacters that are still active within 269b85037dbSmrg# double-quoted strings. 270b85037dbSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 271b85037dbSmrg 272b85037dbSmrg# Same as above, but do not quote variable references. 273b85037dbSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 274b85037dbSmrg 275b85037dbSmrg# Sed substitution to delay expansion of an escaped shell variable in a 276b85037dbSmrg# double_quote_subst'ed string. 277b85037dbSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 278b85037dbSmrg 279b85037dbSmrg# Sed substitution to delay expansion of an escaped single quote. 280b85037dbSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 281b85037dbSmrg 282b85037dbSmrg# Sed substitution to avoid accidental globbing in evaled expressions 283b85037dbSmrgno_glob_subst='s/\*/\\\*/g' 284b85037dbSmrg]) 285b85037dbSmrg 286b85037dbSmrg# _LT_PROG_LTMAIN 287b85037dbSmrg# --------------- 288b85037dbSmrg# Note that this code is called both from `configure', and `config.status' 289b85037dbSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 290b85037dbSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 291b85037dbSmrg# so we pass a copy along to make sure it has a sensible value anyway. 292b85037dbSmrgm4_defun([_LT_PROG_LTMAIN], 293b85037dbSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 294b85037dbSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 295b85037dbSmrgltmain="$ac_aux_dir/ltmain.sh" 296b85037dbSmrg])# _LT_PROG_LTMAIN 297b85037dbSmrg 298b85037dbSmrg 299b85037dbSmrg 300b85037dbSmrg# So that we can recreate a full libtool script including additional 301b85037dbSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 302b85037dbSmrg# in macros and then make a single call at the end using the `libtool' 303b85037dbSmrg# label. 304b85037dbSmrg 305b85037dbSmrg 306b85037dbSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 307b85037dbSmrg# ---------------------------------------- 308b85037dbSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 309b85037dbSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 310b85037dbSmrg[m4_ifval([$1], 311b85037dbSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 312b85037dbSmrg [$1 313b85037dbSmrg])])]) 314b85037dbSmrg 315b85037dbSmrg# Initialize. 316b85037dbSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 317b85037dbSmrg 318b85037dbSmrg 319b85037dbSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 320b85037dbSmrg# ------------------------------ 321b85037dbSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 322b85037dbSmrgm4_define([_LT_CONFIG_LIBTOOL], 323b85037dbSmrg[m4_ifval([$1], 324b85037dbSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 325b85037dbSmrg [$1 326b85037dbSmrg])])]) 327b85037dbSmrg 328b85037dbSmrg# Initialize. 329b85037dbSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 330b85037dbSmrg 331b85037dbSmrg 332b85037dbSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 333b85037dbSmrg# ----------------------------------------------------- 334b85037dbSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 335b85037dbSmrg[_LT_CONFIG_LIBTOOL([$1]) 336b85037dbSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 337b85037dbSmrg]) 338b85037dbSmrg 339b85037dbSmrg 340b85037dbSmrg# _LT_FORMAT_COMMENT([COMMENT]) 341b85037dbSmrg# ----------------------------- 342b85037dbSmrg# Add leading comment marks to the start of each line, and a trailing 343b85037dbSmrg# full-stop to the whole comment if one is not present already. 344b85037dbSmrgm4_define([_LT_FORMAT_COMMENT], 345b85037dbSmrg[m4_ifval([$1], [ 346b85037dbSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 347b85037dbSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 348b85037dbSmrg)]) 349b85037dbSmrg 350b85037dbSmrg 351b85037dbSmrg 352b85037dbSmrg 353b85037dbSmrg 354b85037dbSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 355b85037dbSmrg# ------------------------------------------------------------------- 356b85037dbSmrg# CONFIGNAME is the name given to the value in the libtool script. 357b85037dbSmrg# VARNAME is the (base) name used in the configure script. 358b85037dbSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 359b85037dbSmrg# VARNAME. Any other value will be used directly. 360b85037dbSmrgm4_define([_LT_DECL], 361b85037dbSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 362b85037dbSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 363b85037dbSmrg [m4_ifval([$1], [$1], [$2])]) 364b85037dbSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 365b85037dbSmrg m4_ifval([$4], 366b85037dbSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 367b85037dbSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 368b85037dbSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 369b85037dbSmrg]) 370b85037dbSmrg 371b85037dbSmrg 372b85037dbSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 373b85037dbSmrg# -------------------------------------------------------- 374b85037dbSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 375b85037dbSmrg 376b85037dbSmrg 377b85037dbSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 378b85037dbSmrg# ------------------------------------------------ 379b85037dbSmrgm4_define([lt_decl_tag_varnames], 380b85037dbSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 381b85037dbSmrg 382b85037dbSmrg 383b85037dbSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 384b85037dbSmrg# --------------------------------------------------------- 385b85037dbSmrgm4_define([_lt_decl_filter], 386b85037dbSmrg[m4_case([$#], 387b85037dbSmrg [0], [m4_fatal([$0: too few arguments: $#])], 388b85037dbSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 389b85037dbSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 390b85037dbSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 391b85037dbSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 392b85037dbSmrg]) 393b85037dbSmrg 394b85037dbSmrg 395b85037dbSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 396b85037dbSmrg# -------------------------------------------------- 397b85037dbSmrgm4_define([lt_decl_quote_varnames], 398b85037dbSmrg[_lt_decl_filter([value], [1], $@)]) 399b85037dbSmrg 400b85037dbSmrg 401b85037dbSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 402b85037dbSmrg# --------------------------------------------------- 403b85037dbSmrgm4_define([lt_decl_dquote_varnames], 404b85037dbSmrg[_lt_decl_filter([value], [2], $@)]) 405b85037dbSmrg 406b85037dbSmrg 407b85037dbSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 408b85037dbSmrg# --------------------------------------------------- 409b85037dbSmrgm4_define([lt_decl_varnames_tagged], 410b85037dbSmrg[m4_assert([$# <= 2])dnl 411b85037dbSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 412b85037dbSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 413b85037dbSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 414b85037dbSmrgm4_define([_lt_decl_varnames_tagged], 415b85037dbSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 416b85037dbSmrg 417b85037dbSmrg 418b85037dbSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 419b85037dbSmrg# ------------------------------------------------ 420b85037dbSmrgm4_define([lt_decl_all_varnames], 421b85037dbSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 422b85037dbSmrg m4_if([$2], [], 423b85037dbSmrg m4_quote(lt_decl_varnames), 424b85037dbSmrg m4_quote(m4_shift($@))))[]dnl 425b85037dbSmrg]) 426b85037dbSmrgm4_define([_lt_decl_all_varnames], 427b85037dbSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 428b85037dbSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 429b85037dbSmrg]) 430b85037dbSmrg 431b85037dbSmrg 432b85037dbSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 433b85037dbSmrg# ------------------------------------ 434b85037dbSmrg# Quote a variable value, and forward it to `config.status' so that its 435b85037dbSmrg# declaration there will have the same value as in `configure'. VARNAME 436b85037dbSmrg# must have a single quote delimited value for this to work. 437b85037dbSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 438b85037dbSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 439b85037dbSmrg 440b85037dbSmrg 441b85037dbSmrg# _LT_CONFIG_STATUS_DECLARATIONS 442b85037dbSmrg# ------------------------------ 443b85037dbSmrg# We delimit libtool config variables with single quotes, so when 444b85037dbSmrg# we write them to config.status, we have to be sure to quote all 445b85037dbSmrg# embedded single quotes properly. In configure, this macro expands 446b85037dbSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 447b85037dbSmrg# 448b85037dbSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 449b85037dbSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 450b85037dbSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 451b85037dbSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 452b85037dbSmrg 453b85037dbSmrg 454b85037dbSmrg# _LT_LIBTOOL_TAGS 455b85037dbSmrg# ---------------- 456b85037dbSmrg# Output comment and list of tags supported by the script 457b85037dbSmrgm4_defun([_LT_LIBTOOL_TAGS], 458b85037dbSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 459b85037dbSmrgavailable_tags="_LT_TAGS"dnl 460b85037dbSmrg]) 461b85037dbSmrg 462b85037dbSmrg 463b85037dbSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 464b85037dbSmrg# ----------------------------------- 465b85037dbSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 466b85037dbSmrg# expand to a commented shell variable setting: 467b85037dbSmrg# 468b85037dbSmrg# # Some comment about what VAR is for. 469b85037dbSmrg# visible_name=$lt_internal_name 470b85037dbSmrgm4_define([_LT_LIBTOOL_DECLARE], 471b85037dbSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 472b85037dbSmrg [description])))[]dnl 473b85037dbSmrgm4_pushdef([_libtool_name], 474b85037dbSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 475b85037dbSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 476b85037dbSmrg [0], [_libtool_name=[$]$1], 477b85037dbSmrg [1], [_libtool_name=$lt_[]$1], 478b85037dbSmrg [2], [_libtool_name=$lt_[]$1], 479b85037dbSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 480b85037dbSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 481b85037dbSmrg]) 482b85037dbSmrg 483b85037dbSmrg 484b85037dbSmrg# _LT_LIBTOOL_CONFIG_VARS 485b85037dbSmrg# ----------------------- 486b85037dbSmrg# Produce commented declarations of non-tagged libtool config variables 487b85037dbSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 488b85037dbSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 489b85037dbSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 490b85037dbSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 491b85037dbSmrg[m4_foreach([_lt_var], 492b85037dbSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 493b85037dbSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 494b85037dbSmrg 495b85037dbSmrg 496b85037dbSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 497b85037dbSmrg# ------------------------- 498b85037dbSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 499b85037dbSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 500b85037dbSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 501b85037dbSmrg 502b85037dbSmrg 503b85037dbSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 504b85037dbSmrg# ------------------------------ 505b85037dbSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 506b85037dbSmrg 507b85037dbSmrg 508b85037dbSmrg# _LT_CONFIG_COMMANDS 509b85037dbSmrg# ------------------- 510b85037dbSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 511b85037dbSmrg# variables for single and double quote escaping we saved from calls 512b85037dbSmrg# to _LT_DECL, we can put quote escaped variables declarations 513b85037dbSmrg# into `config.status', and then the shell code to quote escape them in 514b85037dbSmrg# for loops in `config.status'. Finally, any additional code accumulated 515b85037dbSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 516b85037dbSmrgm4_defun([_LT_CONFIG_COMMANDS], 517b85037dbSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 518b85037dbSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 519b85037dbSmrg dnl instead of duplicating it all over again into config.status, 520b85037dbSmrg dnl then we will have config.status run $CONFIG_LT later, so it 521b85037dbSmrg dnl needs to know what name is stored there: 522b85037dbSmrg [AC_CONFIG_COMMANDS([libtool], 523b85037dbSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 524b85037dbSmrg dnl If the libtool generation code is destined for config.status, 525b85037dbSmrg dnl expand the accumulated commands and init code now: 526b85037dbSmrg [AC_CONFIG_COMMANDS([libtool], 527b85037dbSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 528b85037dbSmrg])#_LT_CONFIG_COMMANDS 529b85037dbSmrg 530b85037dbSmrg 531b85037dbSmrg# Initialize. 532b85037dbSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 533b85037dbSmrg[ 534b85037dbSmrg 535b85037dbSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 536b85037dbSmrg# if CDPATH is set. 537b85037dbSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 538b85037dbSmrg 539b85037dbSmrgsed_quote_subst='$sed_quote_subst' 540b85037dbSmrgdouble_quote_subst='$double_quote_subst' 541b85037dbSmrgdelay_variable_subst='$delay_variable_subst' 542b85037dbSmrg_LT_CONFIG_STATUS_DECLARATIONS 543b85037dbSmrgLTCC='$LTCC' 544b85037dbSmrgLTCFLAGS='$LTCFLAGS' 545b85037dbSmrgcompiler='$compiler_DEFAULT' 546b85037dbSmrg 547b85037dbSmrg# A function that is used when there is no print builtin or printf. 548b85037dbSmrgfunc_fallback_echo () 549b85037dbSmrg{ 550b85037dbSmrg eval 'cat <<_LTECHO_EOF 551b85037dbSmrg\$[]1 552b85037dbSmrg_LTECHO_EOF' 553b85037dbSmrg} 554b85037dbSmrg 555b85037dbSmrg# Quote evaled strings. 556b85037dbSmrgfor var in lt_decl_all_varnames([[ \ 557b85037dbSmrg]], lt_decl_quote_varnames); do 558b85037dbSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 559b85037dbSmrg *[[\\\\\\\`\\"\\\$]]*) 560b85037dbSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 561b85037dbSmrg ;; 562b85037dbSmrg *) 563b85037dbSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 564b85037dbSmrg ;; 565b85037dbSmrg esac 566b85037dbSmrgdone 567b85037dbSmrg 568b85037dbSmrg# Double-quote double-evaled strings. 569b85037dbSmrgfor var in lt_decl_all_varnames([[ \ 570b85037dbSmrg]], lt_decl_dquote_varnames); do 571b85037dbSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 572b85037dbSmrg *[[\\\\\\\`\\"\\\$]]*) 573b85037dbSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 574b85037dbSmrg ;; 575b85037dbSmrg *) 576b85037dbSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 577b85037dbSmrg ;; 578b85037dbSmrg esac 579b85037dbSmrgdone 580b85037dbSmrg 581b85037dbSmrg_LT_OUTPUT_LIBTOOL_INIT 582b85037dbSmrg]) 583b85037dbSmrg 584b85037dbSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 585b85037dbSmrg# ------------------------------------ 586b85037dbSmrg# Generate a child script FILE with all initialization necessary to 587b85037dbSmrg# reuse the environment learned by the parent script, and make the 588b85037dbSmrg# file executable. If COMMENT is supplied, it is inserted after the 589b85037dbSmrg# `#!' sequence but before initialization text begins. After this 590b85037dbSmrg# macro, additional text can be appended to FILE to form the body of 591b85037dbSmrg# the child script. The macro ends with non-zero status if the 592b85037dbSmrg# file could not be fully written (such as if the disk is full). 593b85037dbSmrgm4_ifdef([AS_INIT_GENERATED], 594b85037dbSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 595b85037dbSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 596b85037dbSmrg[m4_require([AS_PREPARE])]dnl 597b85037dbSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 598b85037dbSmrg[lt_write_fail=0 599b85037dbSmrgcat >$1 <<_ASEOF || lt_write_fail=1 600b85037dbSmrg#! $SHELL 601b85037dbSmrg# Generated by $as_me. 602b85037dbSmrg$2 603b85037dbSmrgSHELL=\${CONFIG_SHELL-$SHELL} 604b85037dbSmrgexport SHELL 605b85037dbSmrg_ASEOF 606b85037dbSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 607b85037dbSmrgAS_SHELL_SANITIZE 608b85037dbSmrg_AS_PREPARE 609b85037dbSmrgexec AS_MESSAGE_FD>&1 610b85037dbSmrg_ASEOF 611b85037dbSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 612b85037dbSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 613b85037dbSmrg 614b85037dbSmrg# LT_OUTPUT 615b85037dbSmrg# --------- 616b85037dbSmrg# This macro allows early generation of the libtool script (before 617b85037dbSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 618b85037dbSmrg# tests. 619b85037dbSmrgAC_DEFUN([LT_OUTPUT], 620b85037dbSmrg[: ${CONFIG_LT=./config.lt} 621b85037dbSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 622b85037dbSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 623b85037dbSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 624b85037dbSmrg 625b85037dbSmrgcat >>"$CONFIG_LT" <<\_LTEOF 626b85037dbSmrglt_cl_silent=false 627b85037dbSmrgexec AS_MESSAGE_LOG_FD>>config.log 628b85037dbSmrg{ 629b85037dbSmrg echo 630b85037dbSmrg AS_BOX([Running $as_me.]) 631b85037dbSmrg} >&AS_MESSAGE_LOG_FD 632b85037dbSmrg 633b85037dbSmrglt_cl_help="\ 634b85037dbSmrg\`$as_me' creates a local libtool stub from the current configuration, 635b85037dbSmrgfor use in further configure time tests before the real libtool is 636b85037dbSmrggenerated. 637b85037dbSmrg 638b85037dbSmrgUsage: $[0] [[OPTIONS]] 639b85037dbSmrg 640b85037dbSmrg -h, --help print this help, then exit 641b85037dbSmrg -V, --version print version number, then exit 642b85037dbSmrg -q, --quiet do not print progress messages 643b85037dbSmrg -d, --debug don't remove temporary files 644b85037dbSmrg 645b85037dbSmrgReport bugs to <bug-libtool@gnu.org>." 646b85037dbSmrg 647b85037dbSmrglt_cl_version="\ 648b85037dbSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 649b85037dbSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 650b85037dbSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 651b85037dbSmrg 652b85037dbSmrgCopyright (C) 2010 Free Software Foundation, Inc. 653b85037dbSmrgThis config.lt script is free software; the Free Software Foundation 654b85037dbSmrggives unlimited permision to copy, distribute and modify it." 655b85037dbSmrg 656b85037dbSmrgwhile test $[#] != 0 657b85037dbSmrgdo 658b85037dbSmrg case $[1] in 659b85037dbSmrg --version | --v* | -V ) 660b85037dbSmrg echo "$lt_cl_version"; exit 0 ;; 661b85037dbSmrg --help | --h* | -h ) 662b85037dbSmrg echo "$lt_cl_help"; exit 0 ;; 663b85037dbSmrg --debug | --d* | -d ) 664b85037dbSmrg debug=: ;; 665b85037dbSmrg --quiet | --q* | --silent | --s* | -q ) 666b85037dbSmrg lt_cl_silent=: ;; 667b85037dbSmrg 668b85037dbSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 669b85037dbSmrgTry \`$[0] --help' for more information.]) ;; 670b85037dbSmrg 671b85037dbSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 672b85037dbSmrgTry \`$[0] --help' for more information.]) ;; 673b85037dbSmrg esac 674b85037dbSmrg shift 675b85037dbSmrgdone 676b85037dbSmrg 677b85037dbSmrgif $lt_cl_silent; then 678b85037dbSmrg exec AS_MESSAGE_FD>/dev/null 679b85037dbSmrgfi 680b85037dbSmrg_LTEOF 681b85037dbSmrg 682b85037dbSmrgcat >>"$CONFIG_LT" <<_LTEOF 683b85037dbSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 684b85037dbSmrg_LTEOF 685b85037dbSmrg 686b85037dbSmrgcat >>"$CONFIG_LT" <<\_LTEOF 687b85037dbSmrgAC_MSG_NOTICE([creating $ofile]) 688b85037dbSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 689b85037dbSmrgAS_EXIT(0) 690b85037dbSmrg_LTEOF 691b85037dbSmrgchmod +x "$CONFIG_LT" 692b85037dbSmrg 693b85037dbSmrg# configure is writing to config.log, but config.lt does its own redirection, 694b85037dbSmrg# appending to config.log, which fails on DOS, as config.log is still kept 695b85037dbSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 696b85037dbSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 697b85037dbSmrglt_cl_success=: 698b85037dbSmrgtest "$silent" = yes && 699b85037dbSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 700b85037dbSmrgexec AS_MESSAGE_LOG_FD>/dev/null 701b85037dbSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 702b85037dbSmrgexec AS_MESSAGE_LOG_FD>>config.log 703b85037dbSmrg$lt_cl_success || AS_EXIT(1) 704b85037dbSmrg])# LT_OUTPUT 705b85037dbSmrg 706b85037dbSmrg 707b85037dbSmrg# _LT_CONFIG(TAG) 708b85037dbSmrg# --------------- 709b85037dbSmrg# If TAG is the built-in tag, create an initial libtool script with a 710b85037dbSmrg# default configuration from the untagged config vars. Otherwise add code 711b85037dbSmrg# to config.status for appending the configuration named by TAG from the 712b85037dbSmrg# matching tagged config vars. 713b85037dbSmrgm4_defun([_LT_CONFIG], 714b85037dbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 715b85037dbSmrg_LT_CONFIG_SAVE_COMMANDS([ 716b85037dbSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 717b85037dbSmrg m4_if(_LT_TAG, [C], [ 718b85037dbSmrg # See if we are running on zsh, and set the options which allow our 719b85037dbSmrg # commands through without removal of \ escapes. 720b85037dbSmrg if test -n "${ZSH_VERSION+set}" ; then 721b85037dbSmrg setopt NO_GLOB_SUBST 722b85037dbSmrg fi 723b85037dbSmrg 724b85037dbSmrg cfgfile="${ofile}T" 725b85037dbSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 726b85037dbSmrg $RM "$cfgfile" 727b85037dbSmrg 728b85037dbSmrg cat <<_LT_EOF >> "$cfgfile" 729b85037dbSmrg#! $SHELL 730b85037dbSmrg 731b85037dbSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 732b85037dbSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 733b85037dbSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 734b85037dbSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 735b85037dbSmrg# 736b85037dbSmrg_LT_COPYING 737b85037dbSmrg_LT_LIBTOOL_TAGS 738b85037dbSmrg 739b85037dbSmrg# ### BEGIN LIBTOOL CONFIG 740b85037dbSmrg_LT_LIBTOOL_CONFIG_VARS 741b85037dbSmrg_LT_LIBTOOL_TAG_VARS 742b85037dbSmrg# ### END LIBTOOL CONFIG 743b85037dbSmrg 744b85037dbSmrg_LT_EOF 745b85037dbSmrg 746b85037dbSmrg case $host_os in 747b85037dbSmrg aix3*) 748b85037dbSmrg cat <<\_LT_EOF >> "$cfgfile" 749b85037dbSmrg# AIX sometimes has problems with the GCC collect2 program. For some 750b85037dbSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 751b85037dbSmrg# vanish in a puff of smoke. 752b85037dbSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 753b85037dbSmrg COLLECT_NAMES= 754b85037dbSmrg export COLLECT_NAMES 755b85037dbSmrgfi 756b85037dbSmrg_LT_EOF 757b85037dbSmrg ;; 758b85037dbSmrg esac 759b85037dbSmrg 760b85037dbSmrg _LT_PROG_LTMAIN 761b85037dbSmrg 762b85037dbSmrg # We use sed instead of cat because bash on DJGPP gets confused if 763b85037dbSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 764b85037dbSmrg # text mode, it properly converts lines to CR/LF. This bash problem 765b85037dbSmrg # is reportedly fixed, but why not run on old versions too? 766b85037dbSmrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 767b85037dbSmrg || (rm -f "$cfgfile"; exit 1) 768b85037dbSmrg 769b85037dbSmrg _LT_PROG_XSI_SHELLFNS 770b85037dbSmrg 771b85037dbSmrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 772b85037dbSmrg || (rm -f "$cfgfile"; exit 1) 773b85037dbSmrg 774b85037dbSmrg 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 1091b85037dbSmrg# _LT_SYS_MODULE_PATH_AIX 1092b85037dbSmrg# ----------------------- 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. 1099b85037dbSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1100b85037dbSmrg[m4_require([_LT_DECL_SED])dnl 1101b85037dbSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 1102b85037dbSmrglt_aix_libpath_sed=' 1103b85037dbSmrg /Import File Strings/,/^$/ { 1104b85037dbSmrg /^0/ { 1105b85037dbSmrg s/^0 *\(.*\)$/\1/ 1106b85037dbSmrg p 1107b85037dbSmrg } 1108b85037dbSmrg }' 1109b85037dbSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1110b85037dbSmrg# Check for a 64-bit object if we didn't find anything. 1111b85037dbSmrgif test -z "$aix_libpath"; then 1112b85037dbSmrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1113b85037dbSmrgfi],[]) 1114b85037dbSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 1115b85037dbSmrg])# _LT_SYS_MODULE_PATH_AIX 1116b85037dbSmrg 1117b85037dbSmrg 1118b85037dbSmrg# _LT_SHELL_INIT(ARG) 1119b85037dbSmrg# ------------------- 1120b85037dbSmrgm4_define([_LT_SHELL_INIT], 1121b85037dbSmrg[m4_divert_text([M4SH-INIT], [$1 1122b85037dbSmrg])])# _LT_SHELL_INIT 1123b85037dbSmrg 1124b85037dbSmrg 1125b85037dbSmrg 1126b85037dbSmrg# _LT_PROG_ECHO_BACKSLASH 1127b85037dbSmrg# ----------------------- 1128b85037dbSmrg# Find how we can fake an echo command that does not interpret backslash. 1129b85037dbSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 1130b85037dbSmrg# of the generated configure script which will find a shell with a builtin 1131b85037dbSmrg# printf (which we can use as an echo command). 1132b85037dbSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1133b85037dbSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1134b85037dbSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1135b85037dbSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1136b85037dbSmrg 1137b85037dbSmrgAC_MSG_CHECKING([how to print strings]) 1138b85037dbSmrg# Test print first, because it will be a builtin if present. 1139b85037dbSmrgif test "X`print -r -- -n 2>/dev/null`" = X-n && \ 1140b85037dbSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1141b85037dbSmrg ECHO='print -r --' 1142b85037dbSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1143b85037dbSmrg ECHO='printf %s\n' 1144b85037dbSmrgelse 1145b85037dbSmrg # Use this function as a fallback that always works. 1146b85037dbSmrg func_fallback_echo () 1147b85037dbSmrg { 1148b85037dbSmrg eval 'cat <<_LTECHO_EOF 1149b85037dbSmrg$[]1 1150b85037dbSmrg_LTECHO_EOF' 1151b85037dbSmrg } 1152b85037dbSmrg ECHO='func_fallback_echo' 1153b85037dbSmrgfi 1154b85037dbSmrg 1155b85037dbSmrg# func_echo_all arg... 1156b85037dbSmrg# Invoke $ECHO with all args, space-separated. 1157b85037dbSmrgfunc_echo_all () 1158b85037dbSmrg{ 1159b85037dbSmrg $ECHO "$*" 1160b85037dbSmrg} 1161b85037dbSmrg 1162b85037dbSmrgcase "$ECHO" in 1163b85037dbSmrg printf*) AC_MSG_RESULT([printf]) ;; 1164b85037dbSmrg print*) AC_MSG_RESULT([print -r]) ;; 1165b85037dbSmrg *) AC_MSG_RESULT([cat]) ;; 1166b85037dbSmrgesac 1167b85037dbSmrg 1168b85037dbSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 1169b85037dbSmrg[_AS_DETECT_SUGGESTED([ 1170b85037dbSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1171b85037dbSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1172b85037dbSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1173b85037dbSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1174b85037dbSmrg PATH=/empty FPATH=/empty; export PATH FPATH 1175b85037dbSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1176b85037dbSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1177b85037dbSmrg 1178b85037dbSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1179b85037dbSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1180b85037dbSmrg])# _LT_PROG_ECHO_BACKSLASH 1181b85037dbSmrg 1182b85037dbSmrg 1183b85037dbSmrg# _LT_ENABLE_LOCK 1184b85037dbSmrg# --------------- 1185b85037dbSmrgm4_defun([_LT_ENABLE_LOCK], 1186b85037dbSmrg[AC_ARG_ENABLE([libtool-lock], 1187b85037dbSmrg [AS_HELP_STRING([--disable-libtool-lock], 1188b85037dbSmrg [avoid locking (might break parallel builds)])]) 1189b85037dbSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1190b85037dbSmrg 1191b85037dbSmrg# Some flags need to be propagated to the compiler or linker for good 1192b85037dbSmrg# libtool support. 1193b85037dbSmrgcase $host in 1194b85037dbSmrgia64-*-hpux*) 1195b85037dbSmrg # Find out which ABI we are using. 1196b85037dbSmrg echo 'int i;' > conftest.$ac_ext 1197b85037dbSmrg if AC_TRY_EVAL(ac_compile); then 1198b85037dbSmrg case `/usr/bin/file conftest.$ac_objext` in 1199b85037dbSmrg *ELF-32*) 1200b85037dbSmrg HPUX_IA64_MODE="32" 1201b85037dbSmrg ;; 1202b85037dbSmrg *ELF-64*) 1203b85037dbSmrg HPUX_IA64_MODE="64" 1204b85037dbSmrg ;; 1205b85037dbSmrg esac 1206b85037dbSmrg fi 1207b85037dbSmrg rm -rf conftest* 1208b85037dbSmrg ;; 1209b85037dbSmrg*-*-irix6*) 1210b85037dbSmrg # Find out which ABI we are using. 1211b85037dbSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1212b85037dbSmrg if AC_TRY_EVAL(ac_compile); then 1213b85037dbSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 1214b85037dbSmrg case `/usr/bin/file conftest.$ac_objext` in 1215b85037dbSmrg *32-bit*) 1216b85037dbSmrg LD="${LD-ld} -melf32bsmip" 1217b85037dbSmrg ;; 1218b85037dbSmrg *N32*) 1219b85037dbSmrg LD="${LD-ld} -melf32bmipn32" 1220b85037dbSmrg ;; 1221b85037dbSmrg *64-bit*) 1222b85037dbSmrg LD="${LD-ld} -melf64bmip" 1223b85037dbSmrg ;; 1224b85037dbSmrg esac 1225b85037dbSmrg else 1226b85037dbSmrg case `/usr/bin/file conftest.$ac_objext` in 1227b85037dbSmrg *32-bit*) 1228b85037dbSmrg LD="${LD-ld} -32" 1229b85037dbSmrg ;; 1230b85037dbSmrg *N32*) 1231b85037dbSmrg LD="${LD-ld} -n32" 1232b85037dbSmrg ;; 1233b85037dbSmrg *64-bit*) 1234b85037dbSmrg LD="${LD-ld} -64" 1235b85037dbSmrg ;; 1236b85037dbSmrg esac 1237b85037dbSmrg fi 1238b85037dbSmrg fi 1239b85037dbSmrg rm -rf conftest* 1240b85037dbSmrg ;; 1241b85037dbSmrg 1242b85037dbSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1243b85037dbSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1244b85037dbSmrg # Find out which ABI we are using. 1245b85037dbSmrg echo 'int i;' > conftest.$ac_ext 1246b85037dbSmrg if AC_TRY_EVAL(ac_compile); then 1247b85037dbSmrg case `/usr/bin/file conftest.o` in 1248b85037dbSmrg *32-bit*) 1249b85037dbSmrg case $host in 1250b85037dbSmrg x86_64-*kfreebsd*-gnu) 1251b85037dbSmrg LD="${LD-ld} -m elf_i386_fbsd" 1252b85037dbSmrg ;; 1253b85037dbSmrg x86_64-*linux*) 1254b85037dbSmrg LD="${LD-ld} -m elf_i386" 1255b85037dbSmrg ;; 1256b85037dbSmrg ppc64-*linux*|powerpc64-*linux*) 1257b85037dbSmrg LD="${LD-ld} -m elf32ppclinux" 1258b85037dbSmrg ;; 1259b85037dbSmrg s390x-*linux*) 1260b85037dbSmrg LD="${LD-ld} -m elf_s390" 1261b85037dbSmrg ;; 1262b85037dbSmrg sparc64-*linux*) 1263b85037dbSmrg LD="${LD-ld} -m elf32_sparc" 1264b85037dbSmrg ;; 1265b85037dbSmrg esac 1266b85037dbSmrg ;; 1267b85037dbSmrg *64-bit*) 1268b85037dbSmrg case $host in 1269b85037dbSmrg x86_64-*kfreebsd*-gnu) 1270b85037dbSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 1271b85037dbSmrg ;; 1272b85037dbSmrg x86_64-*linux*) 1273b85037dbSmrg LD="${LD-ld} -m elf_x86_64" 1274b85037dbSmrg ;; 1275b85037dbSmrg ppc*-*linux*|powerpc*-*linux*) 1276b85037dbSmrg LD="${LD-ld} -m elf64ppc" 1277b85037dbSmrg ;; 1278b85037dbSmrg s390*-*linux*|s390*-*tpf*) 1279b85037dbSmrg LD="${LD-ld} -m elf64_s390" 1280b85037dbSmrg ;; 1281b85037dbSmrg sparc*-*linux*) 1282b85037dbSmrg LD="${LD-ld} -m elf64_sparc" 1283b85037dbSmrg ;; 1284b85037dbSmrg esac 1285b85037dbSmrg ;; 1286b85037dbSmrg esac 1287b85037dbSmrg fi 1288b85037dbSmrg rm -rf conftest* 1289b85037dbSmrg ;; 1290b85037dbSmrg 1291b85037dbSmrg*-*-sco3.2v5*) 1292b85037dbSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1293b85037dbSmrg SAVE_CFLAGS="$CFLAGS" 1294b85037dbSmrg CFLAGS="$CFLAGS -belf" 1295b85037dbSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1296b85037dbSmrg [AC_LANG_PUSH(C) 1297b85037dbSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1298b85037dbSmrg AC_LANG_POP]) 1299b85037dbSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1300b85037dbSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1301b85037dbSmrg CFLAGS="$SAVE_CFLAGS" 1302b85037dbSmrg fi 1303b85037dbSmrg ;; 1304b85037dbSmrgsparc*-*solaris*) 1305b85037dbSmrg # Find out which ABI we are using. 1306b85037dbSmrg echo 'int i;' > conftest.$ac_ext 1307b85037dbSmrg if AC_TRY_EVAL(ac_compile); then 1308b85037dbSmrg case `/usr/bin/file conftest.o` in 1309b85037dbSmrg *64-bit*) 1310b85037dbSmrg case $lt_cv_prog_gnu_ld in 1311b85037dbSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 1312b85037dbSmrg *) 1313b85037dbSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1314b85037dbSmrg LD="${LD-ld} -64" 1315b85037dbSmrg fi 1316b85037dbSmrg ;; 1317b85037dbSmrg esac 1318b85037dbSmrg ;; 1319b85037dbSmrg esac 1320b85037dbSmrg fi 1321b85037dbSmrg rm -rf conftest* 1322b85037dbSmrg ;; 1323b85037dbSmrgesac 1324b85037dbSmrg 1325b85037dbSmrgneed_locks="$enable_libtool_lock" 1326b85037dbSmrg])# _LT_ENABLE_LOCK 1327b85037dbSmrg 1328b85037dbSmrg 1329b85037dbSmrg# _LT_CMD_OLD_ARCHIVE 1330b85037dbSmrg# ------------------- 1331b85037dbSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1332b85037dbSmrg[AC_CHECK_TOOL(AR, ar, false) 1333b85037dbSmrgtest -z "$AR" && AR=ar 1334b85037dbSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 1335b85037dbSmrg_LT_DECL([], [AR], [1], [The archiver]) 1336b85037dbSmrg_LT_DECL([], [AR_FLAGS], [1]) 1337b85037dbSmrg 1338b85037dbSmrgAC_CHECK_TOOL(STRIP, strip, :) 1339b85037dbSmrgtest -z "$STRIP" && STRIP=: 1340b85037dbSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1341b85037dbSmrg 1342b85037dbSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1343b85037dbSmrgtest -z "$RANLIB" && RANLIB=: 1344b85037dbSmrg_LT_DECL([], [RANLIB], [1], 1345b85037dbSmrg [Commands used to install an old-style archive]) 1346b85037dbSmrg 1347b85037dbSmrg# Determine commands to create old-style static archives. 1348b85037dbSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1349b85037dbSmrgold_postinstall_cmds='chmod 644 $oldlib' 1350b85037dbSmrgold_postuninstall_cmds= 1351b85037dbSmrg 1352b85037dbSmrgif test -n "$RANLIB"; then 1353b85037dbSmrg case $host_os in 1354b85037dbSmrg openbsd*) 1355b85037dbSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1356b85037dbSmrg ;; 1357b85037dbSmrg *) 1358b85037dbSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1359b85037dbSmrg ;; 1360b85037dbSmrg esac 1361b85037dbSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1362b85037dbSmrgfi 1363b85037dbSmrg 1364b85037dbSmrgcase $host_os in 1365b85037dbSmrg darwin*) 1366b85037dbSmrg lock_old_archive_extraction=yes ;; 1367b85037dbSmrg *) 1368b85037dbSmrg lock_old_archive_extraction=no ;; 1369b85037dbSmrgesac 1370b85037dbSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 1371b85037dbSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1372b85037dbSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 1373b85037dbSmrg [Commands used to build an old-style archive]) 1374b85037dbSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 1375b85037dbSmrg [Whether to use a lock for old archive extraction]) 1376b85037dbSmrg])# _LT_CMD_OLD_ARCHIVE 1377b85037dbSmrg 1378b85037dbSmrg 1379b85037dbSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1380b85037dbSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1381b85037dbSmrg# ---------------------------------------------------------------- 1382b85037dbSmrg# Check whether the given compiler option works 1383b85037dbSmrgAC_DEFUN([_LT_COMPILER_OPTION], 1384b85037dbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1385b85037dbSmrgm4_require([_LT_DECL_SED])dnl 1386b85037dbSmrgAC_CACHE_CHECK([$1], [$2], 1387b85037dbSmrg [$2=no 1388b85037dbSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1389b85037dbSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1390b85037dbSmrg lt_compiler_flag="$3" 1391b85037dbSmrg # Insert the option either (1) after the last *FLAGS variable, or 1392b85037dbSmrg # (2) before a word containing "conftest.", or (3) at the end. 1393b85037dbSmrg # Note that $ac_compile itself does not contain backslashes and begins 1394b85037dbSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1395b85037dbSmrg # The option is referenced via a variable to avoid confusing sed. 1396b85037dbSmrg lt_compile=`echo "$ac_compile" | $SED \ 1397b85037dbSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1398b85037dbSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1399b85037dbSmrg -e 's:$: $lt_compiler_flag:'` 1400b85037dbSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1401b85037dbSmrg (eval "$lt_compile" 2>conftest.err) 1402b85037dbSmrg ac_status=$? 1403b85037dbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1404b85037dbSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1405b85037dbSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 1406b85037dbSmrg # The compiler can only warn and ignore the option if not recognized 1407b85037dbSmrg # So say no if there are warnings other than the usual output. 1408b85037dbSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1409b85037dbSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1410b85037dbSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1411b85037dbSmrg $2=yes 1412b85037dbSmrg fi 1413b85037dbSmrg fi 1414b85037dbSmrg $RM conftest* 1415b85037dbSmrg]) 1416b85037dbSmrg 1417b85037dbSmrgif test x"[$]$2" = xyes; then 1418b85037dbSmrg m4_if([$5], , :, [$5]) 1419b85037dbSmrgelse 1420b85037dbSmrg m4_if([$6], , :, [$6]) 1421b85037dbSmrgfi 1422b85037dbSmrg])# _LT_COMPILER_OPTION 1423b85037dbSmrg 1424b85037dbSmrg# Old name: 1425b85037dbSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1426b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 1427b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1428b85037dbSmrg 1429b85037dbSmrg 1430b85037dbSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1431b85037dbSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1432b85037dbSmrg# ---------------------------------------------------- 1433b85037dbSmrg# Check whether the given linker option works 1434b85037dbSmrgAC_DEFUN([_LT_LINKER_OPTION], 1435b85037dbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1436b85037dbSmrgm4_require([_LT_DECL_SED])dnl 1437b85037dbSmrgAC_CACHE_CHECK([$1], [$2], 1438b85037dbSmrg [$2=no 1439b85037dbSmrg save_LDFLAGS="$LDFLAGS" 1440b85037dbSmrg LDFLAGS="$LDFLAGS $3" 1441b85037dbSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1442b85037dbSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1443b85037dbSmrg # The linker can only warn and ignore the option if not recognized 1444b85037dbSmrg # So say no if there are warnings 1445b85037dbSmrg if test -s conftest.err; then 1446b85037dbSmrg # Append any errors to the config.log. 1447b85037dbSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1448b85037dbSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1449b85037dbSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1450b85037dbSmrg if diff conftest.exp conftest.er2 >/dev/null; then 1451b85037dbSmrg $2=yes 1452b85037dbSmrg fi 1453b85037dbSmrg else 1454b85037dbSmrg $2=yes 1455b85037dbSmrg fi 1456b85037dbSmrg fi 1457b85037dbSmrg $RM -r conftest* 1458b85037dbSmrg LDFLAGS="$save_LDFLAGS" 1459b85037dbSmrg]) 1460b85037dbSmrg 1461b85037dbSmrgif test x"[$]$2" = xyes; then 1462b85037dbSmrg m4_if([$4], , :, [$4]) 1463b85037dbSmrgelse 1464b85037dbSmrg m4_if([$5], , :, [$5]) 1465b85037dbSmrgfi 1466b85037dbSmrg])# _LT_LINKER_OPTION 1467b85037dbSmrg 1468b85037dbSmrg# Old name: 1469b85037dbSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1470b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 1471b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1472b85037dbSmrg 1473b85037dbSmrg 1474b85037dbSmrg# LT_CMD_MAX_LEN 1475b85037dbSmrg#--------------- 1476b85037dbSmrgAC_DEFUN([LT_CMD_MAX_LEN], 1477b85037dbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1478b85037dbSmrg# find the maximum length of command line arguments 1479b85037dbSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1480b85037dbSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1481b85037dbSmrg i=0 1482b85037dbSmrg teststring="ABCD" 1483b85037dbSmrg 1484b85037dbSmrg case $build_os in 1485b85037dbSmrg msdosdjgpp*) 1486b85037dbSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1487b85037dbSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1488b85037dbSmrg # during glob expansion). Even if it were fixed, the result of this 1489b85037dbSmrg # check would be larger than it should be. 1490b85037dbSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1491b85037dbSmrg ;; 1492b85037dbSmrg 1493b85037dbSmrg gnu*) 1494b85037dbSmrg # Under GNU Hurd, this test is not required because there is 1495b85037dbSmrg # no limit to the length of command line arguments. 1496b85037dbSmrg # Libtool will interpret -1 as no limit whatsoever 1497b85037dbSmrg lt_cv_sys_max_cmd_len=-1; 1498b85037dbSmrg ;; 1499b85037dbSmrg 1500b85037dbSmrg cygwin* | mingw* | cegcc*) 1501b85037dbSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1502b85037dbSmrg # about 5 minutes as the teststring grows exponentially. 1503b85037dbSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 1504b85037dbSmrg # you end up with a "frozen" computer, even though with patience 1505b85037dbSmrg # the test eventually succeeds (with a max line length of 256k). 1506b85037dbSmrg # Instead, let's just punt: use the minimum linelength reported by 1507b85037dbSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 1508b85037dbSmrg lt_cv_sys_max_cmd_len=8192; 1509b85037dbSmrg ;; 1510b85037dbSmrg 1511b85037dbSmrg mint*) 1512b85037dbSmrg # On MiNT this can take a long time and run out of memory. 1513b85037dbSmrg lt_cv_sys_max_cmd_len=8192; 1514b85037dbSmrg ;; 1515b85037dbSmrg 1516b85037dbSmrg amigaos*) 1517b85037dbSmrg # On AmigaOS with pdksh, this test takes hours, literally. 1518b85037dbSmrg # So we just punt and use a minimum line length of 8192. 1519b85037dbSmrg lt_cv_sys_max_cmd_len=8192; 1520b85037dbSmrg ;; 1521b85037dbSmrg 1522b85037dbSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1523b85037dbSmrg # This has been around since 386BSD, at least. Likely further. 1524b85037dbSmrg if test -x /sbin/sysctl; then 1525b85037dbSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1526b85037dbSmrg elif test -x /usr/sbin/sysctl; then 1527b85037dbSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1528b85037dbSmrg else 1529b85037dbSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1530b85037dbSmrg fi 1531b85037dbSmrg # And add a safety zone 1532b85037dbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1533b85037dbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1534b85037dbSmrg ;; 1535b85037dbSmrg 1536b85037dbSmrg interix*) 1537b85037dbSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1538b85037dbSmrg lt_cv_sys_max_cmd_len=196608 1539b85037dbSmrg ;; 1540b85037dbSmrg 1541b85037dbSmrg osf*) 1542b85037dbSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1543b85037dbSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1544b85037dbSmrg # nice to cause kernel panics so lets avoid the loop below. 1545b85037dbSmrg # First set a reasonable default. 1546b85037dbSmrg lt_cv_sys_max_cmd_len=16384 1547b85037dbSmrg # 1548b85037dbSmrg if test -x /sbin/sysconfig; then 1549b85037dbSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1550b85037dbSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1551b85037dbSmrg esac 1552b85037dbSmrg fi 1553b85037dbSmrg ;; 1554b85037dbSmrg sco3.2v5*) 1555b85037dbSmrg lt_cv_sys_max_cmd_len=102400 1556b85037dbSmrg ;; 1557b85037dbSmrg sysv5* | sco5v6* | sysv4.2uw2*) 1558b85037dbSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1559b85037dbSmrg if test -n "$kargmax"; then 1560b85037dbSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1561b85037dbSmrg else 1562b85037dbSmrg lt_cv_sys_max_cmd_len=32768 1563b85037dbSmrg fi 1564b85037dbSmrg ;; 1565b85037dbSmrg *) 1566b85037dbSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1567b85037dbSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 1568b85037dbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1569b85037dbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1570b85037dbSmrg else 1571b85037dbSmrg # Make teststring a little bigger before we do anything with it. 1572b85037dbSmrg # a 1K string should be a reasonable start. 1573b85037dbSmrg for i in 1 2 3 4 5 6 7 8 ; do 1574b85037dbSmrg teststring=$teststring$teststring 1575b85037dbSmrg done 1576b85037dbSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1577b85037dbSmrg # If test is not a shell built-in, we'll probably end up computing a 1578b85037dbSmrg # maximum length that is only half of the actual maximum length, but 1579b85037dbSmrg # we can't tell. 1580b85037dbSmrg while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 1581b85037dbSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1582b85037dbSmrg test $i != 17 # 1/2 MB should be enough 1583b85037dbSmrg do 1584b85037dbSmrg i=`expr $i + 1` 1585b85037dbSmrg teststring=$teststring$teststring 1586b85037dbSmrg done 1587b85037dbSmrg # Only check the string length outside the loop. 1588b85037dbSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1589b85037dbSmrg teststring= 1590b85037dbSmrg # Add a significant safety factor because C++ compilers can tack on 1591b85037dbSmrg # massive amounts of additional arguments before passing them to the 1592b85037dbSmrg # linker. It appears as though 1/2 is a usable value. 1593b85037dbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1594b85037dbSmrg fi 1595b85037dbSmrg ;; 1596b85037dbSmrg esac 1597b85037dbSmrg]) 1598b85037dbSmrgif test -n $lt_cv_sys_max_cmd_len ; then 1599b85037dbSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1600b85037dbSmrgelse 1601b85037dbSmrg AC_MSG_RESULT(none) 1602b85037dbSmrgfi 1603b85037dbSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1604b85037dbSmrg_LT_DECL([], [max_cmd_len], [0], 1605b85037dbSmrg [What is the maximum length of a command?]) 1606b85037dbSmrg])# LT_CMD_MAX_LEN 1607b85037dbSmrg 1608b85037dbSmrg# Old name: 1609b85037dbSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1610b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 1611b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1612b85037dbSmrg 1613b85037dbSmrg 1614b85037dbSmrg# _LT_HEADER_DLFCN 1615b85037dbSmrg# ---------------- 1616b85037dbSmrgm4_defun([_LT_HEADER_DLFCN], 1617b85037dbSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1618b85037dbSmrg])# _LT_HEADER_DLFCN 1619b85037dbSmrg 1620b85037dbSmrg 1621b85037dbSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1622b85037dbSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1623b85037dbSmrg# ---------------------------------------------------------------- 1624b85037dbSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 1625b85037dbSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1626b85037dbSmrgif test "$cross_compiling" = yes; then : 1627b85037dbSmrg [$4] 1628b85037dbSmrgelse 1629b85037dbSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1630b85037dbSmrg lt_status=$lt_dlunknown 1631b85037dbSmrg cat > conftest.$ac_ext <<_LT_EOF 1632b85037dbSmrg[#line $LINENO "configure" 1633b85037dbSmrg#include "confdefs.h" 1634b85037dbSmrg 1635b85037dbSmrg#if HAVE_DLFCN_H 1636b85037dbSmrg#include <dlfcn.h> 1637b85037dbSmrg#endif 1638b85037dbSmrg 1639b85037dbSmrg#include <stdio.h> 1640b85037dbSmrg 1641b85037dbSmrg#ifdef RTLD_GLOBAL 1642b85037dbSmrg# define LT_DLGLOBAL RTLD_GLOBAL 1643b85037dbSmrg#else 1644b85037dbSmrg# ifdef DL_GLOBAL 1645b85037dbSmrg# define LT_DLGLOBAL DL_GLOBAL 1646b85037dbSmrg# else 1647b85037dbSmrg# define LT_DLGLOBAL 0 1648b85037dbSmrg# endif 1649b85037dbSmrg#endif 1650b85037dbSmrg 1651b85037dbSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1652b85037dbSmrg find out it does not work in some platform. */ 1653b85037dbSmrg#ifndef LT_DLLAZY_OR_NOW 1654b85037dbSmrg# ifdef RTLD_LAZY 1655b85037dbSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1656b85037dbSmrg# else 1657b85037dbSmrg# ifdef DL_LAZY 1658b85037dbSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 1659b85037dbSmrg# else 1660b85037dbSmrg# ifdef RTLD_NOW 1661b85037dbSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1662b85037dbSmrg# else 1663b85037dbSmrg# ifdef DL_NOW 1664b85037dbSmrg# define LT_DLLAZY_OR_NOW DL_NOW 1665b85037dbSmrg# else 1666b85037dbSmrg# define LT_DLLAZY_OR_NOW 0 1667b85037dbSmrg# endif 1668b85037dbSmrg# endif 1669b85037dbSmrg# endif 1670b85037dbSmrg# endif 1671b85037dbSmrg#endif 1672b85037dbSmrg 1673b85037dbSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 1674b85037dbSmrg correspondingly for the symbols needed. */ 1675b85037dbSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1676b85037dbSmrgvoid fnord () __attribute__((visibility("default"))); 1677b85037dbSmrg#endif 1678b85037dbSmrg 1679b85037dbSmrgvoid fnord () { int i=42; } 1680b85037dbSmrgint main () 1681b85037dbSmrg{ 1682b85037dbSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1683b85037dbSmrg int status = $lt_dlunknown; 1684b85037dbSmrg 1685b85037dbSmrg if (self) 1686b85037dbSmrg { 1687b85037dbSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1688b85037dbSmrg else 1689b85037dbSmrg { 1690b85037dbSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1691b85037dbSmrg else puts (dlerror ()); 1692b85037dbSmrg } 1693b85037dbSmrg /* dlclose (self); */ 1694b85037dbSmrg } 1695b85037dbSmrg else 1696b85037dbSmrg puts (dlerror ()); 1697b85037dbSmrg 1698b85037dbSmrg return status; 1699b85037dbSmrg}] 1700b85037dbSmrg_LT_EOF 1701b85037dbSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1702b85037dbSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1703b85037dbSmrg lt_status=$? 1704b85037dbSmrg case x$lt_status in 1705b85037dbSmrg x$lt_dlno_uscore) $1 ;; 1706b85037dbSmrg x$lt_dlneed_uscore) $2 ;; 1707b85037dbSmrg x$lt_dlunknown|x*) $3 ;; 1708b85037dbSmrg esac 1709b85037dbSmrg else : 1710b85037dbSmrg # compilation failed 1711b85037dbSmrg $3 1712b85037dbSmrg fi 1713b85037dbSmrgfi 1714b85037dbSmrgrm -fr conftest* 1715b85037dbSmrg])# _LT_TRY_DLOPEN_SELF 1716b85037dbSmrg 1717b85037dbSmrg 1718b85037dbSmrg# LT_SYS_DLOPEN_SELF 1719b85037dbSmrg# ------------------ 1720b85037dbSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1721b85037dbSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1722b85037dbSmrgif test "x$enable_dlopen" != xyes; then 1723b85037dbSmrg enable_dlopen=unknown 1724b85037dbSmrg enable_dlopen_self=unknown 1725b85037dbSmrg enable_dlopen_self_static=unknown 1726b85037dbSmrgelse 1727b85037dbSmrg lt_cv_dlopen=no 1728b85037dbSmrg lt_cv_dlopen_libs= 1729b85037dbSmrg 1730b85037dbSmrg case $host_os in 1731b85037dbSmrg beos*) 1732b85037dbSmrg lt_cv_dlopen="load_add_on" 1733b85037dbSmrg lt_cv_dlopen_libs= 1734b85037dbSmrg lt_cv_dlopen_self=yes 1735b85037dbSmrg ;; 1736b85037dbSmrg 1737b85037dbSmrg mingw* | pw32* | cegcc*) 1738b85037dbSmrg lt_cv_dlopen="LoadLibrary" 1739b85037dbSmrg lt_cv_dlopen_libs= 1740b85037dbSmrg ;; 1741b85037dbSmrg 1742b85037dbSmrg cygwin*) 1743b85037dbSmrg lt_cv_dlopen="dlopen" 1744b85037dbSmrg lt_cv_dlopen_libs= 1745b85037dbSmrg ;; 1746b85037dbSmrg 1747b85037dbSmrg darwin*) 1748b85037dbSmrg # if libdl is installed we need to link against it 1749b85037dbSmrg AC_CHECK_LIB([dl], [dlopen], 1750b85037dbSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1751b85037dbSmrg lt_cv_dlopen="dyld" 1752b85037dbSmrg lt_cv_dlopen_libs= 1753b85037dbSmrg lt_cv_dlopen_self=yes 1754b85037dbSmrg ]) 1755b85037dbSmrg ;; 1756b85037dbSmrg 1757b85037dbSmrg *) 1758b85037dbSmrg AC_CHECK_FUNC([shl_load], 1759b85037dbSmrg [lt_cv_dlopen="shl_load"], 1760b85037dbSmrg [AC_CHECK_LIB([dld], [shl_load], 1761b85037dbSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1762b85037dbSmrg [AC_CHECK_FUNC([dlopen], 1763b85037dbSmrg [lt_cv_dlopen="dlopen"], 1764b85037dbSmrg [AC_CHECK_LIB([dl], [dlopen], 1765b85037dbSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1766b85037dbSmrg [AC_CHECK_LIB([svld], [dlopen], 1767b85037dbSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1768b85037dbSmrg [AC_CHECK_LIB([dld], [dld_link], 1769b85037dbSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1770b85037dbSmrg ]) 1771b85037dbSmrg ]) 1772b85037dbSmrg ]) 1773b85037dbSmrg ]) 1774b85037dbSmrg ]) 1775b85037dbSmrg ;; 1776b85037dbSmrg esac 1777b85037dbSmrg 1778b85037dbSmrg if test "x$lt_cv_dlopen" != xno; then 1779b85037dbSmrg enable_dlopen=yes 1780b85037dbSmrg else 1781b85037dbSmrg enable_dlopen=no 1782b85037dbSmrg fi 1783b85037dbSmrg 1784b85037dbSmrg case $lt_cv_dlopen in 1785b85037dbSmrg dlopen) 1786b85037dbSmrg save_CPPFLAGS="$CPPFLAGS" 1787b85037dbSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1788b85037dbSmrg 1789b85037dbSmrg save_LDFLAGS="$LDFLAGS" 1790b85037dbSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1791b85037dbSmrg 1792b85037dbSmrg save_LIBS="$LIBS" 1793b85037dbSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 1794b85037dbSmrg 1795b85037dbSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 1796b85037dbSmrg lt_cv_dlopen_self, [dnl 1797b85037dbSmrg _LT_TRY_DLOPEN_SELF( 1798b85037dbSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1799b85037dbSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1800b85037dbSmrg ]) 1801b85037dbSmrg 1802b85037dbSmrg if test "x$lt_cv_dlopen_self" = xyes; then 1803b85037dbSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1804b85037dbSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1805b85037dbSmrg lt_cv_dlopen_self_static, [dnl 1806b85037dbSmrg _LT_TRY_DLOPEN_SELF( 1807b85037dbSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1808b85037dbSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1809b85037dbSmrg ]) 1810b85037dbSmrg fi 1811b85037dbSmrg 1812b85037dbSmrg CPPFLAGS="$save_CPPFLAGS" 1813b85037dbSmrg LDFLAGS="$save_LDFLAGS" 1814b85037dbSmrg LIBS="$save_LIBS" 1815b85037dbSmrg ;; 1816b85037dbSmrg esac 1817b85037dbSmrg 1818b85037dbSmrg case $lt_cv_dlopen_self in 1819b85037dbSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1820b85037dbSmrg *) enable_dlopen_self=unknown ;; 1821b85037dbSmrg esac 1822b85037dbSmrg 1823b85037dbSmrg case $lt_cv_dlopen_self_static in 1824b85037dbSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1825b85037dbSmrg *) enable_dlopen_self_static=unknown ;; 1826b85037dbSmrg esac 1827b85037dbSmrgfi 1828b85037dbSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1829b85037dbSmrg [Whether dlopen is supported]) 1830b85037dbSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1831b85037dbSmrg [Whether dlopen of programs is supported]) 1832b85037dbSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1833b85037dbSmrg [Whether dlopen of statically linked programs is supported]) 1834b85037dbSmrg])# LT_SYS_DLOPEN_SELF 1835b85037dbSmrg 1836b85037dbSmrg# Old name: 1837b85037dbSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1838b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 1839b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1840b85037dbSmrg 1841b85037dbSmrg 1842b85037dbSmrg# _LT_COMPILER_C_O([TAGNAME]) 1843b85037dbSmrg# --------------------------- 1844b85037dbSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 1845b85037dbSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1846b85037dbSmrgm4_defun([_LT_COMPILER_C_O], 1847b85037dbSmrg[m4_require([_LT_DECL_SED])dnl 1848b85037dbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1849b85037dbSmrgm4_require([_LT_TAG_COMPILER])dnl 1850b85037dbSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1851b85037dbSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1852b85037dbSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1853b85037dbSmrg $RM -r conftest 2>/dev/null 1854b85037dbSmrg mkdir conftest 1855b85037dbSmrg cd conftest 1856b85037dbSmrg mkdir out 1857b85037dbSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1858b85037dbSmrg 1859b85037dbSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1860b85037dbSmrg # Insert the option either (1) after the last *FLAGS variable, or 1861b85037dbSmrg # (2) before a word containing "conftest.", or (3) at the end. 1862b85037dbSmrg # Note that $ac_compile itself does not contain backslashes and begins 1863b85037dbSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1864b85037dbSmrg lt_compile=`echo "$ac_compile" | $SED \ 1865b85037dbSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1866b85037dbSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1867b85037dbSmrg -e 's:$: $lt_compiler_flag:'` 1868b85037dbSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1869b85037dbSmrg (eval "$lt_compile" 2>out/conftest.err) 1870b85037dbSmrg ac_status=$? 1871b85037dbSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 1872b85037dbSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1873b85037dbSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 1874b85037dbSmrg then 1875b85037dbSmrg # The compiler can only warn and ignore the option if not recognized 1876b85037dbSmrg # So say no if there are warnings 1877b85037dbSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 1878b85037dbSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1879b85037dbSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1880b85037dbSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1881b85037dbSmrg fi 1882b85037dbSmrg fi 1883b85037dbSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1884b85037dbSmrg $RM conftest* 1885b85037dbSmrg # SGI C++ compiler will create directory out/ii_files/ for 1886b85037dbSmrg # template instantiation 1887b85037dbSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 1888b85037dbSmrg $RM out/* && rmdir out 1889b85037dbSmrg cd .. 1890b85037dbSmrg $RM -r conftest 1891b85037dbSmrg $RM conftest* 1892b85037dbSmrg]) 1893b85037dbSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 1894b85037dbSmrg [Does compiler simultaneously support -c and -o options?]) 1895b85037dbSmrg])# _LT_COMPILER_C_O 1896b85037dbSmrg 1897b85037dbSmrg 1898b85037dbSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 1899b85037dbSmrg# ---------------------------------- 1900b85037dbSmrg# Check to see if we can do hard links to lock some files if needed 1901b85037dbSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 1902b85037dbSmrg[m4_require([_LT_ENABLE_LOCK])dnl 1903b85037dbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1904b85037dbSmrg_LT_COMPILER_C_O([$1]) 1905b85037dbSmrg 1906b85037dbSmrghard_links="nottested" 1907b85037dbSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1908b85037dbSmrg # do not overwrite the value of need_locks provided by the user 1909b85037dbSmrg AC_MSG_CHECKING([if we can lock with hard links]) 1910b85037dbSmrg hard_links=yes 1911b85037dbSmrg $RM conftest* 1912b85037dbSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1913b85037dbSmrg touch conftest.a 1914b85037dbSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 1915b85037dbSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1916b85037dbSmrg AC_MSG_RESULT([$hard_links]) 1917b85037dbSmrg if test "$hard_links" = no; then 1918b85037dbSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1919b85037dbSmrg need_locks=warn 1920b85037dbSmrg fi 1921b85037dbSmrgelse 1922b85037dbSmrg need_locks=no 1923b85037dbSmrgfi 1924b85037dbSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 1925b85037dbSmrg])# _LT_COMPILER_FILE_LOCKS 1926b85037dbSmrg 1927b85037dbSmrg 1928b85037dbSmrg# _LT_CHECK_OBJDIR 1929b85037dbSmrg# ---------------- 1930b85037dbSmrgm4_defun([_LT_CHECK_OBJDIR], 1931b85037dbSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1932b85037dbSmrg[rm -f .libs 2>/dev/null 1933b85037dbSmrgmkdir .libs 2>/dev/null 1934b85037dbSmrgif test -d .libs; then 1935b85037dbSmrg lt_cv_objdir=.libs 1936b85037dbSmrgelse 1937b85037dbSmrg # MS-DOS does not allow filenames that begin with a dot. 1938b85037dbSmrg lt_cv_objdir=_libs 1939b85037dbSmrgfi 1940b85037dbSmrgrmdir .libs 2>/dev/null]) 1941b85037dbSmrgobjdir=$lt_cv_objdir 1942b85037dbSmrg_LT_DECL([], [objdir], [0], 1943b85037dbSmrg [The name of the directory that contains temporary libtool files])dnl 1944b85037dbSmrgm4_pattern_allow([LT_OBJDIR])dnl 1945b85037dbSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 1946b85037dbSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 1947b85037dbSmrg])# _LT_CHECK_OBJDIR 1948b85037dbSmrg 1949b85037dbSmrg 1950b85037dbSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 1951b85037dbSmrg# -------------------------------------- 1952b85037dbSmrg# Check hardcoding attributes. 1953b85037dbSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 1954b85037dbSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1955b85037dbSmrg_LT_TAGVAR(hardcode_action, $1)= 1956b85037dbSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 1957b85037dbSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 1958b85037dbSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1959b85037dbSmrg 1960b85037dbSmrg # We can hardcode non-existent directories. 1961b85037dbSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 1962b85037dbSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 1963b85037dbSmrg # have to relink, otherwise we might link with an installed library 1964b85037dbSmrg # when we should be linking with a yet-to-be-installed one 1965b85037dbSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1966b85037dbSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 1967b85037dbSmrg # Linking always hardcodes the temporary library directory. 1968b85037dbSmrg _LT_TAGVAR(hardcode_action, $1)=relink 1969b85037dbSmrg else 1970b85037dbSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1971b85037dbSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 1972b85037dbSmrg fi 1973b85037dbSmrgelse 1974b85037dbSmrg # We cannot hardcode anything, or else we can only hardcode existing 1975b85037dbSmrg # directories. 1976b85037dbSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 1977b85037dbSmrgfi 1978b85037dbSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 1979b85037dbSmrg 1980b85037dbSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 1981b85037dbSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 1982b85037dbSmrg # Fast installation is not supported 1983b85037dbSmrg enable_fast_install=no 1984b85037dbSmrgelif test "$shlibpath_overrides_runpath" = yes || 1985b85037dbSmrg test "$enable_shared" = no; then 1986b85037dbSmrg # Fast installation is not necessary 1987b85037dbSmrg enable_fast_install=needless 1988b85037dbSmrgfi 1989b85037dbSmrg_LT_TAGDECL([], [hardcode_action], [0], 1990b85037dbSmrg [How to hardcode a shared library path into an executable]) 1991b85037dbSmrg])# _LT_LINKER_HARDCODE_LIBPATH 1992b85037dbSmrg 1993b85037dbSmrg 1994b85037dbSmrg# _LT_CMD_STRIPLIB 1995b85037dbSmrg# ---------------- 1996b85037dbSmrgm4_defun([_LT_CMD_STRIPLIB], 1997b85037dbSmrg[m4_require([_LT_DECL_EGREP]) 1998b85037dbSmrgstriplib= 1999b85037dbSmrgold_striplib= 2000b85037dbSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2001b85037dbSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2002b85037dbSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2003b85037dbSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2004b85037dbSmrg AC_MSG_RESULT([yes]) 2005b85037dbSmrgelse 2006b85037dbSmrg# FIXME - insert some real tests, host_os isn't really good enough 2007b85037dbSmrg case $host_os in 2008b85037dbSmrg darwin*) 2009b85037dbSmrg if test -n "$STRIP" ; then 2010b85037dbSmrg striplib="$STRIP -x" 2011b85037dbSmrg old_striplib="$STRIP -S" 2012b85037dbSmrg AC_MSG_RESULT([yes]) 2013b85037dbSmrg else 2014b85037dbSmrg AC_MSG_RESULT([no]) 2015b85037dbSmrg fi 2016b85037dbSmrg ;; 2017b85037dbSmrg *) 2018b85037dbSmrg AC_MSG_RESULT([no]) 2019b85037dbSmrg ;; 2020b85037dbSmrg esac 2021b85037dbSmrgfi 2022b85037dbSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2023b85037dbSmrg_LT_DECL([], [striplib], [1]) 2024b85037dbSmrg])# _LT_CMD_STRIPLIB 2025b85037dbSmrg 2026b85037dbSmrg 2027b85037dbSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2028b85037dbSmrg# ----------------------------- 2029b85037dbSmrg# PORTME Fill in your ld.so characteristics 2030b85037dbSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2031b85037dbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2032b85037dbSmrgm4_require([_LT_DECL_EGREP])dnl 2033b85037dbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2034b85037dbSmrgm4_require([_LT_DECL_OBJDUMP])dnl 2035b85037dbSmrgm4_require([_LT_DECL_SED])dnl 2036b85037dbSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2037b85037dbSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2038b85037dbSmrgm4_if([$1], 2039b85037dbSmrg [], [ 2040b85037dbSmrgif test "$GCC" = yes; then 2041b85037dbSmrg case $host_os in 2042b85037dbSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2043b85037dbSmrg *) lt_awk_arg="/^libraries:/" ;; 2044b85037dbSmrg esac 2045b85037dbSmrg case $host_os in 2046b85037dbSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2047b85037dbSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 2048b85037dbSmrg esac 2049b85037dbSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2050b85037dbSmrg case $lt_search_path_spec in 2051b85037dbSmrg *\;*) 2052b85037dbSmrg # if the path contains ";" then we assume it to be the separator 2053b85037dbSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2054b85037dbSmrg # assumed that no part of a normal pathname contains ";" but that should 2055b85037dbSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2056b85037dbSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2057b85037dbSmrg ;; 2058b85037dbSmrg *) 2059b85037dbSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2060b85037dbSmrg ;; 2061b85037dbSmrg esac 2062b85037dbSmrg # Ok, now we have the path, separated by spaces, we can step through it 2063b85037dbSmrg # and add multilib dir if necessary. 2064b85037dbSmrg lt_tmp_lt_search_path_spec= 2065b85037dbSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2066b85037dbSmrg for lt_sys_path in $lt_search_path_spec; do 2067b85037dbSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2068b85037dbSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2069b85037dbSmrg else 2070b85037dbSmrg test -d "$lt_sys_path" && \ 2071b85037dbSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2072b85037dbSmrg fi 2073b85037dbSmrg done 2074b85037dbSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2075b85037dbSmrgBEGIN {RS=" "; FS="/|\n";} { 2076b85037dbSmrg lt_foo=""; 2077b85037dbSmrg lt_count=0; 2078b85037dbSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 2079b85037dbSmrg if ($lt_i != "" && $lt_i != ".") { 2080b85037dbSmrg if ($lt_i == "..") { 2081b85037dbSmrg lt_count++; 2082b85037dbSmrg } else { 2083b85037dbSmrg if (lt_count == 0) { 2084b85037dbSmrg lt_foo="/" $lt_i lt_foo; 2085b85037dbSmrg } else { 2086b85037dbSmrg lt_count--; 2087b85037dbSmrg } 2088b85037dbSmrg } 2089b85037dbSmrg } 2090b85037dbSmrg } 2091b85037dbSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2092b85037dbSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2093b85037dbSmrg}'` 2094b85037dbSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 2095b85037dbSmrg # for these hosts. 2096b85037dbSmrg case $host_os in 2097b85037dbSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2098b85037dbSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2099b85037dbSmrg esac 2100b85037dbSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2101b85037dbSmrgelse 2102b85037dbSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2103b85037dbSmrgfi]) 2104b85037dbSmrglibrary_names_spec= 2105b85037dbSmrglibname_spec='lib$name' 2106b85037dbSmrgsoname_spec= 2107b85037dbSmrgshrext_cmds=".so" 2108b85037dbSmrgpostinstall_cmds= 2109b85037dbSmrgpostuninstall_cmds= 2110b85037dbSmrgfinish_cmds= 2111b85037dbSmrgfinish_eval= 2112b85037dbSmrgshlibpath_var= 2113b85037dbSmrgshlibpath_overrides_runpath=unknown 2114b85037dbSmrgversion_type=none 2115b85037dbSmrgdynamic_linker="$host_os ld.so" 2116b85037dbSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2117b85037dbSmrgneed_lib_prefix=unknown 2118b85037dbSmrghardcode_into_libs=no 2119b85037dbSmrg 2120b85037dbSmrg# when you set need_version to no, make sure it does not cause -set_version 2121b85037dbSmrg# flags to be left without arguments 2122b85037dbSmrgneed_version=unknown 2123b85037dbSmrg 2124b85037dbSmrgcase $host_os in 2125b85037dbSmrgaix3*) 2126b85037dbSmrg version_type=linux 2127b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2128b85037dbSmrg shlibpath_var=LIBPATH 2129b85037dbSmrg 2130b85037dbSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2131b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2132b85037dbSmrg ;; 2133b85037dbSmrg 2134b85037dbSmrgaix[[4-9]]*) 2135b85037dbSmrg version_type=linux 2136b85037dbSmrg need_lib_prefix=no 2137b85037dbSmrg need_version=no 2138b85037dbSmrg hardcode_into_libs=yes 2139b85037dbSmrg if test "$host_cpu" = ia64; then 2140b85037dbSmrg # AIX 5 supports IA64 2141b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2142b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2143b85037dbSmrg else 2144b85037dbSmrg # With GCC up to 2.95.x, collect2 would create an import file 2145b85037dbSmrg # for dependence libraries. The import file would start with 2146b85037dbSmrg # the line `#! .'. This would cause the generated library to 2147b85037dbSmrg # depend on `.', always an invalid library. This was fixed in 2148b85037dbSmrg # development snapshots of GCC prior to 3.0. 2149b85037dbSmrg case $host_os in 2150b85037dbSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2151b85037dbSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2152b85037dbSmrg echo ' yes ' 2153b85037dbSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2154b85037dbSmrg : 2155b85037dbSmrg else 2156b85037dbSmrg can_build_shared=no 2157b85037dbSmrg fi 2158b85037dbSmrg ;; 2159b85037dbSmrg esac 2160b85037dbSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2161b85037dbSmrg # soname into executable. Probably we can add versioning support to 2162b85037dbSmrg # collect2, so additional links can be useful in future. 2163b85037dbSmrg if test "$aix_use_runtimelinking" = yes; then 2164b85037dbSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2165b85037dbSmrg # instead of lib<name>.a to let people know that these are not 2166b85037dbSmrg # typical AIX shared libraries. 2167b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2168b85037dbSmrg else 2169b85037dbSmrg # We preserve .a as extension for shared libraries through AIX4.2 2170b85037dbSmrg # and later when we are not doing run time linking. 2171b85037dbSmrg library_names_spec='${libname}${release}.a $libname.a' 2172b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2173b85037dbSmrg fi 2174b85037dbSmrg shlibpath_var=LIBPATH 2175b85037dbSmrg fi 2176b85037dbSmrg ;; 2177b85037dbSmrg 2178b85037dbSmrgamigaos*) 2179b85037dbSmrg case $host_cpu in 2180b85037dbSmrg powerpc) 2181b85037dbSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2182b85037dbSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2183b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2184b85037dbSmrg ;; 2185b85037dbSmrg m68k) 2186b85037dbSmrg library_names_spec='$libname.ixlibrary $libname.a' 2187b85037dbSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2188b85037dbSmrg 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' 2189b85037dbSmrg ;; 2190b85037dbSmrg esac 2191b85037dbSmrg ;; 2192b85037dbSmrg 2193b85037dbSmrgbeos*) 2194b85037dbSmrg library_names_spec='${libname}${shared_ext}' 2195b85037dbSmrg dynamic_linker="$host_os ld.so" 2196b85037dbSmrg shlibpath_var=LIBRARY_PATH 2197b85037dbSmrg ;; 2198b85037dbSmrg 2199b85037dbSmrgbsdi[[45]]*) 2200b85037dbSmrg version_type=linux 2201b85037dbSmrg need_version=no 2202b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2203b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2204b85037dbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2205b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2206b85037dbSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2207b85037dbSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2208b85037dbSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2209b85037dbSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2210b85037dbSmrg # libtool to hard-code these into programs 2211b85037dbSmrg ;; 2212b85037dbSmrg 2213b85037dbSmrgcygwin* | mingw* | pw32* | cegcc*) 2214b85037dbSmrg version_type=windows 2215b85037dbSmrg shrext_cmds=".dll" 2216b85037dbSmrg need_version=no 2217b85037dbSmrg need_lib_prefix=no 2218b85037dbSmrg 2219b85037dbSmrg case $GCC,$host_os in 2220b85037dbSmrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 2221b85037dbSmrg library_names_spec='$libname.dll.a' 2222b85037dbSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2223b85037dbSmrg postinstall_cmds='base_file=`basename \${file}`~ 2224b85037dbSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2225b85037dbSmrg dldir=$destdir/`dirname \$dlpath`~ 2226b85037dbSmrg test -d \$dldir || mkdir -p \$dldir~ 2227b85037dbSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2228b85037dbSmrg chmod a+x \$dldir/$dlname~ 2229b85037dbSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2230b85037dbSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2231b85037dbSmrg fi' 2232b85037dbSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2233b85037dbSmrg dlpath=$dir/\$dldll~ 2234b85037dbSmrg $RM \$dlpath' 2235b85037dbSmrg shlibpath_overrides_runpath=yes 2236b85037dbSmrg 2237b85037dbSmrg case $host_os in 2238b85037dbSmrg cygwin*) 2239b85037dbSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2240b85037dbSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2241b85037dbSmrgm4_if([$1], [],[ 2242b85037dbSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2243b85037dbSmrg ;; 2244b85037dbSmrg mingw* | cegcc*) 2245b85037dbSmrg # MinGW DLLs use traditional 'lib' prefix 2246b85037dbSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2247b85037dbSmrg ;; 2248b85037dbSmrg pw32*) 2249b85037dbSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2250b85037dbSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2251b85037dbSmrg ;; 2252b85037dbSmrg esac 2253b85037dbSmrg ;; 2254b85037dbSmrg 2255b85037dbSmrg *) 2256b85037dbSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2257b85037dbSmrg ;; 2258b85037dbSmrg esac 2259b85037dbSmrg dynamic_linker='Win32 ld.exe' 2260b85037dbSmrg # FIXME: first we should search . and the directory the executable is in 2261b85037dbSmrg shlibpath_var=PATH 2262b85037dbSmrg ;; 2263b85037dbSmrg 2264b85037dbSmrgdarwin* | rhapsody*) 2265b85037dbSmrg dynamic_linker="$host_os dyld" 2266b85037dbSmrg version_type=darwin 2267b85037dbSmrg need_lib_prefix=no 2268b85037dbSmrg need_version=no 2269b85037dbSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2270b85037dbSmrg soname_spec='${libname}${release}${major}$shared_ext' 2271b85037dbSmrg shlibpath_overrides_runpath=yes 2272b85037dbSmrg shlibpath_var=DYLD_LIBRARY_PATH 2273b85037dbSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2274b85037dbSmrgm4_if([$1], [],[ 2275b85037dbSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2276b85037dbSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2277b85037dbSmrg ;; 2278b85037dbSmrg 2279b85037dbSmrgdgux*) 2280b85037dbSmrg version_type=linux 2281b85037dbSmrg need_lib_prefix=no 2282b85037dbSmrg need_version=no 2283b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2284b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2285b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2286b85037dbSmrg ;; 2287b85037dbSmrg 2288b85037dbSmrgfreebsd1*) 2289b85037dbSmrg dynamic_linker=no 2290b85037dbSmrg ;; 2291b85037dbSmrg 2292b85037dbSmrgfreebsd* | dragonfly*) 2293b85037dbSmrg # DragonFly does not have aout. When/if they implement a new 2294b85037dbSmrg # versioning mechanism, adjust this. 2295b85037dbSmrg if test -x /usr/bin/objformat; then 2296b85037dbSmrg objformat=`/usr/bin/objformat` 2297b85037dbSmrg else 2298b85037dbSmrg case $host_os in 2299b85037dbSmrg freebsd[[123]]*) objformat=aout ;; 2300b85037dbSmrg *) objformat=elf ;; 2301b85037dbSmrg esac 2302b85037dbSmrg fi 2303b85037dbSmrg version_type=freebsd-$objformat 2304b85037dbSmrg case $version_type in 2305b85037dbSmrg freebsd-elf*) 2306b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2307b85037dbSmrg need_version=no 2308b85037dbSmrg need_lib_prefix=no 2309b85037dbSmrg ;; 2310b85037dbSmrg freebsd-*) 2311b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2312b85037dbSmrg need_version=yes 2313b85037dbSmrg ;; 2314b85037dbSmrg esac 2315b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2316b85037dbSmrg case $host_os in 2317b85037dbSmrg freebsd2*) 2318b85037dbSmrg shlibpath_overrides_runpath=yes 2319b85037dbSmrg ;; 2320b85037dbSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2321b85037dbSmrg shlibpath_overrides_runpath=yes 2322b85037dbSmrg hardcode_into_libs=yes 2323b85037dbSmrg ;; 2324b85037dbSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2325b85037dbSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2326b85037dbSmrg shlibpath_overrides_runpath=no 2327b85037dbSmrg hardcode_into_libs=yes 2328b85037dbSmrg ;; 2329b85037dbSmrg *) # from 4.6 on, and DragonFly 2330b85037dbSmrg shlibpath_overrides_runpath=yes 2331b85037dbSmrg hardcode_into_libs=yes 2332b85037dbSmrg ;; 2333b85037dbSmrg esac 2334b85037dbSmrg ;; 2335b85037dbSmrg 2336b85037dbSmrggnu*) 2337b85037dbSmrg version_type=linux 2338b85037dbSmrg need_lib_prefix=no 2339b85037dbSmrg need_version=no 2340b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2341b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2342b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2343b85037dbSmrg hardcode_into_libs=yes 2344b85037dbSmrg ;; 2345b85037dbSmrg 2346b85037dbSmrghaiku*) 2347b85037dbSmrg version_type=linux 2348b85037dbSmrg need_lib_prefix=no 2349b85037dbSmrg need_version=no 2350b85037dbSmrg dynamic_linker="$host_os runtime_loader" 2351b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2352b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2353b85037dbSmrg shlibpath_var=LIBRARY_PATH 2354b85037dbSmrg shlibpath_overrides_runpath=yes 2355b85037dbSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2356b85037dbSmrg hardcode_into_libs=yes 2357b85037dbSmrg ;; 2358b85037dbSmrg 2359b85037dbSmrghpux9* | hpux10* | hpux11*) 2360b85037dbSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2361b85037dbSmrg # link against other versions. 2362b85037dbSmrg version_type=sunos 2363b85037dbSmrg need_lib_prefix=no 2364b85037dbSmrg need_version=no 2365b85037dbSmrg case $host_cpu in 2366b85037dbSmrg ia64*) 2367b85037dbSmrg shrext_cmds='.so' 2368b85037dbSmrg hardcode_into_libs=yes 2369b85037dbSmrg dynamic_linker="$host_os dld.so" 2370b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2371b85037dbSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2372b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2373b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2374b85037dbSmrg if test "X$HPUX_IA64_MODE" = X32; then 2375b85037dbSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2376b85037dbSmrg else 2377b85037dbSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2378b85037dbSmrg fi 2379b85037dbSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2380b85037dbSmrg ;; 2381b85037dbSmrg hppa*64*) 2382b85037dbSmrg shrext_cmds='.sl' 2383b85037dbSmrg hardcode_into_libs=yes 2384b85037dbSmrg dynamic_linker="$host_os dld.sl" 2385b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2386b85037dbSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2387b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2388b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2389b85037dbSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2390b85037dbSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2391b85037dbSmrg ;; 2392b85037dbSmrg *) 2393b85037dbSmrg shrext_cmds='.sl' 2394b85037dbSmrg dynamic_linker="$host_os dld.sl" 2395b85037dbSmrg shlibpath_var=SHLIB_PATH 2396b85037dbSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2397b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2398b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2399b85037dbSmrg ;; 2400b85037dbSmrg esac 2401b85037dbSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2402b85037dbSmrg postinstall_cmds='chmod 555 $lib' 2403b85037dbSmrg # or fails outright, so override atomically: 2404b85037dbSmrg install_override_mode=555 2405b85037dbSmrg ;; 2406b85037dbSmrg 2407b85037dbSmrginterix[[3-9]]*) 2408b85037dbSmrg version_type=linux 2409b85037dbSmrg need_lib_prefix=no 2410b85037dbSmrg need_version=no 2411b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2412b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2413b85037dbSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2414b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2415b85037dbSmrg shlibpath_overrides_runpath=no 2416b85037dbSmrg hardcode_into_libs=yes 2417b85037dbSmrg ;; 2418b85037dbSmrg 2419b85037dbSmrgirix5* | irix6* | nonstopux*) 2420b85037dbSmrg case $host_os in 2421b85037dbSmrg nonstopux*) version_type=nonstopux ;; 2422b85037dbSmrg *) 2423b85037dbSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 2424b85037dbSmrg version_type=linux 2425b85037dbSmrg else 2426b85037dbSmrg version_type=irix 2427b85037dbSmrg fi ;; 2428b85037dbSmrg esac 2429b85037dbSmrg need_lib_prefix=no 2430b85037dbSmrg need_version=no 2431b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2432b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2433b85037dbSmrg case $host_os in 2434b85037dbSmrg irix5* | nonstopux*) 2435b85037dbSmrg libsuff= shlibsuff= 2436b85037dbSmrg ;; 2437b85037dbSmrg *) 2438b85037dbSmrg case $LD in # libtool.m4 will add one of these switches to LD 2439b85037dbSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2440b85037dbSmrg libsuff= shlibsuff= libmagic=32-bit;; 2441b85037dbSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2442b85037dbSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2443b85037dbSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2444b85037dbSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2445b85037dbSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2446b85037dbSmrg esac 2447b85037dbSmrg ;; 2448b85037dbSmrg esac 2449b85037dbSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2450b85037dbSmrg shlibpath_overrides_runpath=no 2451b85037dbSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2452b85037dbSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2453b85037dbSmrg hardcode_into_libs=yes 2454b85037dbSmrg ;; 2455b85037dbSmrg 2456b85037dbSmrg# No shared lib support for Linux oldld, aout, or coff. 2457b85037dbSmrglinux*oldld* | linux*aout* | linux*coff*) 2458b85037dbSmrg dynamic_linker=no 2459b85037dbSmrg ;; 2460b85037dbSmrg 2461b85037dbSmrg# This must be Linux ELF. 2462b85037dbSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 2463b85037dbSmrg version_type=linux 2464b85037dbSmrg need_lib_prefix=no 2465b85037dbSmrg need_version=no 2466b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2467b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2468b85037dbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2469b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2470b85037dbSmrg shlibpath_overrides_runpath=no 2471b85037dbSmrg 2472b85037dbSmrg # Some binutils ld are patched to set DT_RUNPATH 2473b85037dbSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2474b85037dbSmrg [lt_cv_shlibpath_overrides_runpath=no 2475b85037dbSmrg save_LDFLAGS=$LDFLAGS 2476b85037dbSmrg save_libdir=$libdir 2477b85037dbSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2478b85037dbSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2479b85037dbSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2480b85037dbSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2481b85037dbSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2482b85037dbSmrg LDFLAGS=$save_LDFLAGS 2483b85037dbSmrg libdir=$save_libdir 2484b85037dbSmrg ]) 2485b85037dbSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2486b85037dbSmrg 2487b85037dbSmrg # This implies no fast_install, which is unacceptable. 2488b85037dbSmrg # Some rework will be needed to allow for fast_install 2489b85037dbSmrg # before this can be enabled. 2490b85037dbSmrg hardcode_into_libs=yes 2491b85037dbSmrg 2492b85037dbSmrg # Add ABI-specific directories to the system library path. 2493b85037dbSmrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2494b85037dbSmrg 2495b85037dbSmrg # Append ld.so.conf contents to the search path 2496b85037dbSmrg if test -f /etc/ld.so.conf; then 2497b85037dbSmrg 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' ' '` 2498b85037dbSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2499b85037dbSmrg 2500b85037dbSmrg fi 2501b85037dbSmrg 2502b85037dbSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2503b85037dbSmrg # powerpc, because MkLinux only supported shared libraries with the 2504b85037dbSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2505b85037dbSmrg # most powerpc-linux boxes support dynamic linking these days and 2506b85037dbSmrg # people can always --disable-shared, the test was removed, and we 2507b85037dbSmrg # assume the GNU/Linux dynamic linker is in use. 2508b85037dbSmrg dynamic_linker='GNU/Linux ld.so' 2509b85037dbSmrg ;; 2510b85037dbSmrg 2511b85037dbSmrgnetbsd*) 2512b85037dbSmrg version_type=sunos 2513b85037dbSmrg need_lib_prefix=no 2514b85037dbSmrg need_version=no 2515b85037dbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2516b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2517b85037dbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2518b85037dbSmrg dynamic_linker='NetBSD (a.out) ld.so' 2519b85037dbSmrg else 2520b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2521b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2522b85037dbSmrg dynamic_linker='NetBSD ld.elf_so' 2523b85037dbSmrg fi 2524b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2525b85037dbSmrg shlibpath_overrides_runpath=yes 2526b85037dbSmrg hardcode_into_libs=yes 2527b85037dbSmrg ;; 2528b85037dbSmrg 2529b85037dbSmrgnewsos6) 2530b85037dbSmrg version_type=linux 2531b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2532b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2533b85037dbSmrg shlibpath_overrides_runpath=yes 2534b85037dbSmrg ;; 2535b85037dbSmrg 2536b85037dbSmrg*nto* | *qnx*) 2537b85037dbSmrg version_type=qnx 2538b85037dbSmrg need_lib_prefix=no 2539b85037dbSmrg need_version=no 2540b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2541b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2542b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2543b85037dbSmrg shlibpath_overrides_runpath=no 2544b85037dbSmrg hardcode_into_libs=yes 2545b85037dbSmrg dynamic_linker='ldqnx.so' 2546b85037dbSmrg ;; 2547b85037dbSmrg 2548b85037dbSmrgopenbsd*) 2549b85037dbSmrg version_type=sunos 2550b85037dbSmrg sys_lib_dlsearch_path_spec="/usr/lib" 2551b85037dbSmrg need_lib_prefix=no 2552b85037dbSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2553b85037dbSmrg case $host_os in 2554b85037dbSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2555b85037dbSmrg *) need_version=no ;; 2556b85037dbSmrg esac 2557b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2558b85037dbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2559b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2560b85037dbSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2561b85037dbSmrg case $host_os in 2562b85037dbSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 2563b85037dbSmrg shlibpath_overrides_runpath=no 2564b85037dbSmrg ;; 2565b85037dbSmrg *) 2566b85037dbSmrg shlibpath_overrides_runpath=yes 2567b85037dbSmrg ;; 2568b85037dbSmrg esac 2569b85037dbSmrg else 2570b85037dbSmrg shlibpath_overrides_runpath=yes 2571b85037dbSmrg fi 2572b85037dbSmrg ;; 2573b85037dbSmrg 2574b85037dbSmrgos2*) 2575b85037dbSmrg libname_spec='$name' 2576b85037dbSmrg shrext_cmds=".dll" 2577b85037dbSmrg need_lib_prefix=no 2578b85037dbSmrg library_names_spec='$libname${shared_ext} $libname.a' 2579b85037dbSmrg dynamic_linker='OS/2 ld.exe' 2580b85037dbSmrg shlibpath_var=LIBPATH 2581b85037dbSmrg ;; 2582b85037dbSmrg 2583b85037dbSmrgosf3* | osf4* | osf5*) 2584b85037dbSmrg version_type=osf 2585b85037dbSmrg need_lib_prefix=no 2586b85037dbSmrg need_version=no 2587b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2588b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2589b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2590b85037dbSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2591b85037dbSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2592b85037dbSmrg ;; 2593b85037dbSmrg 2594b85037dbSmrgrdos*) 2595b85037dbSmrg dynamic_linker=no 2596b85037dbSmrg ;; 2597b85037dbSmrg 2598b85037dbSmrgsolaris*) 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 shlibpath_var=LD_LIBRARY_PATH 2605b85037dbSmrg shlibpath_overrides_runpath=yes 2606b85037dbSmrg hardcode_into_libs=yes 2607b85037dbSmrg # ldd complains unless libraries are executable 2608b85037dbSmrg postinstall_cmds='chmod +x $lib' 2609b85037dbSmrg ;; 2610b85037dbSmrg 2611b85037dbSmrgsunos4*) 2612b85037dbSmrg version_type=sunos 2613b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2614b85037dbSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2615b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2616b85037dbSmrg shlibpath_overrides_runpath=yes 2617b85037dbSmrg if test "$with_gnu_ld" = yes; then 2618b85037dbSmrg need_lib_prefix=no 2619b85037dbSmrg fi 2620b85037dbSmrg need_version=yes 2621b85037dbSmrg ;; 2622b85037dbSmrg 2623b85037dbSmrgsysv4 | sysv4.3*) 2624b85037dbSmrg version_type=linux 2625b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2626b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2627b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2628b85037dbSmrg case $host_vendor in 2629b85037dbSmrg sni) 2630b85037dbSmrg shlibpath_overrides_runpath=no 2631b85037dbSmrg need_lib_prefix=no 2632b85037dbSmrg runpath_var=LD_RUN_PATH 2633b85037dbSmrg ;; 2634b85037dbSmrg siemens) 2635b85037dbSmrg need_lib_prefix=no 2636b85037dbSmrg ;; 2637b85037dbSmrg motorola) 2638b85037dbSmrg need_lib_prefix=no 2639b85037dbSmrg need_version=no 2640b85037dbSmrg shlibpath_overrides_runpath=no 2641b85037dbSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2642b85037dbSmrg ;; 2643b85037dbSmrg esac 2644b85037dbSmrg ;; 2645b85037dbSmrg 2646b85037dbSmrgsysv4*MP*) 2647b85037dbSmrg if test -d /usr/nec ;then 2648b85037dbSmrg version_type=linux 2649b85037dbSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2650b85037dbSmrg soname_spec='$libname${shared_ext}.$major' 2651b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2652b85037dbSmrg fi 2653b85037dbSmrg ;; 2654b85037dbSmrg 2655b85037dbSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2656b85037dbSmrg version_type=freebsd-elf 2657b85037dbSmrg need_lib_prefix=no 2658b85037dbSmrg need_version=no 2659b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2660b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2661b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2662b85037dbSmrg shlibpath_overrides_runpath=yes 2663b85037dbSmrg hardcode_into_libs=yes 2664b85037dbSmrg if test "$with_gnu_ld" = yes; then 2665b85037dbSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2666b85037dbSmrg else 2667b85037dbSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2668b85037dbSmrg case $host_os in 2669b85037dbSmrg sco3.2v5*) 2670b85037dbSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2671b85037dbSmrg ;; 2672b85037dbSmrg esac 2673b85037dbSmrg fi 2674b85037dbSmrg sys_lib_dlsearch_path_spec='/usr/lib' 2675b85037dbSmrg ;; 2676b85037dbSmrg 2677b85037dbSmrgtpf*) 2678b85037dbSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2679b85037dbSmrg version_type=linux 2680b85037dbSmrg need_lib_prefix=no 2681b85037dbSmrg need_version=no 2682b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2683b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2684b85037dbSmrg shlibpath_overrides_runpath=no 2685b85037dbSmrg hardcode_into_libs=yes 2686b85037dbSmrg ;; 2687b85037dbSmrg 2688b85037dbSmrguts4*) 2689b85037dbSmrg version_type=linux 2690b85037dbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2691b85037dbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2692b85037dbSmrg shlibpath_var=LD_LIBRARY_PATH 2693b85037dbSmrg ;; 2694b85037dbSmrg 2695b85037dbSmrg*) 2696b85037dbSmrg dynamic_linker=no 2697b85037dbSmrg ;; 2698b85037dbSmrgesac 2699b85037dbSmrgAC_MSG_RESULT([$dynamic_linker]) 2700b85037dbSmrgtest "$dynamic_linker" = no && can_build_shared=no 2701b85037dbSmrg 2702b85037dbSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2703b85037dbSmrgif test "$GCC" = yes; then 2704b85037dbSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2705b85037dbSmrgfi 2706b85037dbSmrg 2707b85037dbSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2708b85037dbSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2709b85037dbSmrgfi 2710b85037dbSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2711b85037dbSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2712b85037dbSmrgfi 2713b85037dbSmrg 2714b85037dbSmrg_LT_DECL([], [variables_saved_for_relink], [1], 2715b85037dbSmrg [Variables whose values should be saved in libtool wrapper scripts and 2716b85037dbSmrg restored at link time]) 2717b85037dbSmrg_LT_DECL([], [need_lib_prefix], [0], 2718b85037dbSmrg [Do we need the "lib" prefix for modules?]) 2719b85037dbSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2720b85037dbSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2721b85037dbSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2722b85037dbSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2723b85037dbSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2724b85037dbSmrg [Is shlibpath searched before the hard-coded library search path?]) 2725b85037dbSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2726b85037dbSmrg_LT_DECL([], [library_names_spec], [1], 2727b85037dbSmrg [[List of archive names. First name is the real one, the rest are links. 2728b85037dbSmrg The last name is the one that the linker finds with -lNAME]]) 2729b85037dbSmrg_LT_DECL([], [soname_spec], [1], 2730b85037dbSmrg [[The coded name of the library, if different from the real name]]) 2731b85037dbSmrg_LT_DECL([], [install_override_mode], [1], 2732b85037dbSmrg [Permission mode override for installation of shared libraries]) 2733b85037dbSmrg_LT_DECL([], [postinstall_cmds], [2], 2734b85037dbSmrg [Command to use after installation of a shared archive]) 2735b85037dbSmrg_LT_DECL([], [postuninstall_cmds], [2], 2736b85037dbSmrg [Command to use after uninstallation of a shared archive]) 2737b85037dbSmrg_LT_DECL([], [finish_cmds], [2], 2738b85037dbSmrg [Commands used to finish a libtool library installation in a directory]) 2739b85037dbSmrg_LT_DECL([], [finish_eval], [1], 2740b85037dbSmrg [[As "finish_cmds", except a single script fragment to be evaled but 2741b85037dbSmrg not shown]]) 2742b85037dbSmrg_LT_DECL([], [hardcode_into_libs], [0], 2743b85037dbSmrg [Whether we should hardcode library paths into libraries]) 2744b85037dbSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2745b85037dbSmrg [Compile-time system search path for libraries]) 2746b85037dbSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2747b85037dbSmrg [Run-time system search path for libraries]) 2748b85037dbSmrg])# _LT_SYS_DYNAMIC_LINKER 2749b85037dbSmrg 2750b85037dbSmrg 2751b85037dbSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 2752b85037dbSmrg# -------------------------- 2753b85037dbSmrg# find a file program which can recognize shared library 2754b85037dbSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2755b85037dbSmrg[m4_require([_LT_DECL_EGREP])dnl 2756b85037dbSmrgAC_MSG_CHECKING([for $1]) 2757b85037dbSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2758b85037dbSmrg[case $MAGIC_CMD in 2759b85037dbSmrg[[\\/*] | ?:[\\/]*]) 2760b85037dbSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2761b85037dbSmrg ;; 2762b85037dbSmrg*) 2763b85037dbSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2764b85037dbSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2765b85037dbSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2766b85037dbSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2767b85037dbSmrgdnl not every word. This closes a longstanding sh security hole. 2768b85037dbSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 2769b85037dbSmrg for ac_dir in $ac_dummy; do 2770b85037dbSmrg IFS="$lt_save_ifs" 2771b85037dbSmrg test -z "$ac_dir" && ac_dir=. 2772b85037dbSmrg if test -f $ac_dir/$1; then 2773b85037dbSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2774b85037dbSmrg if test -n "$file_magic_test_file"; then 2775b85037dbSmrg case $deplibs_check_method in 2776b85037dbSmrg "file_magic "*) 2777b85037dbSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2778b85037dbSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2779b85037dbSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2780b85037dbSmrg $EGREP "$file_magic_regex" > /dev/null; then 2781b85037dbSmrg : 2782b85037dbSmrg else 2783b85037dbSmrg cat <<_LT_EOF 1>&2 2784b85037dbSmrg 2785b85037dbSmrg*** Warning: the command libtool uses to detect shared libraries, 2786b85037dbSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2787b85037dbSmrg*** The result is that libtool may fail to recognize shared libraries 2788b85037dbSmrg*** as such. This will affect the creation of libtool libraries that 2789b85037dbSmrg*** depend on shared libraries, but programs linked with such libtool 2790b85037dbSmrg*** libraries will work regardless of this problem. Nevertheless, you 2791b85037dbSmrg*** may want to report the problem to your system manager and/or to 2792b85037dbSmrg*** bug-libtool@gnu.org 2793b85037dbSmrg 2794b85037dbSmrg_LT_EOF 2795b85037dbSmrg fi ;; 2796b85037dbSmrg esac 2797b85037dbSmrg fi 2798b85037dbSmrg break 2799b85037dbSmrg fi 2800b85037dbSmrg done 2801b85037dbSmrg IFS="$lt_save_ifs" 2802b85037dbSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 2803b85037dbSmrg ;; 2804b85037dbSmrgesac]) 2805b85037dbSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2806b85037dbSmrgif test -n "$MAGIC_CMD"; then 2807b85037dbSmrg AC_MSG_RESULT($MAGIC_CMD) 2808b85037dbSmrgelse 2809b85037dbSmrg AC_MSG_RESULT(no) 2810b85037dbSmrgfi 2811b85037dbSmrg_LT_DECL([], [MAGIC_CMD], [0], 2812b85037dbSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2813b85037dbSmrg])# _LT_PATH_TOOL_PREFIX 2814b85037dbSmrg 2815b85037dbSmrg# Old name: 2816b85037dbSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2817b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 2818b85037dbSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 2819b85037dbSmrg 2820b85037dbSmrg 2821b85037dbSmrg# _LT_PATH_MAGIC 2822b85037dbSmrg# -------------- 2823b85037dbSmrg# find a file program which can recognize a shared library 2824b85037dbSmrgm4_defun([_LT_PATH_MAGIC], 2825b85037dbSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2826b85037dbSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 2827b85037dbSmrg if test -n "$ac_tool_prefix"; then 2828b85037dbSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2829b85037dbSmrg else 2830b85037dbSmrg MAGIC_CMD=: 2831b85037dbSmrg fi 2832b85037dbSmrgfi 2833b85037dbSmrg])# _LT_PATH_MAGIC 2834b85037dbSmrg 2835b85037dbSmrg 2836b85037dbSmrg# LT_PATH_LD 2837b85037dbSmrg# ---------- 2838b85037dbSmrg# find the pathname to the GNU or non-GNU linker 2839b85037dbSmrgAC_DEFUN([LT_PATH_LD], 2840b85037dbSmrg[AC_REQUIRE([AC_PROG_CC])dnl 2841b85037dbSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2842b85037dbSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2843b85037dbSmrgm4_require([_LT_DECL_SED])dnl 2844b85037dbSmrgm4_require([_LT_DECL_EGREP])dnl 2845b85037dbSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 2846b85037dbSmrg 2847b85037dbSmrgAC_ARG_WITH([gnu-ld], 2848b85037dbSmrg [AS_HELP_STRING([--with-gnu-ld], 2849b85037dbSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2850b85037dbSmrg [test "$withval" = no || with_gnu_ld=yes], 2851b85037dbSmrg [with_gnu_ld=no])dnl 2852b85037dbSmrg 2853b85037dbSmrgac_prog=ld 2854b85037dbSmrgif test "$GCC" = yes; then 2855b85037dbSmrg # Check if gcc -print-prog-name=ld gives a path. 2856b85037dbSmrg AC_MSG_CHECKING([for ld used by $CC]) 2857b85037dbSmrg case $host in 2858b85037dbSmrg *-*-mingw*) 2859b85037dbSmrg # gcc leaves a trailing carriage return which upsets mingw 2860b85037dbSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2861b85037dbSmrg *) 2862b85037dbSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2863b85037dbSmrg esac 2864b85037dbSmrg case $ac_prog in 2865b85037dbSmrg # Accept absolute paths. 2866b85037dbSmrg [[\\/]]* | ?:[[\\/]]*) 2867b85037dbSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 2868b85037dbSmrg # Canonicalize the pathname of ld 2869b85037dbSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 2870b85037dbSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 2871b85037dbSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 2872b85037dbSmrg done 2873b85037dbSmrg test -z "$LD" && LD="$ac_prog" 2874b85037dbSmrg ;; 2875b85037dbSmrg "") 2876b85037dbSmrg # If it fails, then pretend we aren't using GCC. 2877b85037dbSmrg ac_prog=ld 2878b85037dbSmrg ;; 2879b85037dbSmrg *) 2880b85037dbSmrg # If it is relative, then search for the first ld in PATH. 2881b85037dbSmrg with_gnu_ld=unknown 2882b85037dbSmrg ;; 2883b85037dbSmrg esac 2884b85037dbSmrgelif test "$with_gnu_ld" = yes; then 2885b85037dbSmrg AC_MSG_CHECKING([for GNU ld]) 2886b85037dbSmrgelse 2887b85037dbSmrg AC_MSG_CHECKING([for non-GNU ld]) 2888b85037dbSmrgfi 2889b85037dbSmrgAC_CACHE_VAL(lt_cv_path_LD, 2890b85037dbSmrg[if test -z "$LD"; then 2891b85037dbSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2892b85037dbSmrg for ac_dir in $PATH; do 2893b85037dbSmrg IFS="$lt_save_ifs" 2894b85037dbSmrg test -z "$ac_dir" && ac_dir=. 2895b85037dbSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2896b85037dbSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 2897b85037dbSmrg # Check to see if the program is GNU ld. I'd rather use --version, 2898b85037dbSmrg # but apparently some variants of GNU ld only accept -v. 2899b85037dbSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 2900b85037dbSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2901b85037dbSmrg *GNU* | *'with BFD'*) 2902b85037dbSmrg test "$with_gnu_ld" != no && break 2903b85037dbSmrg ;; 2904b85037dbSmrg *) 2905b85037dbSmrg test "$with_gnu_ld" != yes && break 2906b85037dbSmrg ;; 2907b85037dbSmrg esac 2908b85037dbSmrg fi 2909b85037dbSmrg done 2910b85037dbSmrg IFS="$lt_save_ifs" 2911b85037dbSmrgelse 2912b85037dbSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 2913b85037dbSmrgfi]) 2914b85037dbSmrgLD="$lt_cv_path_LD" 2915b85037dbSmrgif test -n "$LD"; then 2916b85037dbSmrg AC_MSG_RESULT($LD) 2917b85037dbSmrgelse 2918b85037dbSmrg AC_MSG_RESULT(no) 2919b85037dbSmrgfi 2920b85037dbSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2921b85037dbSmrg_LT_PATH_LD_GNU 2922b85037dbSmrgAC_SUBST([LD]) 2923b85037dbSmrg 2924b85037dbSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 2925b85037dbSmrg])# LT_PATH_LD 2926b85037dbSmrg 2927b85037dbSmrg# Old names: 2928b85037dbSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 2929b85037dbSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 2930b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 2931b85037dbSmrgdnl AC_DEFUN([AM_PROG_LD], []) 2932b85037dbSmrgdnl AC_DEFUN([AC_PROG_LD], []) 2933b85037dbSmrg 2934b85037dbSmrg 2935b85037dbSmrg# _LT_PATH_LD_GNU 2936b85037dbSmrg#- -------------- 2937b85037dbSmrgm4_defun([_LT_PATH_LD_GNU], 2938b85037dbSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2939b85037dbSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2940b85037dbSmrgcase `$LD -v 2>&1 </dev/null` in 2941b85037dbSmrg*GNU* | *'with BFD'*) 2942b85037dbSmrg lt_cv_prog_gnu_ld=yes 2943b85037dbSmrg ;; 2944b85037dbSmrg*) 2945b85037dbSmrg lt_cv_prog_gnu_ld=no 2946b85037dbSmrg ;; 2947b85037dbSmrgesac]) 2948b85037dbSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2949b85037dbSmrg])# _LT_PATH_LD_GNU 2950b85037dbSmrg 2951b85037dbSmrg 2952b85037dbSmrg# _LT_CMD_RELOAD 2953b85037dbSmrg# -------------- 2954b85037dbSmrg# find reload flag for linker 2955b85037dbSmrg# -- PORTME Some linkers may need a different reload flag. 2956b85037dbSmrgm4_defun([_LT_CMD_RELOAD], 2957b85037dbSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 2958b85037dbSmrg lt_cv_ld_reload_flag, 2959b85037dbSmrg [lt_cv_ld_reload_flag='-r']) 2960b85037dbSmrgreload_flag=$lt_cv_ld_reload_flag 2961b85037dbSmrgcase $reload_flag in 2962b85037dbSmrg"" | " "*) ;; 2963b85037dbSmrg*) reload_flag=" $reload_flag" ;; 2964b85037dbSmrgesac 2965b85037dbSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 2966b85037dbSmrgcase $host_os in 2967b85037dbSmrg darwin*) 2968b85037dbSmrg if test "$GCC" = yes; then 2969b85037dbSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2970b85037dbSmrg else 2971b85037dbSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 2972b85037dbSmrg fi 2973b85037dbSmrg ;; 2974b85037dbSmrgesac 2975b85037dbSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 2976b85037dbSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 2977b85037dbSmrg])# _LT_CMD_RELOAD 2978b85037dbSmrg 2979b85037dbSmrg 2980b85037dbSmrg# _LT_CHECK_MAGIC_METHOD 2981b85037dbSmrg# ---------------------- 2982b85037dbSmrg# how to check for library dependencies 2983b85037dbSmrg# -- PORTME fill in with the dynamic library characteristics 2984b85037dbSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 2985b85037dbSmrg[m4_require([_LT_DECL_EGREP]) 2986b85037dbSmrgm4_require([_LT_DECL_OBJDUMP]) 2987b85037dbSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 2988b85037dbSmrglt_cv_deplibs_check_method, 2989b85037dbSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 2990b85037dbSmrglt_cv_file_magic_test_file= 2991b85037dbSmrglt_cv_deplibs_check_method='unknown' 2992b85037dbSmrg# Need to set the preceding variable on all platforms that support 2993b85037dbSmrg# interlibrary dependencies. 2994b85037dbSmrg# 'none' -- dependencies not supported. 2995b85037dbSmrg# `unknown' -- same as none, but documents that we really don't know. 2996b85037dbSmrg# 'pass_all' -- all dependencies passed with no checks. 2997b85037dbSmrg# 'test_compile' -- check by making test program. 2998b85037dbSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 2999b85037dbSmrg# which responds to the $file_magic_cmd with a given extended regex. 3000b85037dbSmrg# If you have `file' or equivalent on your system and you're not sure 3001b85037dbSmrg# whether `pass_all' will *always* work, you probably want this one. 3002b85037dbSmrg 3003b85037dbSmrgcase $host_os in 3004b85037dbSmrgaix[[4-9]]*) 3005b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3006b85037dbSmrg ;; 3007b85037dbSmrg 3008b85037dbSmrgbeos*) 3009b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3010b85037dbSmrg ;; 3011b85037dbSmrg 3012b85037dbSmrgbsdi[[45]]*) 3013b85037dbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3014b85037dbSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3015b85037dbSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3016b85037dbSmrg ;; 3017b85037dbSmrg 3018b85037dbSmrgcygwin*) 3019b85037dbSmrg # func_win32_libid is a shell function defined in ltmain.sh 3020b85037dbSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3021b85037dbSmrg lt_cv_file_magic_cmd='func_win32_libid' 3022b85037dbSmrg ;; 3023b85037dbSmrg 3024b85037dbSmrgmingw* | pw32*) 3025b85037dbSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3026b85037dbSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3027b85037dbSmrg # unless we find 'file', for example because we are cross-compiling. 3028b85037dbSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3029b85037dbSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3030b85037dbSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3031b85037dbSmrg lt_cv_file_magic_cmd='func_win32_libid' 3032b85037dbSmrg else 3033b85037dbSmrg # Keep this pattern in sync with the one in func_win32_libid. 3034b85037dbSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3035b85037dbSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3036b85037dbSmrg fi 3037b85037dbSmrg ;; 3038b85037dbSmrg 3039b85037dbSmrgcegcc*) 3040b85037dbSmrg # use the weaker test based on 'objdump'. See mingw*. 3041b85037dbSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3042b85037dbSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3043b85037dbSmrg ;; 3044b85037dbSmrg 3045b85037dbSmrgdarwin* | rhapsody*) 3046b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3047b85037dbSmrg ;; 3048b85037dbSmrg 3049b85037dbSmrgfreebsd* | dragonfly*) 3050b85037dbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3051b85037dbSmrg case $host_cpu in 3052b85037dbSmrg i*86 ) 3053b85037dbSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3054b85037dbSmrg # Let's accept both of them until this is cleared up. 3055b85037dbSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3056b85037dbSmrg lt_cv_file_magic_cmd=/usr/bin/file 3057b85037dbSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3058b85037dbSmrg ;; 3059b85037dbSmrg esac 3060b85037dbSmrg else 3061b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3062b85037dbSmrg fi 3063b85037dbSmrg ;; 3064b85037dbSmrg 3065b85037dbSmrggnu*) 3066b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3067b85037dbSmrg ;; 3068b85037dbSmrg 3069b85037dbSmrghaiku*) 3070b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3071b85037dbSmrg ;; 3072b85037dbSmrg 3073b85037dbSmrghpux10.20* | hpux11*) 3074b85037dbSmrg lt_cv_file_magic_cmd=/usr/bin/file 3075b85037dbSmrg case $host_cpu in 3076b85037dbSmrg ia64*) 3077b85037dbSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3078b85037dbSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3079b85037dbSmrg ;; 3080b85037dbSmrg hppa*64*) 3081b85037dbSmrg [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]'] 3082b85037dbSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3083b85037dbSmrg ;; 3084b85037dbSmrg *) 3085b85037dbSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3086b85037dbSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3087b85037dbSmrg ;; 3088b85037dbSmrg esac 3089b85037dbSmrg ;; 3090b85037dbSmrg 3091b85037dbSmrginterix[[3-9]]*) 3092b85037dbSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3093b85037dbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3094b85037dbSmrg ;; 3095b85037dbSmrg 3096b85037dbSmrgirix5* | irix6* | nonstopux*) 3097b85037dbSmrg case $LD in 3098b85037dbSmrg *-32|*"-32 ") libmagic=32-bit;; 3099b85037dbSmrg *-n32|*"-n32 ") libmagic=N32;; 3100b85037dbSmrg *-64|*"-64 ") libmagic=64-bit;; 3101b85037dbSmrg *) libmagic=never-match;; 3102b85037dbSmrg esac 3103b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3104b85037dbSmrg ;; 3105b85037dbSmrg 3106b85037dbSmrg# This must be Linux ELF. 3107b85037dbSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 3108b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3109b85037dbSmrg ;; 3110b85037dbSmrg 3111b85037dbSmrgnetbsd*) 3112b85037dbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3113b85037dbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3114b85037dbSmrg else 3115b85037dbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3116b85037dbSmrg fi 3117b85037dbSmrg ;; 3118b85037dbSmrg 3119b85037dbSmrgnewos6*) 3120b85037dbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3121b85037dbSmrg lt_cv_file_magic_cmd=/usr/bin/file 3122b85037dbSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3123b85037dbSmrg ;; 3124b85037dbSmrg 3125b85037dbSmrg*nto* | *qnx*) 3126b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3127b85037dbSmrg ;; 3128b85037dbSmrg 3129b85037dbSmrgopenbsd*) 3130b85037dbSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3131b85037dbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3132b85037dbSmrg else 3133b85037dbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3134b85037dbSmrg fi 3135b85037dbSmrg ;; 3136b85037dbSmrg 3137b85037dbSmrgosf3* | osf4* | osf5*) 3138b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3139b85037dbSmrg ;; 3140b85037dbSmrg 3141b85037dbSmrgrdos*) 3142b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3143b85037dbSmrg ;; 3144b85037dbSmrg 3145b85037dbSmrgsolaris*) 3146b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3147b85037dbSmrg ;; 3148b85037dbSmrg 3149b85037dbSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3150b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3151b85037dbSmrg ;; 3152b85037dbSmrg 3153b85037dbSmrgsysv4 | sysv4.3*) 3154b85037dbSmrg case $host_vendor in 3155b85037dbSmrg motorola) 3156b85037dbSmrg 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]]' 3157b85037dbSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3158b85037dbSmrg ;; 3159b85037dbSmrg ncr) 3160b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3161b85037dbSmrg ;; 3162b85037dbSmrg sequent) 3163b85037dbSmrg lt_cv_file_magic_cmd='/bin/file' 3164b85037dbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3165b85037dbSmrg ;; 3166b85037dbSmrg sni) 3167b85037dbSmrg lt_cv_file_magic_cmd='/bin/file' 3168b85037dbSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3169b85037dbSmrg lt_cv_file_magic_test_file=/lib/libc.so 3170b85037dbSmrg ;; 3171b85037dbSmrg siemens) 3172b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3173b85037dbSmrg ;; 3174b85037dbSmrg pc) 3175b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3176b85037dbSmrg ;; 3177b85037dbSmrg esac 3178b85037dbSmrg ;; 3179b85037dbSmrg 3180b85037dbSmrgtpf*) 3181b85037dbSmrg lt_cv_deplibs_check_method=pass_all 3182b85037dbSmrg ;; 3183b85037dbSmrgesac 3184b85037dbSmrg]) 3185b85037dbSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3186b85037dbSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3187b85037dbSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3188b85037dbSmrg 3189b85037dbSmrg_LT_DECL([], [deplibs_check_method], [1], 3190b85037dbSmrg [Method to check whether dependent libraries are shared objects]) 3191b85037dbSmrg_LT_DECL([], [file_magic_cmd], [1], 3192b85037dbSmrg [Command to use when deplibs_check_method == "file_magic"]) 3193b85037dbSmrg])# _LT_CHECK_MAGIC_METHOD 3194b85037dbSmrg 3195b85037dbSmrg 3196b85037dbSmrg# LT_PATH_NM 3197b85037dbSmrg# ---------- 3198b85037dbSmrg# find the pathname to a BSD- or MS-compatible name lister 3199b85037dbSmrgAC_DEFUN([LT_PATH_NM], 3200b85037dbSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3201b85037dbSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3202b85037dbSmrg[if test -n "$NM"; then 3203b85037dbSmrg # Let the user override the test. 3204b85037dbSmrg lt_cv_path_NM="$NM" 3205b85037dbSmrgelse 3206b85037dbSmrg lt_nm_to_check="${ac_tool_prefix}nm" 3207b85037dbSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3208b85037dbSmrg lt_nm_to_check="$lt_nm_to_check nm" 3209b85037dbSmrg fi 3210b85037dbSmrg for lt_tmp_nm in $lt_nm_to_check; do 3211b85037dbSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3212b85037dbSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3213b85037dbSmrg IFS="$lt_save_ifs" 3214b85037dbSmrg test -z "$ac_dir" && ac_dir=. 3215b85037dbSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 3216b85037dbSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3217b85037dbSmrg # Check to see if the nm accepts a BSD-compat flag. 3218b85037dbSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3219b85037dbSmrg # nm: unknown option "B" ignored 3220b85037dbSmrg # Tru64's nm complains that /dev/null is an invalid object file 3221b85037dbSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3222b85037dbSmrg */dev/null* | *'Invalid file or object type'*) 3223b85037dbSmrg lt_cv_path_NM="$tmp_nm -B" 3224b85037dbSmrg break 3225b85037dbSmrg ;; 3226b85037dbSmrg *) 3227b85037dbSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3228b85037dbSmrg */dev/null*) 3229b85037dbSmrg lt_cv_path_NM="$tmp_nm -p" 3230b85037dbSmrg break 3231b85037dbSmrg ;; 3232b85037dbSmrg *) 3233b85037dbSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3234b85037dbSmrg continue # so that we can try to find one that supports BSD flags 3235b85037dbSmrg ;; 3236b85037dbSmrg esac 3237b85037dbSmrg ;; 3238b85037dbSmrg esac 3239b85037dbSmrg fi 3240b85037dbSmrg done 3241b85037dbSmrg IFS="$lt_save_ifs" 3242b85037dbSmrg done 3243b85037dbSmrg : ${lt_cv_path_NM=no} 3244b85037dbSmrgfi]) 3245b85037dbSmrgif test "$lt_cv_path_NM" != "no"; then 3246b85037dbSmrg NM="$lt_cv_path_NM" 3247b85037dbSmrgelse 3248b85037dbSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 3249b85037dbSmrg if test -n "$DUMPBIN"; then : 3250b85037dbSmrg # Let the user override the test. 3251b85037dbSmrg else 3252b85037dbSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3253b85037dbSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3254b85037dbSmrg *COFF*) 3255b85037dbSmrg DUMPBIN="$DUMPBIN -symbols" 3256b85037dbSmrg ;; 3257b85037dbSmrg *) 3258b85037dbSmrg DUMPBIN=: 3259b85037dbSmrg ;; 3260b85037dbSmrg esac 3261b85037dbSmrg fi 3262b85037dbSmrg AC_SUBST([DUMPBIN]) 3263b85037dbSmrg if test "$DUMPBIN" != ":"; then 3264b85037dbSmrg NM="$DUMPBIN" 3265b85037dbSmrg fi 3266b85037dbSmrgfi 3267b85037dbSmrgtest -z "$NM" && NM=nm 3268b85037dbSmrgAC_SUBST([NM]) 3269b85037dbSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3270b85037dbSmrg 3271b85037dbSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3272b85037dbSmrg [lt_cv_nm_interface="BSD nm" 3273b85037dbSmrg echo "int some_variable = 0;" > conftest.$ac_ext 3274b85037dbSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3275b85037dbSmrg (eval "$ac_compile" 2>conftest.err) 3276b85037dbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3277b85037dbSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3278b85037dbSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3279b85037dbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3280b85037dbSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3281b85037dbSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 3282b85037dbSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3283b85037dbSmrg lt_cv_nm_interface="MS dumpbin" 3284b85037dbSmrg fi 3285b85037dbSmrg rm -f conftest*]) 3286b85037dbSmrg])# LT_PATH_NM 3287b85037dbSmrg 3288b85037dbSmrg# Old names: 3289b85037dbSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3290b85037dbSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3291b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 3292b85037dbSmrgdnl AC_DEFUN([AM_PROG_NM], []) 3293b85037dbSmrgdnl AC_DEFUN([AC_PROG_NM], []) 3294b85037dbSmrg 3295b85037dbSmrg 3296b85037dbSmrg# LT_LIB_M 3297b85037dbSmrg# -------- 3298b85037dbSmrg# check for math library 3299b85037dbSmrgAC_DEFUN([LT_LIB_M], 3300b85037dbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3301b85037dbSmrgLIBM= 3302b85037dbSmrgcase $host in 3303b85037dbSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3304b85037dbSmrg # These system don't have libm, or don't need it 3305b85037dbSmrg ;; 3306b85037dbSmrg*-ncr-sysv4.3*) 3307b85037dbSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3308b85037dbSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3309b85037dbSmrg ;; 3310b85037dbSmrg*) 3311b85037dbSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3312b85037dbSmrg ;; 3313b85037dbSmrgesac 3314b85037dbSmrgAC_SUBST([LIBM]) 3315b85037dbSmrg])# LT_LIB_M 3316b85037dbSmrg 3317b85037dbSmrg# Old name: 3318b85037dbSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3319b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 3320b85037dbSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3321b85037dbSmrg 3322b85037dbSmrg 3323b85037dbSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3324b85037dbSmrg# ------------------------------- 3325b85037dbSmrgm4_defun([_LT_COMPILER_NO_RTTI], 3326b85037dbSmrg[m4_require([_LT_TAG_COMPILER])dnl 3327b85037dbSmrg 3328b85037dbSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3329b85037dbSmrg 3330b85037dbSmrgif test "$GCC" = yes; then 3331b85037dbSmrg case $cc_basename in 3332b85037dbSmrg nvcc*) 3333b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3334b85037dbSmrg *) 3335b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3336b85037dbSmrg esac 3337b85037dbSmrg 3338b85037dbSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3339b85037dbSmrg lt_cv_prog_compiler_rtti_exceptions, 3340b85037dbSmrg [-fno-rtti -fno-exceptions], [], 3341b85037dbSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3342b85037dbSmrgfi 3343b85037dbSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3344b85037dbSmrg [Compiler flag to turn off builtin functions]) 3345b85037dbSmrg])# _LT_COMPILER_NO_RTTI 3346b85037dbSmrg 3347b85037dbSmrg 3348b85037dbSmrg# _LT_CMD_GLOBAL_SYMBOLS 3349b85037dbSmrg# ---------------------- 3350b85037dbSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3351b85037dbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3352b85037dbSmrgAC_REQUIRE([AC_PROG_CC])dnl 3353b85037dbSmrgAC_REQUIRE([AC_PROG_AWK])dnl 3354b85037dbSmrgAC_REQUIRE([LT_PATH_NM])dnl 3355b85037dbSmrgAC_REQUIRE([LT_PATH_LD])dnl 3356b85037dbSmrgm4_require([_LT_DECL_SED])dnl 3357b85037dbSmrgm4_require([_LT_DECL_EGREP])dnl 3358b85037dbSmrgm4_require([_LT_TAG_COMPILER])dnl 3359b85037dbSmrg 3360b85037dbSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3361b85037dbSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3362b85037dbSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3363b85037dbSmrg[ 3364b85037dbSmrg# These are sane defaults that work on at least a few old systems. 3365b85037dbSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3366b85037dbSmrg 3367b85037dbSmrg# Character class describing NM global symbol codes. 3368b85037dbSmrgsymcode='[[BCDEGRST]]' 3369b85037dbSmrg 3370b85037dbSmrg# Regexp to match symbols that can be accessed directly from C. 3371b85037dbSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3372b85037dbSmrg 3373b85037dbSmrg# Define system-specific variables. 3374b85037dbSmrgcase $host_os in 3375b85037dbSmrgaix*) 3376b85037dbSmrg symcode='[[BCDT]]' 3377b85037dbSmrg ;; 3378b85037dbSmrgcygwin* | mingw* | pw32* | cegcc*) 3379b85037dbSmrg symcode='[[ABCDGISTW]]' 3380b85037dbSmrg ;; 3381b85037dbSmrghpux*) 3382b85037dbSmrg if test "$host_cpu" = ia64; then 3383b85037dbSmrg symcode='[[ABCDEGRST]]' 3384b85037dbSmrg fi 3385b85037dbSmrg ;; 3386b85037dbSmrgirix* | nonstopux*) 3387b85037dbSmrg symcode='[[BCDEGRST]]' 3388b85037dbSmrg ;; 3389b85037dbSmrgosf*) 3390b85037dbSmrg symcode='[[BCDEGQRST]]' 3391b85037dbSmrg ;; 3392b85037dbSmrgsolaris*) 3393b85037dbSmrg symcode='[[BDRT]]' 3394b85037dbSmrg ;; 3395b85037dbSmrgsco3.2v5*) 3396b85037dbSmrg symcode='[[DT]]' 3397b85037dbSmrg ;; 3398b85037dbSmrgsysv4.2uw2*) 3399b85037dbSmrg symcode='[[DT]]' 3400b85037dbSmrg ;; 3401b85037dbSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3402b85037dbSmrg symcode='[[ABDT]]' 3403b85037dbSmrg ;; 3404b85037dbSmrgsysv4) 3405b85037dbSmrg symcode='[[DFNSTU]]' 3406b85037dbSmrg ;; 3407b85037dbSmrgesac 3408b85037dbSmrg 3409b85037dbSmrg# If we're using GNU nm, then use its standard symbol codes. 3410b85037dbSmrgcase `$NM -V 2>&1` in 3411b85037dbSmrg*GNU* | *'with BFD'*) 3412b85037dbSmrg symcode='[[ABCDGIRSTW]]' ;; 3413b85037dbSmrgesac 3414b85037dbSmrg 3415b85037dbSmrg# Transform an extracted symbol line into a proper C declaration. 3416b85037dbSmrg# Some systems (esp. on ia64) link data and code symbols differently, 3417b85037dbSmrg# so use this general approach. 3418b85037dbSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3419b85037dbSmrg 3420b85037dbSmrg# Transform an extracted symbol line into symbol name and symbol address 3421b85037dbSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3422b85037dbSmrglt_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'" 3423b85037dbSmrg 3424b85037dbSmrg# Handle CRLF in mingw tool chain 3425b85037dbSmrgopt_cr= 3426b85037dbSmrgcase $build_os in 3427b85037dbSmrgmingw*) 3428b85037dbSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3429b85037dbSmrg ;; 3430b85037dbSmrgesac 3431b85037dbSmrg 3432b85037dbSmrg# Try without a prefix underscore, then with it. 3433b85037dbSmrgfor ac_symprfx in "" "_"; do 3434b85037dbSmrg 3435b85037dbSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3436b85037dbSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3437b85037dbSmrg 3438b85037dbSmrg # Write the raw and C identifiers. 3439b85037dbSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3440b85037dbSmrg # Fake it for dumpbin and say T for any non-static function 3441b85037dbSmrg # and D for any global variable. 3442b85037dbSmrg # Also find C++ and __fastcall symbols from MSVC++, 3443b85037dbSmrg # which start with @ or ?. 3444b85037dbSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3445b85037dbSmrg" {last_section=section; section=\$ 3};"\ 3446b85037dbSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3447b85037dbSmrg" \$ 0!~/External *\|/{next};"\ 3448b85037dbSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3449b85037dbSmrg" {if(hide[section]) next};"\ 3450b85037dbSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3451b85037dbSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3452b85037dbSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3453b85037dbSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3454b85037dbSmrg" ' prfx=^$ac_symprfx]" 3455b85037dbSmrg else 3456b85037dbSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3457b85037dbSmrg fi 3458b85037dbSmrg 3459b85037dbSmrg # Check to see that the pipe works correctly. 3460b85037dbSmrg pipe_works=no 3461b85037dbSmrg 3462b85037dbSmrg rm -f conftest* 3463b85037dbSmrg cat > conftest.$ac_ext <<_LT_EOF 3464b85037dbSmrg#ifdef __cplusplus 3465b85037dbSmrgextern "C" { 3466b85037dbSmrg#endif 3467b85037dbSmrgchar nm_test_var; 3468b85037dbSmrgvoid nm_test_func(void); 3469b85037dbSmrgvoid nm_test_func(void){} 3470b85037dbSmrg#ifdef __cplusplus 3471b85037dbSmrg} 3472b85037dbSmrg#endif 3473b85037dbSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 3474b85037dbSmrg_LT_EOF 3475b85037dbSmrg 3476b85037dbSmrg if AC_TRY_EVAL(ac_compile); then 3477b85037dbSmrg # Now try to grab the symbols. 3478b85037dbSmrg nlist=conftest.nm 3479b85037dbSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3480b85037dbSmrg # Try sorting and uniquifying the output. 3481b85037dbSmrg if sort "$nlist" | uniq > "$nlist"T; then 3482b85037dbSmrg mv -f "$nlist"T "$nlist" 3483b85037dbSmrg else 3484b85037dbSmrg rm -f "$nlist"T 3485b85037dbSmrg fi 3486b85037dbSmrg 3487b85037dbSmrg # Make sure that we snagged all the symbols we need. 3488b85037dbSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3489b85037dbSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3490b85037dbSmrg cat <<_LT_EOF > conftest.$ac_ext 3491b85037dbSmrg#ifdef __cplusplus 3492b85037dbSmrgextern "C" { 3493b85037dbSmrg#endif 3494b85037dbSmrg 3495b85037dbSmrg_LT_EOF 3496b85037dbSmrg # Now generate the symbol file. 3497b85037dbSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3498b85037dbSmrg 3499b85037dbSmrg cat <<_LT_EOF >> conftest.$ac_ext 3500b85037dbSmrg 3501b85037dbSmrg/* The mapping between symbol names and symbols. */ 3502b85037dbSmrgconst struct { 3503b85037dbSmrg const char *name; 3504b85037dbSmrg void *address; 3505b85037dbSmrg} 3506b85037dbSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3507b85037dbSmrg{ 3508b85037dbSmrg { "@PROGRAM@", (void *) 0 }, 3509b85037dbSmrg_LT_EOF 3510b85037dbSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3511b85037dbSmrg cat <<\_LT_EOF >> conftest.$ac_ext 3512b85037dbSmrg {0, (void *) 0} 3513b85037dbSmrg}; 3514b85037dbSmrg 3515b85037dbSmrg/* This works around a problem in FreeBSD linker */ 3516b85037dbSmrg#ifdef FREEBSD_WORKAROUND 3517b85037dbSmrgstatic const void *lt_preloaded_setup() { 3518b85037dbSmrg return lt__PROGRAM__LTX_preloaded_symbols; 3519b85037dbSmrg} 3520b85037dbSmrg#endif 3521b85037dbSmrg 3522b85037dbSmrg#ifdef __cplusplus 3523b85037dbSmrg} 3524b85037dbSmrg#endif 3525b85037dbSmrg_LT_EOF 3526b85037dbSmrg # Now try linking the two files. 3527b85037dbSmrg mv conftest.$ac_objext conftstm.$ac_objext 3528b85037dbSmrg lt_save_LIBS="$LIBS" 3529b85037dbSmrg lt_save_CFLAGS="$CFLAGS" 3530b85037dbSmrg LIBS="conftstm.$ac_objext" 3531b85037dbSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3532b85037dbSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3533b85037dbSmrg pipe_works=yes 3534b85037dbSmrg fi 3535b85037dbSmrg LIBS="$lt_save_LIBS" 3536b85037dbSmrg CFLAGS="$lt_save_CFLAGS" 3537b85037dbSmrg else 3538b85037dbSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3539b85037dbSmrg fi 3540b85037dbSmrg else 3541b85037dbSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3542b85037dbSmrg fi 3543b85037dbSmrg else 3544b85037dbSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3545b85037dbSmrg fi 3546b85037dbSmrg else 3547b85037dbSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3548b85037dbSmrg cat conftest.$ac_ext >&5 3549b85037dbSmrg fi 3550b85037dbSmrg rm -rf conftest* conftst* 3551b85037dbSmrg 3552b85037dbSmrg # Do not use the global_symbol_pipe unless it works. 3553b85037dbSmrg if test "$pipe_works" = yes; then 3554b85037dbSmrg break 3555b85037dbSmrg else 3556b85037dbSmrg lt_cv_sys_global_symbol_pipe= 3557b85037dbSmrg fi 3558b85037dbSmrgdone 3559b85037dbSmrg]) 3560b85037dbSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3561b85037dbSmrg lt_cv_sys_global_symbol_to_cdecl= 3562b85037dbSmrgfi 3563b85037dbSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3564b85037dbSmrg AC_MSG_RESULT(failed) 3565b85037dbSmrgelse 3566b85037dbSmrg AC_MSG_RESULT(ok) 3567b85037dbSmrgfi 3568b85037dbSmrg 3569b85037dbSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3570b85037dbSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 3571b85037dbSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3572b85037dbSmrg [Transform the output of nm in a proper C declaration]) 3573b85037dbSmrg_LT_DECL([global_symbol_to_c_name_address], 3574b85037dbSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3575b85037dbSmrg [Transform the output of nm in a C name address pair]) 3576b85037dbSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3577b85037dbSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3578b85037dbSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3579b85037dbSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 3580b85037dbSmrg 3581b85037dbSmrg 3582b85037dbSmrg# _LT_COMPILER_PIC([TAGNAME]) 3583b85037dbSmrg# --------------------------- 3584b85037dbSmrgm4_defun([_LT_COMPILER_PIC], 3585b85037dbSmrg[m4_require([_LT_TAG_COMPILER])dnl 3586b85037dbSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3587b85037dbSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3588b85037dbSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3589b85037dbSmrg 3590b85037dbSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 3591b85037dbSmrgm4_if([$1], [CXX], [ 3592b85037dbSmrg # C++ specific cases for pic, static, wl, etc. 3593b85037dbSmrg if test "$GXX" = yes; then 3594b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3595b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3596b85037dbSmrg 3597b85037dbSmrg case $host_os in 3598b85037dbSmrg aix*) 3599b85037dbSmrg # All AIX code is PIC. 3600b85037dbSmrg if test "$host_cpu" = ia64; then 3601b85037dbSmrg # AIX 5 now supports IA64 processor 3602b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3603b85037dbSmrg fi 3604b85037dbSmrg ;; 3605b85037dbSmrg 3606b85037dbSmrg amigaos*) 3607b85037dbSmrg case $host_cpu in 3608b85037dbSmrg powerpc) 3609b85037dbSmrg # see comment about AmigaOS4 .so support 3610b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3611b85037dbSmrg ;; 3612b85037dbSmrg m68k) 3613b85037dbSmrg # FIXME: we need at least 68020 code to build shared libraries, but 3614b85037dbSmrg # adding the `-m68020' flag to GCC prevents building anything better, 3615b85037dbSmrg # like `-m68040'. 3616b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3617b85037dbSmrg ;; 3618b85037dbSmrg esac 3619b85037dbSmrg ;; 3620b85037dbSmrg 3621b85037dbSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3622b85037dbSmrg # PIC is the default for these OSes. 3623b85037dbSmrg ;; 3624b85037dbSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3625b85037dbSmrg # This hack is so that the source file can tell whether it is being 3626b85037dbSmrg # built for inclusion in a dll (and should export symbols for example). 3627b85037dbSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3628b85037dbSmrg # (--disable-auto-import) libraries 3629b85037dbSmrg m4_if([$1], [GCJ], [], 3630b85037dbSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3631b85037dbSmrg ;; 3632b85037dbSmrg darwin* | rhapsody*) 3633b85037dbSmrg # PIC is the default on this platform 3634b85037dbSmrg # Common symbols not allowed in MH_DYLIB files 3635b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3636b85037dbSmrg ;; 3637b85037dbSmrg *djgpp*) 3638b85037dbSmrg # DJGPP does not support shared libraries at all 3639b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3640b85037dbSmrg ;; 3641b85037dbSmrg haiku*) 3642b85037dbSmrg # PIC is the default for Haiku. 3643b85037dbSmrg # The "-static" flag exists, but is broken. 3644b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 3645b85037dbSmrg ;; 3646b85037dbSmrg interix[[3-9]]*) 3647b85037dbSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3648b85037dbSmrg # Instead, we relocate shared libraries at runtime. 3649b85037dbSmrg ;; 3650b85037dbSmrg sysv4*MP*) 3651b85037dbSmrg if test -d /usr/nec; then 3652b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3653b85037dbSmrg fi 3654b85037dbSmrg ;; 3655b85037dbSmrg hpux*) 3656b85037dbSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3657b85037dbSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3658b85037dbSmrg # sets the default TLS model and affects inlining. 3659b85037dbSmrg case $host_cpu in 3660b85037dbSmrg hppa*64*) 3661b85037dbSmrg ;; 3662b85037dbSmrg *) 3663b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3664b85037dbSmrg ;; 3665b85037dbSmrg esac 3666b85037dbSmrg ;; 3667b85037dbSmrg *qnx* | *nto*) 3668b85037dbSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3669b85037dbSmrg # it will coredump. 3670b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3671b85037dbSmrg ;; 3672b85037dbSmrg *) 3673b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3674b85037dbSmrg ;; 3675b85037dbSmrg esac 3676b85037dbSmrg else 3677b85037dbSmrg case $host_os in 3678b85037dbSmrg aix[[4-9]]*) 3679b85037dbSmrg # All AIX code is PIC. 3680b85037dbSmrg if test "$host_cpu" = ia64; then 3681b85037dbSmrg # AIX 5 now supports IA64 processor 3682b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3683b85037dbSmrg else 3684b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3685b85037dbSmrg fi 3686b85037dbSmrg ;; 3687b85037dbSmrg chorus*) 3688b85037dbSmrg case $cc_basename in 3689b85037dbSmrg cxch68*) 3690b85037dbSmrg # Green Hills C++ Compiler 3691b85037dbSmrg # _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" 3692b85037dbSmrg ;; 3693b85037dbSmrg esac 3694b85037dbSmrg ;; 3695b85037dbSmrg dgux*) 3696b85037dbSmrg case $cc_basename in 3697b85037dbSmrg ec++*) 3698b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3699b85037dbSmrg ;; 3700b85037dbSmrg ghcx*) 3701b85037dbSmrg # Green Hills C++ Compiler 3702b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3703b85037dbSmrg ;; 3704b85037dbSmrg *) 3705b85037dbSmrg ;; 3706b85037dbSmrg esac 3707b85037dbSmrg ;; 3708b85037dbSmrg freebsd* | dragonfly*) 3709b85037dbSmrg # FreeBSD uses GNU C++ 3710b85037dbSmrg ;; 3711b85037dbSmrg hpux9* | hpux10* | hpux11*) 3712b85037dbSmrg case $cc_basename in 3713b85037dbSmrg CC*) 3714b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3715b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3716b85037dbSmrg if test "$host_cpu" != ia64; then 3717b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3718b85037dbSmrg fi 3719b85037dbSmrg ;; 3720b85037dbSmrg aCC*) 3721b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3722b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3723b85037dbSmrg case $host_cpu in 3724b85037dbSmrg hppa*64*|ia64*) 3725b85037dbSmrg # +Z the default 3726b85037dbSmrg ;; 3727b85037dbSmrg *) 3728b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3729b85037dbSmrg ;; 3730b85037dbSmrg esac 3731b85037dbSmrg ;; 3732b85037dbSmrg *) 3733b85037dbSmrg ;; 3734b85037dbSmrg esac 3735b85037dbSmrg ;; 3736b85037dbSmrg interix*) 3737b85037dbSmrg # This is c89, which is MS Visual C++ (no shared libs) 3738b85037dbSmrg # Anyone wants to do a port? 3739b85037dbSmrg ;; 3740b85037dbSmrg irix5* | irix6* | nonstopux*) 3741b85037dbSmrg case $cc_basename in 3742b85037dbSmrg CC*) 3743b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3744b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3745b85037dbSmrg # CC pic flag -KPIC is the default. 3746b85037dbSmrg ;; 3747b85037dbSmrg *) 3748b85037dbSmrg ;; 3749b85037dbSmrg esac 3750b85037dbSmrg ;; 3751b85037dbSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 3752b85037dbSmrg case $cc_basename in 3753b85037dbSmrg KCC*) 3754b85037dbSmrg # KAI C++ Compiler 3755b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3756b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3757b85037dbSmrg ;; 3758b85037dbSmrg ecpc* ) 3759b85037dbSmrg # old Intel C++ for x86_64 which still supported -KPIC. 3760b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3761b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3762b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3763b85037dbSmrg ;; 3764b85037dbSmrg icpc* ) 3765b85037dbSmrg # Intel C++, used to be incompatible with GCC. 3766b85037dbSmrg # ICC 10 doesn't accept -KPIC any more. 3767b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3768b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3769b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3770b85037dbSmrg ;; 3771b85037dbSmrg pgCC* | pgcpp*) 3772b85037dbSmrg # Portland Group C++ compiler 3773b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3774b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 3775b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3776b85037dbSmrg ;; 3777b85037dbSmrg cxx*) 3778b85037dbSmrg # Compaq C++ 3779b85037dbSmrg # Make sure the PIC flag is empty. It appears that all Alpha 3780b85037dbSmrg # Linux and Compaq Tru64 Unix objects are PIC. 3781b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3782b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3783b85037dbSmrg ;; 3784b85037dbSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 3785b85037dbSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 3786b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3787b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 3788b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 3789b85037dbSmrg ;; 3790b85037dbSmrg *) 3791b85037dbSmrg case `$CC -V 2>&1 | sed 5q` in 3792b85037dbSmrg *Sun\ C*) 3793b85037dbSmrg # Sun C++ 5.9 3794b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3795b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3796b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3797b85037dbSmrg ;; 3798b85037dbSmrg esac 3799b85037dbSmrg ;; 3800b85037dbSmrg esac 3801b85037dbSmrg ;; 3802b85037dbSmrg lynxos*) 3803b85037dbSmrg ;; 3804b85037dbSmrg m88k*) 3805b85037dbSmrg ;; 3806b85037dbSmrg mvs*) 3807b85037dbSmrg case $cc_basename in 3808b85037dbSmrg cxx*) 3809b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 3810b85037dbSmrg ;; 3811b85037dbSmrg *) 3812b85037dbSmrg ;; 3813b85037dbSmrg esac 3814b85037dbSmrg ;; 3815b85037dbSmrg netbsd*) 3816b85037dbSmrg ;; 3817b85037dbSmrg *qnx* | *nto*) 3818b85037dbSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3819b85037dbSmrg # it will coredump. 3820b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3821b85037dbSmrg ;; 3822b85037dbSmrg osf3* | osf4* | osf5*) 3823b85037dbSmrg case $cc_basename in 3824b85037dbSmrg KCC*) 3825b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3826b85037dbSmrg ;; 3827b85037dbSmrg RCC*) 3828b85037dbSmrg # Rational C++ 2.4.1 3829b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3830b85037dbSmrg ;; 3831b85037dbSmrg cxx*) 3832b85037dbSmrg # Digital/Compaq C++ 3833b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3834b85037dbSmrg # Make sure the PIC flag is empty. It appears that all Alpha 3835b85037dbSmrg # Linux and Compaq Tru64 Unix objects are PIC. 3836b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3837b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3838b85037dbSmrg ;; 3839b85037dbSmrg *) 3840b85037dbSmrg ;; 3841b85037dbSmrg esac 3842b85037dbSmrg ;; 3843b85037dbSmrg psos*) 3844b85037dbSmrg ;; 3845b85037dbSmrg solaris*) 3846b85037dbSmrg case $cc_basename in 3847b85037dbSmrg CC* | sunCC*) 3848b85037dbSmrg # Sun C++ 4.2, 5.x and Centerline C++ 3849b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3850b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3851b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3852b85037dbSmrg ;; 3853b85037dbSmrg gcx*) 3854b85037dbSmrg # Green Hills C++ Compiler 3855b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 3856b85037dbSmrg ;; 3857b85037dbSmrg *) 3858b85037dbSmrg ;; 3859b85037dbSmrg esac 3860b85037dbSmrg ;; 3861b85037dbSmrg sunos4*) 3862b85037dbSmrg case $cc_basename in 3863b85037dbSmrg CC*) 3864b85037dbSmrg # Sun C++ 4.x 3865b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3866b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3867b85037dbSmrg ;; 3868b85037dbSmrg lcc*) 3869b85037dbSmrg # Lucid 3870b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3871b85037dbSmrg ;; 3872b85037dbSmrg *) 3873b85037dbSmrg ;; 3874b85037dbSmrg esac 3875b85037dbSmrg ;; 3876b85037dbSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 3877b85037dbSmrg case $cc_basename in 3878b85037dbSmrg CC*) 3879b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3880b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3881b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3882b85037dbSmrg ;; 3883b85037dbSmrg esac 3884b85037dbSmrg ;; 3885b85037dbSmrg tandem*) 3886b85037dbSmrg case $cc_basename in 3887b85037dbSmrg NCC*) 3888b85037dbSmrg # NonStop-UX NCC 3.20 3889b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3890b85037dbSmrg ;; 3891b85037dbSmrg *) 3892b85037dbSmrg ;; 3893b85037dbSmrg esac 3894b85037dbSmrg ;; 3895b85037dbSmrg vxworks*) 3896b85037dbSmrg ;; 3897b85037dbSmrg *) 3898b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 3899b85037dbSmrg ;; 3900b85037dbSmrg esac 3901b85037dbSmrg fi 3902b85037dbSmrg], 3903b85037dbSmrg[ 3904b85037dbSmrg if test "$GCC" = yes; then 3905b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3906b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3907b85037dbSmrg 3908b85037dbSmrg case $host_os in 3909b85037dbSmrg aix*) 3910b85037dbSmrg # All AIX code is PIC. 3911b85037dbSmrg if test "$host_cpu" = ia64; then 3912b85037dbSmrg # AIX 5 now supports IA64 processor 3913b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3914b85037dbSmrg fi 3915b85037dbSmrg ;; 3916b85037dbSmrg 3917b85037dbSmrg amigaos*) 3918b85037dbSmrg case $host_cpu in 3919b85037dbSmrg powerpc) 3920b85037dbSmrg # see comment about AmigaOS4 .so support 3921b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3922b85037dbSmrg ;; 3923b85037dbSmrg m68k) 3924b85037dbSmrg # FIXME: we need at least 68020 code to build shared libraries, but 3925b85037dbSmrg # adding the `-m68020' flag to GCC prevents building anything better, 3926b85037dbSmrg # like `-m68040'. 3927b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3928b85037dbSmrg ;; 3929b85037dbSmrg esac 3930b85037dbSmrg ;; 3931b85037dbSmrg 3932b85037dbSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3933b85037dbSmrg # PIC is the default for these OSes. 3934b85037dbSmrg ;; 3935b85037dbSmrg 3936b85037dbSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 3937b85037dbSmrg # This hack is so that the source file can tell whether it is being 3938b85037dbSmrg # built for inclusion in a dll (and should export symbols for example). 3939b85037dbSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3940b85037dbSmrg # (--disable-auto-import) libraries 3941b85037dbSmrg m4_if([$1], [GCJ], [], 3942b85037dbSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3943b85037dbSmrg ;; 3944b85037dbSmrg 3945b85037dbSmrg darwin* | rhapsody*) 3946b85037dbSmrg # PIC is the default on this platform 3947b85037dbSmrg # Common symbols not allowed in MH_DYLIB files 3948b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3949b85037dbSmrg ;; 3950b85037dbSmrg 3951b85037dbSmrg haiku*) 3952b85037dbSmrg # PIC is the default for Haiku. 3953b85037dbSmrg # The "-static" flag exists, but is broken. 3954b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 3955b85037dbSmrg ;; 3956b85037dbSmrg 3957b85037dbSmrg hpux*) 3958b85037dbSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3959b85037dbSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3960b85037dbSmrg # sets the default TLS model and affects inlining. 3961b85037dbSmrg case $host_cpu in 3962b85037dbSmrg hppa*64*) 3963b85037dbSmrg # +Z the default 3964b85037dbSmrg ;; 3965b85037dbSmrg *) 3966b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3967b85037dbSmrg ;; 3968b85037dbSmrg esac 3969b85037dbSmrg ;; 3970b85037dbSmrg 3971b85037dbSmrg interix[[3-9]]*) 3972b85037dbSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3973b85037dbSmrg # Instead, we relocate shared libraries at runtime. 3974b85037dbSmrg ;; 3975b85037dbSmrg 3976b85037dbSmrg msdosdjgpp*) 3977b85037dbSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 3978b85037dbSmrg # on systems that don't support them. 3979b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 3980b85037dbSmrg enable_shared=no 3981b85037dbSmrg ;; 3982b85037dbSmrg 3983b85037dbSmrg *nto* | *qnx*) 3984b85037dbSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3985b85037dbSmrg # it will coredump. 3986b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3987b85037dbSmrg ;; 3988b85037dbSmrg 3989b85037dbSmrg sysv4*MP*) 3990b85037dbSmrg if test -d /usr/nec; then 3991b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3992b85037dbSmrg fi 3993b85037dbSmrg ;; 3994b85037dbSmrg 3995b85037dbSmrg *) 3996b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3997b85037dbSmrg ;; 3998b85037dbSmrg esac 3999b85037dbSmrg 4000b85037dbSmrg case $cc_basename in 4001b85037dbSmrg nvcc*) # Cuda Compiler Driver 2.2 4002b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4003b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 4004b85037dbSmrg ;; 4005b85037dbSmrg esac 4006b85037dbSmrg else 4007b85037dbSmrg # PORTME Check for flag to pass linker flags through the system compiler. 4008b85037dbSmrg case $host_os in 4009b85037dbSmrg aix*) 4010b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4011b85037dbSmrg if test "$host_cpu" = ia64; then 4012b85037dbSmrg # AIX 5 now supports IA64 processor 4013b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4014b85037dbSmrg else 4015b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4016b85037dbSmrg fi 4017b85037dbSmrg ;; 4018b85037dbSmrg 4019b85037dbSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4020b85037dbSmrg # This hack is so that the source file can tell whether it is being 4021b85037dbSmrg # built for inclusion in a dll (and should export symbols for example). 4022b85037dbSmrg m4_if([$1], [GCJ], [], 4023b85037dbSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4024b85037dbSmrg ;; 4025b85037dbSmrg 4026b85037dbSmrg hpux9* | hpux10* | hpux11*) 4027b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4028b85037dbSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4029b85037dbSmrg # not for PA HP-UX. 4030b85037dbSmrg case $host_cpu in 4031b85037dbSmrg hppa*64*|ia64*) 4032b85037dbSmrg # +Z the default 4033b85037dbSmrg ;; 4034b85037dbSmrg *) 4035b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4036b85037dbSmrg ;; 4037b85037dbSmrg esac 4038b85037dbSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4039b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4040b85037dbSmrg ;; 4041b85037dbSmrg 4042b85037dbSmrg irix5* | irix6* | nonstopux*) 4043b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4044b85037dbSmrg # PIC (with -KPIC) is the default. 4045b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4046b85037dbSmrg ;; 4047b85037dbSmrg 4048b85037dbSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4049b85037dbSmrg case $cc_basename in 4050b85037dbSmrg # old Intel for x86_64 which still supported -KPIC. 4051b85037dbSmrg ecc*) 4052b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4053b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4054b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4055b85037dbSmrg ;; 4056b85037dbSmrg # icc used to be incompatible with GCC. 4057b85037dbSmrg # ICC 10 doesn't accept -KPIC any more. 4058b85037dbSmrg icc* | ifort*) 4059b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4060b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4061b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4062b85037dbSmrg ;; 4063b85037dbSmrg # Lahey Fortran 8.1. 4064b85037dbSmrg lf95*) 4065b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4066b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4067b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4068b85037dbSmrg ;; 4069b85037dbSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4070b85037dbSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 4071b85037dbSmrg # which looks to be a dead project) 4072b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4073b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4074b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4075b85037dbSmrg ;; 4076b85037dbSmrg ccc*) 4077b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4078b85037dbSmrg # All Alpha code is PIC. 4079b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4080b85037dbSmrg ;; 4081b85037dbSmrg xl* | bgxl* | bgf* | mpixl*) 4082b85037dbSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4083b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4084b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4085b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4086b85037dbSmrg ;; 4087b85037dbSmrg *) 4088b85037dbSmrg case `$CC -V 2>&1 | sed 5q` in 4089b85037dbSmrg *Sun\ F* | *Sun*Fortran*) 4090b85037dbSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4091b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4092b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4093b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4094b85037dbSmrg ;; 4095b85037dbSmrg *Sun\ C*) 4096b85037dbSmrg # Sun C 5.9 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)='-Wl,' 4100b85037dbSmrg ;; 4101b85037dbSmrg esac 4102b85037dbSmrg ;; 4103b85037dbSmrg esac 4104b85037dbSmrg ;; 4105b85037dbSmrg 4106b85037dbSmrg newsos6) 4107b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4108b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4109b85037dbSmrg ;; 4110b85037dbSmrg 4111b85037dbSmrg *nto* | *qnx*) 4112b85037dbSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4113b85037dbSmrg # it will coredump. 4114b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4115b85037dbSmrg ;; 4116b85037dbSmrg 4117b85037dbSmrg osf3* | osf4* | osf5*) 4118b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4119b85037dbSmrg # All OSF/1 code is PIC. 4120b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4121b85037dbSmrg ;; 4122b85037dbSmrg 4123b85037dbSmrg rdos*) 4124b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4125b85037dbSmrg ;; 4126b85037dbSmrg 4127b85037dbSmrg solaris*) 4128b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4129b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4130b85037dbSmrg case $cc_basename in 4131b85037dbSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4132b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4133b85037dbSmrg *) 4134b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4135b85037dbSmrg esac 4136b85037dbSmrg ;; 4137b85037dbSmrg 4138b85037dbSmrg sunos4*) 4139b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4140b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4141b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4142b85037dbSmrg ;; 4143b85037dbSmrg 4144b85037dbSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 4145b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4146b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4147b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4148b85037dbSmrg ;; 4149b85037dbSmrg 4150b85037dbSmrg sysv4*MP*) 4151b85037dbSmrg if test -d /usr/nec ;then 4152b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4153b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4154b85037dbSmrg fi 4155b85037dbSmrg ;; 4156b85037dbSmrg 4157b85037dbSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4158b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4159b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4160b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4161b85037dbSmrg ;; 4162b85037dbSmrg 4163b85037dbSmrg unicos*) 4164b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4165b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4166b85037dbSmrg ;; 4167b85037dbSmrg 4168b85037dbSmrg uts4*) 4169b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4170b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4171b85037dbSmrg ;; 4172b85037dbSmrg 4173b85037dbSmrg *) 4174b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4175b85037dbSmrg ;; 4176b85037dbSmrg esac 4177b85037dbSmrg fi 4178b85037dbSmrg]) 4179b85037dbSmrgcase $host_os in 4180b85037dbSmrg # For platforms which do not support PIC, -DPIC is meaningless: 4181b85037dbSmrg *djgpp*) 4182b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4183b85037dbSmrg ;; 4184b85037dbSmrg *) 4185b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4186b85037dbSmrg ;; 4187b85037dbSmrgesac 4188b85037dbSmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4189b85037dbSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4190b85037dbSmrg [How to pass a linker flag through the compiler]) 4191b85037dbSmrg 4192b85037dbSmrg# 4193b85037dbSmrg# Check to make sure the PIC flag actually works. 4194b85037dbSmrg# 4195b85037dbSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4196b85037dbSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4197b85037dbSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4198b85037dbSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4199b85037dbSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4200b85037dbSmrg "" | " "*) ;; 4201b85037dbSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4202b85037dbSmrg esac], 4203b85037dbSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4204b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4205b85037dbSmrgfi 4206b85037dbSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4207b85037dbSmrg [Additional compiler flags for building library objects]) 4208b85037dbSmrg 4209b85037dbSmrg# 4210b85037dbSmrg# Check to make sure the static flag actually works. 4211b85037dbSmrg# 4212b85037dbSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4213b85037dbSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4214b85037dbSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4215b85037dbSmrg $lt_tmp_static_flag, 4216b85037dbSmrg [], 4217b85037dbSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4218b85037dbSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4219b85037dbSmrg [Compiler flag to prevent dynamic linking]) 4220b85037dbSmrg])# _LT_COMPILER_PIC 4221b85037dbSmrg 4222b85037dbSmrg 4223b85037dbSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 4224b85037dbSmrg# ---------------------------- 4225b85037dbSmrg# See if the linker supports building shared libraries. 4226b85037dbSmrgm4_defun([_LT_LINKER_SHLIBS], 4227b85037dbSmrg[AC_REQUIRE([LT_PATH_LD])dnl 4228b85037dbSmrgAC_REQUIRE([LT_PATH_NM])dnl 4229b85037dbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4230b85037dbSmrgm4_require([_LT_DECL_EGREP])dnl 4231b85037dbSmrgm4_require([_LT_DECL_SED])dnl 4232b85037dbSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4233b85037dbSmrgm4_require([_LT_TAG_COMPILER])dnl 4234b85037dbSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4235b85037dbSmrgm4_if([$1], [CXX], [ 4236b85037dbSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4237b85037dbSmrg case $host_os in 4238b85037dbSmrg aix[[4-9]]*) 4239b85037dbSmrg # If we're using GNU nm, then we don't want the "-C" option. 4240b85037dbSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4241b85037dbSmrg # Also, AIX nm treats weak defined symbols like other global defined 4242b85037dbSmrg # symbols, whereas GNU nm marks them as "W". 4243b85037dbSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4244b85037dbSmrg _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' 4245b85037dbSmrg else 4246b85037dbSmrg _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' 4247b85037dbSmrg fi 4248b85037dbSmrg ;; 4249b85037dbSmrg pw32*) 4250b85037dbSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4251b85037dbSmrg ;; 4252b85037dbSmrg cygwin* | mingw* | cegcc*) 4253b85037dbSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 4254b85037dbSmrg ;; 4255b85037dbSmrg *) 4256b85037dbSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4257b85037dbSmrg ;; 4258b85037dbSmrg esac 4259b85037dbSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4260b85037dbSmrg], [ 4261b85037dbSmrg runpath_var= 4262b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 4263b85037dbSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4264b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)= 4265b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4266b85037dbSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 4267b85037dbSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4268b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4269b85037dbSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4270b85037dbSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 4271b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4272b85037dbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4273b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4274b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4275b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4276b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4277b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4278b85037dbSmrg _LT_TAGVAR(inherit_rpath, $1)=no 4279b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4280b85037dbSmrg _LT_TAGVAR(module_cmds, $1)= 4281b85037dbSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 4282b85037dbSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4283b85037dbSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4284b85037dbSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4285b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4286b85037dbSmrg # include_expsyms should be a list of space-separated symbols to be *always* 4287b85037dbSmrg # included in the symbol list 4288b85037dbSmrg _LT_TAGVAR(include_expsyms, $1)= 4289b85037dbSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 4290b85037dbSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4291b85037dbSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4292b85037dbSmrg # as well as any symbol that contains `d'. 4293b85037dbSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4294b85037dbSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4295b85037dbSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 4296b85037dbSmrg # the symbol is explicitly referenced. Since portable code cannot 4297b85037dbSmrg # rely on this symbol name, it's probably fine to never include it in 4298b85037dbSmrg # preloaded symbol tables. 4299b85037dbSmrg # Exclude shared library initialization/finalization symbols. 4300b85037dbSmrgdnl Note also adjust exclude_expsyms for C++ above. 4301b85037dbSmrg extract_expsyms_cmds= 4302b85037dbSmrg 4303b85037dbSmrg case $host_os in 4304b85037dbSmrg cygwin* | mingw* | pw32* | cegcc*) 4305b85037dbSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4306b85037dbSmrg # When not using gcc, we currently assume that we are using 4307b85037dbSmrg # Microsoft Visual C++. 4308b85037dbSmrg if test "$GCC" != yes; then 4309b85037dbSmrg with_gnu_ld=no 4310b85037dbSmrg fi 4311b85037dbSmrg ;; 4312b85037dbSmrg interix*) 4313b85037dbSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4314b85037dbSmrg with_gnu_ld=yes 4315b85037dbSmrg ;; 4316b85037dbSmrg openbsd*) 4317b85037dbSmrg with_gnu_ld=no 4318b85037dbSmrg ;; 4319b85037dbSmrg esac 4320b85037dbSmrg 4321b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 4322b85037dbSmrg 4323b85037dbSmrg # On some targets, GNU ld is compatible enough with the native linker 4324b85037dbSmrg # that we're better off using the native interface for both. 4325b85037dbSmrg lt_use_gnu_ld_interface=no 4326b85037dbSmrg if test "$with_gnu_ld" = yes; then 4327b85037dbSmrg case $host_os in 4328b85037dbSmrg aix*) 4329b85037dbSmrg # The AIX port of GNU ld has always aspired to compatibility 4330b85037dbSmrg # with the native linker. However, as the warning in the GNU ld 4331b85037dbSmrg # block says, versions before 2.19.5* couldn't really create working 4332b85037dbSmrg # shared libraries, regardless of the interface used. 4333b85037dbSmrg case `$LD -v 2>&1` in 4334b85037dbSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4335b85037dbSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4336b85037dbSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4337b85037dbSmrg *) 4338b85037dbSmrg lt_use_gnu_ld_interface=yes 4339b85037dbSmrg ;; 4340b85037dbSmrg esac 4341b85037dbSmrg ;; 4342b85037dbSmrg *) 4343b85037dbSmrg lt_use_gnu_ld_interface=yes 4344b85037dbSmrg ;; 4345b85037dbSmrg esac 4346b85037dbSmrg fi 4347b85037dbSmrg 4348b85037dbSmrg if test "$lt_use_gnu_ld_interface" = yes; then 4349b85037dbSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 4350b85037dbSmrg wlarc='${wl}' 4351b85037dbSmrg 4352b85037dbSmrg # Set some defaults for GNU ld with shared library support. These 4353b85037dbSmrg # are reset later if shared libraries are not supported. Putting them 4354b85037dbSmrg # here allows them to be overridden if necessary. 4355b85037dbSmrg runpath_var=LD_RUN_PATH 4356b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4357b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4358b85037dbSmrg # ancient GNU ld didn't support --whole-archive et. al. 4359b85037dbSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4360b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4361b85037dbSmrg else 4362b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4363b85037dbSmrg fi 4364b85037dbSmrg supports_anon_versioning=no 4365b85037dbSmrg case `$LD -v 2>&1` in 4366b85037dbSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 4367b85037dbSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4368b85037dbSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4369b85037dbSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4370b85037dbSmrg *\ 2.11.*) ;; # other 2.11 versions 4371b85037dbSmrg *) supports_anon_versioning=yes ;; 4372b85037dbSmrg esac 4373b85037dbSmrg 4374b85037dbSmrg # See if GNU ld supports shared libraries. 4375b85037dbSmrg case $host_os in 4376b85037dbSmrg aix[[3-9]]*) 4377b85037dbSmrg # On AIX/PPC, the GNU linker is very broken 4378b85037dbSmrg if test "$host_cpu" != ia64; then 4379b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4380b85037dbSmrg cat <<_LT_EOF 1>&2 4381b85037dbSmrg 4382b85037dbSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 4383b85037dbSmrg*** to be unable to reliably create shared libraries on AIX. 4384b85037dbSmrg*** Therefore, libtool is disabling shared libraries support. If you 4385b85037dbSmrg*** really care for shared libraries, you may want to install binutils 4386b85037dbSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4387b85037dbSmrg*** You will then need to restart the configuration process. 4388b85037dbSmrg 4389b85037dbSmrg_LT_EOF 4390b85037dbSmrg fi 4391b85037dbSmrg ;; 4392b85037dbSmrg 4393b85037dbSmrg amigaos*) 4394b85037dbSmrg case $host_cpu in 4395b85037dbSmrg powerpc) 4396b85037dbSmrg # see comment about AmigaOS4 .so support 4397b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4398b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4399b85037dbSmrg ;; 4400b85037dbSmrg m68k) 4401b85037dbSmrg _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)' 4402b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4403b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4404b85037dbSmrg ;; 4405b85037dbSmrg esac 4406b85037dbSmrg ;; 4407b85037dbSmrg 4408b85037dbSmrg beos*) 4409b85037dbSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4410b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4411b85037dbSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4412b85037dbSmrg # support --undefined. This deserves some investigation. FIXME 4413b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4414b85037dbSmrg else 4415b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4416b85037dbSmrg fi 4417b85037dbSmrg ;; 4418b85037dbSmrg 4419b85037dbSmrg cygwin* | mingw* | pw32* | cegcc*) 4420b85037dbSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4421b85037dbSmrg # as there is no search path for DLLs. 4422b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4423b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4424b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4425b85037dbSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4426b85037dbSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4427b85037dbSmrg _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' 4428b85037dbSmrg 4429b85037dbSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4430b85037dbSmrg _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' 4431b85037dbSmrg # If the export-symbols file already is a .def file (1st line 4432b85037dbSmrg # is EXPORTS), use it as is; otherwise, prepend... 4433b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4434b85037dbSmrg cp $export_symbols $output_objdir/$soname.def; 4435b85037dbSmrg else 4436b85037dbSmrg echo EXPORTS > $output_objdir/$soname.def; 4437b85037dbSmrg cat $export_symbols >> $output_objdir/$soname.def; 4438b85037dbSmrg fi~ 4439b85037dbSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4440b85037dbSmrg else 4441b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4442b85037dbSmrg fi 4443b85037dbSmrg ;; 4444b85037dbSmrg 4445b85037dbSmrg haiku*) 4446b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4447b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4448b85037dbSmrg ;; 4449b85037dbSmrg 4450b85037dbSmrg interix[[3-9]]*) 4451b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4452b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4453b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4454b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4455b85037dbSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4456b85037dbSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4457b85037dbSmrg # default) and relocated if they conflict, which is a slow very memory 4458b85037dbSmrg # consuming and fragmenting process. To avoid this, we pick a random, 4459b85037dbSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4460b85037dbSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4461b85037dbSmrg _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' 4462b85037dbSmrg _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' 4463b85037dbSmrg ;; 4464b85037dbSmrg 4465b85037dbSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4466b85037dbSmrg tmp_diet=no 4467b85037dbSmrg if test "$host_os" = linux-dietlibc; then 4468b85037dbSmrg case $cc_basename in 4469b85037dbSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4470b85037dbSmrg esac 4471b85037dbSmrg fi 4472b85037dbSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4473b85037dbSmrg && test "$tmp_diet" = no 4474b85037dbSmrg then 4475b85037dbSmrg tmp_addflag= 4476b85037dbSmrg tmp_sharedflag='-shared' 4477b85037dbSmrg case $cc_basename,$host_cpu in 4478b85037dbSmrg pgcc*) # Portland Group C compiler 4479b85037dbSmrg _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' 4480b85037dbSmrg tmp_addflag=' $pic_flag' 4481b85037dbSmrg ;; 4482b85037dbSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 4483b85037dbSmrg # Portland Group f77 and f90 compilers 4484b85037dbSmrg _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' 4485b85037dbSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 4486b85037dbSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4487b85037dbSmrg tmp_addflag=' -i_dynamic' ;; 4488b85037dbSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4489b85037dbSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4490b85037dbSmrg ifc* | ifort*) # Intel Fortran compiler 4491b85037dbSmrg tmp_addflag=' -nofor_main' ;; 4492b85037dbSmrg lf95*) # Lahey Fortran 8.1 4493b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4494b85037dbSmrg tmp_sharedflag='--shared' ;; 4495b85037dbSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4496b85037dbSmrg tmp_sharedflag='-qmkshrobj' 4497b85037dbSmrg tmp_addflag= ;; 4498b85037dbSmrg nvcc*) # Cuda Compiler Driver 2.2 4499b85037dbSmrg _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' 4500b85037dbSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4501b85037dbSmrg ;; 4502b85037dbSmrg esac 4503b85037dbSmrg case `$CC -V 2>&1 | sed 5q` in 4504b85037dbSmrg *Sun\ C*) # Sun C 5.9 4505b85037dbSmrg _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' 4506b85037dbSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4507b85037dbSmrg tmp_sharedflag='-G' ;; 4508b85037dbSmrg *Sun\ F*) # Sun Fortran 8.3 4509b85037dbSmrg tmp_sharedflag='-G' ;; 4510b85037dbSmrg esac 4511b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4512b85037dbSmrg 4513b85037dbSmrg if test "x$supports_anon_versioning" = xyes; then 4514b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4515b85037dbSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4516b85037dbSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4517b85037dbSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4518b85037dbSmrg fi 4519b85037dbSmrg 4520b85037dbSmrg case $cc_basename in 4521b85037dbSmrg xlf* | bgf* | bgxlf* | mpixlf*) 4522b85037dbSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4523b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4524b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4525b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 4526b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4527b85037dbSmrg if test "x$supports_anon_versioning" = xyes; then 4528b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4529b85037dbSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4530b85037dbSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4531b85037dbSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4532b85037dbSmrg fi 4533b85037dbSmrg ;; 4534b85037dbSmrg esac 4535b85037dbSmrg else 4536b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4537b85037dbSmrg fi 4538b85037dbSmrg ;; 4539b85037dbSmrg 4540b85037dbSmrg netbsd*) 4541b85037dbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4542b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4543b85037dbSmrg wlarc= 4544b85037dbSmrg else 4545b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4546b85037dbSmrg _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' 4547b85037dbSmrg fi 4548b85037dbSmrg ;; 4549b85037dbSmrg 4550b85037dbSmrg solaris*) 4551b85037dbSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4552b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4553b85037dbSmrg cat <<_LT_EOF 1>&2 4554b85037dbSmrg 4555b85037dbSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4556b85037dbSmrg*** create shared libraries on Solaris systems. Therefore, libtool 4557b85037dbSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 4558b85037dbSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 4559b85037dbSmrg*** your PATH or compiler configuration so that the native linker is 4560b85037dbSmrg*** used, and then restart. 4561b85037dbSmrg 4562b85037dbSmrg_LT_EOF 4563b85037dbSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4564b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4565b85037dbSmrg _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' 4566b85037dbSmrg else 4567b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4568b85037dbSmrg fi 4569b85037dbSmrg ;; 4570b85037dbSmrg 4571b85037dbSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4572b85037dbSmrg case `$LD -v 2>&1` in 4573b85037dbSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4574b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4575b85037dbSmrg cat <<_LT_EOF 1>&2 4576b85037dbSmrg 4577b85037dbSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4578b85037dbSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4579b85037dbSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 4580b85037dbSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4581b85037dbSmrg*** your PATH or compiler configuration so that the native linker is 4582b85037dbSmrg*** used, and then restart. 4583b85037dbSmrg 4584b85037dbSmrg_LT_EOF 4585b85037dbSmrg ;; 4586b85037dbSmrg *) 4587b85037dbSmrg # For security reasons, it is highly recommended that you always 4588b85037dbSmrg # use absolute paths for naming shared libraries, and exclude the 4589b85037dbSmrg # DT_RUNPATH tag from executables and libraries. But doing so 4590b85037dbSmrg # requires that you compile everything twice, which is a pain. 4591b85037dbSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4592b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4593b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4594b85037dbSmrg _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' 4595b85037dbSmrg else 4596b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4597b85037dbSmrg fi 4598b85037dbSmrg ;; 4599b85037dbSmrg esac 4600b85037dbSmrg ;; 4601b85037dbSmrg 4602b85037dbSmrg sunos4*) 4603b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4604b85037dbSmrg wlarc= 4605b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4606b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4607b85037dbSmrg ;; 4608b85037dbSmrg 4609b85037dbSmrg *) 4610b85037dbSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4611b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4612b85037dbSmrg _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' 4613b85037dbSmrg else 4614b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4615b85037dbSmrg fi 4616b85037dbSmrg ;; 4617b85037dbSmrg esac 4618b85037dbSmrg 4619b85037dbSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4620b85037dbSmrg runpath_var= 4621b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4622b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4623b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4624b85037dbSmrg fi 4625b85037dbSmrg else 4626b85037dbSmrg # PORTME fill in a description of your system's linker (not GNU ld) 4627b85037dbSmrg case $host_os in 4628b85037dbSmrg aix3*) 4629b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4630b85037dbSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 4631b85037dbSmrg _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' 4632b85037dbSmrg # Note: this linker hardcodes the directories in LIBPATH if there 4633b85037dbSmrg # are no directories specified by -L. 4634b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4635b85037dbSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4636b85037dbSmrg # Neither direct hardcoding nor static linking is supported with a 4637b85037dbSmrg # broken collect2. 4638b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4639b85037dbSmrg fi 4640b85037dbSmrg ;; 4641b85037dbSmrg 4642b85037dbSmrg aix[[4-9]]*) 4643b85037dbSmrg if test "$host_cpu" = ia64; then 4644b85037dbSmrg # On IA64, the linker does run time linking by default, so we don't 4645b85037dbSmrg # have to do anything special. 4646b85037dbSmrg aix_use_runtimelinking=no 4647b85037dbSmrg exp_sym_flag='-Bexport' 4648b85037dbSmrg no_entry_flag="" 4649b85037dbSmrg else 4650b85037dbSmrg # If we're using GNU nm, then we don't want the "-C" option. 4651b85037dbSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4652b85037dbSmrg # Also, AIX nm treats weak defined symbols like other global 4653b85037dbSmrg # defined symbols, whereas GNU nm marks them as "W". 4654b85037dbSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4655b85037dbSmrg _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' 4656b85037dbSmrg else 4657b85037dbSmrg _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' 4658b85037dbSmrg fi 4659b85037dbSmrg aix_use_runtimelinking=no 4660b85037dbSmrg 4661b85037dbSmrg # Test if we are trying to use run time linking or normal 4662b85037dbSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4663b85037dbSmrg # need to do runtime linking. 4664b85037dbSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4665b85037dbSmrg for ld_flag in $LDFLAGS; do 4666b85037dbSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4667b85037dbSmrg aix_use_runtimelinking=yes 4668b85037dbSmrg break 4669b85037dbSmrg fi 4670b85037dbSmrg done 4671b85037dbSmrg ;; 4672b85037dbSmrg esac 4673b85037dbSmrg 4674b85037dbSmrg exp_sym_flag='-bexport' 4675b85037dbSmrg no_entry_flag='-bnoentry' 4676b85037dbSmrg fi 4677b85037dbSmrg 4678b85037dbSmrg # When large executables or shared objects are built, AIX ld can 4679b85037dbSmrg # have problems creating the table of contents. If linking a library 4680b85037dbSmrg # or program results in "error TOC overflow" add -mminimal-toc to 4681b85037dbSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4682b85037dbSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4683b85037dbSmrg 4684b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='' 4685b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4686b85037dbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4687b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 4688b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4689b85037dbSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 4690b85037dbSmrg 4691b85037dbSmrg if test "$GCC" = yes; then 4692b85037dbSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 4693b85037dbSmrg # We only want to do this on AIX 4.2 and lower, the check 4694b85037dbSmrg # below for broken collect2 doesn't work under 4.3+ 4695b85037dbSmrg collect2name=`${CC} -print-prog-name=collect2` 4696b85037dbSmrg if test -f "$collect2name" && 4697b85037dbSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 4698b85037dbSmrg then 4699b85037dbSmrg # We have reworked collect2 4700b85037dbSmrg : 4701b85037dbSmrg else 4702b85037dbSmrg # We have old collect2 4703b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4704b85037dbSmrg # It fails to find uninstalled libraries when the uninstalled 4705b85037dbSmrg # path is not listed in the libpath. Setting hardcode_minus_L 4706b85037dbSmrg # to unsupported forces relinking 4707b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4708b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4709b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4710b85037dbSmrg fi 4711b85037dbSmrg ;; 4712b85037dbSmrg esac 4713b85037dbSmrg shared_flag='-shared' 4714b85037dbSmrg if test "$aix_use_runtimelinking" = yes; then 4715b85037dbSmrg shared_flag="$shared_flag "'${wl}-G' 4716b85037dbSmrg fi 4717b85037dbSmrg else 4718b85037dbSmrg # not using gcc 4719b85037dbSmrg if test "$host_cpu" = ia64; then 4720b85037dbSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4721b85037dbSmrg # chokes on -Wl,-G. The following line is correct: 4722b85037dbSmrg shared_flag='-G' 4723b85037dbSmrg else 4724b85037dbSmrg if test "$aix_use_runtimelinking" = yes; then 4725b85037dbSmrg shared_flag='${wl}-G' 4726b85037dbSmrg else 4727b85037dbSmrg shared_flag='${wl}-bM:SRE' 4728b85037dbSmrg fi 4729b85037dbSmrg fi 4730b85037dbSmrg fi 4731b85037dbSmrg 4732b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 4733b85037dbSmrg # It seems that -bexpall does not export symbols beginning with 4734b85037dbSmrg # underscore (_), so it is better to generate a list of symbols to export. 4735b85037dbSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 4736b85037dbSmrg if test "$aix_use_runtimelinking" = yes; then 4737b85037dbSmrg # Warning - without using the other runtime loading flags (-brtl), 4738b85037dbSmrg # -berok will link without error, but may produce a broken library. 4739b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 4740b85037dbSmrg # Determine the default libpath from the value encoded in an 4741b85037dbSmrg # empty executable. 4742b85037dbSmrg _LT_SYS_MODULE_PATH_AIX 4743b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4744b85037dbSmrg _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" 4745b85037dbSmrg else 4746b85037dbSmrg if test "$host_cpu" = ia64; then 4747b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 4748b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 4749b85037dbSmrg _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" 4750b85037dbSmrg else 4751b85037dbSmrg # Determine the default libpath from the value encoded in an 4752b85037dbSmrg # empty executable. 4753b85037dbSmrg _LT_SYS_MODULE_PATH_AIX 4754b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4755b85037dbSmrg # Warning - without using the other run time loading flags, 4756b85037dbSmrg # -berok will link without error, but may produce a broken library. 4757b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 4758b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 4759b85037dbSmrg if test "$with_gnu_ld" = yes; then 4760b85037dbSmrg # We only use this code for GNU lds that support --whole-archive. 4761b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 4762b85037dbSmrg else 4763b85037dbSmrg # Exported symbols can be pulled into shared objects from archives 4764b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 4765b85037dbSmrg fi 4766b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 4767b85037dbSmrg # This is similar to how AIX traditionally builds its shared libraries. 4768b85037dbSmrg _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' 4769b85037dbSmrg fi 4770b85037dbSmrg fi 4771b85037dbSmrg ;; 4772b85037dbSmrg 4773b85037dbSmrg amigaos*) 4774b85037dbSmrg case $host_cpu in 4775b85037dbSmrg powerpc) 4776b85037dbSmrg # see comment about AmigaOS4 .so support 4777b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4778b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4779b85037dbSmrg ;; 4780b85037dbSmrg m68k) 4781b85037dbSmrg _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)' 4782b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4783b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4784b85037dbSmrg ;; 4785b85037dbSmrg esac 4786b85037dbSmrg ;; 4787b85037dbSmrg 4788b85037dbSmrg bsdi[[45]]*) 4789b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 4790b85037dbSmrg ;; 4791b85037dbSmrg 4792b85037dbSmrg cygwin* | mingw* | pw32* | cegcc*) 4793b85037dbSmrg # When not using gcc, we currently assume that we are using 4794b85037dbSmrg # Microsoft Visual C++. 4795b85037dbSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 4796b85037dbSmrg # no search path for DLLs. 4797b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 4798b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4799b85037dbSmrg # Tell ltmain to make .lib files, not .a files. 4800b85037dbSmrg libext=lib 4801b85037dbSmrg # Tell ltmain to make .dll files, not .so files. 4802b85037dbSmrg shrext_cmds=".dll" 4803b85037dbSmrg # FIXME: Setting linknames here is a bad hack. 4804b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 4805b85037dbSmrg # The linker will automatically build a .lib file if we build a DLL. 4806b85037dbSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 4807b85037dbSmrg # FIXME: Should let the user specify the lib program. 4808b85037dbSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 4809b85037dbSmrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 4810b85037dbSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4811b85037dbSmrg ;; 4812b85037dbSmrg 4813b85037dbSmrg darwin* | rhapsody*) 4814b85037dbSmrg _LT_DARWIN_LINKER_FEATURES($1) 4815b85037dbSmrg ;; 4816b85037dbSmrg 4817b85037dbSmrg dgux*) 4818b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4819b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4820b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4821b85037dbSmrg ;; 4822b85037dbSmrg 4823b85037dbSmrg freebsd1*) 4824b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4825b85037dbSmrg ;; 4826b85037dbSmrg 4827b85037dbSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 4828b85037dbSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 4829b85037dbSmrg # does not break anything, and helps significantly (at the cost of a little 4830b85037dbSmrg # extra space). 4831b85037dbSmrg freebsd2.2*) 4832b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 4833b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4834b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4835b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4836b85037dbSmrg ;; 4837b85037dbSmrg 4838b85037dbSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 4839b85037dbSmrg freebsd2*) 4840b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4841b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4842b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4843b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4844b85037dbSmrg ;; 4845b85037dbSmrg 4846b85037dbSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 4847b85037dbSmrg freebsd* | dragonfly*) 4848b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 4849b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4850b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4851b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4852b85037dbSmrg ;; 4853b85037dbSmrg 4854b85037dbSmrg hpux9*) 4855b85037dbSmrg if test "$GCC" = yes; then 4856b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 4857b85037dbSmrg else 4858b85037dbSmrg _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' 4859b85037dbSmrg fi 4860b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4861b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4862b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4863b85037dbSmrg 4864b85037dbSmrg # hardcode_minus_L: Not really in the search PATH, 4865b85037dbSmrg # but as the default location of the library. 4866b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4867b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4868b85037dbSmrg ;; 4869b85037dbSmrg 4870b85037dbSmrg hpux10*) 4871b85037dbSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 4872b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4873b85037dbSmrg else 4874b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 4875b85037dbSmrg fi 4876b85037dbSmrg if test "$with_gnu_ld" = no; then 4877b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4878b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 4879b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4880b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4881b85037dbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4882b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4883b85037dbSmrg # hardcode_minus_L: Not really in the search PATH, 4884b85037dbSmrg # but as the default location of the library. 4885b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4886b85037dbSmrg fi 4887b85037dbSmrg ;; 4888b85037dbSmrg 4889b85037dbSmrg hpux11*) 4890b85037dbSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 4891b85037dbSmrg case $host_cpu in 4892b85037dbSmrg hppa*64*) 4893b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4894b85037dbSmrg ;; 4895b85037dbSmrg ia64*) 4896b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4897b85037dbSmrg ;; 4898b85037dbSmrg *) 4899b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4900b85037dbSmrg ;; 4901b85037dbSmrg esac 4902b85037dbSmrg else 4903b85037dbSmrg case $host_cpu in 4904b85037dbSmrg hppa*64*) 4905b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4906b85037dbSmrg ;; 4907b85037dbSmrg ia64*) 4908b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4909b85037dbSmrg ;; 4910b85037dbSmrg *) 4911b85037dbSmrg m4_if($1, [], [ 4912b85037dbSmrg # Older versions of the 11.00 compiler do not understand -b yet 4913b85037dbSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 4914b85037dbSmrg _LT_LINKER_OPTION([if $CC understands -b], 4915b85037dbSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 4916b85037dbSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 4917b85037dbSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 4918b85037dbSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 4919b85037dbSmrg ;; 4920b85037dbSmrg esac 4921b85037dbSmrg fi 4922b85037dbSmrg if test "$with_gnu_ld" = no; then 4923b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4924b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4925b85037dbSmrg 4926b85037dbSmrg case $host_cpu in 4927b85037dbSmrg hppa*64*|ia64*) 4928b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4929b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4930b85037dbSmrg ;; 4931b85037dbSmrg *) 4932b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4933b85037dbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4934b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4935b85037dbSmrg 4936b85037dbSmrg # hardcode_minus_L: Not really in the search PATH, 4937b85037dbSmrg # but as the default location of the library. 4938b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4939b85037dbSmrg ;; 4940b85037dbSmrg esac 4941b85037dbSmrg fi 4942b85037dbSmrg ;; 4943b85037dbSmrg 4944b85037dbSmrg irix5* | irix6* | nonstopux*) 4945b85037dbSmrg if test "$GCC" = yes; then 4946b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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' 4947b85037dbSmrg # Try to use the -exported_symbol ld option, if it does not 4948b85037dbSmrg # work, assume that -exports_file does not work either and 4949b85037dbSmrg # implicitly export all symbols. 4950b85037dbSmrg save_LDFLAGS="$LDFLAGS" 4951b85037dbSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 4952b85037dbSmrg AC_LINK_IFELSE(int foo(void) {}, 4953b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $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' 4954b85037dbSmrg ) 4955b85037dbSmrg LDFLAGS="$save_LDFLAGS" 4956b85037dbSmrg else 4957b85037dbSmrg _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' 4958b85037dbSmrg _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' 4959b85037dbSmrg fi 4960b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4961b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4962b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4963b85037dbSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 4964b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4965b85037dbSmrg ;; 4966b85037dbSmrg 4967b85037dbSmrg netbsd*) 4968b85037dbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4969b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 4970b85037dbSmrg else 4971b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 4972b85037dbSmrg fi 4973b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4974b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4975b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4976b85037dbSmrg ;; 4977b85037dbSmrg 4978b85037dbSmrg newsos6) 4979b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4980b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4981b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4982b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4983b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4984b85037dbSmrg ;; 4985b85037dbSmrg 4986b85037dbSmrg *nto* | *qnx*) 4987b85037dbSmrg ;; 4988b85037dbSmrg 4989b85037dbSmrg openbsd*) 4990b85037dbSmrg if test -f /usr/libexec/ld.so; then 4991b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4992b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4993b85037dbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4994b85037dbSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4995b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 4996b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 4997b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4998b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4999b85037dbSmrg else 5000b85037dbSmrg case $host_os in 5001b85037dbSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5002b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5003b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5004b85037dbSmrg ;; 5005b85037dbSmrg *) 5006b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5007b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5008b85037dbSmrg ;; 5009b85037dbSmrg esac 5010b85037dbSmrg fi 5011b85037dbSmrg else 5012b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5013b85037dbSmrg fi 5014b85037dbSmrg ;; 5015b85037dbSmrg 5016b85037dbSmrg os2*) 5017b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5018b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5019b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5020b85037dbSmrg _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' 5021b85037dbSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5022b85037dbSmrg ;; 5023b85037dbSmrg 5024b85037dbSmrg osf3*) 5025b85037dbSmrg if test "$GCC" = yes; then 5026b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5027b85037dbSmrg _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' 5028b85037dbSmrg else 5029b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5030b85037dbSmrg _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' 5031b85037dbSmrg fi 5032b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5033b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5034b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5035b85037dbSmrg ;; 5036b85037dbSmrg 5037b85037dbSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5038b85037dbSmrg if test "$GCC" = yes; then 5039b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5040b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_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' 5041b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5042b85037dbSmrg else 5043b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5044b85037dbSmrg _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' 5045b85037dbSmrg _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~ 5046b85037dbSmrg $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' 5047b85037dbSmrg 5048b85037dbSmrg # Both c and cxx compiler support -rpath directly 5049b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5050b85037dbSmrg fi 5051b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5052b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5053b85037dbSmrg ;; 5054b85037dbSmrg 5055b85037dbSmrg solaris*) 5056b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5057b85037dbSmrg if test "$GCC" = yes; then 5058b85037dbSmrg wlarc='${wl}' 5059b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5060b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5061b85037dbSmrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5062b85037dbSmrg else 5063b85037dbSmrg case `$CC -V 2>&1` in 5064b85037dbSmrg *"Compilers 5.0"*) 5065b85037dbSmrg wlarc='' 5066b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5067b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5068b85037dbSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5069b85037dbSmrg ;; 5070b85037dbSmrg *) 5071b85037dbSmrg wlarc='${wl}' 5072b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5073b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5074b85037dbSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5075b85037dbSmrg ;; 5076b85037dbSmrg esac 5077b85037dbSmrg fi 5078b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5079b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5080b85037dbSmrg case $host_os in 5081b85037dbSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5082b85037dbSmrg *) 5083b85037dbSmrg # The compiler driver will combine and reorder linker options, 5084b85037dbSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 5085b85037dbSmrg # but is careful enough not to reorder. 5086b85037dbSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5087b85037dbSmrg if test "$GCC" = yes; then 5088b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5089b85037dbSmrg else 5090b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5091b85037dbSmrg fi 5092b85037dbSmrg ;; 5093b85037dbSmrg esac 5094b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5095b85037dbSmrg ;; 5096b85037dbSmrg 5097b85037dbSmrg sunos4*) 5098b85037dbSmrg if test "x$host_vendor" = xsequent; then 5099b85037dbSmrg # Use $CC to link under sequent, because it throws in some extra .o 5100b85037dbSmrg # files that make .init and .fini sections work. 5101b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5102b85037dbSmrg else 5103b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5104b85037dbSmrg fi 5105b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5106b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5107b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5108b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5109b85037dbSmrg ;; 5110b85037dbSmrg 5111b85037dbSmrg sysv4) 5112b85037dbSmrg case $host_vendor in 5113b85037dbSmrg sni) 5114b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5115b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5116b85037dbSmrg ;; 5117b85037dbSmrg siemens) 5118b85037dbSmrg ## LD is ld it makes a PLAMLIB 5119b85037dbSmrg ## CC just makes a GrossModule. 5120b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5121b85037dbSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5122b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5123b85037dbSmrg ;; 5124b85037dbSmrg motorola) 5125b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5126b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5127b85037dbSmrg ;; 5128b85037dbSmrg esac 5129b85037dbSmrg runpath_var='LD_RUN_PATH' 5130b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5131b85037dbSmrg ;; 5132b85037dbSmrg 5133b85037dbSmrg sysv4.3*) 5134b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5135b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5136b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5137b85037dbSmrg ;; 5138b85037dbSmrg 5139b85037dbSmrg sysv4*MP*) 5140b85037dbSmrg if test -d /usr/nec; then 5141b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5142b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5143b85037dbSmrg runpath_var=LD_RUN_PATH 5144b85037dbSmrg hardcode_runpath_var=yes 5145b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5146b85037dbSmrg fi 5147b85037dbSmrg ;; 5148b85037dbSmrg 5149b85037dbSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5150b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5151b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5152b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5153b85037dbSmrg runpath_var='LD_RUN_PATH' 5154b85037dbSmrg 5155b85037dbSmrg if test "$GCC" = yes; then 5156b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5157b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5158b85037dbSmrg else 5159b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5160b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5161b85037dbSmrg fi 5162b85037dbSmrg ;; 5163b85037dbSmrg 5164b85037dbSmrg sysv5* | sco3.2v5* | sco5v6*) 5165b85037dbSmrg # Note: We can NOT use -z defs as we might desire, because we do not 5166b85037dbSmrg # link with -lc, and that would cause any symbols used from libc to 5167b85037dbSmrg # always be unresolved, which means just about no library would 5168b85037dbSmrg # ever link correctly. If we're not using GNU ld we use -z text 5169b85037dbSmrg # though, which does catch some bad symbols but isn't as heavy-handed 5170b85037dbSmrg # as -z defs. 5171b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5172b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5173b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5174b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5175b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5176b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5177b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5178b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5179b85037dbSmrg runpath_var='LD_RUN_PATH' 5180b85037dbSmrg 5181b85037dbSmrg if test "$GCC" = yes; then 5182b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5183b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5184b85037dbSmrg else 5185b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5186b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5187b85037dbSmrg fi 5188b85037dbSmrg ;; 5189b85037dbSmrg 5190b85037dbSmrg uts4*) 5191b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5192b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5193b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5194b85037dbSmrg ;; 5195b85037dbSmrg 5196b85037dbSmrg *) 5197b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5198b85037dbSmrg ;; 5199b85037dbSmrg esac 5200b85037dbSmrg 5201b85037dbSmrg if test x$host_vendor = xsni; then 5202b85037dbSmrg case $host in 5203b85037dbSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5204b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5205b85037dbSmrg ;; 5206b85037dbSmrg esac 5207b85037dbSmrg fi 5208b85037dbSmrg fi 5209b85037dbSmrg]) 5210b85037dbSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5211b85037dbSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5212b85037dbSmrg 5213b85037dbSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5214b85037dbSmrg 5215b85037dbSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5216b85037dbSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5217b85037dbSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 5218b85037dbSmrg [The commands to extract the exported symbol list from a shared archive]) 5219b85037dbSmrg 5220b85037dbSmrg# 5221b85037dbSmrg# Do we need to explicitly link libc? 5222b85037dbSmrg# 5223b85037dbSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5224b85037dbSmrgx|xyes) 5225b85037dbSmrg # Assume -lc should be added 5226b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5227b85037dbSmrg 5228b85037dbSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5229b85037dbSmrg case $_LT_TAGVAR(archive_cmds, $1) in 5230b85037dbSmrg *'~'*) 5231b85037dbSmrg # FIXME: we may have to deal with multi-command sequences. 5232b85037dbSmrg ;; 5233b85037dbSmrg '$CC '*) 5234b85037dbSmrg # Test whether the compiler implicitly links with -lc since on some 5235b85037dbSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5236b85037dbSmrg # to ld, don't add -lc before -lgcc. 5237b85037dbSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5238b85037dbSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5239b85037dbSmrg [$RM conftest* 5240b85037dbSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5241b85037dbSmrg 5242b85037dbSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5243b85037dbSmrg soname=conftest 5244b85037dbSmrg lib=conftest 5245b85037dbSmrg libobjs=conftest.$ac_objext 5246b85037dbSmrg deplibs= 5247b85037dbSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5248b85037dbSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5249b85037dbSmrg compiler_flags=-v 5250b85037dbSmrg linker_flags=-v 5251b85037dbSmrg verstring= 5252b85037dbSmrg output_objdir=. 5253b85037dbSmrg libname=conftest 5254b85037dbSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5255b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 5256b85037dbSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5257b85037dbSmrg then 5258b85037dbSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5259b85037dbSmrg else 5260b85037dbSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5261b85037dbSmrg fi 5262b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5263b85037dbSmrg else 5264b85037dbSmrg cat conftest.err 1>&5 5265b85037dbSmrg fi 5266b85037dbSmrg $RM conftest* 5267b85037dbSmrg ]) 5268b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5269b85037dbSmrg ;; 5270b85037dbSmrg esac 5271b85037dbSmrg fi 5272b85037dbSmrg ;; 5273b85037dbSmrgesac 5274b85037dbSmrg 5275b85037dbSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5276b85037dbSmrg [Whether or not to add -lc for building shared libraries]) 5277b85037dbSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5278b85037dbSmrg [enable_shared_with_static_runtimes], [0], 5279b85037dbSmrg [Whether or not to disallow shared libs when runtime libs are static]) 5280b85037dbSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5281b85037dbSmrg [Compiler flag to allow reflexive dlopens]) 5282b85037dbSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5283b85037dbSmrg [Compiler flag to generate shared objects directly from archives]) 5284b85037dbSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 5285b85037dbSmrg [Whether the compiler copes with passing no objects directly]) 5286b85037dbSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5287b85037dbSmrg [Create an old-style archive from a shared archive]) 5288b85037dbSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5289b85037dbSmrg [Create a temporary old-style archive to link instead of a shared archive]) 5290b85037dbSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5291b85037dbSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5292b85037dbSmrg_LT_TAGDECL([], [module_cmds], [2], 5293b85037dbSmrg [Commands used to build a loadable module if different from building 5294b85037dbSmrg a shared archive.]) 5295b85037dbSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5296b85037dbSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 5297b85037dbSmrg [Whether we are building with GNU ld or not]) 5298b85037dbSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5299b85037dbSmrg [Flag that allows shared libraries with undefined symbols to be built]) 5300b85037dbSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 5301b85037dbSmrg [Flag that enforces no undefined symbols]) 5302b85037dbSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5303b85037dbSmrg [Flag to hardcode $libdir into a binary during linking. 5304b85037dbSmrg This must work even if $libdir does not exist]) 5305b85037dbSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 5306b85037dbSmrg [[If ld is used when linking, flag to hardcode $libdir into a binary 5307b85037dbSmrg during linking. This must work even if $libdir does not exist]]) 5308b85037dbSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5309b85037dbSmrg [Whether we need a single "-rpath" flag with a separated argument]) 5310b85037dbSmrg_LT_TAGDECL([], [hardcode_direct], [0], 5311b85037dbSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5312b85037dbSmrg DIR into the resulting binary]) 5313b85037dbSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5314b85037dbSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5315b85037dbSmrg DIR into the resulting binary and the resulting library dependency is 5316b85037dbSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5317b85037dbSmrg library is relocated]) 5318b85037dbSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5319b85037dbSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5320b85037dbSmrg into the resulting binary]) 5321b85037dbSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5322b85037dbSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5323b85037dbSmrg into the resulting binary]) 5324b85037dbSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 5325b85037dbSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 5326b85037dbSmrg into the library and all subsequent libraries and executables linked 5327b85037dbSmrg against it]) 5328b85037dbSmrg_LT_TAGDECL([], [inherit_rpath], [0], 5329b85037dbSmrg [Set to yes if linker adds runtime paths of dependent libraries 5330b85037dbSmrg to runtime path list]) 5331b85037dbSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 5332b85037dbSmrg [Whether libtool must link a program against all its dependency libraries]) 5333b85037dbSmrg_LT_TAGDECL([], [fix_srcfile_path], [1], 5334b85037dbSmrg [Fix the shell variable $srcfile for the compiler]) 5335b85037dbSmrg_LT_TAGDECL([], [always_export_symbols], [0], 5336b85037dbSmrg [Set to "yes" if exported symbols are required]) 5337b85037dbSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5338b85037dbSmrg [The commands to list exported symbols]) 5339b85037dbSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 5340b85037dbSmrg [Symbols that should not be listed in the preloaded symbols]) 5341b85037dbSmrg_LT_TAGDECL([], [include_expsyms], [1], 5342b85037dbSmrg [Symbols that must always be exported]) 5343b85037dbSmrg_LT_TAGDECL([], [prelink_cmds], [2], 5344b85037dbSmrg [Commands necessary for linking programs (against libraries) with templates]) 5345b85037dbSmrg_LT_TAGDECL([], [file_list_spec], [1], 5346b85037dbSmrg [Specify filename containing input files]) 5347b85037dbSmrgdnl FIXME: Not yet implemented 5348b85037dbSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5349b85037dbSmrgdnl [Compiler flag to generate thread safe objects]) 5350b85037dbSmrg])# _LT_LINKER_SHLIBS 5351b85037dbSmrg 5352b85037dbSmrg 5353b85037dbSmrg# _LT_LANG_C_CONFIG([TAG]) 5354b85037dbSmrg# ------------------------ 5355b85037dbSmrg# Ensure that the configuration variables for a C compiler are suitably 5356b85037dbSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 5357b85037dbSmrg# the compiler configuration to `libtool'. 5358b85037dbSmrgm4_defun([_LT_LANG_C_CONFIG], 5359b85037dbSmrg[m4_require([_LT_DECL_EGREP])dnl 5360b85037dbSmrglt_save_CC="$CC" 5361b85037dbSmrgAC_LANG_PUSH(C) 5362b85037dbSmrg 5363b85037dbSmrg# Source file extension for C test sources. 5364b85037dbSmrgac_ext=c 5365b85037dbSmrg 5366b85037dbSmrg# Object file extension for compiled C test sources. 5367b85037dbSmrgobjext=o 5368b85037dbSmrg_LT_TAGVAR(objext, $1)=$objext 5369b85037dbSmrg 5370b85037dbSmrg# Code to be used in simple compile tests 5371b85037dbSmrglt_simple_compile_test_code="int some_variable = 0;" 5372b85037dbSmrg 5373b85037dbSmrg# Code to be used in simple link tests 5374b85037dbSmrglt_simple_link_test_code='int main(){return(0);}' 5375b85037dbSmrg 5376b85037dbSmrg_LT_TAG_COMPILER 5377b85037dbSmrg# Save the default compiler, since it gets overwritten when the other 5378b85037dbSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5379b85037dbSmrgcompiler_DEFAULT=$CC 5380b85037dbSmrg 5381b85037dbSmrg# save warnings/boilerplate of simple test code 5382b85037dbSmrg_LT_COMPILER_BOILERPLATE 5383b85037dbSmrg_LT_LINKER_BOILERPLATE 5384b85037dbSmrg 5385b85037dbSmrgif test -n "$compiler"; then 5386b85037dbSmrg _LT_COMPILER_NO_RTTI($1) 5387b85037dbSmrg _LT_COMPILER_PIC($1) 5388b85037dbSmrg _LT_COMPILER_C_O($1) 5389b85037dbSmrg _LT_COMPILER_FILE_LOCKS($1) 5390b85037dbSmrg _LT_LINKER_SHLIBS($1) 5391b85037dbSmrg _LT_SYS_DYNAMIC_LINKER($1) 5392b85037dbSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 5393b85037dbSmrg LT_SYS_DLOPEN_SELF 5394b85037dbSmrg _LT_CMD_STRIPLIB 5395b85037dbSmrg 5396b85037dbSmrg # Report which library types will actually be built 5397b85037dbSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5398b85037dbSmrg AC_MSG_RESULT([$can_build_shared]) 5399b85037dbSmrg 5400b85037dbSmrg AC_MSG_CHECKING([whether to build shared libraries]) 5401b85037dbSmrg test "$can_build_shared" = "no" && enable_shared=no 5402b85037dbSmrg 5403b85037dbSmrg # On AIX, shared libraries and static libraries use the same namespace, and 5404b85037dbSmrg # are all built from PIC. 5405b85037dbSmrg case $host_os in 5406b85037dbSmrg aix3*) 5407b85037dbSmrg test "$enable_shared" = yes && enable_static=no 5408b85037dbSmrg if test -n "$RANLIB"; then 5409b85037dbSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5410b85037dbSmrg postinstall_cmds='$RANLIB $lib' 5411b85037dbSmrg fi 5412b85037dbSmrg ;; 5413b85037dbSmrg 5414b85037dbSmrg aix[[4-9]]*) 5415b85037dbSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5416b85037dbSmrg test "$enable_shared" = yes && enable_static=no 5417b85037dbSmrg fi 5418b85037dbSmrg ;; 5419b85037dbSmrg esac 5420b85037dbSmrg AC_MSG_RESULT([$enable_shared]) 5421b85037dbSmrg 5422b85037dbSmrg AC_MSG_CHECKING([whether to build static libraries]) 5423b85037dbSmrg # Make sure either enable_shared or enable_static is yes. 5424b85037dbSmrg test "$enable_shared" = yes || enable_static=yes 5425b85037dbSmrg AC_MSG_RESULT([$enable_static]) 5426b85037dbSmrg 5427b85037dbSmrg _LT_CONFIG($1) 5428b85037dbSmrgfi 5429b85037dbSmrgAC_LANG_POP 5430b85037dbSmrgCC="$lt_save_CC" 5431b85037dbSmrg])# _LT_LANG_C_CONFIG 5432b85037dbSmrg 5433b85037dbSmrg 5434b85037dbSmrg# _LT_LANG_CXX_CONFIG([TAG]) 5435b85037dbSmrg# -------------------------- 5436b85037dbSmrg# Ensure that the configuration variables for a C++ compiler are suitably 5437b85037dbSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 5438b85037dbSmrg# the compiler configuration to `libtool'. 5439b85037dbSmrgm4_defun([_LT_LANG_CXX_CONFIG], 5440b85037dbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5441b85037dbSmrgm4_require([_LT_DECL_EGREP])dnl 5442b85037dbSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5443b85037dbSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5444b85037dbSmrg (test "X$CXX" != "Xg++"))) ; then 5445b85037dbSmrg AC_PROG_CXXCPP 5446b85037dbSmrgelse 5447b85037dbSmrg _lt_caught_CXX_error=yes 5448b85037dbSmrgfi 5449b85037dbSmrg 5450b85037dbSmrgAC_LANG_PUSH(C++) 5451b85037dbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5452b85037dbSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 5453b85037dbSmrg_LT_TAGVAR(always_export_symbols, $1)=no 5454b85037dbSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5455b85037dbSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 5456b85037dbSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5457b85037dbSmrg_LT_TAGVAR(hardcode_direct, $1)=no 5458b85037dbSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5459b85037dbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5460b85037dbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5461b85037dbSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5462b85037dbSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5463b85037dbSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5464b85037dbSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 5465b85037dbSmrg_LT_TAGVAR(inherit_rpath, $1)=no 5466b85037dbSmrg_LT_TAGVAR(module_cmds, $1)= 5467b85037dbSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 5468b85037dbSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5469b85037dbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5470b85037dbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 5471b85037dbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5472b85037dbSmrg_LT_TAGVAR(no_undefined_flag, $1)= 5473b85037dbSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5474b85037dbSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5475b85037dbSmrg 5476b85037dbSmrg# Source file extension for C++ test sources. 5477b85037dbSmrgac_ext=cpp 5478b85037dbSmrg 5479b85037dbSmrg# Object file extension for compiled C++ test sources. 5480b85037dbSmrgobjext=o 5481b85037dbSmrg_LT_TAGVAR(objext, $1)=$objext 5482b85037dbSmrg 5483b85037dbSmrg# No sense in running all these tests if we already determined that 5484b85037dbSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 5485b85037dbSmrg# are currently assumed to apply to all compilers on this platform, 5486b85037dbSmrg# and will be corrupted by setting them based on a non-working compiler. 5487b85037dbSmrgif test "$_lt_caught_CXX_error" != yes; then 5488b85037dbSmrg # Code to be used in simple compile tests 5489b85037dbSmrg lt_simple_compile_test_code="int some_variable = 0;" 5490b85037dbSmrg 5491b85037dbSmrg # Code to be used in simple link tests 5492b85037dbSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5493b85037dbSmrg 5494b85037dbSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5495b85037dbSmrg _LT_TAG_COMPILER 5496b85037dbSmrg 5497b85037dbSmrg # save warnings/boilerplate of simple test code 5498b85037dbSmrg _LT_COMPILER_BOILERPLATE 5499b85037dbSmrg _LT_LINKER_BOILERPLATE 5500b85037dbSmrg 5501b85037dbSmrg # Allow CC to be a program name with arguments. 5502b85037dbSmrg lt_save_CC=$CC 5503b85037dbSmrg lt_save_LD=$LD 5504b85037dbSmrg lt_save_GCC=$GCC 5505b85037dbSmrg GCC=$GXX 5506b85037dbSmrg lt_save_with_gnu_ld=$with_gnu_ld 5507b85037dbSmrg lt_save_path_LD=$lt_cv_path_LD 5508b85037dbSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5509b85037dbSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5510b85037dbSmrg else 5511b85037dbSmrg $as_unset lt_cv_prog_gnu_ld 5512b85037dbSmrg fi 5513b85037dbSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 5514b85037dbSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 5515b85037dbSmrg else 5516b85037dbSmrg $as_unset lt_cv_path_LD 5517b85037dbSmrg fi 5518b85037dbSmrg test -z "${LDCXX+set}" || LD=$LDCXX 5519b85037dbSmrg CC=${CXX-"c++"} 5520b85037dbSmrg compiler=$CC 5521b85037dbSmrg _LT_TAGVAR(compiler, $1)=$CC 5522b85037dbSmrg _LT_CC_BASENAME([$compiler]) 5523b85037dbSmrg 5524b85037dbSmrg if test -n "$compiler"; then 5525b85037dbSmrg # We don't want -fno-exception when compiling C++ code, so set the 5526b85037dbSmrg # no_builtin_flag separately 5527b85037dbSmrg if test "$GXX" = yes; then 5528b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5529b85037dbSmrg else 5530b85037dbSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5531b85037dbSmrg fi 5532b85037dbSmrg 5533b85037dbSmrg if test "$GXX" = yes; then 5534b85037dbSmrg # Set up default GNU C++ configuration 5535b85037dbSmrg 5536b85037dbSmrg LT_PATH_LD 5537b85037dbSmrg 5538b85037dbSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5539b85037dbSmrg # archiving commands below assume that GNU ld is being used. 5540b85037dbSmrg if test "$with_gnu_ld" = yes; then 5541b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5542b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 5543b85037dbSmrg 5544b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5545b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5546b85037dbSmrg 5547b85037dbSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5548b85037dbSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5549b85037dbSmrg # investigate it a little bit more. (MM) 5550b85037dbSmrg wlarc='${wl}' 5551b85037dbSmrg 5552b85037dbSmrg # ancient GNU ld didn't support --whole-archive et. al. 5553b85037dbSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5554b85037dbSmrg $GREP 'no-whole-archive' > /dev/null; then 5555b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5556b85037dbSmrg else 5557b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5558b85037dbSmrg fi 5559b85037dbSmrg else 5560b85037dbSmrg with_gnu_ld=no 5561b85037dbSmrg wlarc= 5562b85037dbSmrg 5563b85037dbSmrg # A generic and very simple default shared library creation 5564b85037dbSmrg # command for GNU C++ for the case where it uses the native 5565b85037dbSmrg # linker, instead of GNU ld. If possible, this setting should 5566b85037dbSmrg # overridden to take advantage of the native linker features on 5567b85037dbSmrg # the platform it is being used on. 5568b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5569b85037dbSmrg fi 5570b85037dbSmrg 5571b85037dbSmrg # Commands to make compiler produce verbose output that lists 5572b85037dbSmrg # what "hidden" libraries, object files and flags are used when 5573b85037dbSmrg # linking a shared library. 5574b85037dbSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5575b85037dbSmrg 5576b85037dbSmrg else 5577b85037dbSmrg GXX=no 5578b85037dbSmrg with_gnu_ld=no 5579b85037dbSmrg wlarc= 5580b85037dbSmrg fi 5581b85037dbSmrg 5582b85037dbSmrg # PORTME: fill in a description of your system's C++ link characteristics 5583b85037dbSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5584b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5585b85037dbSmrg case $host_os in 5586b85037dbSmrg aix3*) 5587b85037dbSmrg # FIXME: insert proper C++ library support 5588b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5589b85037dbSmrg ;; 5590b85037dbSmrg aix[[4-9]]*) 5591b85037dbSmrg if test "$host_cpu" = ia64; then 5592b85037dbSmrg # On IA64, the linker does run time linking by default, so we don't 5593b85037dbSmrg # have to do anything special. 5594b85037dbSmrg aix_use_runtimelinking=no 5595b85037dbSmrg exp_sym_flag='-Bexport' 5596b85037dbSmrg no_entry_flag="" 5597b85037dbSmrg else 5598b85037dbSmrg aix_use_runtimelinking=no 5599b85037dbSmrg 5600b85037dbSmrg # Test if we are trying to use run time linking or normal 5601b85037dbSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5602b85037dbSmrg # need to do runtime linking. 5603b85037dbSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5604b85037dbSmrg for ld_flag in $LDFLAGS; do 5605b85037dbSmrg case $ld_flag in 5606b85037dbSmrg *-brtl*) 5607b85037dbSmrg aix_use_runtimelinking=yes 5608b85037dbSmrg break 5609b85037dbSmrg ;; 5610b85037dbSmrg esac 5611b85037dbSmrg done 5612b85037dbSmrg ;; 5613b85037dbSmrg esac 5614b85037dbSmrg 5615b85037dbSmrg exp_sym_flag='-bexport' 5616b85037dbSmrg no_entry_flag='-bnoentry' 5617b85037dbSmrg fi 5618b85037dbSmrg 5619b85037dbSmrg # When large executables or shared objects are built, AIX ld can 5620b85037dbSmrg # have problems creating the table of contents. If linking a library 5621b85037dbSmrg # or program results in "error TOC overflow" add -mminimal-toc to 5622b85037dbSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5623b85037dbSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5624b85037dbSmrg 5625b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='' 5626b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5627b85037dbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5628b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5629b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5630b85037dbSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5631b85037dbSmrg 5632b85037dbSmrg if test "$GXX" = yes; then 5633b85037dbSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5634b85037dbSmrg # We only want to do this on AIX 4.2 and lower, the check 5635b85037dbSmrg # below for broken collect2 doesn't work under 4.3+ 5636b85037dbSmrg collect2name=`${CC} -print-prog-name=collect2` 5637b85037dbSmrg if test -f "$collect2name" && 5638b85037dbSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5639b85037dbSmrg then 5640b85037dbSmrg # We have reworked collect2 5641b85037dbSmrg : 5642b85037dbSmrg else 5643b85037dbSmrg # We have old collect2 5644b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5645b85037dbSmrg # It fails to find uninstalled libraries when the uninstalled 5646b85037dbSmrg # path is not listed in the libpath. Setting hardcode_minus_L 5647b85037dbSmrg # to unsupported forces relinking 5648b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5649b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5650b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5651b85037dbSmrg fi 5652b85037dbSmrg esac 5653b85037dbSmrg shared_flag='-shared' 5654b85037dbSmrg if test "$aix_use_runtimelinking" = yes; then 5655b85037dbSmrg shared_flag="$shared_flag "'${wl}-G' 5656b85037dbSmrg fi 5657b85037dbSmrg else 5658b85037dbSmrg # not using gcc 5659b85037dbSmrg if test "$host_cpu" = ia64; then 5660b85037dbSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5661b85037dbSmrg # chokes on -Wl,-G. The following line is correct: 5662b85037dbSmrg shared_flag='-G' 5663b85037dbSmrg else 5664b85037dbSmrg if test "$aix_use_runtimelinking" = yes; then 5665b85037dbSmrg shared_flag='${wl}-G' 5666b85037dbSmrg else 5667b85037dbSmrg shared_flag='${wl}-bM:SRE' 5668b85037dbSmrg fi 5669b85037dbSmrg fi 5670b85037dbSmrg fi 5671b85037dbSmrg 5672b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5673b85037dbSmrg # It seems that -bexpall does not export symbols beginning with 5674b85037dbSmrg # underscore (_), so it is better to generate a list of symbols to 5675b85037dbSmrg # export. 5676b85037dbSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5677b85037dbSmrg if test "$aix_use_runtimelinking" = yes; then 5678b85037dbSmrg # Warning - without using the other runtime loading flags (-brtl), 5679b85037dbSmrg # -berok will link without error, but may produce a broken library. 5680b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5681b85037dbSmrg # Determine the default libpath from the value encoded in an empty 5682b85037dbSmrg # executable. 5683b85037dbSmrg _LT_SYS_MODULE_PATH_AIX 5684b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5685b85037dbSmrg 5686b85037dbSmrg _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" 5687b85037dbSmrg else 5688b85037dbSmrg if test "$host_cpu" = ia64; then 5689b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5690b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5691b85037dbSmrg _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" 5692b85037dbSmrg else 5693b85037dbSmrg # Determine the default libpath from the value encoded in an 5694b85037dbSmrg # empty executable. 5695b85037dbSmrg _LT_SYS_MODULE_PATH_AIX 5696b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5697b85037dbSmrg # Warning - without using the other run time loading flags, 5698b85037dbSmrg # -berok will link without error, but may produce a broken library. 5699b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5700b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5701b85037dbSmrg if test "$with_gnu_ld" = yes; then 5702b85037dbSmrg # We only use this code for GNU lds that support --whole-archive. 5703b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5704b85037dbSmrg else 5705b85037dbSmrg # Exported symbols can be pulled into shared objects from archives 5706b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5707b85037dbSmrg fi 5708b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5709b85037dbSmrg # This is similar to how AIX traditionally builds its shared 5710b85037dbSmrg # libraries. 5711b85037dbSmrg _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' 5712b85037dbSmrg fi 5713b85037dbSmrg fi 5714b85037dbSmrg ;; 5715b85037dbSmrg 5716b85037dbSmrg beos*) 5717b85037dbSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5718b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5719b85037dbSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5720b85037dbSmrg # support --undefined. This deserves some investigation. FIXME 5721b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5722b85037dbSmrg else 5723b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5724b85037dbSmrg fi 5725b85037dbSmrg ;; 5726b85037dbSmrg 5727b85037dbSmrg chorus*) 5728b85037dbSmrg case $cc_basename in 5729b85037dbSmrg *) 5730b85037dbSmrg # FIXME: insert proper C++ library support 5731b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5732b85037dbSmrg ;; 5733b85037dbSmrg esac 5734b85037dbSmrg ;; 5735b85037dbSmrg 5736b85037dbSmrg cygwin* | mingw* | pw32* | cegcc*) 5737b85037dbSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5738b85037dbSmrg # as there is no search path for DLLs. 5739b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5740b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 5741b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5742b85037dbSmrg _LT_TAGVAR(always_export_symbols, $1)=no 5743b85037dbSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5744b85037dbSmrg 5745b85037dbSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5746b85037dbSmrg _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' 5747b85037dbSmrg # If the export-symbols file already is a .def file (1st line 5748b85037dbSmrg # is EXPORTS), use it as is; otherwise, prepend... 5749b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5750b85037dbSmrg cp $export_symbols $output_objdir/$soname.def; 5751b85037dbSmrg else 5752b85037dbSmrg echo EXPORTS > $output_objdir/$soname.def; 5753b85037dbSmrg cat $export_symbols >> $output_objdir/$soname.def; 5754b85037dbSmrg fi~ 5755b85037dbSmrg $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' 5756b85037dbSmrg else 5757b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5758b85037dbSmrg fi 5759b85037dbSmrg ;; 5760b85037dbSmrg darwin* | rhapsody*) 5761b85037dbSmrg _LT_DARWIN_LINKER_FEATURES($1) 5762b85037dbSmrg ;; 5763b85037dbSmrg 5764b85037dbSmrg dgux*) 5765b85037dbSmrg case $cc_basename in 5766b85037dbSmrg ec++*) 5767b85037dbSmrg # FIXME: insert proper C++ library support 5768b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5769b85037dbSmrg ;; 5770b85037dbSmrg ghcx*) 5771b85037dbSmrg # Green Hills C++ Compiler 5772b85037dbSmrg # FIXME: insert proper C++ library support 5773b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5774b85037dbSmrg ;; 5775b85037dbSmrg *) 5776b85037dbSmrg # FIXME: insert proper C++ library support 5777b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5778b85037dbSmrg ;; 5779b85037dbSmrg esac 5780b85037dbSmrg ;; 5781b85037dbSmrg 5782b85037dbSmrg freebsd[[12]]*) 5783b85037dbSmrg # C++ shared libraries reported to be fairly broken before 5784b85037dbSmrg # switch to ELF 5785b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5786b85037dbSmrg ;; 5787b85037dbSmrg 5788b85037dbSmrg freebsd-elf*) 5789b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5790b85037dbSmrg ;; 5791b85037dbSmrg 5792b85037dbSmrg freebsd* | dragonfly*) 5793b85037dbSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 5794b85037dbSmrg # conventions 5795b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5796b85037dbSmrg ;; 5797b85037dbSmrg 5798b85037dbSmrg gnu*) 5799b85037dbSmrg ;; 5800b85037dbSmrg 5801b85037dbSmrg haiku*) 5802b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5803b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5804b85037dbSmrg ;; 5805b85037dbSmrg 5806b85037dbSmrg hpux9*) 5807b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5808b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5809b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5810b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5811b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5812b85037dbSmrg # but as the default 5813b85037dbSmrg # location of the library. 5814b85037dbSmrg 5815b85037dbSmrg case $cc_basename in 5816b85037dbSmrg CC*) 5817b85037dbSmrg # FIXME: insert proper C++ library support 5818b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5819b85037dbSmrg ;; 5820b85037dbSmrg aCC*) 5821b85037dbSmrg _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' 5822b85037dbSmrg # Commands to make compiler produce verbose output that lists 5823b85037dbSmrg # what "hidden" libraries, object files and flags are used when 5824b85037dbSmrg # linking a shared library. 5825b85037dbSmrg # 5826b85037dbSmrg # There doesn't appear to be a way to prevent this compiler from 5827b85037dbSmrg # explicitly linking system object files so we need to strip them 5828b85037dbSmrg # from the output so that they don't get included in the library 5829b85037dbSmrg # dependencies. 5830b85037dbSmrg 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"' 5831b85037dbSmrg ;; 5832b85037dbSmrg *) 5833b85037dbSmrg if test "$GXX" = yes; then 5834b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5835b85037dbSmrg else 5836b85037dbSmrg # FIXME: insert proper C++ library support 5837b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5838b85037dbSmrg fi 5839b85037dbSmrg ;; 5840b85037dbSmrg esac 5841b85037dbSmrg ;; 5842b85037dbSmrg 5843b85037dbSmrg hpux10*|hpux11*) 5844b85037dbSmrg if test $with_gnu_ld = no; then 5845b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5846b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5847b85037dbSmrg 5848b85037dbSmrg case $host_cpu in 5849b85037dbSmrg hppa*64*|ia64*) 5850b85037dbSmrg ;; 5851b85037dbSmrg *) 5852b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5853b85037dbSmrg ;; 5854b85037dbSmrg esac 5855b85037dbSmrg fi 5856b85037dbSmrg case $host_cpu in 5857b85037dbSmrg hppa*64*|ia64*) 5858b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5859b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5860b85037dbSmrg ;; 5861b85037dbSmrg *) 5862b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5863b85037dbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5864b85037dbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5865b85037dbSmrg # but as the default 5866b85037dbSmrg # location of the library. 5867b85037dbSmrg ;; 5868b85037dbSmrg esac 5869b85037dbSmrg 5870b85037dbSmrg case $cc_basename in 5871b85037dbSmrg CC*) 5872b85037dbSmrg # FIXME: insert proper C++ library support 5873b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5874b85037dbSmrg ;; 5875b85037dbSmrg aCC*) 5876b85037dbSmrg case $host_cpu in 5877b85037dbSmrg hppa*64*) 5878b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5879b85037dbSmrg ;; 5880b85037dbSmrg ia64*) 5881b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5882b85037dbSmrg ;; 5883b85037dbSmrg *) 5884b85037dbSmrg _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' 5885b85037dbSmrg ;; 5886b85037dbSmrg esac 5887b85037dbSmrg # Commands to make compiler produce verbose output that lists 5888b85037dbSmrg # what "hidden" libraries, object files and flags are used when 5889b85037dbSmrg # linking a shared library. 5890b85037dbSmrg # 5891b85037dbSmrg # There doesn't appear to be a way to prevent this compiler from 5892b85037dbSmrg # explicitly linking system object files so we need to strip them 5893b85037dbSmrg # from the output so that they don't get included in the library 5894b85037dbSmrg # dependencies. 5895b85037dbSmrg 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"' 5896b85037dbSmrg ;; 5897b85037dbSmrg *) 5898b85037dbSmrg if test "$GXX" = yes; then 5899b85037dbSmrg if test $with_gnu_ld = no; then 5900b85037dbSmrg case $host_cpu in 5901b85037dbSmrg hppa*64*) 5902b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5903b85037dbSmrg ;; 5904b85037dbSmrg ia64*) 5905b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5906b85037dbSmrg ;; 5907b85037dbSmrg *) 5908b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5909b85037dbSmrg ;; 5910b85037dbSmrg esac 5911b85037dbSmrg fi 5912b85037dbSmrg else 5913b85037dbSmrg # FIXME: insert proper C++ library support 5914b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5915b85037dbSmrg fi 5916b85037dbSmrg ;; 5917b85037dbSmrg esac 5918b85037dbSmrg ;; 5919b85037dbSmrg 5920b85037dbSmrg interix[[3-9]]*) 5921b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5922b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5923b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5924b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5925b85037dbSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5926b85037dbSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5927b85037dbSmrg # default) and relocated if they conflict, which is a slow very memory 5928b85037dbSmrg # consuming and fragmenting process. To avoid this, we pick a random, 5929b85037dbSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5930b85037dbSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5931b85037dbSmrg _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' 5932b85037dbSmrg _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' 5933b85037dbSmrg ;; 5934b85037dbSmrg irix5* | irix6*) 5935b85037dbSmrg case $cc_basename in 5936b85037dbSmrg CC*) 5937b85037dbSmrg # SGI C++ 5938b85037dbSmrg _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' 5939b85037dbSmrg 5940b85037dbSmrg # Archives containing C++ object files must be created using 5941b85037dbSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 5942b85037dbSmrg # necessary to make sure instantiated templates are included 5943b85037dbSmrg # in the archive. 5944b85037dbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 5945b85037dbSmrg ;; 5946b85037dbSmrg *) 5947b85037dbSmrg if test "$GXX" = yes; then 5948b85037dbSmrg if test "$with_gnu_ld" = no; then 5949b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 5950b85037dbSmrg else 5951b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 5952b85037dbSmrg fi 5953b85037dbSmrg fi 5954b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5955b85037dbSmrg ;; 5956b85037dbSmrg esac 5957b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5958b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5959b85037dbSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 5960b85037dbSmrg ;; 5961b85037dbSmrg 5962b85037dbSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 5963b85037dbSmrg case $cc_basename in 5964b85037dbSmrg KCC*) 5965b85037dbSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 5966b85037dbSmrg 5967b85037dbSmrg # KCC will only create a shared library if the output file 5968b85037dbSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 5969b85037dbSmrg # to its proper name (with version) after linking. 5970b85037dbSmrg _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' 5971b85037dbSmrg _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' 5972b85037dbSmrg # Commands to make compiler produce verbose output that lists 5973b85037dbSmrg # what "hidden" libraries, object files and flags are used when 5974b85037dbSmrg # linking a shared library. 5975b85037dbSmrg # 5976b85037dbSmrg # There doesn't appear to be a way to prevent this compiler from 5977b85037dbSmrg # explicitly linking system object files so we need to strip them 5978b85037dbSmrg # from the output so that they don't get included in the library 5979b85037dbSmrg # dependencies. 5980b85037dbSmrg 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"' 5981b85037dbSmrg 5982b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5983b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5984b85037dbSmrg 5985b85037dbSmrg # Archives containing C++ object files must be created using 5986b85037dbSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 5987b85037dbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 5988b85037dbSmrg ;; 5989b85037dbSmrg icpc* | ecpc* ) 5990b85037dbSmrg # Intel C++ 5991b85037dbSmrg with_gnu_ld=yes 5992b85037dbSmrg # version 8.0 and above of icpc choke on multiply defined symbols 5993b85037dbSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 5994b85037dbSmrg # earlier do not add the objects themselves. 5995b85037dbSmrg case `$CC -V 2>&1` in 5996b85037dbSmrg *"Version 7."*) 5997b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5998b85037dbSmrg _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' 5999b85037dbSmrg ;; 6000b85037dbSmrg *) # Version 8.0 or newer 6001b85037dbSmrg tmp_idyn= 6002b85037dbSmrg case $host_cpu in 6003b85037dbSmrg ia64*) tmp_idyn=' -i_dynamic';; 6004b85037dbSmrg esac 6005b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6006b85037dbSmrg _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' 6007b85037dbSmrg ;; 6008b85037dbSmrg esac 6009b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6010b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6011b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6012b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6013b85037dbSmrg ;; 6014b85037dbSmrg pgCC* | pgcpp*) 6015b85037dbSmrg # Portland Group C++ compiler 6016b85037dbSmrg case `$CC -V` in 6017b85037dbSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6018b85037dbSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6019b85037dbSmrg rm -rf $tpldir~ 6020b85037dbSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6021b85037dbSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6022b85037dbSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6023b85037dbSmrg rm -rf $tpldir~ 6024b85037dbSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6025b85037dbSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6026b85037dbSmrg $RANLIB $oldlib' 6027b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6028b85037dbSmrg rm -rf $tpldir~ 6029b85037dbSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6030b85037dbSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6031b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6032b85037dbSmrg rm -rf $tpldir~ 6033b85037dbSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6034b85037dbSmrg $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' 6035b85037dbSmrg ;; 6036b85037dbSmrg *) # Version 6 and above use weak symbols 6037b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6038b85037dbSmrg _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' 6039b85037dbSmrg ;; 6040b85037dbSmrg esac 6041b85037dbSmrg 6042b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6043b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6044b85037dbSmrg _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' 6045b85037dbSmrg ;; 6046b85037dbSmrg cxx*) 6047b85037dbSmrg # Compaq C++ 6048b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6049b85037dbSmrg _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' 6050b85037dbSmrg 6051b85037dbSmrg runpath_var=LD_RUN_PATH 6052b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6053b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6054b85037dbSmrg 6055b85037dbSmrg # Commands to make compiler produce verbose output that lists 6056b85037dbSmrg # what "hidden" libraries, object files and flags are used when 6057b85037dbSmrg # linking a shared library. 6058b85037dbSmrg # 6059b85037dbSmrg # There doesn't appear to be a way to prevent this compiler from 6060b85037dbSmrg # explicitly linking system object files so we need to strip them 6061b85037dbSmrg # from the output so that they don't get included in the library 6062b85037dbSmrg # dependencies. 6063b85037dbSmrg 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' 6064b85037dbSmrg ;; 6065b85037dbSmrg xl* | mpixl* | bgxl*) 6066b85037dbSmrg # IBM XL 8.0 on PPC, with GNU ld 6067b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6068b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6069b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6070b85037dbSmrg if test "x$supports_anon_versioning" = xyes; then 6071b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6072b85037dbSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6073b85037dbSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6074b85037dbSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6075b85037dbSmrg fi 6076b85037dbSmrg ;; 6077b85037dbSmrg *) 6078b85037dbSmrg case `$CC -V 2>&1 | sed 5q` in 6079b85037dbSmrg *Sun\ C*) 6080b85037dbSmrg # Sun C++ 5.9 6081b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6082b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6083b85037dbSmrg _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' 6084b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6085b85037dbSmrg _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' 6086b85037dbSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6087b85037dbSmrg 6088b85037dbSmrg # Not sure whether something based on 6089b85037dbSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6090b85037dbSmrg # would be better. 6091b85037dbSmrg output_verbose_link_cmd='func_echo_all' 6092b85037dbSmrg 6093b85037dbSmrg # Archives containing C++ object files must be created using 6094b85037dbSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6095b85037dbSmrg # necessary to make sure instantiated templates are included 6096b85037dbSmrg # in the archive. 6097b85037dbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6098b85037dbSmrg ;; 6099b85037dbSmrg esac 6100b85037dbSmrg ;; 6101b85037dbSmrg esac 6102b85037dbSmrg ;; 6103b85037dbSmrg 6104b85037dbSmrg lynxos*) 6105b85037dbSmrg # FIXME: insert proper C++ library support 6106b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6107b85037dbSmrg ;; 6108b85037dbSmrg 6109b85037dbSmrg m88k*) 6110b85037dbSmrg # FIXME: insert proper C++ library support 6111b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6112b85037dbSmrg ;; 6113b85037dbSmrg 6114b85037dbSmrg mvs*) 6115b85037dbSmrg case $cc_basename in 6116b85037dbSmrg cxx*) 6117b85037dbSmrg # FIXME: insert proper C++ library support 6118b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6119b85037dbSmrg ;; 6120b85037dbSmrg *) 6121b85037dbSmrg # FIXME: insert proper C++ library support 6122b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6123b85037dbSmrg ;; 6124b85037dbSmrg esac 6125b85037dbSmrg ;; 6126b85037dbSmrg 6127b85037dbSmrg netbsd*) 6128b85037dbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6129b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6130b85037dbSmrg wlarc= 6131b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6132b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6133b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6134b85037dbSmrg fi 6135b85037dbSmrg # Workaround some broken pre-1.5 toolchains 6136b85037dbSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6137b85037dbSmrg ;; 6138b85037dbSmrg 6139b85037dbSmrg *nto* | *qnx*) 6140b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6141b85037dbSmrg ;; 6142b85037dbSmrg 6143b85037dbSmrg openbsd2*) 6144b85037dbSmrg # C++ shared libraries are fairly broken 6145b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6146b85037dbSmrg ;; 6147b85037dbSmrg 6148b85037dbSmrg openbsd*) 6149b85037dbSmrg if test -f /usr/libexec/ld.so; then 6150b85037dbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6151b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6152b85037dbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6153b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6154b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6155b85037dbSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6156b85037dbSmrg _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' 6157b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6158b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6159b85037dbSmrg fi 6160b85037dbSmrg output_verbose_link_cmd=func_echo_all 6161b85037dbSmrg else 6162b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6163b85037dbSmrg fi 6164b85037dbSmrg ;; 6165b85037dbSmrg 6166b85037dbSmrg osf3* | osf4* | osf5*) 6167b85037dbSmrg case $cc_basename in 6168b85037dbSmrg KCC*) 6169b85037dbSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6170b85037dbSmrg 6171b85037dbSmrg # KCC will only create a shared library if the output file 6172b85037dbSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6173b85037dbSmrg # to its proper name (with version) after linking. 6174b85037dbSmrg _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' 6175b85037dbSmrg 6176b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6177b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6178b85037dbSmrg 6179b85037dbSmrg # Archives containing C++ object files must be created using 6180b85037dbSmrg # the KAI C++ compiler. 6181b85037dbSmrg case $host in 6182b85037dbSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6183b85037dbSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6184b85037dbSmrg esac 6185b85037dbSmrg ;; 6186b85037dbSmrg RCC*) 6187b85037dbSmrg # Rational C++ 2.4.1 6188b85037dbSmrg # FIXME: insert proper C++ library support 6189b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6190b85037dbSmrg ;; 6191b85037dbSmrg cxx*) 6192b85037dbSmrg case $host in 6193b85037dbSmrg osf3*) 6194b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6195b85037dbSmrg _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' 6196b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6197b85037dbSmrg ;; 6198b85037dbSmrg *) 6199b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6200b85037dbSmrg _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' 6201b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6202b85037dbSmrg echo "-hidden">> $lib.exp~ 6203b85037dbSmrg $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~ 6204b85037dbSmrg $RM $lib.exp' 6205b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6206b85037dbSmrg ;; 6207b85037dbSmrg esac 6208b85037dbSmrg 6209b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6210b85037dbSmrg 6211b85037dbSmrg # Commands to make compiler produce verbose output that lists 6212b85037dbSmrg # what "hidden" libraries, object files and flags are used when 6213b85037dbSmrg # linking a shared library. 6214b85037dbSmrg # 6215b85037dbSmrg # There doesn't appear to be a way to prevent this compiler from 6216b85037dbSmrg # explicitly linking system object files so we need to strip them 6217b85037dbSmrg # from the output so that they don't get included in the library 6218b85037dbSmrg # dependencies. 6219b85037dbSmrg 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"' 6220b85037dbSmrg ;; 6221b85037dbSmrg *) 6222b85037dbSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6223b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6224b85037dbSmrg case $host in 6225b85037dbSmrg osf3*) 6226b85037dbSmrg _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' 6227b85037dbSmrg ;; 6228b85037dbSmrg *) 6229b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6230b85037dbSmrg ;; 6231b85037dbSmrg esac 6232b85037dbSmrg 6233b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6234b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6235b85037dbSmrg 6236b85037dbSmrg # Commands to make compiler produce verbose output that lists 6237b85037dbSmrg # what "hidden" libraries, object files and flags are used when 6238b85037dbSmrg # linking a shared library. 6239b85037dbSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6240b85037dbSmrg 6241b85037dbSmrg else 6242b85037dbSmrg # FIXME: insert proper C++ library support 6243b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6244b85037dbSmrg fi 6245b85037dbSmrg ;; 6246b85037dbSmrg esac 6247b85037dbSmrg ;; 6248b85037dbSmrg 6249b85037dbSmrg psos*) 6250b85037dbSmrg # FIXME: insert proper C++ library support 6251b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6252b85037dbSmrg ;; 6253b85037dbSmrg 6254b85037dbSmrg sunos4*) 6255b85037dbSmrg case $cc_basename in 6256b85037dbSmrg CC*) 6257b85037dbSmrg # Sun C++ 4.x 6258b85037dbSmrg # FIXME: insert proper C++ library support 6259b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6260b85037dbSmrg ;; 6261b85037dbSmrg lcc*) 6262b85037dbSmrg # Lucid 6263b85037dbSmrg # FIXME: insert proper C++ library support 6264b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6265b85037dbSmrg ;; 6266b85037dbSmrg *) 6267b85037dbSmrg # FIXME: insert proper C++ library support 6268b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6269b85037dbSmrg ;; 6270b85037dbSmrg esac 6271b85037dbSmrg ;; 6272b85037dbSmrg 6273b85037dbSmrg solaris*) 6274b85037dbSmrg case $cc_basename in 6275b85037dbSmrg CC* | sunCC*) 6276b85037dbSmrg # Sun C++ 4.2, 5.x and Centerline C++ 6277b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6278b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6279b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6280b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6281b85037dbSmrg $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' 6282b85037dbSmrg 6283b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6284b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6285b85037dbSmrg case $host_os in 6286b85037dbSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6287b85037dbSmrg *) 6288b85037dbSmrg # The compiler driver will combine and reorder linker options, 6289b85037dbSmrg # but understands `-z linker_flag'. 6290b85037dbSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6291b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6292b85037dbSmrg ;; 6293b85037dbSmrg esac 6294b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6295b85037dbSmrg 6296b85037dbSmrg output_verbose_link_cmd='func_echo_all' 6297b85037dbSmrg 6298b85037dbSmrg # Archives containing C++ object files must be created using 6299b85037dbSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6300b85037dbSmrg # necessary to make sure instantiated templates are included 6301b85037dbSmrg # in the archive. 6302b85037dbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6303b85037dbSmrg ;; 6304b85037dbSmrg gcx*) 6305b85037dbSmrg # Green Hills C++ Compiler 6306b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6307b85037dbSmrg 6308b85037dbSmrg # The C++ compiler must be used to create the archive. 6309b85037dbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6310b85037dbSmrg ;; 6311b85037dbSmrg *) 6312b85037dbSmrg # GNU C++ compiler with Solaris linker 6313b85037dbSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6314b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6315b85037dbSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6316b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6317b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6318b85037dbSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6319b85037dbSmrg 6320b85037dbSmrg # Commands to make compiler produce verbose output that lists 6321b85037dbSmrg # what "hidden" libraries, object files and flags are used when 6322b85037dbSmrg # linking a shared library. 6323b85037dbSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6324b85037dbSmrg else 6325b85037dbSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6326b85037dbSmrg # platform. 6327b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6328b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6329b85037dbSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6330b85037dbSmrg 6331b85037dbSmrg # Commands to make compiler produce verbose output that lists 6332b85037dbSmrg # what "hidden" libraries, object files and flags are used when 6333b85037dbSmrg # linking a shared library. 6334b85037dbSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6335b85037dbSmrg fi 6336b85037dbSmrg 6337b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6338b85037dbSmrg case $host_os in 6339b85037dbSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6340b85037dbSmrg *) 6341b85037dbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6342b85037dbSmrg ;; 6343b85037dbSmrg esac 6344b85037dbSmrg fi 6345b85037dbSmrg ;; 6346b85037dbSmrg esac 6347b85037dbSmrg ;; 6348b85037dbSmrg 6349b85037dbSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6350b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6351b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6352b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6353b85037dbSmrg runpath_var='LD_RUN_PATH' 6354b85037dbSmrg 6355b85037dbSmrg case $cc_basename in 6356b85037dbSmrg CC*) 6357b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6358b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6359b85037dbSmrg ;; 6360b85037dbSmrg *) 6361b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6362b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6363b85037dbSmrg ;; 6364b85037dbSmrg esac 6365b85037dbSmrg ;; 6366b85037dbSmrg 6367b85037dbSmrg sysv5* | sco3.2v5* | sco5v6*) 6368b85037dbSmrg # Note: We can NOT use -z defs as we might desire, because we do not 6369b85037dbSmrg # link with -lc, and that would cause any symbols used from libc to 6370b85037dbSmrg # always be unresolved, which means just about no library would 6371b85037dbSmrg # ever link correctly. If we're not using GNU ld we use -z text 6372b85037dbSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6373b85037dbSmrg # as -z defs. 6374b85037dbSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6375b85037dbSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6376b85037dbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6377b85037dbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6378b85037dbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6379b85037dbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6380b85037dbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6381b85037dbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6382b85037dbSmrg runpath_var='LD_RUN_PATH' 6383b85037dbSmrg 6384b85037dbSmrg case $cc_basename in 6385b85037dbSmrg CC*) 6386b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6387b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6388b85037dbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6389b85037dbSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 6390b85037dbSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6391b85037dbSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 6392b85037dbSmrg ;; 6393b85037dbSmrg *) 6394b85037dbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6395b85037dbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6396b85037dbSmrg ;; 6397b85037dbSmrg esac 6398b85037dbSmrg ;; 6399b85037dbSmrg 6400b85037dbSmrg tandem*) 6401b85037dbSmrg case $cc_basename in 6402b85037dbSmrg NCC*) 6403b85037dbSmrg # NonStop-UX NCC 3.20 6404b85037dbSmrg # FIXME: insert proper C++ library support 6405b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6406b85037dbSmrg ;; 6407b85037dbSmrg *) 6408b85037dbSmrg # FIXME: insert proper C++ library support 6409b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6410b85037dbSmrg ;; 6411b85037dbSmrg esac 6412b85037dbSmrg ;; 6413b85037dbSmrg 6414b85037dbSmrg vxworks*) 6415b85037dbSmrg # FIXME: insert proper C++ library support 6416b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6417b85037dbSmrg ;; 6418b85037dbSmrg 6419b85037dbSmrg *) 6420b85037dbSmrg # FIXME: insert proper C++ library support 6421b85037dbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6422b85037dbSmrg ;; 6423b85037dbSmrg esac 6424b85037dbSmrg 6425b85037dbSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6426b85037dbSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6427b85037dbSmrg 6428b85037dbSmrg _LT_TAGVAR(GCC, $1)="$GXX" 6429b85037dbSmrg _LT_TAGVAR(LD, $1)="$LD" 6430b85037dbSmrg 6431b85037dbSmrg ## CAVEAT EMPTOR: 6432b85037dbSmrg ## There is no encapsulation within the following macros, do not change 6433b85037dbSmrg ## the running order or otherwise move them around unless you know exactly 6434b85037dbSmrg ## what you are doing... 6435b85037dbSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 6436b85037dbSmrg _LT_COMPILER_PIC($1) 6437b85037dbSmrg _LT_COMPILER_C_O($1) 6438b85037dbSmrg _LT_COMPILER_FILE_LOCKS($1) 6439b85037dbSmrg _LT_LINKER_SHLIBS($1) 6440b85037dbSmrg _LT_SYS_DYNAMIC_LINKER($1) 6441b85037dbSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6442b85037dbSmrg 6443b85037dbSmrg _LT_CONFIG($1) 6444b85037dbSmrg fi # test -n "$compiler" 6445b85037dbSmrg 6446b85037dbSmrg CC=$lt_save_CC 6447b85037dbSmrg LDCXX=$LD 6448b85037dbSmrg LD=$lt_save_LD 6449b85037dbSmrg GCC=$lt_save_GCC 6450b85037dbSmrg with_gnu_ld=$lt_save_with_gnu_ld 6451b85037dbSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 6452b85037dbSmrg lt_cv_path_LD=$lt_save_path_LD 6453b85037dbSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6454b85037dbSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6455b85037dbSmrgfi # test "$_lt_caught_CXX_error" != yes 6456b85037dbSmrg 6457b85037dbSmrgAC_LANG_POP 6458b85037dbSmrg])# _LT_LANG_CXX_CONFIG 6459b85037dbSmrg 6460b85037dbSmrg 6461b85037dbSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6462b85037dbSmrg# --------------------------------- 6463b85037dbSmrg# Figure out "hidden" library dependencies from verbose 6464b85037dbSmrg# compiler output when linking a shared library. 6465b85037dbSmrg# Parse the compiler output and extract the necessary 6466b85037dbSmrg# objects, libraries and library flags. 6467b85037dbSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6468b85037dbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6469b85037dbSmrg# Dependencies to place before and after the object being linked: 6470b85037dbSmrg_LT_TAGVAR(predep_objects, $1)= 6471b85037dbSmrg_LT_TAGVAR(postdep_objects, $1)= 6472b85037dbSmrg_LT_TAGVAR(predeps, $1)= 6473b85037dbSmrg_LT_TAGVAR(postdeps, $1)= 6474b85037dbSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6475b85037dbSmrg 6476b85037dbSmrgdnl we can't use the lt_simple_compile_test_code here, 6477b85037dbSmrgdnl because it contains code intended for an executable, 6478b85037dbSmrgdnl not a library. It's possible we should let each 6479b85037dbSmrgdnl tag define a new lt_????_link_test_code variable, 6480b85037dbSmrgdnl but it's only used here... 6481b85037dbSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6482b85037dbSmrgint a; 6483b85037dbSmrgvoid foo (void) { a = 0; } 6484b85037dbSmrg_LT_EOF 6485b85037dbSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6486b85037dbSmrgclass Foo 6487b85037dbSmrg{ 6488b85037dbSmrgpublic: 6489b85037dbSmrg Foo (void) { a = 0; } 6490b85037dbSmrgprivate: 6491b85037dbSmrg int a; 6492b85037dbSmrg}; 6493b85037dbSmrg_LT_EOF 6494b85037dbSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6495b85037dbSmrg subroutine foo 6496b85037dbSmrg implicit none 6497b85037dbSmrg integer*4 a 6498b85037dbSmrg a=0 6499b85037dbSmrg return 6500b85037dbSmrg end 6501b85037dbSmrg_LT_EOF 6502b85037dbSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6503b85037dbSmrg subroutine foo 6504b85037dbSmrg implicit none 6505b85037dbSmrg integer a 6506b85037dbSmrg a=0 6507b85037dbSmrg return 6508b85037dbSmrg end 6509b85037dbSmrg_LT_EOF 6510b85037dbSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6511b85037dbSmrgpublic class foo { 6512b85037dbSmrg private int a; 6513b85037dbSmrg public void bar (void) { 6514b85037dbSmrg a = 0; 6515b85037dbSmrg } 6516b85037dbSmrg}; 6517b85037dbSmrg_LT_EOF 6518b85037dbSmrg]) 6519b85037dbSmrgdnl Parse the compiler output and extract the necessary 6520b85037dbSmrgdnl objects, libraries and library flags. 6521b85037dbSmrgif AC_TRY_EVAL(ac_compile); then 6522b85037dbSmrg # Parse the compiler output and extract the necessary 6523b85037dbSmrg # objects, libraries and library flags. 6524b85037dbSmrg 6525b85037dbSmrg # Sentinel used to keep track of whether or not we are before 6526b85037dbSmrg # the conftest object file. 6527b85037dbSmrg pre_test_object_deps_done=no 6528b85037dbSmrg 6529b85037dbSmrg for p in `eval "$output_verbose_link_cmd"`; do 6530b85037dbSmrg case $p in 6531b85037dbSmrg 6532b85037dbSmrg -L* | -R* | -l*) 6533b85037dbSmrg # Some compilers place space between "-{L,R}" and the path. 6534b85037dbSmrg # Remove the space. 6535b85037dbSmrg if test $p = "-L" || 6536b85037dbSmrg test $p = "-R"; then 6537b85037dbSmrg prev=$p 6538b85037dbSmrg continue 6539b85037dbSmrg else 6540b85037dbSmrg prev= 6541b85037dbSmrg fi 6542b85037dbSmrg 6543b85037dbSmrg if test "$pre_test_object_deps_done" = no; then 6544b85037dbSmrg case $p in 6545b85037dbSmrg -L* | -R*) 6546b85037dbSmrg # Internal compiler library paths should come after those 6547b85037dbSmrg # provided the user. The postdeps already come after the 6548b85037dbSmrg # user supplied libs so there is no need to process them. 6549b85037dbSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 6550b85037dbSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 6551b85037dbSmrg else 6552b85037dbSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 6553b85037dbSmrg fi 6554b85037dbSmrg ;; 6555b85037dbSmrg # The "-l" case would never come before the object being 6556b85037dbSmrg # linked, so don't bother handling this case. 6557b85037dbSmrg esac 6558b85037dbSmrg else 6559b85037dbSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 6560b85037dbSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 6561b85037dbSmrg else 6562b85037dbSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 6563b85037dbSmrg fi 6564b85037dbSmrg fi 6565b85037dbSmrg ;; 6566b85037dbSmrg 6567b85037dbSmrg *.$objext) 6568b85037dbSmrg # This assumes that the test object file only shows up 6569b85037dbSmrg # once in the compiler output. 6570b85037dbSmrg if test "$p" = "conftest.$objext"; then 6571b85037dbSmrg pre_test_object_deps_done=yes 6572b85037dbSmrg continue 6573b85037dbSmrg fi 6574b85037dbSmrg 6575b85037dbSmrg if test "$pre_test_object_deps_done" = no; then 6576b85037dbSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 6577b85037dbSmrg _LT_TAGVAR(predep_objects, $1)="$p" 6578b85037dbSmrg else 6579b85037dbSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 6580b85037dbSmrg fi 6581b85037dbSmrg else 6582b85037dbSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 6583b85037dbSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 6584b85037dbSmrg else 6585b85037dbSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 6586b85037dbSmrg fi 6587b85037dbSmrg fi 6588b85037dbSmrg ;; 6589b85037dbSmrg 6590b85037dbSmrg *) ;; # Ignore the rest. 6591b85037dbSmrg 6592b85037dbSmrg esac 6593b85037dbSmrg done 6594b85037dbSmrg 6595b85037dbSmrg # Clean up. 6596b85037dbSmrg rm -f a.out a.exe 6597b85037dbSmrgelse 6598b85037dbSmrg echo "libtool.m4: error: problem compiling $1 test program" 6599b85037dbSmrgfi 6600b85037dbSmrg 6601b85037dbSmrg$RM -f confest.$objext 6602b85037dbSmrg 6603b85037dbSmrg# PORTME: override above test on systems where it is broken 6604b85037dbSmrgm4_if([$1], [CXX], 6605b85037dbSmrg[case $host_os in 6606b85037dbSmrginterix[[3-9]]*) 6607b85037dbSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 6608b85037dbSmrg # hack all around it, let's just trust "g++" to DTRT. 6609b85037dbSmrg _LT_TAGVAR(predep_objects,$1)= 6610b85037dbSmrg _LT_TAGVAR(postdep_objects,$1)= 6611b85037dbSmrg _LT_TAGVAR(postdeps,$1)= 6612b85037dbSmrg ;; 6613b85037dbSmrg 6614b85037dbSmrglinux*) 6615b85037dbSmrg case `$CC -V 2>&1 | sed 5q` in 6616b85037dbSmrg *Sun\ C*) 6617b85037dbSmrg # Sun C++ 5.9 6618b85037dbSmrg 6619b85037dbSmrg # The more standards-conforming stlport4 library is 6620b85037dbSmrg # incompatible with the Cstd library. Avoid specifying 6621b85037dbSmrg # it if it's in CXXFLAGS. Ignore libCrun as 6622b85037dbSmrg # -library=stlport4 depends on it. 6623b85037dbSmrg case " $CXX $CXXFLAGS " in 6624b85037dbSmrg *" -library=stlport4 "*) 6625b85037dbSmrg solaris_use_stlport4=yes 6626b85037dbSmrg ;; 6627b85037dbSmrg esac 6628b85037dbSmrg 6629b85037dbSmrg if test "$solaris_use_stlport4" != yes; then 6630b85037dbSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6631b85037dbSmrg fi 6632b85037dbSmrg ;; 6633b85037dbSmrg esac 6634b85037dbSmrg ;; 6635b85037dbSmrg 6636b85037dbSmrgsolaris*) 6637b85037dbSmrg case $cc_basename in 6638b85037dbSmrg CC* | sunCC*) 6639b85037dbSmrg # The more standards-conforming stlport4 library is 6640b85037dbSmrg # incompatible with the Cstd library. Avoid specifying 6641b85037dbSmrg # it if it's in CXXFLAGS. Ignore libCrun as 6642b85037dbSmrg # -library=stlport4 depends on it. 6643b85037dbSmrg case " $CXX $CXXFLAGS " in 6644b85037dbSmrg *" -library=stlport4 "*) 6645b85037dbSmrg solaris_use_stlport4=yes 6646b85037dbSmrg ;; 6647b85037dbSmrg esac 6648b85037dbSmrg 6649b85037dbSmrg # Adding this requires a known-good setup of shared libraries for 6650b85037dbSmrg # Sun compiler versions before 5.6, else PIC objects from an old 6651b85037dbSmrg # archive will be linked into the output, leading to subtle bugs. 6652b85037dbSmrg if test "$solaris_use_stlport4" != yes; then 6653b85037dbSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6654b85037dbSmrg fi 6655b85037dbSmrg ;; 6656b85037dbSmrg esac 6657b85037dbSmrg ;; 6658b85037dbSmrgesac 6659b85037dbSmrg]) 6660b85037dbSmrg 6661b85037dbSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 6662b85037dbSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 6663b85037dbSmrgesac 6664b85037dbSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 6665b85037dbSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 6666b85037dbSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 6667b85037dbSmrgfi 6668b85037dbSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 6669b85037dbSmrg [The directories searched by this compiler when creating a shared library]) 6670b85037dbSmrg_LT_TAGDECL([], [predep_objects], [1], 6671b85037dbSmrg [Dependencies to place before and after the objects being linked to 6672b85037dbSmrg create a shared library]) 6673b85037dbSmrg_LT_TAGDECL([], [postdep_objects], [1]) 6674b85037dbSmrg_LT_TAGDECL([], [predeps], [1]) 6675b85037dbSmrg_LT_TAGDECL([], [postdeps], [1]) 6676b85037dbSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 6677b85037dbSmrg [The library search path used internally by the compiler when linking 6678b85037dbSmrg a shared library]) 6679b85037dbSmrg])# _LT_SYS_HIDDEN_LIBDEPS 6680b85037dbSmrg 6681b85037dbSmrg 6682b85037dbSmrg# _LT_LANG_F77_CONFIG([TAG]) 6683b85037dbSmrg# -------------------------- 6684b85037dbSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 6685b85037dbSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6686b85037dbSmrg# to write the compiler configuration to `libtool'. 6687b85037dbSmrgm4_defun([_LT_LANG_F77_CONFIG], 6688b85037dbSmrg[AC_LANG_PUSH(Fortran 77) 6689b85037dbSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 6690b85037dbSmrg _lt_disable_F77=yes 6691b85037dbSmrgfi 6692b85037dbSmrg 6693b85037dbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6694b85037dbSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6695b85037dbSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6696b85037dbSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6697b85037dbSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6698b85037dbSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6699b85037dbSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6700b85037dbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6701b85037dbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6702b85037dbSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6703b85037dbSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6704b85037dbSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6705b85037dbSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6706b85037dbSmrg_LT_TAGVAR(module_cmds, $1)= 6707b85037dbSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6708b85037dbSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6709b85037dbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6710b85037dbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6711b85037dbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6712b85037dbSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6713b85037dbSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6714b85037dbSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6715b85037dbSmrg 6716b85037dbSmrg# Source file extension for f77 test sources. 6717b85037dbSmrgac_ext=f 6718b85037dbSmrg 6719b85037dbSmrg# Object file extension for compiled f77 test sources. 6720b85037dbSmrgobjext=o 6721b85037dbSmrg_LT_TAGVAR(objext, $1)=$objext 6722b85037dbSmrg 6723b85037dbSmrg# No sense in running all these tests if we already determined that 6724b85037dbSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 6725b85037dbSmrg# are currently assumed to apply to all compilers on this platform, 6726b85037dbSmrg# and will be corrupted by setting them based on a non-working compiler. 6727b85037dbSmrgif test "$_lt_disable_F77" != yes; then 6728b85037dbSmrg # Code to be used in simple compile tests 6729b85037dbSmrg lt_simple_compile_test_code="\ 6730b85037dbSmrg subroutine t 6731b85037dbSmrg return 6732b85037dbSmrg end 6733b85037dbSmrg" 6734b85037dbSmrg 6735b85037dbSmrg # Code to be used in simple link tests 6736b85037dbSmrg lt_simple_link_test_code="\ 6737b85037dbSmrg program t 6738b85037dbSmrg end 6739b85037dbSmrg" 6740b85037dbSmrg 6741b85037dbSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6742b85037dbSmrg _LT_TAG_COMPILER 6743b85037dbSmrg 6744b85037dbSmrg # save warnings/boilerplate of simple test code 6745b85037dbSmrg _LT_COMPILER_BOILERPLATE 6746b85037dbSmrg _LT_LINKER_BOILERPLATE 6747b85037dbSmrg 6748b85037dbSmrg # Allow CC to be a program name with arguments. 6749b85037dbSmrg lt_save_CC="$CC" 6750b85037dbSmrg lt_save_GCC=$GCC 6751b85037dbSmrg CC=${F77-"f77"} 6752b85037dbSmrg compiler=$CC 6753b85037dbSmrg _LT_TAGVAR(compiler, $1)=$CC 6754b85037dbSmrg _LT_CC_BASENAME([$compiler]) 6755b85037dbSmrg GCC=$G77 6756b85037dbSmrg if test -n "$compiler"; then 6757b85037dbSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6758b85037dbSmrg AC_MSG_RESULT([$can_build_shared]) 6759b85037dbSmrg 6760b85037dbSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6761b85037dbSmrg test "$can_build_shared" = "no" && enable_shared=no 6762b85037dbSmrg 6763b85037dbSmrg # On AIX, shared libraries and static libraries use the same namespace, and 6764b85037dbSmrg # are all built from PIC. 6765b85037dbSmrg case $host_os in 6766b85037dbSmrg aix3*) 6767b85037dbSmrg test "$enable_shared" = yes && enable_static=no 6768b85037dbSmrg if test -n "$RANLIB"; then 6769b85037dbSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6770b85037dbSmrg postinstall_cmds='$RANLIB $lib' 6771b85037dbSmrg fi 6772b85037dbSmrg ;; 6773b85037dbSmrg aix[[4-9]]*) 6774b85037dbSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6775b85037dbSmrg test "$enable_shared" = yes && enable_static=no 6776b85037dbSmrg fi 6777b85037dbSmrg ;; 6778b85037dbSmrg esac 6779b85037dbSmrg AC_MSG_RESULT([$enable_shared]) 6780b85037dbSmrg 6781b85037dbSmrg AC_MSG_CHECKING([whether to build static libraries]) 6782b85037dbSmrg # Make sure either enable_shared or enable_static is yes. 6783b85037dbSmrg test "$enable_shared" = yes || enable_static=yes 6784b85037dbSmrg AC_MSG_RESULT([$enable_static]) 6785b85037dbSmrg 6786b85037dbSmrg _LT_TAGVAR(GCC, $1)="$G77" 6787b85037dbSmrg _LT_TAGVAR(LD, $1)="$LD" 6788b85037dbSmrg 6789b85037dbSmrg ## CAVEAT EMPTOR: 6790b85037dbSmrg ## There is no encapsulation within the following macros, do not change 6791b85037dbSmrg ## the running order or otherwise move them around unless you know exactly 6792b85037dbSmrg ## what you are doing... 6793b85037dbSmrg _LT_COMPILER_PIC($1) 6794b85037dbSmrg _LT_COMPILER_C_O($1) 6795b85037dbSmrg _LT_COMPILER_FILE_LOCKS($1) 6796b85037dbSmrg _LT_LINKER_SHLIBS($1) 6797b85037dbSmrg _LT_SYS_DYNAMIC_LINKER($1) 6798b85037dbSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6799b85037dbSmrg 6800b85037dbSmrg _LT_CONFIG($1) 6801b85037dbSmrg fi # test -n "$compiler" 6802b85037dbSmrg 6803b85037dbSmrg GCC=$lt_save_GCC 6804b85037dbSmrg CC="$lt_save_CC" 6805b85037dbSmrgfi # test "$_lt_disable_F77" != yes 6806b85037dbSmrg 6807b85037dbSmrgAC_LANG_POP 6808b85037dbSmrg])# _LT_LANG_F77_CONFIG 6809b85037dbSmrg 6810b85037dbSmrg 6811b85037dbSmrg# _LT_LANG_FC_CONFIG([TAG]) 6812b85037dbSmrg# ------------------------- 6813b85037dbSmrg# Ensure that the configuration variables for a Fortran compiler are 6814b85037dbSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6815b85037dbSmrg# to write the compiler configuration to `libtool'. 6816b85037dbSmrgm4_defun([_LT_LANG_FC_CONFIG], 6817b85037dbSmrg[AC_LANG_PUSH(Fortran) 6818b85037dbSmrg 6819b85037dbSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 6820b85037dbSmrg _lt_disable_FC=yes 6821b85037dbSmrgfi 6822b85037dbSmrg 6823b85037dbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6824b85037dbSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6825b85037dbSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6826b85037dbSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6827b85037dbSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6828b85037dbSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6829b85037dbSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6830b85037dbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6831b85037dbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6832b85037dbSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6833b85037dbSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6834b85037dbSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6835b85037dbSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6836b85037dbSmrg_LT_TAGVAR(module_cmds, $1)= 6837b85037dbSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6838b85037dbSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6839b85037dbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6840b85037dbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6841b85037dbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6842b85037dbSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6843b85037dbSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6844b85037dbSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6845b85037dbSmrg 6846b85037dbSmrg# Source file extension for fc test sources. 6847b85037dbSmrgac_ext=${ac_fc_srcext-f} 6848b85037dbSmrg 6849b85037dbSmrg# Object file extension for compiled fc test sources. 6850b85037dbSmrgobjext=o 6851b85037dbSmrg_LT_TAGVAR(objext, $1)=$objext 6852b85037dbSmrg 6853b85037dbSmrg# No sense in running all these tests if we already determined that 6854b85037dbSmrg# the FC compiler isn't working. Some variables (like enable_shared) 6855b85037dbSmrg# are currently assumed to apply to all compilers on this platform, 6856b85037dbSmrg# and will be corrupted by setting them based on a non-working compiler. 6857b85037dbSmrgif test "$_lt_disable_FC" != yes; then 6858b85037dbSmrg # Code to be used in simple compile tests 6859b85037dbSmrg lt_simple_compile_test_code="\ 6860b85037dbSmrg subroutine t 6861b85037dbSmrg return 6862b85037dbSmrg end 6863b85037dbSmrg" 6864b85037dbSmrg 6865b85037dbSmrg # Code to be used in simple link tests 6866b85037dbSmrg lt_simple_link_test_code="\ 6867b85037dbSmrg program t 6868b85037dbSmrg end 6869b85037dbSmrg" 6870b85037dbSmrg 6871b85037dbSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6872b85037dbSmrg _LT_TAG_COMPILER 6873b85037dbSmrg 6874b85037dbSmrg # save warnings/boilerplate of simple test code 6875b85037dbSmrg _LT_COMPILER_BOILERPLATE 6876b85037dbSmrg _LT_LINKER_BOILERPLATE 6877b85037dbSmrg 6878b85037dbSmrg # Allow CC to be a program name with arguments. 6879b85037dbSmrg lt_save_CC="$CC" 6880b85037dbSmrg lt_save_GCC=$GCC 6881b85037dbSmrg CC=${FC-"f95"} 6882b85037dbSmrg compiler=$CC 6883b85037dbSmrg GCC=$ac_cv_fc_compiler_gnu 6884b85037dbSmrg 6885b85037dbSmrg _LT_TAGVAR(compiler, $1)=$CC 6886b85037dbSmrg _LT_CC_BASENAME([$compiler]) 6887b85037dbSmrg 6888b85037dbSmrg if test -n "$compiler"; then 6889b85037dbSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6890b85037dbSmrg AC_MSG_RESULT([$can_build_shared]) 6891b85037dbSmrg 6892b85037dbSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6893b85037dbSmrg test "$can_build_shared" = "no" && enable_shared=no 6894b85037dbSmrg 6895b85037dbSmrg # On AIX, shared libraries and static libraries use the same namespace, and 6896b85037dbSmrg # are all built from PIC. 6897b85037dbSmrg case $host_os in 6898b85037dbSmrg aix3*) 6899b85037dbSmrg test "$enable_shared" = yes && enable_static=no 6900b85037dbSmrg if test -n "$RANLIB"; then 6901b85037dbSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6902b85037dbSmrg postinstall_cmds='$RANLIB $lib' 6903b85037dbSmrg fi 6904b85037dbSmrg ;; 6905b85037dbSmrg aix[[4-9]]*) 6906b85037dbSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6907b85037dbSmrg test "$enable_shared" = yes && enable_static=no 6908b85037dbSmrg fi 6909b85037dbSmrg ;; 6910b85037dbSmrg esac 6911b85037dbSmrg AC_MSG_RESULT([$enable_shared]) 6912b85037dbSmrg 6913b85037dbSmrg AC_MSG_CHECKING([whether to build static libraries]) 6914b85037dbSmrg # Make sure either enable_shared or enable_static is yes. 6915b85037dbSmrg test "$enable_shared" = yes || enable_static=yes 6916b85037dbSmrg AC_MSG_RESULT([$enable_static]) 6917b85037dbSmrg 6918b85037dbSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 6919b85037dbSmrg _LT_TAGVAR(LD, $1)="$LD" 6920b85037dbSmrg 6921b85037dbSmrg ## CAVEAT EMPTOR: 6922b85037dbSmrg ## There is no encapsulation within the following macros, do not change 6923b85037dbSmrg ## the running order or otherwise move them around unless you know exactly 6924b85037dbSmrg ## what you are doing... 6925b85037dbSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 6926b85037dbSmrg _LT_COMPILER_PIC($1) 6927b85037dbSmrg _LT_COMPILER_C_O($1) 6928b85037dbSmrg _LT_COMPILER_FILE_LOCKS($1) 6929b85037dbSmrg _LT_LINKER_SHLIBS($1) 6930b85037dbSmrg _LT_SYS_DYNAMIC_LINKER($1) 6931b85037dbSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6932b85037dbSmrg 6933b85037dbSmrg _LT_CONFIG($1) 6934b85037dbSmrg fi # test -n "$compiler" 6935b85037dbSmrg 6936b85037dbSmrg GCC=$lt_save_GCC 6937b85037dbSmrg CC="$lt_save_CC" 6938b85037dbSmrgfi # test "$_lt_disable_FC" != yes 6939b85037dbSmrg 6940b85037dbSmrgAC_LANG_POP 6941b85037dbSmrg])# _LT_LANG_FC_CONFIG 6942b85037dbSmrg 6943b85037dbSmrg 6944b85037dbSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 6945b85037dbSmrg# -------------------------- 6946b85037dbSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 6947b85037dbSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 6948b85037dbSmrg# to write the compiler configuration to `libtool'. 6949b85037dbSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 6950b85037dbSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 6951b85037dbSmrgAC_LANG_SAVE 6952b85037dbSmrg 6953b85037dbSmrg# Source file extension for Java test sources. 6954b85037dbSmrgac_ext=java 6955b85037dbSmrg 6956b85037dbSmrg# Object file extension for compiled Java test sources. 6957b85037dbSmrgobjext=o 6958b85037dbSmrg_LT_TAGVAR(objext, $1)=$objext 6959b85037dbSmrg 6960b85037dbSmrg# Code to be used in simple compile tests 6961b85037dbSmrglt_simple_compile_test_code="class foo {}" 6962b85037dbSmrg 6963b85037dbSmrg# Code to be used in simple link tests 6964b85037dbSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 6965b85037dbSmrg 6966b85037dbSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6967b85037dbSmrg_LT_TAG_COMPILER 6968b85037dbSmrg 6969b85037dbSmrg# save warnings/boilerplate of simple test code 6970b85037dbSmrg_LT_COMPILER_BOILERPLATE 6971b85037dbSmrg_LT_LINKER_BOILERPLATE 6972b85037dbSmrg 6973b85037dbSmrg# Allow CC to be a program name with arguments. 6974b85037dbSmrglt_save_CC="$CC" 6975b85037dbSmrglt_save_GCC=$GCC 6976b85037dbSmrgGCC=yes 6977b85037dbSmrgCC=${GCJ-"gcj"} 6978b85037dbSmrgcompiler=$CC 6979b85037dbSmrg_LT_TAGVAR(compiler, $1)=$CC 6980b85037dbSmrg_LT_TAGVAR(LD, $1)="$LD" 6981b85037dbSmrg_LT_CC_BASENAME([$compiler]) 6982b85037dbSmrg 6983b85037dbSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 6984b85037dbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6985b85037dbSmrg 6986b85037dbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6987b85037dbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6988b85037dbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6989b85037dbSmrg 6990b85037dbSmrgif test -n "$compiler"; then 6991b85037dbSmrg _LT_COMPILER_NO_RTTI($1) 6992b85037dbSmrg _LT_COMPILER_PIC($1) 6993b85037dbSmrg _LT_COMPILER_C_O($1) 6994b85037dbSmrg _LT_COMPILER_FILE_LOCKS($1) 6995b85037dbSmrg _LT_LINKER_SHLIBS($1) 6996b85037dbSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6997b85037dbSmrg 6998b85037dbSmrg _LT_CONFIG($1) 6999b85037dbSmrgfi 7000b85037dbSmrg 7001b85037dbSmrgAC_LANG_RESTORE 7002b85037dbSmrg 7003b85037dbSmrgGCC=$lt_save_GCC 7004b85037dbSmrgCC="$lt_save_CC" 7005b85037dbSmrg])# _LT_LANG_GCJ_CONFIG 7006b85037dbSmrg 7007b85037dbSmrg 7008b85037dbSmrg# _LT_LANG_RC_CONFIG([TAG]) 7009b85037dbSmrg# ------------------------- 7010b85037dbSmrg# Ensure that the configuration variables for the Windows resource compiler 7011b85037dbSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7012b85037dbSmrg# to write the compiler configuration to `libtool'. 7013b85037dbSmrgm4_defun([_LT_LANG_RC_CONFIG], 7014b85037dbSmrg[AC_REQUIRE([LT_PROG_RC])dnl 7015b85037dbSmrgAC_LANG_SAVE 7016b85037dbSmrg 7017b85037dbSmrg# Source file extension for RC test sources. 7018b85037dbSmrgac_ext=rc 7019b85037dbSmrg 7020b85037dbSmrg# Object file extension for compiled RC test sources. 7021b85037dbSmrgobjext=o 7022b85037dbSmrg_LT_TAGVAR(objext, $1)=$objext 7023b85037dbSmrg 7024b85037dbSmrg# Code to be used in simple compile tests 7025b85037dbSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7026b85037dbSmrg 7027b85037dbSmrg# Code to be used in simple link tests 7028b85037dbSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 7029b85037dbSmrg 7030b85037dbSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7031b85037dbSmrg_LT_TAG_COMPILER 7032b85037dbSmrg 7033b85037dbSmrg# save warnings/boilerplate of simple test code 7034b85037dbSmrg_LT_COMPILER_BOILERPLATE 7035b85037dbSmrg_LT_LINKER_BOILERPLATE 7036b85037dbSmrg 7037b85037dbSmrg# Allow CC to be a program name with arguments. 7038b85037dbSmrglt_save_CC="$CC" 7039b85037dbSmrglt_save_GCC=$GCC 7040b85037dbSmrgGCC= 7041b85037dbSmrgCC=${RC-"windres"} 7042b85037dbSmrgcompiler=$CC 7043b85037dbSmrg_LT_TAGVAR(compiler, $1)=$CC 7044b85037dbSmrg_LT_CC_BASENAME([$compiler]) 7045b85037dbSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7046b85037dbSmrg 7047b85037dbSmrgif test -n "$compiler"; then 7048b85037dbSmrg : 7049b85037dbSmrg _LT_CONFIG($1) 7050b85037dbSmrgfi 7051b85037dbSmrg 7052b85037dbSmrgGCC=$lt_save_GCC 7053b85037dbSmrgAC_LANG_RESTORE 7054b85037dbSmrgCC="$lt_save_CC" 7055b85037dbSmrg])# _LT_LANG_RC_CONFIG 7056b85037dbSmrg 7057b85037dbSmrg 7058b85037dbSmrg# LT_PROG_GCJ 7059b85037dbSmrg# ----------- 7060b85037dbSmrgAC_DEFUN([LT_PROG_GCJ], 7061b85037dbSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7062b85037dbSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7063b85037dbSmrg [AC_CHECK_TOOL(GCJ, gcj,) 7064b85037dbSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7065b85037dbSmrg AC_SUBST(GCJFLAGS)])])[]dnl 7066b85037dbSmrg]) 7067b85037dbSmrg 7068b85037dbSmrg# Old name: 7069b85037dbSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7070b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 7071b85037dbSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7072b85037dbSmrg 7073b85037dbSmrg 7074b85037dbSmrg# LT_PROG_RC 7075b85037dbSmrg# ---------- 7076b85037dbSmrgAC_DEFUN([LT_PROG_RC], 7077b85037dbSmrg[AC_CHECK_TOOL(RC, windres,) 7078b85037dbSmrg]) 7079b85037dbSmrg 7080b85037dbSmrg# Old name: 7081b85037dbSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7082b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 7083b85037dbSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 7084b85037dbSmrg 7085b85037dbSmrg 7086b85037dbSmrg# _LT_DECL_EGREP 7087b85037dbSmrg# -------------- 7088b85037dbSmrg# If we don't have a new enough Autoconf to choose the best grep 7089b85037dbSmrg# available, choose the one first in the user's PATH. 7090b85037dbSmrgm4_defun([_LT_DECL_EGREP], 7091b85037dbSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7092b85037dbSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7093b85037dbSmrgtest -z "$GREP" && GREP=grep 7094b85037dbSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7095b85037dbSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7096b85037dbSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7097b85037dbSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7098b85037dbSmrgAC_SUBST([GREP]) 7099b85037dbSmrg]) 7100b85037dbSmrg 7101b85037dbSmrg 7102b85037dbSmrg# _LT_DECL_OBJDUMP 7103b85037dbSmrg# -------------- 7104b85037dbSmrg# If we don't have a new enough Autoconf to choose the best objdump 7105b85037dbSmrg# available, choose the one first in the user's PATH. 7106b85037dbSmrgm4_defun([_LT_DECL_OBJDUMP], 7107b85037dbSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7108b85037dbSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7109b85037dbSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7110b85037dbSmrgAC_SUBST([OBJDUMP]) 7111b85037dbSmrg]) 7112b85037dbSmrg 7113b85037dbSmrg 7114b85037dbSmrg# _LT_DECL_SED 7115b85037dbSmrg# ------------ 7116b85037dbSmrg# Check for a fully-functional sed program, that truncates 7117b85037dbSmrg# as few characters as possible. Prefer GNU sed if found. 7118b85037dbSmrgm4_defun([_LT_DECL_SED], 7119b85037dbSmrg[AC_PROG_SED 7120b85037dbSmrgtest -z "$SED" && SED=sed 7121b85037dbSmrgXsed="$SED -e 1s/^X//" 7122b85037dbSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7123b85037dbSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7124b85037dbSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7125b85037dbSmrg])# _LT_DECL_SED 7126b85037dbSmrg 7127b85037dbSmrgm4_ifndef([AC_PROG_SED], [ 7128b85037dbSmrg# NOTE: This macro has been submitted for inclusion into # 7129b85037dbSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7130b85037dbSmrg# a released version of Autoconf we should remove this # 7131b85037dbSmrg# macro and use it instead. # 7132b85037dbSmrg 7133b85037dbSmrgm4_defun([AC_PROG_SED], 7134b85037dbSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7135b85037dbSmrgAC_CACHE_VAL(lt_cv_path_SED, 7136b85037dbSmrg[# Loop through the user's path and test for sed and gsed. 7137b85037dbSmrg# Then use that list of sed's as ones to test for truncation. 7138b85037dbSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7139b85037dbSmrgfor as_dir in $PATH 7140b85037dbSmrgdo 7141b85037dbSmrg IFS=$as_save_IFS 7142b85037dbSmrg test -z "$as_dir" && as_dir=. 7143b85037dbSmrg for lt_ac_prog in sed gsed; do 7144b85037dbSmrg for ac_exec_ext in '' $ac_executable_extensions; do 7145b85037dbSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7146b85037dbSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7147b85037dbSmrg fi 7148b85037dbSmrg done 7149b85037dbSmrg done 7150b85037dbSmrgdone 7151b85037dbSmrgIFS=$as_save_IFS 7152b85037dbSmrglt_ac_max=0 7153b85037dbSmrglt_ac_count=0 7154b85037dbSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7155b85037dbSmrg# along with /bin/sed that truncates output. 7156b85037dbSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7157b85037dbSmrg test ! -f $lt_ac_sed && continue 7158b85037dbSmrg cat /dev/null > conftest.in 7159b85037dbSmrg lt_ac_count=0 7160b85037dbSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7161b85037dbSmrg # Check for GNU sed and select it if it is found. 7162b85037dbSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7163b85037dbSmrg lt_cv_path_SED=$lt_ac_sed 7164b85037dbSmrg break 7165b85037dbSmrg fi 7166b85037dbSmrg while true; do 7167b85037dbSmrg cat conftest.in conftest.in >conftest.tmp 7168b85037dbSmrg mv conftest.tmp conftest.in 7169b85037dbSmrg cp conftest.in conftest.nl 7170b85037dbSmrg echo >>conftest.nl 7171b85037dbSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7172b85037dbSmrg cmp -s conftest.out conftest.nl || break 7173b85037dbSmrg # 10000 chars as input seems more than enough 7174b85037dbSmrg test $lt_ac_count -gt 10 && break 7175b85037dbSmrg lt_ac_count=`expr $lt_ac_count + 1` 7176b85037dbSmrg if test $lt_ac_count -gt $lt_ac_max; then 7177b85037dbSmrg lt_ac_max=$lt_ac_count 7178b85037dbSmrg lt_cv_path_SED=$lt_ac_sed 7179b85037dbSmrg fi 7180b85037dbSmrg done 7181b85037dbSmrgdone 7182b85037dbSmrg]) 7183b85037dbSmrgSED=$lt_cv_path_SED 7184b85037dbSmrgAC_SUBST([SED]) 7185b85037dbSmrgAC_MSG_RESULT([$SED]) 7186b85037dbSmrg])#AC_PROG_SED 7187b85037dbSmrg])#m4_ifndef 7188b85037dbSmrg 7189b85037dbSmrg# Old name: 7190b85037dbSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7191b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 7192b85037dbSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7193b85037dbSmrg 7194b85037dbSmrg 7195b85037dbSmrg# _LT_CHECK_SHELL_FEATURES 7196b85037dbSmrg# ------------------------ 7197b85037dbSmrg# Find out whether the shell is Bourne or XSI compatible, 7198b85037dbSmrg# or has some other useful features. 7199b85037dbSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7200b85037dbSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7201b85037dbSmrg# Try some XSI features 7202b85037dbSmrgxsi_shell=no 7203b85037dbSmrg( _lt_dummy="a/b/c" 7204b85037dbSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 7205b85037dbSmrg = c,a/b,, \ 7206b85037dbSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7207b85037dbSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7208b85037dbSmrg && xsi_shell=yes 7209b85037dbSmrgAC_MSG_RESULT([$xsi_shell]) 7210b85037dbSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7211b85037dbSmrg 7212b85037dbSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7213b85037dbSmrglt_shell_append=no 7214b85037dbSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7215b85037dbSmrg >/dev/null 2>&1 \ 7216b85037dbSmrg && lt_shell_append=yes 7217b85037dbSmrgAC_MSG_RESULT([$lt_shell_append]) 7218b85037dbSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7219b85037dbSmrg 7220b85037dbSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7221b85037dbSmrg lt_unset=unset 7222b85037dbSmrgelse 7223b85037dbSmrg lt_unset=false 7224b85037dbSmrgfi 7225b85037dbSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7226b85037dbSmrg 7227b85037dbSmrg# test EBCDIC or ASCII 7228b85037dbSmrgcase `echo X|tr X '\101'` in 7229b85037dbSmrg A) # ASCII based system 7230b85037dbSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7231b85037dbSmrg lt_SP2NL='tr \040 \012' 7232b85037dbSmrg lt_NL2SP='tr \015\012 \040\040' 7233b85037dbSmrg ;; 7234b85037dbSmrg *) # EBCDIC based system 7235b85037dbSmrg lt_SP2NL='tr \100 \n' 7236b85037dbSmrg lt_NL2SP='tr \r\n \100\100' 7237b85037dbSmrg ;; 7238b85037dbSmrgesac 7239b85037dbSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7240b85037dbSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7241b85037dbSmrg])# _LT_CHECK_SHELL_FEATURES 7242b85037dbSmrg 7243b85037dbSmrg 7244b85037dbSmrg# _LT_PROG_XSI_SHELLFNS 7245b85037dbSmrg# --------------------- 7246b85037dbSmrg# Bourne and XSI compatible variants of some useful shell functions. 7247b85037dbSmrgm4_defun([_LT_PROG_XSI_SHELLFNS], 7248b85037dbSmrg[case $xsi_shell in 7249b85037dbSmrg yes) 7250b85037dbSmrg cat << \_LT_EOF >> "$cfgfile" 7251b85037dbSmrg 7252b85037dbSmrg# func_dirname file append nondir_replacement 7253b85037dbSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7254b85037dbSmrg# otherwise set result to NONDIR_REPLACEMENT. 7255b85037dbSmrgfunc_dirname () 7256b85037dbSmrg{ 7257b85037dbSmrg case ${1} in 7258b85037dbSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7259b85037dbSmrg * ) func_dirname_result="${3}" ;; 7260b85037dbSmrg esac 7261b85037dbSmrg} 7262b85037dbSmrg 7263b85037dbSmrg# func_basename file 7264b85037dbSmrgfunc_basename () 7265b85037dbSmrg{ 7266b85037dbSmrg func_basename_result="${1##*/}" 7267b85037dbSmrg} 7268b85037dbSmrg 7269b85037dbSmrg# func_dirname_and_basename file append nondir_replacement 7270b85037dbSmrg# perform func_basename and func_dirname in a single function 7271b85037dbSmrg# call: 7272b85037dbSmrg# dirname: Compute the dirname of FILE. If nonempty, 7273b85037dbSmrg# add APPEND to the result, otherwise set result 7274b85037dbSmrg# to NONDIR_REPLACEMENT. 7275b85037dbSmrg# value returned in "$func_dirname_result" 7276b85037dbSmrg# basename: Compute filename of FILE. 7277b85037dbSmrg# value retuned in "$func_basename_result" 7278b85037dbSmrg# Implementation must be kept synchronized with func_dirname 7279b85037dbSmrg# and func_basename. For efficiency, we do not delegate to 7280b85037dbSmrg# those functions but instead duplicate the functionality here. 7281b85037dbSmrgfunc_dirname_and_basename () 7282b85037dbSmrg{ 7283b85037dbSmrg case ${1} in 7284b85037dbSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7285b85037dbSmrg * ) func_dirname_result="${3}" ;; 7286b85037dbSmrg esac 7287b85037dbSmrg func_basename_result="${1##*/}" 7288b85037dbSmrg} 7289b85037dbSmrg 7290b85037dbSmrg# func_stripname prefix suffix name 7291b85037dbSmrg# strip PREFIX and SUFFIX off of NAME. 7292b85037dbSmrg# PREFIX and SUFFIX must not contain globbing or regex special 7293b85037dbSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7294b85037dbSmrg# dot (in which case that matches only a dot). 7295b85037dbSmrgfunc_stripname () 7296b85037dbSmrg{ 7297b85037dbSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7298b85037dbSmrg # positional parameters, so assign one to ordinary parameter first. 7299b85037dbSmrg func_stripname_result=${3} 7300b85037dbSmrg func_stripname_result=${func_stripname_result#"${1}"} 7301b85037dbSmrg func_stripname_result=${func_stripname_result%"${2}"} 7302b85037dbSmrg} 7303b85037dbSmrg 7304b85037dbSmrg# func_opt_split 7305b85037dbSmrgfunc_opt_split () 7306b85037dbSmrg{ 7307b85037dbSmrg func_opt_split_opt=${1%%=*} 7308b85037dbSmrg func_opt_split_arg=${1#*=} 7309b85037dbSmrg} 7310b85037dbSmrg 7311b85037dbSmrg# func_lo2o object 7312b85037dbSmrgfunc_lo2o () 7313b85037dbSmrg{ 7314b85037dbSmrg case ${1} in 7315b85037dbSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7316b85037dbSmrg *) func_lo2o_result=${1} ;; 7317b85037dbSmrg esac 7318b85037dbSmrg} 7319b85037dbSmrg 7320b85037dbSmrg# func_xform libobj-or-source 7321b85037dbSmrgfunc_xform () 7322b85037dbSmrg{ 7323b85037dbSmrg func_xform_result=${1%.*}.lo 7324b85037dbSmrg} 7325b85037dbSmrg 7326b85037dbSmrg# func_arith arithmetic-term... 7327b85037dbSmrgfunc_arith () 7328b85037dbSmrg{ 7329b85037dbSmrg func_arith_result=$(( $[*] )) 7330b85037dbSmrg} 7331b85037dbSmrg 7332b85037dbSmrg# func_len string 7333b85037dbSmrg# STRING may not start with a hyphen. 7334b85037dbSmrgfunc_len () 7335b85037dbSmrg{ 7336b85037dbSmrg func_len_result=${#1} 7337b85037dbSmrg} 7338b85037dbSmrg 7339b85037dbSmrg_LT_EOF 7340b85037dbSmrg ;; 7341b85037dbSmrg *) # Bourne compatible functions. 7342b85037dbSmrg cat << \_LT_EOF >> "$cfgfile" 7343b85037dbSmrg 7344b85037dbSmrg# func_dirname file append nondir_replacement 7345b85037dbSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7346b85037dbSmrg# otherwise set result to NONDIR_REPLACEMENT. 7347b85037dbSmrgfunc_dirname () 7348b85037dbSmrg{ 7349b85037dbSmrg # Extract subdirectory from the argument. 7350b85037dbSmrg func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` 7351b85037dbSmrg if test "X$func_dirname_result" = "X${1}"; then 7352b85037dbSmrg func_dirname_result="${3}" 7353b85037dbSmrg else 7354b85037dbSmrg func_dirname_result="$func_dirname_result${2}" 7355b85037dbSmrg fi 7356b85037dbSmrg} 7357b85037dbSmrg 7358b85037dbSmrg# func_basename file 7359b85037dbSmrgfunc_basename () 7360b85037dbSmrg{ 7361b85037dbSmrg func_basename_result=`$ECHO "${1}" | $SED "$basename"` 7362b85037dbSmrg} 7363b85037dbSmrg 7364b85037dbSmrgdnl func_dirname_and_basename 7365b85037dbSmrgdnl A portable version of this function is already defined in general.m4sh 7366b85037dbSmrgdnl so there is no need for it here. 7367b85037dbSmrg 7368b85037dbSmrg# func_stripname prefix suffix name 7369b85037dbSmrg# strip PREFIX and SUFFIX off of NAME. 7370b85037dbSmrg# PREFIX and SUFFIX must not contain globbing or regex special 7371b85037dbSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7372b85037dbSmrg# dot (in which case that matches only a dot). 7373b85037dbSmrg# func_strip_suffix prefix name 7374b85037dbSmrgfunc_stripname () 7375b85037dbSmrg{ 7376b85037dbSmrg case ${2} in 7377b85037dbSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 7378b85037dbSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 7379b85037dbSmrg esac 7380b85037dbSmrg} 7381b85037dbSmrg 7382b85037dbSmrg# sed scripts: 7383b85037dbSmrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 7384b85037dbSmrgmy_sed_long_arg='1s/^-[[^=]]*=//' 7385b85037dbSmrg 7386b85037dbSmrg# func_opt_split 7387b85037dbSmrgfunc_opt_split () 7388b85037dbSmrg{ 7389b85037dbSmrg func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` 7390b85037dbSmrg func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` 7391b85037dbSmrg} 7392b85037dbSmrg 7393b85037dbSmrg# func_lo2o object 7394b85037dbSmrgfunc_lo2o () 7395b85037dbSmrg{ 7396b85037dbSmrg func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` 7397b85037dbSmrg} 7398b85037dbSmrg 7399b85037dbSmrg# func_xform libobj-or-source 7400b85037dbSmrgfunc_xform () 7401b85037dbSmrg{ 7402b85037dbSmrg func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` 7403b85037dbSmrg} 7404b85037dbSmrg 7405b85037dbSmrg# func_arith arithmetic-term... 7406b85037dbSmrgfunc_arith () 7407b85037dbSmrg{ 7408b85037dbSmrg func_arith_result=`expr "$[@]"` 7409b85037dbSmrg} 7410b85037dbSmrg 7411b85037dbSmrg# func_len string 7412b85037dbSmrg# STRING may not start with a hyphen. 7413b85037dbSmrgfunc_len () 7414b85037dbSmrg{ 7415b85037dbSmrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 7416b85037dbSmrg} 7417b85037dbSmrg 7418b85037dbSmrg_LT_EOF 7419b85037dbSmrgesac 7420b85037dbSmrg 7421b85037dbSmrgcase $lt_shell_append in 7422b85037dbSmrg yes) 7423b85037dbSmrg cat << \_LT_EOF >> "$cfgfile" 7424b85037dbSmrg 7425b85037dbSmrg# func_append var value 7426b85037dbSmrg# Append VALUE to the end of shell variable VAR. 7427b85037dbSmrgfunc_append () 7428b85037dbSmrg{ 7429b85037dbSmrg eval "$[1]+=\$[2]" 7430b85037dbSmrg} 7431b85037dbSmrg_LT_EOF 7432b85037dbSmrg ;; 7433b85037dbSmrg *) 7434b85037dbSmrg cat << \_LT_EOF >> "$cfgfile" 7435b85037dbSmrg 7436b85037dbSmrg# func_append var value 7437b85037dbSmrg# Append VALUE to the end of shell variable VAR. 7438b85037dbSmrgfunc_append () 7439b85037dbSmrg{ 7440b85037dbSmrg eval "$[1]=\$$[1]\$[2]" 7441b85037dbSmrg} 7442b85037dbSmrg 7443b85037dbSmrg_LT_EOF 7444b85037dbSmrg ;; 7445b85037dbSmrg esac 7446b85037dbSmrg]) 7447b85037dbSmrg 7448b85037dbSmrg# Helper functions for option handling. -*- Autoconf -*- 7449b85037dbSmrg# 7450b85037dbSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 7451b85037dbSmrg# Inc. 7452b85037dbSmrg# Written by Gary V. Vaughan, 2004 7453b85037dbSmrg# 7454b85037dbSmrg# This file is free software; the Free Software Foundation gives 7455b85037dbSmrg# unlimited permission to copy and/or distribute it, with or without 7456b85037dbSmrg# modifications, as long as this notice is preserved. 7457b85037dbSmrg 7458b85037dbSmrg# serial 7 ltoptions.m4 7459b85037dbSmrg 7460b85037dbSmrg# This is to help aclocal find these macros, as it can't see m4_define. 7461b85037dbSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 7462b85037dbSmrg 7463b85037dbSmrg 7464b85037dbSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 7465b85037dbSmrg# ------------------------------------------ 7466b85037dbSmrgm4_define([_LT_MANGLE_OPTION], 7467b85037dbSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 7468b85037dbSmrg 7469b85037dbSmrg 7470b85037dbSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 7471b85037dbSmrg# --------------------------------------- 7472b85037dbSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 7473b85037dbSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 7474b85037dbSmrg# saved as a flag. 7475b85037dbSmrgm4_define([_LT_SET_OPTION], 7476b85037dbSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 7477b85037dbSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 7478b85037dbSmrg _LT_MANGLE_DEFUN([$1], [$2]), 7479b85037dbSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 7480b85037dbSmrg]) 7481b85037dbSmrg 7482b85037dbSmrg 7483b85037dbSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 7484b85037dbSmrg# ------------------------------------------------------------ 7485b85037dbSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7486b85037dbSmrgm4_define([_LT_IF_OPTION], 7487b85037dbSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 7488b85037dbSmrg 7489b85037dbSmrg 7490b85037dbSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 7491b85037dbSmrg# ------------------------------------------------------- 7492b85037dbSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 7493b85037dbSmrg# are set. 7494b85037dbSmrgm4_define([_LT_UNLESS_OPTIONS], 7495b85037dbSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7496b85037dbSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 7497b85037dbSmrg [m4_define([$0_found])])])[]dnl 7498b85037dbSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 7499b85037dbSmrg])[]dnl 7500b85037dbSmrg]) 7501b85037dbSmrg 7502b85037dbSmrg 7503b85037dbSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 7504b85037dbSmrg# ---------------------------------------- 7505b85037dbSmrg# OPTION-LIST is a space-separated list of Libtool options associated 7506b85037dbSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 7507b85037dbSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 7508b85037dbSmrg# the unknown option and exit. 7509b85037dbSmrgm4_defun([_LT_SET_OPTIONS], 7510b85037dbSmrg[# Set options 7511b85037dbSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7512b85037dbSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 7513b85037dbSmrg 7514b85037dbSmrgm4_if([$1],[LT_INIT],[ 7515b85037dbSmrg dnl 7516b85037dbSmrg dnl Simply set some default values (i.e off) if boolean options were not 7517b85037dbSmrg dnl specified: 7518b85037dbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 7519b85037dbSmrg ]) 7520b85037dbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 7521b85037dbSmrg ]) 7522b85037dbSmrg dnl 7523b85037dbSmrg dnl If no reference was made to various pairs of opposing options, then 7524b85037dbSmrg dnl we run the default mode handler for the pair. For example, if neither 7525b85037dbSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 7526b85037dbSmrg dnl archives by default: 7527b85037dbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 7528b85037dbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 7529b85037dbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 7530b85037dbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 7531b85037dbSmrg [_LT_ENABLE_FAST_INSTALL]) 7532b85037dbSmrg ]) 7533b85037dbSmrg])# _LT_SET_OPTIONS 7534b85037dbSmrg 7535b85037dbSmrg 7536b85037dbSmrg 7537b85037dbSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 7538b85037dbSmrg# ----------------------------------------- 7539b85037dbSmrgm4_define([_LT_MANGLE_DEFUN], 7540b85037dbSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 7541b85037dbSmrg 7542b85037dbSmrg 7543b85037dbSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 7544b85037dbSmrg# ----------------------------------------------- 7545b85037dbSmrgm4_define([LT_OPTION_DEFINE], 7546b85037dbSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 7547b85037dbSmrg])# LT_OPTION_DEFINE 7548b85037dbSmrg 7549b85037dbSmrg 7550b85037dbSmrg# dlopen 7551b85037dbSmrg# ------ 7552b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 7553b85037dbSmrg]) 7554b85037dbSmrg 7555b85037dbSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 7556b85037dbSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 7557b85037dbSmrgAC_DIAGNOSE([obsolete], 7558b85037dbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7559b85037dbSmrgput the `dlopen' option into LT_INIT's first parameter.]) 7560b85037dbSmrg]) 7561b85037dbSmrg 7562b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 7563b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 7564b85037dbSmrg 7565b85037dbSmrg 7566b85037dbSmrg# win32-dll 7567b85037dbSmrg# --------- 7568b85037dbSmrg# Declare package support for building win32 dll's. 7569b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 7570b85037dbSmrg[enable_win32_dll=yes 7571b85037dbSmrg 7572b85037dbSmrgcase $host in 7573b85037dbSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 7574b85037dbSmrg AC_CHECK_TOOL(AS, as, false) 7575b85037dbSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7576b85037dbSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7577b85037dbSmrg ;; 7578b85037dbSmrgesac 7579b85037dbSmrg 7580b85037dbSmrgtest -z "$AS" && AS=as 7581b85037dbSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 7582b85037dbSmrg 7583b85037dbSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7584b85037dbSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 7585b85037dbSmrg 7586b85037dbSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7587b85037dbSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 7588b85037dbSmrg])# win32-dll 7589b85037dbSmrg 7590b85037dbSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 7591b85037dbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7592b85037dbSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 7593b85037dbSmrgAC_DIAGNOSE([obsolete], 7594b85037dbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7595b85037dbSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 7596b85037dbSmrg]) 7597b85037dbSmrg 7598b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 7599b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 7600b85037dbSmrg 7601b85037dbSmrg 7602b85037dbSmrg# _LT_ENABLE_SHARED([DEFAULT]) 7603b85037dbSmrg# ---------------------------- 7604b85037dbSmrg# implement the --enable-shared flag, and supports the `shared' and 7605b85037dbSmrg# `disable-shared' LT_INIT options. 7606b85037dbSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7607b85037dbSmrgm4_define([_LT_ENABLE_SHARED], 7608b85037dbSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 7609b85037dbSmrgAC_ARG_ENABLE([shared], 7610b85037dbSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 7611b85037dbSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 7612b85037dbSmrg [p=${PACKAGE-default} 7613b85037dbSmrg case $enableval in 7614b85037dbSmrg yes) enable_shared=yes ;; 7615b85037dbSmrg no) enable_shared=no ;; 7616b85037dbSmrg *) 7617b85037dbSmrg enable_shared=no 7618b85037dbSmrg # Look at the argument we got. We use all the common list separators. 7619b85037dbSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7620b85037dbSmrg for pkg in $enableval; do 7621b85037dbSmrg IFS="$lt_save_ifs" 7622b85037dbSmrg if test "X$pkg" = "X$p"; then 7623b85037dbSmrg enable_shared=yes 7624b85037dbSmrg fi 7625b85037dbSmrg done 7626b85037dbSmrg IFS="$lt_save_ifs" 7627b85037dbSmrg ;; 7628b85037dbSmrg esac], 7629b85037dbSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 7630b85037dbSmrg 7631b85037dbSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 7632b85037dbSmrg [Whether or not to build shared libraries]) 7633b85037dbSmrg])# _LT_ENABLE_SHARED 7634b85037dbSmrg 7635b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 7636b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 7637b85037dbSmrg 7638b85037dbSmrg# Old names: 7639b85037dbSmrgAC_DEFUN([AC_ENABLE_SHARED], 7640b85037dbSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 7641b85037dbSmrg]) 7642b85037dbSmrg 7643b85037dbSmrgAC_DEFUN([AC_DISABLE_SHARED], 7644b85037dbSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 7645b85037dbSmrg]) 7646b85037dbSmrg 7647b85037dbSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 7648b85037dbSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 7649b85037dbSmrg 7650b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 7651b85037dbSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 7652b85037dbSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 7653b85037dbSmrg 7654b85037dbSmrg 7655b85037dbSmrg 7656b85037dbSmrg# _LT_ENABLE_STATIC([DEFAULT]) 7657b85037dbSmrg# ---------------------------- 7658b85037dbSmrg# implement the --enable-static flag, and support the `static' and 7659b85037dbSmrg# `disable-static' LT_INIT options. 7660b85037dbSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7661b85037dbSmrgm4_define([_LT_ENABLE_STATIC], 7662b85037dbSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 7663b85037dbSmrgAC_ARG_ENABLE([static], 7664b85037dbSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 7665b85037dbSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 7666b85037dbSmrg [p=${PACKAGE-default} 7667b85037dbSmrg case $enableval in 7668b85037dbSmrg yes) enable_static=yes ;; 7669b85037dbSmrg no) enable_static=no ;; 7670b85037dbSmrg *) 7671b85037dbSmrg enable_static=no 7672b85037dbSmrg # Look at the argument we got. We use all the common list separators. 7673b85037dbSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7674b85037dbSmrg for pkg in $enableval; do 7675b85037dbSmrg IFS="$lt_save_ifs" 7676b85037dbSmrg if test "X$pkg" = "X$p"; then 7677b85037dbSmrg enable_static=yes 7678b85037dbSmrg fi 7679b85037dbSmrg done 7680b85037dbSmrg IFS="$lt_save_ifs" 7681b85037dbSmrg ;; 7682b85037dbSmrg esac], 7683b85037dbSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 7684b85037dbSmrg 7685b85037dbSmrg _LT_DECL([build_old_libs], [enable_static], [0], 7686b85037dbSmrg [Whether or not to build static libraries]) 7687b85037dbSmrg])# _LT_ENABLE_STATIC 7688b85037dbSmrg 7689b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 7690b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 7691b85037dbSmrg 7692b85037dbSmrg# Old names: 7693b85037dbSmrgAC_DEFUN([AC_ENABLE_STATIC], 7694b85037dbSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 7695b85037dbSmrg]) 7696b85037dbSmrg 7697b85037dbSmrgAC_DEFUN([AC_DISABLE_STATIC], 7698b85037dbSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 7699b85037dbSmrg]) 7700b85037dbSmrg 7701b85037dbSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 7702b85037dbSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 7703b85037dbSmrg 7704b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 7705b85037dbSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 7706b85037dbSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 7707b85037dbSmrg 7708b85037dbSmrg 7709b85037dbSmrg 7710b85037dbSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 7711b85037dbSmrg# ---------------------------------- 7712b85037dbSmrg# implement the --enable-fast-install flag, and support the `fast-install' 7713b85037dbSmrg# and `disable-fast-install' LT_INIT options. 7714b85037dbSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7715b85037dbSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 7716b85037dbSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 7717b85037dbSmrgAC_ARG_ENABLE([fast-install], 7718b85037dbSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 7719b85037dbSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 7720b85037dbSmrg [p=${PACKAGE-default} 7721b85037dbSmrg case $enableval in 7722b85037dbSmrg yes) enable_fast_install=yes ;; 7723b85037dbSmrg no) enable_fast_install=no ;; 7724b85037dbSmrg *) 7725b85037dbSmrg enable_fast_install=no 7726b85037dbSmrg # Look at the argument we got. We use all the common list separators. 7727b85037dbSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7728b85037dbSmrg for pkg in $enableval; do 7729b85037dbSmrg IFS="$lt_save_ifs" 7730b85037dbSmrg if test "X$pkg" = "X$p"; then 7731b85037dbSmrg enable_fast_install=yes 7732b85037dbSmrg fi 7733b85037dbSmrg done 7734b85037dbSmrg IFS="$lt_save_ifs" 7735b85037dbSmrg ;; 7736b85037dbSmrg esac], 7737b85037dbSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 7738b85037dbSmrg 7739b85037dbSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 7740b85037dbSmrg [Whether or not to optimize for fast installation])dnl 7741b85037dbSmrg])# _LT_ENABLE_FAST_INSTALL 7742b85037dbSmrg 7743b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 7744b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 7745b85037dbSmrg 7746b85037dbSmrg# Old names: 7747b85037dbSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 7748b85037dbSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 7749b85037dbSmrgAC_DIAGNOSE([obsolete], 7750b85037dbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7751b85037dbSmrgthe `fast-install' option into LT_INIT's first parameter.]) 7752b85037dbSmrg]) 7753b85037dbSmrg 7754b85037dbSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 7755b85037dbSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 7756b85037dbSmrgAC_DIAGNOSE([obsolete], 7757b85037dbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7758b85037dbSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 7759b85037dbSmrg]) 7760b85037dbSmrg 7761b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 7762b85037dbSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 7763b85037dbSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 7764b85037dbSmrg 7765b85037dbSmrg 7766b85037dbSmrg# _LT_WITH_PIC([MODE]) 7767b85037dbSmrg# -------------------- 7768b85037dbSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 7769b85037dbSmrg# LT_INIT options. 7770b85037dbSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 7771b85037dbSmrgm4_define([_LT_WITH_PIC], 7772b85037dbSmrg[AC_ARG_WITH([pic], 7773b85037dbSmrg [AS_HELP_STRING([--with-pic], 7774b85037dbSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 7775b85037dbSmrg [pic_mode="$withval"], 7776b85037dbSmrg [pic_mode=default]) 7777b85037dbSmrg 7778b85037dbSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 7779b85037dbSmrg 7780b85037dbSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 7781b85037dbSmrg])# _LT_WITH_PIC 7782b85037dbSmrg 7783b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 7784b85037dbSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 7785b85037dbSmrg 7786b85037dbSmrg# Old name: 7787b85037dbSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 7788b85037dbSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 7789b85037dbSmrgAC_DIAGNOSE([obsolete], 7790b85037dbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7791b85037dbSmrgput the `pic-only' option into LT_INIT's first parameter.]) 7792b85037dbSmrg]) 7793b85037dbSmrg 7794b85037dbSmrgdnl aclocal-1.4 backwards compatibility: 7795b85037dbSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 7796b85037dbSmrg 7797b85037dbSmrg 7798b85037dbSmrgm4_define([_LTDL_MODE], []) 7799b85037dbSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 7800b85037dbSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 7801b85037dbSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 7802b85037dbSmrg [m4_define([_LTDL_MODE], [recursive])]) 7803b85037dbSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 7804b85037dbSmrg [m4_define([_LTDL_MODE], [subproject])]) 7805b85037dbSmrg 7806b85037dbSmrgm4_define([_LTDL_TYPE], []) 7807b85037dbSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 7808b85037dbSmrg [m4_define([_LTDL_TYPE], [installable])]) 7809b85037dbSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 7810b85037dbSmrg [m4_define([_LTDL_TYPE], [convenience])]) 7811b85037dbSmrg 7812b85037dbSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 7813b85037dbSmrg# 7814b85037dbSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 7815b85037dbSmrg# Written by Gary V. Vaughan, 2004 7816b85037dbSmrg# 7817b85037dbSmrg# This file is free software; the Free Software Foundation gives 7818b85037dbSmrg# unlimited permission to copy and/or distribute it, with or without 7819b85037dbSmrg# modifications, as long as this notice is preserved. 7820b85037dbSmrg 7821b85037dbSmrg# serial 6 ltsugar.m4 7822b85037dbSmrg 7823b85037dbSmrg# This is to help aclocal find these macros, as it can't see m4_define. 7824b85037dbSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 7825b85037dbSmrg 7826b85037dbSmrg 7827b85037dbSmrg# lt_join(SEP, ARG1, [ARG2...]) 7828b85037dbSmrg# ----------------------------- 7829b85037dbSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 7830b85037dbSmrg# associated separator. 7831b85037dbSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 7832b85037dbSmrg# versions in m4sugar had bugs. 7833b85037dbSmrgm4_define([lt_join], 7834b85037dbSmrg[m4_if([$#], [1], [], 7835b85037dbSmrg [$#], [2], [[$2]], 7836b85037dbSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 7837b85037dbSmrgm4_define([_lt_join], 7838b85037dbSmrg[m4_if([$#$2], [2], [], 7839b85037dbSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 7840b85037dbSmrg 7841b85037dbSmrg 7842b85037dbSmrg# lt_car(LIST) 7843b85037dbSmrg# lt_cdr(LIST) 7844b85037dbSmrg# ------------ 7845b85037dbSmrg# Manipulate m4 lists. 7846b85037dbSmrg# These macros are necessary as long as will still need to support 7847b85037dbSmrg# Autoconf-2.59 which quotes differently. 7848b85037dbSmrgm4_define([lt_car], [[$1]]) 7849b85037dbSmrgm4_define([lt_cdr], 7850b85037dbSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 7851b85037dbSmrg [$#], 1, [], 7852b85037dbSmrg [m4_dquote(m4_shift($@))])]) 7853b85037dbSmrgm4_define([lt_unquote], $1) 7854b85037dbSmrg 7855b85037dbSmrg 7856b85037dbSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 7857b85037dbSmrg# ------------------------------------------ 7858b85037dbSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 7859b85037dbSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 7860b85037dbSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 7861b85037dbSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 7862b85037dbSmrg# than defined and empty). 7863b85037dbSmrg# 7864b85037dbSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 7865b85037dbSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 7866b85037dbSmrgm4_define([lt_append], 7867b85037dbSmrg[m4_define([$1], 7868b85037dbSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 7869b85037dbSmrg 7870b85037dbSmrg 7871b85037dbSmrg 7872b85037dbSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 7873b85037dbSmrg# ---------------------------------------------------------- 7874b85037dbSmrg# Produce a SEP delimited list of all paired combinations of elements of 7875b85037dbSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 7876b85037dbSmrg# has the form PREFIXmINFIXSUFFIXn. 7877b85037dbSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 7878b85037dbSmrgm4_define([lt_combine], 7879b85037dbSmrg[m4_if(m4_eval([$# > 3]), [1], 7880b85037dbSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 7881b85037dbSmrg[[m4_foreach([_Lt_prefix], [$2], 7882b85037dbSmrg [m4_foreach([_Lt_suffix], 7883b85037dbSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 7884b85037dbSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 7885b85037dbSmrg 7886b85037dbSmrg 7887b85037dbSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 7888b85037dbSmrg# ----------------------------------------------------------------------- 7889b85037dbSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 7890b85037dbSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 7891b85037dbSmrgm4_define([lt_if_append_uniq], 7892b85037dbSmrg[m4_ifdef([$1], 7893b85037dbSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 7894b85037dbSmrg [lt_append([$1], [$2], [$3])$4], 7895b85037dbSmrg [$5])], 7896b85037dbSmrg [lt_append([$1], [$2], [$3])$4])]) 7897b85037dbSmrg 7898b85037dbSmrg 7899b85037dbSmrg# lt_dict_add(DICT, KEY, VALUE) 7900b85037dbSmrg# ----------------------------- 7901b85037dbSmrgm4_define([lt_dict_add], 7902b85037dbSmrg[m4_define([$1($2)], [$3])]) 7903b85037dbSmrg 7904b85037dbSmrg 7905b85037dbSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 7906b85037dbSmrg# -------------------------------------------- 7907b85037dbSmrgm4_define([lt_dict_add_subkey], 7908b85037dbSmrg[m4_define([$1($2:$3)], [$4])]) 7909b85037dbSmrg 7910b85037dbSmrg 7911b85037dbSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 7912b85037dbSmrg# ---------------------------------- 7913b85037dbSmrgm4_define([lt_dict_fetch], 7914b85037dbSmrg[m4_ifval([$3], 7915b85037dbSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 7916b85037dbSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 7917b85037dbSmrg 7918b85037dbSmrg 7919b85037dbSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 7920b85037dbSmrg# ----------------------------------------------------------------- 7921b85037dbSmrgm4_define([lt_if_dict_fetch], 7922b85037dbSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 7923b85037dbSmrg [$5], 7924b85037dbSmrg [$6])]) 7925b85037dbSmrg 7926b85037dbSmrg 7927b85037dbSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 7928b85037dbSmrg# -------------------------------------------------------------- 7929b85037dbSmrgm4_define([lt_dict_filter], 7930b85037dbSmrg[m4_if([$5], [], [], 7931b85037dbSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 7932b85037dbSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 7933b85037dbSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 7934b85037dbSmrg]) 7935b85037dbSmrg 7936b85037dbSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 7937b85037dbSmrg# 7938b85037dbSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 7939b85037dbSmrg# Written by Scott James Remnant, 2004 7940b85037dbSmrg# 7941b85037dbSmrg# This file is free software; the Free Software Foundation gives 7942b85037dbSmrg# unlimited permission to copy and/or distribute it, with or without 7943b85037dbSmrg# modifications, as long as this notice is preserved. 7944b85037dbSmrg 7945b85037dbSmrg# Generated from ltversion.in. 7946b85037dbSmrg 7947b85037dbSmrg# serial 3175 ltversion.m4 7948b85037dbSmrg# This file is part of GNU Libtool 7949b85037dbSmrg 7950b85037dbSmrgm4_define([LT_PACKAGE_VERSION], [2.2.10]) 7951b85037dbSmrgm4_define([LT_PACKAGE_REVISION], [1.3175]) 7952b85037dbSmrg 7953b85037dbSmrgAC_DEFUN([LTVERSION_VERSION], 7954b85037dbSmrg[macro_version='2.2.10' 7955b85037dbSmrgmacro_revision='1.3175' 7956b85037dbSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 7957b85037dbSmrg_LT_DECL(, macro_revision, 0) 7958b85037dbSmrg]) 7959b85037dbSmrg 7960b85037dbSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 7961b85037dbSmrg# 7962b85037dbSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 7963b85037dbSmrg# Written by Scott James Remnant, 2004. 7964b85037dbSmrg# 7965b85037dbSmrg# This file is free software; the Free Software Foundation gives 7966b85037dbSmrg# unlimited permission to copy and/or distribute it, with or without 7967b85037dbSmrg# modifications, as long as this notice is preserved. 7968b85037dbSmrg 7969b85037dbSmrg# serial 5 lt~obsolete.m4 7970b85037dbSmrg 7971b85037dbSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 7972b85037dbSmrg# 7973b85037dbSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 7974b85037dbSmrg# which have later been changed to m4_define as they aren't part of the 7975b85037dbSmrg# exported API, or moved to Autoconf or Automake where they belong. 7976b85037dbSmrg# 7977b85037dbSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 7978b85037dbSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 7979b85037dbSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 7980b85037dbSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 7981b85037dbSmrg# and doesn't know about Autoconf macros at all.) 7982b85037dbSmrg# 7983b85037dbSmrg# So we provide this file, which has a silly filename so it's always 7984b85037dbSmrg# included after everything else. This provides aclocal with the 7985b85037dbSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 7986b85037dbSmrg# because those macros already exist, or will be overwritten later. 7987b85037dbSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 7988b85037dbSmrg# 7989b85037dbSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 7990b85037dbSmrg# Yes, that means every name once taken will need to remain here until 7991b85037dbSmrg# we give up compatibility with versions before 1.7, at which point 7992b85037dbSmrg# we need to keep only those names which we still refer to. 7993b85037dbSmrg 7994b85037dbSmrg# This is to help aclocal find these macros, as it can't see m4_define. 7995b85037dbSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 7996b85037dbSmrg 7997b85037dbSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 7998b85037dbSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 7999b85037dbSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8000b85037dbSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8001b85037dbSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8002b85037dbSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8003b85037dbSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8004b85037dbSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8005b85037dbSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8006b85037dbSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8007b85037dbSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8008b85037dbSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8009b85037dbSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8010b85037dbSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8011b85037dbSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8012b85037dbSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8013b85037dbSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8014b85037dbSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8015b85037dbSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8016b85037dbSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8017b85037dbSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8018b85037dbSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8019b85037dbSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8020b85037dbSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8021b85037dbSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8022b85037dbSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8023b85037dbSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8024b85037dbSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8025b85037dbSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8026b85037dbSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8027b85037dbSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8028b85037dbSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8029b85037dbSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8030b85037dbSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8031b85037dbSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8032b85037dbSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8033b85037dbSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8034b85037dbSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8035b85037dbSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8036b85037dbSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8037b85037dbSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8038b85037dbSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8039b85037dbSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8040b85037dbSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8041b85037dbSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8042b85037dbSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8043b85037dbSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8044b85037dbSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8045b85037dbSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8046b85037dbSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8047b85037dbSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8048b85037dbSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8049b85037dbSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8050b85037dbSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8051b85037dbSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8052b85037dbSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8053b85037dbSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8054b85037dbSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8055b85037dbSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8056b85037dbSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8057b85037dbSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 8058b85037dbSmrg 8059b85037dbSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 8060b85037dbSmrg# serial 1 (pkg-config-0.24) 8061b85037dbSmrg# 8062b85037dbSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 8063b85037dbSmrg# 8064b85037dbSmrg# This program is free software; you can redistribute it and/or modify 8065b85037dbSmrg# it under the terms of the GNU General Public License as published by 8066b85037dbSmrg# the Free Software Foundation; either version 2 of the License, or 8067b85037dbSmrg# (at your option) any later version. 8068b85037dbSmrg# 8069b85037dbSmrg# This program is distributed in the hope that it will be useful, but 8070b85037dbSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 8071b85037dbSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8072b85037dbSmrg# General Public License for more details. 8073b85037dbSmrg# 8074b85037dbSmrg# You should have received a copy of the GNU General Public License 8075b85037dbSmrg# along with this program; if not, write to the Free Software 8076b85037dbSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 8077b85037dbSmrg# 8078b85037dbSmrg# As a special exception to the GNU General Public License, if you 8079b85037dbSmrg# distribute this file as part of a program that contains a 8080b85037dbSmrg# configuration script generated by Autoconf, you may include it under 8081b85037dbSmrg# the same distribution terms that you use for the rest of that program. 8082b85037dbSmrg 8083b85037dbSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 8084b85037dbSmrg# ---------------------------------- 8085b85037dbSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 8086b85037dbSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 8087b85037dbSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 8088b85037dbSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 8089b85037dbSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 8090b85037dbSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 8091b85037dbSmrg 8092b85037dbSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8093b85037dbSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8094b85037dbSmrgfi 8095b85037dbSmrgif test -n "$PKG_CONFIG"; then 8096b85037dbSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 8097b85037dbSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8098b85037dbSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8099b85037dbSmrg AC_MSG_RESULT([yes]) 8100b85037dbSmrg else 8101b85037dbSmrg AC_MSG_RESULT([no]) 8102b85037dbSmrg PKG_CONFIG="" 8103b85037dbSmrg fi 8104b85037dbSmrgfi[]dnl 8105b85037dbSmrg])# PKG_PROG_PKG_CONFIG 8106b85037dbSmrg 8107b85037dbSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8108b85037dbSmrg# 8109b85037dbSmrg# Check to see whether a particular set of modules exists. Similar 8110b85037dbSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8111b85037dbSmrg# 8112b85037dbSmrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8113b85037dbSmrg# only at the first occurence in configure.ac, so if the first place 8114b85037dbSmrg# it's called might be skipped (such as if it is within an "if", you 8115b85037dbSmrg# have to call PKG_CHECK_EXISTS manually 8116b85037dbSmrg# -------------------------------------------------------------- 8117b85037dbSmrgAC_DEFUN([PKG_CHECK_EXISTS], 8118b85037dbSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8119b85037dbSmrgif test -n "$PKG_CONFIG" && \ 8120b85037dbSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8121b85037dbSmrg m4_default([$2], [:]) 8122b85037dbSmrgm4_ifvaln([$3], [else 8123b85037dbSmrg $3])dnl 8124b85037dbSmrgfi]) 8125b85037dbSmrg 8126b85037dbSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8127b85037dbSmrg# --------------------------------------------- 8128b85037dbSmrgm4_define([_PKG_CONFIG], 8129b85037dbSmrg[if test -n "$$1"; then 8130b85037dbSmrg pkg_cv_[]$1="$$1" 8131b85037dbSmrg elif test -n "$PKG_CONFIG"; then 8132b85037dbSmrg PKG_CHECK_EXISTS([$3], 8133b85037dbSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 8134b85037dbSmrg [pkg_failed=yes]) 8135b85037dbSmrg else 8136b85037dbSmrg pkg_failed=untried 8137b85037dbSmrgfi[]dnl 8138b85037dbSmrg])# _PKG_CONFIG 8139b85037dbSmrg 8140b85037dbSmrg# _PKG_SHORT_ERRORS_SUPPORTED 8141b85037dbSmrg# ----------------------------- 8142b85037dbSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8143b85037dbSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8144b85037dbSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8145b85037dbSmrg _pkg_short_errors_supported=yes 8146b85037dbSmrgelse 8147b85037dbSmrg _pkg_short_errors_supported=no 8148b85037dbSmrgfi[]dnl 8149b85037dbSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 8150b85037dbSmrg 8151b85037dbSmrg 8152b85037dbSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8153b85037dbSmrg# [ACTION-IF-NOT-FOUND]) 8154b85037dbSmrg# 8155b85037dbSmrg# 8156b85037dbSmrg# Note that if there is a possibility the first call to 8157b85037dbSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8158b85037dbSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8159b85037dbSmrg# 8160b85037dbSmrg# 8161b85037dbSmrg# -------------------------------------------------------------- 8162b85037dbSmrgAC_DEFUN([PKG_CHECK_MODULES], 8163b85037dbSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8164b85037dbSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8165b85037dbSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8166b85037dbSmrg 8167b85037dbSmrgpkg_failed=no 8168b85037dbSmrgAC_MSG_CHECKING([for $1]) 8169b85037dbSmrg 8170b85037dbSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8171b85037dbSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8172b85037dbSmrg 8173b85037dbSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8174b85037dbSmrgand $1[]_LIBS to avoid the need to call pkg-config. 8175b85037dbSmrgSee the pkg-config man page for more details.]) 8176b85037dbSmrg 8177b85037dbSmrgif test $pkg_failed = yes; then 8178b85037dbSmrg AC_MSG_RESULT([no]) 8179b85037dbSmrg _PKG_SHORT_ERRORS_SUPPORTED 8180b85037dbSmrg if test $_pkg_short_errors_supported = yes; then 8181b85037dbSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 8182b85037dbSmrg else 8183b85037dbSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 8184b85037dbSmrg fi 8185b85037dbSmrg # Put the nasty error message in config.log where it belongs 8186b85037dbSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8187b85037dbSmrg 8188b85037dbSmrg m4_default([$4], [AC_MSG_ERROR( 8189b85037dbSmrg[Package requirements ($2) were not met: 8190b85037dbSmrg 8191b85037dbSmrg$$1_PKG_ERRORS 8192b85037dbSmrg 8193b85037dbSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8194b85037dbSmrginstalled software in a non-standard prefix. 8195b85037dbSmrg 8196b85037dbSmrg_PKG_TEXT]) 8197b85037dbSmrg ]) 8198b85037dbSmrgelif test $pkg_failed = untried; then 8199b85037dbSmrg AC_MSG_RESULT([no]) 8200b85037dbSmrg m4_default([$4], [AC_MSG_FAILURE( 8201b85037dbSmrg[The pkg-config script could not be found or is too old. Make sure it 8202b85037dbSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 8203b85037dbSmrgpath to pkg-config. 8204b85037dbSmrg 8205b85037dbSmrg_PKG_TEXT 8206b85037dbSmrg 8207b85037dbSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 8208b85037dbSmrg ]) 8209b85037dbSmrgelse 8210b85037dbSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8211b85037dbSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8212b85037dbSmrg AC_MSG_RESULT([yes]) 8213b85037dbSmrg $3 8214b85037dbSmrgfi[]dnl 8215b85037dbSmrg])# PKG_CHECK_MODULES 8216b85037dbSmrg 8217b85037dbSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 8218b85037dbSmrg# 8219b85037dbSmrg# This file is free software; the Free Software Foundation 8220b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8221b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8222b85037dbSmrg 8223b85037dbSmrg# AM_AUTOMAKE_VERSION(VERSION) 8224b85037dbSmrg# ---------------------------- 8225b85037dbSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 8226b85037dbSmrg# generated from the m4 files accompanying Automake X.Y. 8227b85037dbSmrg# (This private macro should not be called outside this file.) 8228b85037dbSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 8229b85037dbSmrg[am__api_version='1.11' 8230b85037dbSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 8231b85037dbSmrgdnl require some minimum version. Point them to the right macro. 8232b85037dbSmrgm4_if([$1], [1.11.1], [], 8233b85037dbSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 8234b85037dbSmrg]) 8235b85037dbSmrg 8236b85037dbSmrg# _AM_AUTOCONF_VERSION(VERSION) 8237b85037dbSmrg# ----------------------------- 8238b85037dbSmrg# aclocal traces this macro to find the Autoconf version. 8239b85037dbSmrg# This is a private macro too. Using m4_define simplifies 8240b85037dbSmrg# the logic in aclocal, which can simply ignore this definition. 8241b85037dbSmrgm4_define([_AM_AUTOCONF_VERSION], []) 8242b85037dbSmrg 8243b85037dbSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 8244b85037dbSmrg# ------------------------------- 8245b85037dbSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 8246b85037dbSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 8247b85037dbSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 8248b85037dbSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 8249b85037dbSmrgm4_ifndef([AC_AUTOCONF_VERSION], 8250b85037dbSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 8251b85037dbSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 8252b85037dbSmrg 8253b85037dbSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 8254b85037dbSmrg 8255b85037dbSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8256b85037dbSmrg# 8257b85037dbSmrg# This file is free software; the Free Software Foundation 8258b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8259b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8260b85037dbSmrg 8261b85037dbSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 8262b85037dbSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 8263b85037dbSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 8264b85037dbSmrg# 8265b85037dbSmrg# Of course, Automake must honor this variable whenever it calls a 8266b85037dbSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 8267b85037dbSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 8268b85037dbSmrg# depending on how configure is run. This is pretty annoying, since 8269b85037dbSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 8270b85037dbSmrg# source directory, any form will work fine, but in subdirectories a 8271b85037dbSmrg# relative path needs to be adjusted first. 8272b85037dbSmrg# 8273b85037dbSmrg# $ac_aux_dir/missing 8274b85037dbSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 8275b85037dbSmrg# $top_srcdir/$ac_aux_dir/missing 8276b85037dbSmrg# fails if $ac_aux_dir is absolute, 8277b85037dbSmrg# fails when called from a subdirectory in a VPATH build with 8278b85037dbSmrg# a relative $ac_aux_dir 8279b85037dbSmrg# 8280b85037dbSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8281b85037dbSmrg# are both prefixed by $srcdir. In an in-source build this is usually 8282b85037dbSmrg# harmless because $srcdir is `.', but things will broke when you 8283b85037dbSmrg# start a VPATH build or use an absolute $srcdir. 8284b85037dbSmrg# 8285b85037dbSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 8286b85037dbSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 8287b85037dbSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 8288b85037dbSmrg# and then we would define $MISSING as 8289b85037dbSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 8290b85037dbSmrg# This will work as long as MISSING is not called from configure, because 8291b85037dbSmrg# unfortunately $(top_srcdir) has no meaning in configure. 8292b85037dbSmrg# However there are other variables, like CC, which are often used in 8293b85037dbSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 8294b85037dbSmrg# 8295b85037dbSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 8296b85037dbSmrg# absolute PATH. The drawback is that using absolute paths prevent a 8297b85037dbSmrg# configured tree to be moved without reconfiguration. 8298b85037dbSmrg 8299b85037dbSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 8300b85037dbSmrg[dnl Rely on autoconf to set up CDPATH properly. 8301b85037dbSmrgAC_PREREQ([2.50])dnl 8302b85037dbSmrg# expand $ac_aux_dir to an absolute path 8303b85037dbSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 8304b85037dbSmrg]) 8305b85037dbSmrg 8306b85037dbSmrg# AM_CONDITIONAL -*- Autoconf -*- 8307b85037dbSmrg 8308b85037dbSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 8309b85037dbSmrg# Free Software Foundation, Inc. 8310b85037dbSmrg# 8311b85037dbSmrg# This file is free software; the Free Software Foundation 8312b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8313b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8314b85037dbSmrg 8315b85037dbSmrg# serial 9 8316b85037dbSmrg 8317b85037dbSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 8318b85037dbSmrg# ------------------------------------- 8319b85037dbSmrg# Define a conditional. 8320b85037dbSmrgAC_DEFUN([AM_CONDITIONAL], 8321b85037dbSmrg[AC_PREREQ(2.52)dnl 8322b85037dbSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 8323b85037dbSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 8324b85037dbSmrgAC_SUBST([$1_TRUE])dnl 8325b85037dbSmrgAC_SUBST([$1_FALSE])dnl 8326b85037dbSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 8327b85037dbSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 8328b85037dbSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 8329b85037dbSmrgif $2; then 8330b85037dbSmrg $1_TRUE= 8331b85037dbSmrg $1_FALSE='#' 8332b85037dbSmrgelse 8333b85037dbSmrg $1_TRUE='#' 8334b85037dbSmrg $1_FALSE= 8335b85037dbSmrgfi 8336b85037dbSmrgAC_CONFIG_COMMANDS_PRE( 8337b85037dbSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 8338b85037dbSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 8339b85037dbSmrgUsually this means the macro was only invoked conditionally.]]) 8340b85037dbSmrgfi])]) 8341b85037dbSmrg 8342b85037dbSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 8343b85037dbSmrg# Free Software Foundation, Inc. 8344b85037dbSmrg# 8345b85037dbSmrg# This file is free software; the Free Software Foundation 8346b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8347b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8348b85037dbSmrg 8349b85037dbSmrg# serial 10 8350b85037dbSmrg 8351b85037dbSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 8352b85037dbSmrg# written in clear, in which case automake, when reading aclocal.m4, 8353b85037dbSmrg# will think it sees a *use*, and therefore will trigger all it's 8354b85037dbSmrg# C support machinery. Also note that it means that autoscan, seeing 8355b85037dbSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 8356b85037dbSmrg 8357b85037dbSmrg 8358b85037dbSmrg# _AM_DEPENDENCIES(NAME) 8359b85037dbSmrg# ---------------------- 8360b85037dbSmrg# See how the compiler implements dependency checking. 8361b85037dbSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 8362b85037dbSmrg# We try a few techniques and use that to set a single cache variable. 8363b85037dbSmrg# 8364b85037dbSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 8365b85037dbSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 8366b85037dbSmrg# dependency, and given that the user is not expected to run this macro, 8367b85037dbSmrg# just rely on AC_PROG_CC. 8368b85037dbSmrgAC_DEFUN([_AM_DEPENDENCIES], 8369b85037dbSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 8370b85037dbSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 8371b85037dbSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 8372b85037dbSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 8373b85037dbSmrg 8374b85037dbSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 8375b85037dbSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 8376b85037dbSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 8377b85037dbSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 8378b85037dbSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 8379b85037dbSmrg [depcc="$$1" am_compiler_list=]) 8380b85037dbSmrg 8381b85037dbSmrgAC_CACHE_CHECK([dependency style of $depcc], 8382b85037dbSmrg [am_cv_$1_dependencies_compiler_type], 8383b85037dbSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 8384b85037dbSmrg # We make a subdir and do the tests there. Otherwise we can end up 8385b85037dbSmrg # making bogus files that we don't know about and never remove. For 8386b85037dbSmrg # instance it was reported that on HP-UX the gcc test will end up 8387b85037dbSmrg # making a dummy file named `D' -- because `-MD' means `put the output 8388b85037dbSmrg # in D'. 8389b85037dbSmrg mkdir conftest.dir 8390b85037dbSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 8391b85037dbSmrg # using a relative directory. 8392b85037dbSmrg cp "$am_depcomp" conftest.dir 8393b85037dbSmrg cd conftest.dir 8394b85037dbSmrg # We will build objects and dependencies in a subdirectory because 8395b85037dbSmrg # it helps to detect inapplicable dependency modes. For instance 8396b85037dbSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 8397b85037dbSmrg # side effect of compilation, but ICC will put the dependencies in 8398b85037dbSmrg # the current directory while Tru64 will put them in the object 8399b85037dbSmrg # directory. 8400b85037dbSmrg mkdir sub 8401b85037dbSmrg 8402b85037dbSmrg am_cv_$1_dependencies_compiler_type=none 8403b85037dbSmrg if test "$am_compiler_list" = ""; then 8404b85037dbSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 8405b85037dbSmrg fi 8406b85037dbSmrg am__universal=false 8407b85037dbSmrg m4_case([$1], [CC], 8408b85037dbSmrg [case " $depcc " in #( 8409b85037dbSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 8410b85037dbSmrg esac], 8411b85037dbSmrg [CXX], 8412b85037dbSmrg [case " $depcc " in #( 8413b85037dbSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 8414b85037dbSmrg esac]) 8415b85037dbSmrg 8416b85037dbSmrg for depmode in $am_compiler_list; do 8417b85037dbSmrg # Setup a source with many dependencies, because some compilers 8418b85037dbSmrg # like to wrap large dependency lists on column 80 (with \), and 8419b85037dbSmrg # we should not choose a depcomp mode which is confused by this. 8420b85037dbSmrg # 8421b85037dbSmrg # We need to recreate these files for each test, as the compiler may 8422b85037dbSmrg # overwrite some of them when testing with obscure command lines. 8423b85037dbSmrg # This happens at least with the AIX C compiler. 8424b85037dbSmrg : > sub/conftest.c 8425b85037dbSmrg for i in 1 2 3 4 5 6; do 8426b85037dbSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 8427b85037dbSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 8428b85037dbSmrg # Solaris 8's {/usr,}/bin/sh. 8429b85037dbSmrg touch sub/conftst$i.h 8430b85037dbSmrg done 8431b85037dbSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 8432b85037dbSmrg 8433b85037dbSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 8434b85037dbSmrg # mode. It turns out that the SunPro C++ compiler does not properly 8435b85037dbSmrg # handle `-M -o', and we need to detect this. Also, some Intel 8436b85037dbSmrg # versions had trouble with output in subdirs 8437b85037dbSmrg am__obj=sub/conftest.${OBJEXT-o} 8438b85037dbSmrg am__minus_obj="-o $am__obj" 8439b85037dbSmrg case $depmode in 8440b85037dbSmrg gcc) 8441b85037dbSmrg # This depmode causes a compiler race in universal mode. 8442b85037dbSmrg test "$am__universal" = false || continue 8443b85037dbSmrg ;; 8444b85037dbSmrg nosideeffect) 8445b85037dbSmrg # after this tag, mechanisms are not by side-effect, so they'll 8446b85037dbSmrg # only be used when explicitly requested 8447b85037dbSmrg if test "x$enable_dependency_tracking" = xyes; then 8448b85037dbSmrg continue 8449b85037dbSmrg else 8450b85037dbSmrg break 8451b85037dbSmrg fi 8452b85037dbSmrg ;; 8453b85037dbSmrg msvisualcpp | msvcmsys) 8454b85037dbSmrg # This compiler won't grok `-c -o', but also, the minuso test has 8455b85037dbSmrg # not run yet. These depmodes are late enough in the game, and 8456b85037dbSmrg # so weak that their functioning should not be impacted. 8457b85037dbSmrg am__obj=conftest.${OBJEXT-o} 8458b85037dbSmrg am__minus_obj= 8459b85037dbSmrg ;; 8460b85037dbSmrg none) break ;; 8461b85037dbSmrg esac 8462b85037dbSmrg if depmode=$depmode \ 8463b85037dbSmrg source=sub/conftest.c object=$am__obj \ 8464b85037dbSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 8465b85037dbSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 8466b85037dbSmrg >/dev/null 2>conftest.err && 8467b85037dbSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 8468b85037dbSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 8469b85037dbSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 8470b85037dbSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 8471b85037dbSmrg # icc doesn't choke on unknown options, it will just issue warnings 8472b85037dbSmrg # or remarks (even with -Werror). So we grep stderr for any message 8473b85037dbSmrg # that says an option was ignored or not supported. 8474b85037dbSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 8475b85037dbSmrg # icc: Command line warning: ignoring option '-M'; no argument required 8476b85037dbSmrg # The diagnosis changed in icc 8.0: 8477b85037dbSmrg # icc: Command line remark: option '-MP' not supported 8478b85037dbSmrg if (grep 'ignoring option' conftest.err || 8479b85037dbSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 8480b85037dbSmrg am_cv_$1_dependencies_compiler_type=$depmode 8481b85037dbSmrg break 8482b85037dbSmrg fi 8483b85037dbSmrg fi 8484b85037dbSmrg done 8485b85037dbSmrg 8486b85037dbSmrg cd .. 8487b85037dbSmrg rm -rf conftest.dir 8488b85037dbSmrgelse 8489b85037dbSmrg am_cv_$1_dependencies_compiler_type=none 8490b85037dbSmrgfi 8491b85037dbSmrg]) 8492b85037dbSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 8493b85037dbSmrgAM_CONDITIONAL([am__fastdep$1], [ 8494b85037dbSmrg test "x$enable_dependency_tracking" != xno \ 8495b85037dbSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 8496b85037dbSmrg]) 8497b85037dbSmrg 8498b85037dbSmrg 8499b85037dbSmrg# AM_SET_DEPDIR 8500b85037dbSmrg# ------------- 8501b85037dbSmrg# Choose a directory name for dependency files. 8502b85037dbSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 8503b85037dbSmrgAC_DEFUN([AM_SET_DEPDIR], 8504b85037dbSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 8505b85037dbSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 8506b85037dbSmrg]) 8507b85037dbSmrg 8508b85037dbSmrg 8509b85037dbSmrg# AM_DEP_TRACK 8510b85037dbSmrg# ------------ 8511b85037dbSmrgAC_DEFUN([AM_DEP_TRACK], 8512b85037dbSmrg[AC_ARG_ENABLE(dependency-tracking, 8513b85037dbSmrg[ --disable-dependency-tracking speeds up one-time build 8514b85037dbSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 8515b85037dbSmrgif test "x$enable_dependency_tracking" != xno; then 8516b85037dbSmrg am_depcomp="$ac_aux_dir/depcomp" 8517b85037dbSmrg AMDEPBACKSLASH='\' 8518b85037dbSmrgfi 8519b85037dbSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 8520b85037dbSmrgAC_SUBST([AMDEPBACKSLASH])dnl 8521b85037dbSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 8522b85037dbSmrg]) 8523b85037dbSmrg 8524b85037dbSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 8525b85037dbSmrg 8526b85037dbSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 8527b85037dbSmrg# Free Software Foundation, Inc. 8528b85037dbSmrg# 8529b85037dbSmrg# This file is free software; the Free Software Foundation 8530b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8531b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8532b85037dbSmrg 8533b85037dbSmrg#serial 5 8534b85037dbSmrg 8535b85037dbSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 8536b85037dbSmrg# ------------------------------ 8537b85037dbSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 8538b85037dbSmrg[{ 8539b85037dbSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 8540b85037dbSmrg # are listed without --file. Let's play safe and only enable the eval 8541b85037dbSmrg # if we detect the quoting. 8542b85037dbSmrg case $CONFIG_FILES in 8543b85037dbSmrg *\'*) eval set x "$CONFIG_FILES" ;; 8544b85037dbSmrg *) set x $CONFIG_FILES ;; 8545b85037dbSmrg esac 8546b85037dbSmrg shift 8547b85037dbSmrg for mf 8548b85037dbSmrg do 8549b85037dbSmrg # Strip MF so we end up with the name of the file. 8550b85037dbSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 8551b85037dbSmrg # Check whether this is an Automake generated Makefile or not. 8552b85037dbSmrg # We used to match only the files named `Makefile.in', but 8553b85037dbSmrg # some people rename them; so instead we look at the file content. 8554b85037dbSmrg # Grep'ing the first line is not enough: some people post-process 8555b85037dbSmrg # each Makefile.in and add a new line on top of each file to say so. 8556b85037dbSmrg # Grep'ing the whole file is not good either: AIX grep has a line 8557b85037dbSmrg # limit of 2048, but all sed's we know have understand at least 4000. 8558b85037dbSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 8559b85037dbSmrg dirpart=`AS_DIRNAME("$mf")` 8560b85037dbSmrg else 8561b85037dbSmrg continue 8562b85037dbSmrg fi 8563b85037dbSmrg # Extract the definition of DEPDIR, am__include, and am__quote 8564b85037dbSmrg # from the Makefile without running `make'. 8565b85037dbSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 8566b85037dbSmrg test -z "$DEPDIR" && continue 8567b85037dbSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 8568b85037dbSmrg test -z "am__include" && continue 8569b85037dbSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 8570b85037dbSmrg # When using ansi2knr, U may be empty or an underscore; expand it 8571b85037dbSmrg U=`sed -n 's/^U = //p' < "$mf"` 8572b85037dbSmrg # Find all dependency output files, they are included files with 8573b85037dbSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 8574b85037dbSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 8575b85037dbSmrg # expansion. 8576b85037dbSmrg for file in `sed -n " 8577b85037dbSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 8578b85037dbSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 8579b85037dbSmrg # Make sure the directory exists. 8580b85037dbSmrg test -f "$dirpart/$file" && continue 8581b85037dbSmrg fdir=`AS_DIRNAME(["$file"])` 8582b85037dbSmrg AS_MKDIR_P([$dirpart/$fdir]) 8583b85037dbSmrg # echo "creating $dirpart/$file" 8584b85037dbSmrg echo '# dummy' > "$dirpart/$file" 8585b85037dbSmrg done 8586b85037dbSmrg done 8587b85037dbSmrg} 8588b85037dbSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 8589b85037dbSmrg 8590b85037dbSmrg 8591b85037dbSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 8592b85037dbSmrg# ----------------------------- 8593b85037dbSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 8594b85037dbSmrg# 8595b85037dbSmrg# This code is only required when automatic dependency tracking 8596b85037dbSmrg# is enabled. FIXME. This creates each `.P' file that we will 8597b85037dbSmrg# need in order to bootstrap the dependency handling code. 8598b85037dbSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 8599b85037dbSmrg[AC_CONFIG_COMMANDS([depfiles], 8600b85037dbSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 8601b85037dbSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 8602b85037dbSmrg]) 8603b85037dbSmrg 8604b85037dbSmrg# Do all the work for Automake. -*- Autoconf -*- 8605b85037dbSmrg 8606b85037dbSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 8607b85037dbSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 8608b85037dbSmrg# 8609b85037dbSmrg# This file is free software; the Free Software Foundation 8610b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8611b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8612b85037dbSmrg 8613b85037dbSmrg# serial 16 8614b85037dbSmrg 8615b85037dbSmrg# This macro actually does too much. Some checks are only needed if 8616b85037dbSmrg# your package does certain things. But this isn't really a big deal. 8617b85037dbSmrg 8618b85037dbSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 8619b85037dbSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 8620b85037dbSmrg# ----------------------------------------------- 8621b85037dbSmrg# The call with PACKAGE and VERSION arguments is the old style 8622b85037dbSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 8623b85037dbSmrg# and VERSION should now be passed to AC_INIT and removed from 8624b85037dbSmrg# the call to AM_INIT_AUTOMAKE. 8625b85037dbSmrg# We support both call styles for the transition. After 8626b85037dbSmrg# the next Automake release, Autoconf can make the AC_INIT 8627b85037dbSmrg# arguments mandatory, and then we can depend on a new Autoconf 8628b85037dbSmrg# release and drop the old call support. 8629b85037dbSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 8630b85037dbSmrg[AC_PREREQ([2.62])dnl 8631b85037dbSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 8632b85037dbSmrgdnl the ones we care about. 8633b85037dbSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 8634b85037dbSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 8635b85037dbSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 8636b85037dbSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 8637b85037dbSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 8638b85037dbSmrg # is not polluted with repeated "-I." 8639b85037dbSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 8640b85037dbSmrg # test to see if srcdir already configured 8641b85037dbSmrg if test -f $srcdir/config.status; then 8642b85037dbSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 8643b85037dbSmrg fi 8644b85037dbSmrgfi 8645b85037dbSmrg 8646b85037dbSmrg# test whether we have cygpath 8647b85037dbSmrgif test -z "$CYGPATH_W"; then 8648b85037dbSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 8649b85037dbSmrg CYGPATH_W='cygpath -w' 8650b85037dbSmrg else 8651b85037dbSmrg CYGPATH_W=echo 8652b85037dbSmrg fi 8653b85037dbSmrgfi 8654b85037dbSmrgAC_SUBST([CYGPATH_W]) 8655b85037dbSmrg 8656b85037dbSmrg# Define the identity of the package. 8657b85037dbSmrgdnl Distinguish between old-style and new-style calls. 8658b85037dbSmrgm4_ifval([$2], 8659b85037dbSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 8660b85037dbSmrg AC_SUBST([PACKAGE], [$1])dnl 8661b85037dbSmrg AC_SUBST([VERSION], [$2])], 8662b85037dbSmrg[_AM_SET_OPTIONS([$1])dnl 8663b85037dbSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 8664b85037dbSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 8665b85037dbSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 8666b85037dbSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 8667b85037dbSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 8668b85037dbSmrg 8669b85037dbSmrg_AM_IF_OPTION([no-define],, 8670b85037dbSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 8671b85037dbSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 8672b85037dbSmrg 8673b85037dbSmrg# Some tools Automake needs. 8674b85037dbSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 8675b85037dbSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 8676b85037dbSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 8677b85037dbSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 8678b85037dbSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 8679b85037dbSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 8680b85037dbSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 8681b85037dbSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 8682b85037dbSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 8683b85037dbSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 8684b85037dbSmrg# We need awk for the "check" target. The system "awk" is bad on 8685b85037dbSmrg# some platforms. 8686b85037dbSmrgAC_REQUIRE([AC_PROG_AWK])dnl 8687b85037dbSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 8688b85037dbSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 8689b85037dbSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 8690b85037dbSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 8691b85037dbSmrg [_AM_PROG_TAR([v7])])]) 8692b85037dbSmrg_AM_IF_OPTION([no-dependencies],, 8693b85037dbSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 8694b85037dbSmrg [_AM_DEPENDENCIES(CC)], 8695b85037dbSmrg [define([AC_PROG_CC], 8696b85037dbSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 8697b85037dbSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 8698b85037dbSmrg [_AM_DEPENDENCIES(CXX)], 8699b85037dbSmrg [define([AC_PROG_CXX], 8700b85037dbSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 8701b85037dbSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 8702b85037dbSmrg [_AM_DEPENDENCIES(OBJC)], 8703b85037dbSmrg [define([AC_PROG_OBJC], 8704b85037dbSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 8705b85037dbSmrg]) 8706b85037dbSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 8707b85037dbSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 8708b85037dbSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 8709b85037dbSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 8710b85037dbSmrgAC_CONFIG_COMMANDS_PRE(dnl 8711b85037dbSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 8712b85037dbSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 8713b85037dbSmrg]) 8714b85037dbSmrg 8715b85037dbSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 8716b85037dbSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 8717b85037dbSmrgdnl mangled by Autoconf and run in a shell conditional statement. 8718b85037dbSmrgm4_define([_AC_COMPILER_EXEEXT], 8719b85037dbSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 8720b85037dbSmrg 8721b85037dbSmrg 8722b85037dbSmrg# When config.status generates a header, we must update the stamp-h file. 8723b85037dbSmrg# This file resides in the same directory as the config header 8724b85037dbSmrg# that is generated. The stamp files are numbered to have different names. 8725b85037dbSmrg 8726b85037dbSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 8727b85037dbSmrg# loop where config.status creates the headers, so we can generate 8728b85037dbSmrg# our stamp files there. 8729b85037dbSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 8730b85037dbSmrg[# Compute $1's index in $config_headers. 8731b85037dbSmrg_am_arg=$1 8732b85037dbSmrg_am_stamp_count=1 8733b85037dbSmrgfor _am_header in $config_headers :; do 8734b85037dbSmrg case $_am_header in 8735b85037dbSmrg $_am_arg | $_am_arg:* ) 8736b85037dbSmrg break ;; 8737b85037dbSmrg * ) 8738b85037dbSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 8739b85037dbSmrg esac 8740b85037dbSmrgdone 8741b85037dbSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 8742b85037dbSmrg 8743b85037dbSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 8744b85037dbSmrg# 8745b85037dbSmrg# This file is free software; the Free Software Foundation 8746b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8747b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8748b85037dbSmrg 8749b85037dbSmrg# AM_PROG_INSTALL_SH 8750b85037dbSmrg# ------------------ 8751b85037dbSmrg# Define $install_sh. 8752b85037dbSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 8753b85037dbSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 8754b85037dbSmrgif test x"${install_sh}" != xset; then 8755b85037dbSmrg case $am_aux_dir in 8756b85037dbSmrg *\ * | *\ *) 8757b85037dbSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 8758b85037dbSmrg *) 8759b85037dbSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 8760b85037dbSmrg esac 8761b85037dbSmrgfi 8762b85037dbSmrgAC_SUBST(install_sh)]) 8763b85037dbSmrg 8764b85037dbSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 8765b85037dbSmrg# 8766b85037dbSmrg# This file is free software; the Free Software Foundation 8767b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8768b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8769b85037dbSmrg 8770b85037dbSmrg# serial 2 8771b85037dbSmrg 8772b85037dbSmrg# Check whether the underlying file-system supports filenames 8773b85037dbSmrg# with a leading dot. For instance MS-DOS doesn't. 8774b85037dbSmrgAC_DEFUN([AM_SET_LEADING_DOT], 8775b85037dbSmrg[rm -rf .tst 2>/dev/null 8776b85037dbSmrgmkdir .tst 2>/dev/null 8777b85037dbSmrgif test -d .tst; then 8778b85037dbSmrg am__leading_dot=. 8779b85037dbSmrgelse 8780b85037dbSmrg am__leading_dot=_ 8781b85037dbSmrgfi 8782b85037dbSmrgrmdir .tst 2>/dev/null 8783b85037dbSmrgAC_SUBST([am__leading_dot])]) 8784b85037dbSmrg 8785b85037dbSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 8786b85037dbSmrg# From Jim Meyering 8787b85037dbSmrg 8788b85037dbSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 8789b85037dbSmrg# Free Software Foundation, Inc. 8790b85037dbSmrg# 8791b85037dbSmrg# This file is free software; the Free Software Foundation 8792b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8793b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8794b85037dbSmrg 8795b85037dbSmrg# serial 5 8796b85037dbSmrg 8797b85037dbSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 8798b85037dbSmrg# ---------------------------------- 8799b85037dbSmrg# Control maintainer-specific portions of Makefiles. 8800b85037dbSmrg# Default is to disable them, unless `enable' is passed literally. 8801b85037dbSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 8802b85037dbSmrg# can override the default with the --enable/--disable switch. 8803b85037dbSmrgAC_DEFUN([AM_MAINTAINER_MODE], 8804b85037dbSmrg[m4_case(m4_default([$1], [disable]), 8805b85037dbSmrg [enable], [m4_define([am_maintainer_other], [disable])], 8806b85037dbSmrg [disable], [m4_define([am_maintainer_other], [enable])], 8807b85037dbSmrg [m4_define([am_maintainer_other], [enable]) 8808b85037dbSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 8809b85037dbSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 8810b85037dbSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 8811b85037dbSmrg AC_ARG_ENABLE([maintainer-mode], 8812b85037dbSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 8813b85037dbSmrg (and sometimes confusing) to the casual installer], 8814b85037dbSmrg [USE_MAINTAINER_MODE=$enableval], 8815b85037dbSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 8816b85037dbSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 8817b85037dbSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 8818b85037dbSmrg MAINT=$MAINTAINER_MODE_TRUE 8819b85037dbSmrg AC_SUBST([MAINT])dnl 8820b85037dbSmrg] 8821b85037dbSmrg) 8822b85037dbSmrg 8823b85037dbSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 8824b85037dbSmrg 8825b85037dbSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 8826b85037dbSmrg 8827b85037dbSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 8828b85037dbSmrg# 8829b85037dbSmrg# This file is free software; the Free Software Foundation 8830b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8831b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8832b85037dbSmrg 8833b85037dbSmrg# serial 4 8834b85037dbSmrg 8835b85037dbSmrg# AM_MAKE_INCLUDE() 8836b85037dbSmrg# ----------------- 8837b85037dbSmrg# Check to see how make treats includes. 8838b85037dbSmrgAC_DEFUN([AM_MAKE_INCLUDE], 8839b85037dbSmrg[am_make=${MAKE-make} 8840b85037dbSmrgcat > confinc << 'END' 8841b85037dbSmrgam__doit: 8842b85037dbSmrg @echo this is the am__doit target 8843b85037dbSmrg.PHONY: am__doit 8844b85037dbSmrgEND 8845b85037dbSmrg# If we don't find an include directive, just comment out the code. 8846b85037dbSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 8847b85037dbSmrgam__include="#" 8848b85037dbSmrgam__quote= 8849b85037dbSmrg_am_result=none 8850b85037dbSmrg# First try GNU make style include. 8851b85037dbSmrgecho "include confinc" > confmf 8852b85037dbSmrg# Ignore all kinds of additional output from `make'. 8853b85037dbSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 8854b85037dbSmrg*the\ am__doit\ target*) 8855b85037dbSmrg am__include=include 8856b85037dbSmrg am__quote= 8857b85037dbSmrg _am_result=GNU 8858b85037dbSmrg ;; 8859b85037dbSmrgesac 8860b85037dbSmrg# Now try BSD make style include. 8861b85037dbSmrgif test "$am__include" = "#"; then 8862b85037dbSmrg echo '.include "confinc"' > confmf 8863b85037dbSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 8864b85037dbSmrg *the\ am__doit\ target*) 8865b85037dbSmrg am__include=.include 8866b85037dbSmrg am__quote="\"" 8867b85037dbSmrg _am_result=BSD 8868b85037dbSmrg ;; 8869b85037dbSmrg esac 8870b85037dbSmrgfi 8871b85037dbSmrgAC_SUBST([am__include]) 8872b85037dbSmrgAC_SUBST([am__quote]) 8873b85037dbSmrgAC_MSG_RESULT([$_am_result]) 8874b85037dbSmrgrm -f confinc confmf 8875b85037dbSmrg]) 8876b85037dbSmrg 8877b85037dbSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 8878b85037dbSmrg 8879b85037dbSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 8880b85037dbSmrg# Free Software Foundation, Inc. 8881b85037dbSmrg# 8882b85037dbSmrg# This file is free software; the Free Software Foundation 8883b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8884b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8885b85037dbSmrg 8886b85037dbSmrg# serial 6 8887b85037dbSmrg 8888b85037dbSmrg# AM_MISSING_PROG(NAME, PROGRAM) 8889b85037dbSmrg# ------------------------------ 8890b85037dbSmrgAC_DEFUN([AM_MISSING_PROG], 8891b85037dbSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 8892b85037dbSmrg$1=${$1-"${am_missing_run}$2"} 8893b85037dbSmrgAC_SUBST($1)]) 8894b85037dbSmrg 8895b85037dbSmrg 8896b85037dbSmrg# AM_MISSING_HAS_RUN 8897b85037dbSmrg# ------------------ 8898b85037dbSmrg# Define MISSING if not defined so far and test if it supports --run. 8899b85037dbSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 8900b85037dbSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 8901b85037dbSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 8902b85037dbSmrgAC_REQUIRE_AUX_FILE([missing])dnl 8903b85037dbSmrgif test x"${MISSING+set}" != xset; then 8904b85037dbSmrg case $am_aux_dir in 8905b85037dbSmrg *\ * | *\ *) 8906b85037dbSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 8907b85037dbSmrg *) 8908b85037dbSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 8909b85037dbSmrg esac 8910b85037dbSmrgfi 8911b85037dbSmrg# Use eval to expand $SHELL 8912b85037dbSmrgif eval "$MISSING --run true"; then 8913b85037dbSmrg am_missing_run="$MISSING --run " 8914b85037dbSmrgelse 8915b85037dbSmrg am_missing_run= 8916b85037dbSmrg AC_MSG_WARN([`missing' script is too old or missing]) 8917b85037dbSmrgfi 8918b85037dbSmrg]) 8919b85037dbSmrg 8920b85037dbSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 8921b85037dbSmrg# 8922b85037dbSmrg# This file is free software; the Free Software Foundation 8923b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8924b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8925b85037dbSmrg 8926b85037dbSmrg# AM_PROG_MKDIR_P 8927b85037dbSmrg# --------------- 8928b85037dbSmrg# Check for `mkdir -p'. 8929b85037dbSmrgAC_DEFUN([AM_PROG_MKDIR_P], 8930b85037dbSmrg[AC_PREREQ([2.60])dnl 8931b85037dbSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 8932b85037dbSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 8933b85037dbSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 8934b85037dbSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 8935b85037dbSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 8936b85037dbSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 8937b85037dbSmrgdnl adjustment using top_builddir (which is defined more often than 8938b85037dbSmrgdnl MKDIR_P). 8939b85037dbSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 8940b85037dbSmrgcase $mkdir_p in 8941b85037dbSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 8942b85037dbSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 8943b85037dbSmrgesac 8944b85037dbSmrg]) 8945b85037dbSmrg 8946b85037dbSmrg# Helper functions for option handling. -*- Autoconf -*- 8947b85037dbSmrg 8948b85037dbSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 8949b85037dbSmrg# 8950b85037dbSmrg# This file is free software; the Free Software Foundation 8951b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8952b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8953b85037dbSmrg 8954b85037dbSmrg# serial 4 8955b85037dbSmrg 8956b85037dbSmrg# _AM_MANGLE_OPTION(NAME) 8957b85037dbSmrg# ----------------------- 8958b85037dbSmrgAC_DEFUN([_AM_MANGLE_OPTION], 8959b85037dbSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 8960b85037dbSmrg 8961b85037dbSmrg# _AM_SET_OPTION(NAME) 8962b85037dbSmrg# ------------------------------ 8963b85037dbSmrg# Set option NAME. Presently that only means defining a flag for this option. 8964b85037dbSmrgAC_DEFUN([_AM_SET_OPTION], 8965b85037dbSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 8966b85037dbSmrg 8967b85037dbSmrg# _AM_SET_OPTIONS(OPTIONS) 8968b85037dbSmrg# ---------------------------------- 8969b85037dbSmrg# OPTIONS is a space-separated list of Automake options. 8970b85037dbSmrgAC_DEFUN([_AM_SET_OPTIONS], 8971b85037dbSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 8972b85037dbSmrg 8973b85037dbSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 8974b85037dbSmrg# ------------------------------------------- 8975b85037dbSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8976b85037dbSmrgAC_DEFUN([_AM_IF_OPTION], 8977b85037dbSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 8978b85037dbSmrg 8979b85037dbSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8980b85037dbSmrg 8981b85037dbSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 8982b85037dbSmrg# Free Software Foundation, Inc. 8983b85037dbSmrg# 8984b85037dbSmrg# This file is free software; the Free Software Foundation 8985b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 8986b85037dbSmrg# with or without modifications, as long as this notice is preserved. 8987b85037dbSmrg 8988b85037dbSmrg# serial 5 8989b85037dbSmrg 8990b85037dbSmrg# AM_SANITY_CHECK 8991b85037dbSmrg# --------------- 8992b85037dbSmrgAC_DEFUN([AM_SANITY_CHECK], 8993b85037dbSmrg[AC_MSG_CHECKING([whether build environment is sane]) 8994b85037dbSmrg# Just in case 8995b85037dbSmrgsleep 1 8996b85037dbSmrgecho timestamp > conftest.file 8997b85037dbSmrg# Reject unsafe characters in $srcdir or the absolute working directory 8998b85037dbSmrg# name. Accept space and tab only in the latter. 8999b85037dbSmrgam_lf=' 9000b85037dbSmrg' 9001b85037dbSmrgcase `pwd` in 9002b85037dbSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 9003b85037dbSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 9004b85037dbSmrgesac 9005b85037dbSmrgcase $srcdir in 9006b85037dbSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 9007b85037dbSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 9008b85037dbSmrgesac 9009b85037dbSmrg 9010b85037dbSmrg# Do `set' in a subshell so we don't clobber the current shell's 9011b85037dbSmrg# arguments. Must try -L first in case configure is actually a 9012b85037dbSmrg# symlink; some systems play weird games with the mod time of symlinks 9013b85037dbSmrg# (eg FreeBSD returns the mod time of the symlink's containing 9014b85037dbSmrg# directory). 9015b85037dbSmrgif ( 9016b85037dbSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 9017b85037dbSmrg if test "$[*]" = "X"; then 9018b85037dbSmrg # -L didn't work. 9019b85037dbSmrg set X `ls -t "$srcdir/configure" conftest.file` 9020b85037dbSmrg fi 9021b85037dbSmrg rm -f conftest.file 9022b85037dbSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 9023b85037dbSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 9024b85037dbSmrg 9025b85037dbSmrg # If neither matched, then we have a broken ls. This can happen 9026b85037dbSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 9027b85037dbSmrg # broken ls alias from the environment. This has actually 9028b85037dbSmrg # happened. Such a system could not be considered "sane". 9029b85037dbSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 9030b85037dbSmrgalias in your environment]) 9031b85037dbSmrg fi 9032b85037dbSmrg 9033b85037dbSmrg test "$[2]" = conftest.file 9034b85037dbSmrg ) 9035b85037dbSmrgthen 9036b85037dbSmrg # Ok. 9037b85037dbSmrg : 9038b85037dbSmrgelse 9039b85037dbSmrg AC_MSG_ERROR([newly created file is older than distributed files! 9040b85037dbSmrgCheck your system clock]) 9041b85037dbSmrgfi 9042b85037dbSmrgAC_MSG_RESULT(yes)]) 9043b85037dbSmrg 9044b85037dbSmrg# Copyright (C) 2009 Free Software Foundation, Inc. 9045b85037dbSmrg# 9046b85037dbSmrg# This file is free software; the Free Software Foundation 9047b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9048b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9049b85037dbSmrg 9050b85037dbSmrg# serial 1 9051b85037dbSmrg 9052b85037dbSmrg# AM_SILENT_RULES([DEFAULT]) 9053b85037dbSmrg# -------------------------- 9054b85037dbSmrg# Enable less verbose build rules; with the default set to DEFAULT 9055b85037dbSmrg# (`yes' being less verbose, `no' or empty being verbose). 9056b85037dbSmrgAC_DEFUN([AM_SILENT_RULES], 9057b85037dbSmrg[AC_ARG_ENABLE([silent-rules], 9058b85037dbSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 9059b85037dbSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 9060b85037dbSmrgcase $enable_silent_rules in 9061b85037dbSmrgyes) AM_DEFAULT_VERBOSITY=0;; 9062b85037dbSmrgno) AM_DEFAULT_VERBOSITY=1;; 9063b85037dbSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 9064b85037dbSmrgesac 9065b85037dbSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 9066b85037dbSmrgAM_BACKSLASH='\' 9067b85037dbSmrgAC_SUBST([AM_BACKSLASH])dnl 9068b85037dbSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 9069b85037dbSmrg]) 9070b85037dbSmrg 9071b85037dbSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 9072b85037dbSmrg# 9073b85037dbSmrg# This file is free software; the Free Software Foundation 9074b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9075b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9076b85037dbSmrg 9077b85037dbSmrg# AM_PROG_INSTALL_STRIP 9078b85037dbSmrg# --------------------- 9079b85037dbSmrg# One issue with vendor `install' (even GNU) is that you can't 9080b85037dbSmrg# specify the program used to strip binaries. This is especially 9081b85037dbSmrg# annoying in cross-compiling environments, where the build's strip 9082b85037dbSmrg# is unlikely to handle the host's binaries. 9083b85037dbSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9084b85037dbSmrg# always use install-sh in `make install-strip', and initialize 9085b85037dbSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 9086b85037dbSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9087b85037dbSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9088b85037dbSmrg# Installed binaries are usually stripped using `strip' when the user 9089b85037dbSmrg# run `make install-strip'. However `strip' might not be the right 9090b85037dbSmrg# tool to use in cross-compilation environments, therefore Automake 9091b85037dbSmrg# will honor the `STRIP' environment variable to overrule this program. 9092b85037dbSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 9093b85037dbSmrgif test "$cross_compiling" != no; then 9094b85037dbSmrg AC_CHECK_TOOL([STRIP], [strip], :) 9095b85037dbSmrgfi 9096b85037dbSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9097b85037dbSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9098b85037dbSmrg 9099b85037dbSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 9100b85037dbSmrg# 9101b85037dbSmrg# This file is free software; the Free Software Foundation 9102b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9103b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9104b85037dbSmrg 9105b85037dbSmrg# serial 2 9106b85037dbSmrg 9107b85037dbSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 9108b85037dbSmrg# --------------------------- 9109b85037dbSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9110b85037dbSmrg# This macro is traced by Automake. 9111b85037dbSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9112b85037dbSmrg 9113b85037dbSmrg# AM_SUBST_NOTMAKE(VARIABLE) 9114b85037dbSmrg# --------------------------- 9115b85037dbSmrg# Public sister of _AM_SUBST_NOTMAKE. 9116b85037dbSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9117b85037dbSmrg 9118b85037dbSmrg# Check how to create a tarball. -*- Autoconf -*- 9119b85037dbSmrg 9120b85037dbSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 9121b85037dbSmrg# 9122b85037dbSmrg# This file is free software; the Free Software Foundation 9123b85037dbSmrg# gives unlimited permission to copy and/or distribute it, 9124b85037dbSmrg# with or without modifications, as long as this notice is preserved. 9125b85037dbSmrg 9126b85037dbSmrg# serial 2 9127b85037dbSmrg 9128b85037dbSmrg# _AM_PROG_TAR(FORMAT) 9129b85037dbSmrg# -------------------- 9130b85037dbSmrg# Check how to create a tarball in format FORMAT. 9131b85037dbSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 9132b85037dbSmrg# 9133b85037dbSmrg# Substitute a variable $(am__tar) that is a command 9134b85037dbSmrg# writing to stdout a FORMAT-tarball containing the directory 9135b85037dbSmrg# $tardir. 9136b85037dbSmrg# tardir=directory && $(am__tar) > result.tar 9137b85037dbSmrg# 9138b85037dbSmrg# Substitute a variable $(am__untar) that extract such 9139b85037dbSmrg# a tarball read from stdin. 9140b85037dbSmrg# $(am__untar) < result.tar 9141b85037dbSmrgAC_DEFUN([_AM_PROG_TAR], 9142b85037dbSmrg[# Always define AMTAR for backward compatibility. 9143b85037dbSmrgAM_MISSING_PROG([AMTAR], [tar]) 9144b85037dbSmrgm4_if([$1], [v7], 9145b85037dbSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 9146b85037dbSmrg [m4_case([$1], [ustar],, [pax],, 9147b85037dbSmrg [m4_fatal([Unknown tar format])]) 9148b85037dbSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 9149b85037dbSmrg# Loop over all known methods to create a tar archive until one works. 9150b85037dbSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9151b85037dbSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9152b85037dbSmrg# Do not fold the above two line into one, because Tru64 sh and 9153b85037dbSmrg# Solaris sh will not grok spaces in the rhs of `-'. 9154b85037dbSmrgfor _am_tool in $_am_tools 9155b85037dbSmrgdo 9156b85037dbSmrg case $_am_tool in 9157b85037dbSmrg gnutar) 9158b85037dbSmrg for _am_tar in tar gnutar gtar; 9159b85037dbSmrg do 9160b85037dbSmrg AM_RUN_LOG([$_am_tar --version]) && break 9161b85037dbSmrg done 9162b85037dbSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9163b85037dbSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9164b85037dbSmrg am__untar="$_am_tar -xf -" 9165b85037dbSmrg ;; 9166b85037dbSmrg plaintar) 9167b85037dbSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 9168b85037dbSmrg # ustar tarball either. 9169b85037dbSmrg (tar --version) >/dev/null 2>&1 && continue 9170b85037dbSmrg am__tar='tar chf - "$$tardir"' 9171b85037dbSmrg am__tar_='tar chf - "$tardir"' 9172b85037dbSmrg am__untar='tar xf -' 9173b85037dbSmrg ;; 9174b85037dbSmrg pax) 9175b85037dbSmrg am__tar='pax -L -x $1 -w "$$tardir"' 9176b85037dbSmrg am__tar_='pax -L -x $1 -w "$tardir"' 9177b85037dbSmrg am__untar='pax -r' 9178b85037dbSmrg ;; 9179b85037dbSmrg cpio) 9180b85037dbSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9181b85037dbSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9182b85037dbSmrg am__untar='cpio -i -H $1 -d' 9183b85037dbSmrg ;; 9184b85037dbSmrg none) 9185b85037dbSmrg am__tar=false 9186b85037dbSmrg am__tar_=false 9187b85037dbSmrg am__untar=false 9188b85037dbSmrg ;; 9189b85037dbSmrg esac 9190b85037dbSmrg 9191b85037dbSmrg # If the value was cached, stop now. We just wanted to have am__tar 9192b85037dbSmrg # and am__untar set. 9193b85037dbSmrg test -n "${am_cv_prog_tar_$1}" && break 9194b85037dbSmrg 9195b85037dbSmrg # tar/untar a dummy directory, and stop if the command works 9196b85037dbSmrg rm -rf conftest.dir 9197b85037dbSmrg mkdir conftest.dir 9198b85037dbSmrg echo GrepMe > conftest.dir/file 9199b85037dbSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 9200b85037dbSmrg rm -rf conftest.dir 9201b85037dbSmrg if test -s conftest.tar; then 9202b85037dbSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 9203b85037dbSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 9204b85037dbSmrg fi 9205b85037dbSmrgdone 9206b85037dbSmrgrm -rf conftest.dir 9207b85037dbSmrg 9208b85037dbSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 9209b85037dbSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 9210b85037dbSmrgAC_SUBST([am__tar]) 9211b85037dbSmrgAC_SUBST([am__untar]) 9212b85037dbSmrg]) # _AM_PROG_TAR 9213b85037dbSmrg 9214b85037dbSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9215b85037dbSmrgdnl 9216b85037dbSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 9217b85037dbSmrgdnl 9218b85037dbSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9219b85037dbSmrgdnl copy of this software and associated documentation files (the "Software"), 9220b85037dbSmrgdnl to deal in the Software without restriction, including without limitation 9221b85037dbSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9222b85037dbSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 9223b85037dbSmrgdnl Software is furnished to do so, subject to the following conditions: 9224b85037dbSmrgdnl 9225b85037dbSmrgdnl The above copyright notice and this permission notice (including the next 9226b85037dbSmrgdnl paragraph) shall be included in all copies or substantial portions of the 9227b85037dbSmrgdnl Software. 9228b85037dbSmrgdnl 9229b85037dbSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9230b85037dbSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9231b85037dbSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9232b85037dbSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9233b85037dbSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9234b85037dbSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9235b85037dbSmrgdnl DEALINGS IN THE SOFTWARE. 9236b85037dbSmrg 9237b85037dbSmrg# XORG_MACROS_VERSION(required-version) 9238b85037dbSmrg# ------------------------------------- 9239b85037dbSmrg# Minimum version: 1.1.0 9240b85037dbSmrg# 9241b85037dbSmrg# If you're using a macro added in Version 1.1 or newer, include this in 9242b85037dbSmrg# your configure.ac with the minimum required version, such as: 9243b85037dbSmrg# XORG_MACROS_VERSION(1.1) 9244b85037dbSmrg# 9245b85037dbSmrg# To ensure that this macro is defined, also add: 9246b85037dbSmrg# m4_ifndef([XORG_MACROS_VERSION], 9247b85037dbSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9248b85037dbSmrg# 9249b85037dbSmrg# 9250b85037dbSmrg# See the "minimum version" comment for each macro you use to see what 9251b85037dbSmrg# version you require. 9252b85037dbSmrgm4_defun([XORG_MACROS_VERSION],[ 9253b85037dbSmrgm4_define([vers_have], [1.10.0]) 9254b85037dbSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9255b85037dbSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9256b85037dbSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9257b85037dbSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9258b85037dbSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9259b85037dbSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9260b85037dbSmrgm4_undefine([vers_have]) 9261b85037dbSmrgm4_undefine([maj_have]) 9262b85037dbSmrgm4_undefine([maj_needed]) 9263b85037dbSmrg]) # XORG_MACROS_VERSION 9264b85037dbSmrg 9265b85037dbSmrg# XORG_PROG_RAWCPP() 9266b85037dbSmrg# ------------------ 9267b85037dbSmrg# Minimum version: 1.0.0 9268b85037dbSmrg# 9269b85037dbSmrg# Find cpp program and necessary flags for use in pre-processing text files 9270b85037dbSmrg# such as man pages and config files 9271b85037dbSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9272b85037dbSmrgAC_REQUIRE([AC_PROG_CPP]) 9273b85037dbSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9274b85037dbSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9275b85037dbSmrg 9276b85037dbSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9277b85037dbSmrg# which is not the best choice for supporting other OS'es, but covers most 9278b85037dbSmrg# of the ones we need for now. 9279b85037dbSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9280b85037dbSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 9281b85037dbSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9282b85037dbSmrg AC_MSG_RESULT([no]) 9283b85037dbSmrgelse 9284b85037dbSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9285b85037dbSmrg RAWCPPFLAGS=-undef 9286b85037dbSmrg AC_MSG_RESULT([yes]) 9287b85037dbSmrg # under Cygwin unix is still defined even with -undef 9288b85037dbSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9289b85037dbSmrg RAWCPPFLAGS="-undef -ansi" 9290b85037dbSmrg AC_MSG_RESULT([yes, with -ansi]) 9291b85037dbSmrg else 9292b85037dbSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9293b85037dbSmrg fi 9294b85037dbSmrgfi 9295b85037dbSmrgrm -f conftest.$ac_ext 9296b85037dbSmrg 9297b85037dbSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9298b85037dbSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 9299b85037dbSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9300b85037dbSmrg AC_MSG_RESULT([no]) 9301b85037dbSmrgelse 9302b85037dbSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9303b85037dbSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9304b85037dbSmrg AC_MSG_RESULT([yes]) 9305b85037dbSmrg else 9306b85037dbSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9307b85037dbSmrg fi 9308b85037dbSmrgfi 9309b85037dbSmrgrm -f conftest.$ac_ext 9310b85037dbSmrgAC_SUBST(RAWCPPFLAGS) 9311b85037dbSmrg]) # XORG_PROG_RAWCPP 9312b85037dbSmrg 9313b85037dbSmrg# XORG_MANPAGE_SECTIONS() 9314b85037dbSmrg# ----------------------- 9315b85037dbSmrg# Minimum version: 1.0.0 9316b85037dbSmrg# 9317b85037dbSmrg# Determine which sections man pages go in for the different man page types 9318b85037dbSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9319b85037dbSmrg# Not sure if there's any better way than just hardcoding by OS name. 9320b85037dbSmrg# Override default settings by setting environment variables 9321b85037dbSmrg# Added MAN_SUBSTS in version 1.8 9322b85037dbSmrg# Added AC_PROG_SED in version 1.8 9323b85037dbSmrg 9324b85037dbSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9325b85037dbSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9326b85037dbSmrgAC_REQUIRE([AC_PROG_SED]) 9327b85037dbSmrg 9328b85037dbSmrgif test x$APP_MAN_SUFFIX = x ; then 9329b85037dbSmrg APP_MAN_SUFFIX=1 9330b85037dbSmrgfi 9331b85037dbSmrgif test x$APP_MAN_DIR = x ; then 9332b85037dbSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9333b85037dbSmrgfi 9334b85037dbSmrg 9335b85037dbSmrgif test x$LIB_MAN_SUFFIX = x ; then 9336b85037dbSmrg LIB_MAN_SUFFIX=3 9337b85037dbSmrgfi 9338b85037dbSmrgif test x$LIB_MAN_DIR = x ; then 9339b85037dbSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9340b85037dbSmrgfi 9341b85037dbSmrg 9342b85037dbSmrgif test x$FILE_MAN_SUFFIX = x ; then 9343b85037dbSmrg case $host_os in 9344b85037dbSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 9345b85037dbSmrg *) FILE_MAN_SUFFIX=5 ;; 9346b85037dbSmrg esac 9347b85037dbSmrgfi 9348b85037dbSmrgif test x$FILE_MAN_DIR = x ; then 9349b85037dbSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9350b85037dbSmrgfi 9351b85037dbSmrg 9352b85037dbSmrgif test x$MISC_MAN_SUFFIX = x ; then 9353b85037dbSmrg case $host_os in 9354b85037dbSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 9355b85037dbSmrg *) MISC_MAN_SUFFIX=7 ;; 9356b85037dbSmrg esac 9357b85037dbSmrgfi 9358b85037dbSmrgif test x$MISC_MAN_DIR = x ; then 9359b85037dbSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9360b85037dbSmrgfi 9361b85037dbSmrg 9362b85037dbSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 9363b85037dbSmrg case $host_os in 9364b85037dbSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 9365b85037dbSmrg *) DRIVER_MAN_SUFFIX=4 ;; 9366b85037dbSmrg esac 9367b85037dbSmrgfi 9368b85037dbSmrgif test x$DRIVER_MAN_DIR = x ; then 9369b85037dbSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9370b85037dbSmrgfi 9371b85037dbSmrg 9372b85037dbSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 9373b85037dbSmrg case $host_os in 9374b85037dbSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 9375b85037dbSmrg *) ADMIN_MAN_SUFFIX=8 ;; 9376b85037dbSmrg esac 9377b85037dbSmrgfi 9378b85037dbSmrgif test x$ADMIN_MAN_DIR = x ; then 9379b85037dbSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9380b85037dbSmrgfi 9381b85037dbSmrg 9382b85037dbSmrg 9383b85037dbSmrgAC_SUBST([APP_MAN_SUFFIX]) 9384b85037dbSmrgAC_SUBST([LIB_MAN_SUFFIX]) 9385b85037dbSmrgAC_SUBST([FILE_MAN_SUFFIX]) 9386b85037dbSmrgAC_SUBST([MISC_MAN_SUFFIX]) 9387b85037dbSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 9388b85037dbSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 9389b85037dbSmrgAC_SUBST([APP_MAN_DIR]) 9390b85037dbSmrgAC_SUBST([LIB_MAN_DIR]) 9391b85037dbSmrgAC_SUBST([FILE_MAN_DIR]) 9392b85037dbSmrgAC_SUBST([MISC_MAN_DIR]) 9393b85037dbSmrgAC_SUBST([DRIVER_MAN_DIR]) 9394b85037dbSmrgAC_SUBST([ADMIN_MAN_DIR]) 9395b85037dbSmrg 9396b85037dbSmrgXORG_MAN_PAGE="X Version 11" 9397b85037dbSmrgAC_SUBST([XORG_MAN_PAGE]) 9398b85037dbSmrgMAN_SUBSTS="\ 9399b85037dbSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9400b85037dbSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9401b85037dbSmrg -e 's|__xservername__|Xorg|g' \ 9402b85037dbSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 9403b85037dbSmrg -e 's|__projectroot__|\$(prefix)|g' \ 9404b85037dbSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9405b85037dbSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9406b85037dbSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9407b85037dbSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9408b85037dbSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9409b85037dbSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9410b85037dbSmrgAC_SUBST([MAN_SUBSTS]) 9411b85037dbSmrg 9412b85037dbSmrg]) # XORG_MANPAGE_SECTIONS 9413b85037dbSmrg 9414b85037dbSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9415b85037dbSmrg# ------------------------ 9416b85037dbSmrg# Minimum version: 1.7.0 9417b85037dbSmrg# 9418b85037dbSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9419b85037dbSmrg# provided by xorg-sgml-doctools, if installed. 9420b85037dbSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9421b85037dbSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9422b85037dbSmrgXORG_SGML_PATH= 9423b85037dbSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9424b85037dbSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9425b85037dbSmrg [m4_ifval([$1],[:], 9426b85037dbSmrg [if test x"$cross_compiling" != x"yes" ; then 9427b85037dbSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9428b85037dbSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 9429b85037dbSmrg fi]) 9430b85037dbSmrg ]) 9431b85037dbSmrg 9432b85037dbSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9433b85037dbSmrg# the path and the name of the doc stylesheet 9434b85037dbSmrgif test "x$XORG_SGML_PATH" != "x" ; then 9435b85037dbSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 9436b85037dbSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9437b85037dbSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9438b85037dbSmrgelse 9439b85037dbSmrg AC_MSG_RESULT([no]) 9440b85037dbSmrgfi 9441b85037dbSmrg 9442b85037dbSmrgAC_SUBST(XORG_SGML_PATH) 9443b85037dbSmrgAC_SUBST(STYLESHEET_SRCDIR) 9444b85037dbSmrgAC_SUBST(XSL_STYLESHEET) 9445b85037dbSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9446b85037dbSmrg]) # XORG_CHECK_SGML_DOCTOOLS 9447b85037dbSmrg 9448b85037dbSmrg# XORG_CHECK_LINUXDOC 9449b85037dbSmrg# ------------------- 9450b85037dbSmrg# Minimum version: 1.0.0 9451b85037dbSmrg# 9452b85037dbSmrg# Defines the variable MAKE_TEXT if the necessary tools and 9453b85037dbSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9454b85037dbSmrg# Whether or not the necessary tools and files are found can be checked 9455b85037dbSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9456b85037dbSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9457b85037dbSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9458b85037dbSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9459b85037dbSmrg 9460b85037dbSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9461b85037dbSmrg 9462b85037dbSmrgAC_MSG_CHECKING([whether to build documentation]) 9463b85037dbSmrg 9464b85037dbSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9465b85037dbSmrg BUILDDOC=yes 9466b85037dbSmrgelse 9467b85037dbSmrg BUILDDOC=no 9468b85037dbSmrgfi 9469b85037dbSmrg 9470b85037dbSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9471b85037dbSmrg 9472b85037dbSmrgAC_MSG_RESULT([$BUILDDOC]) 9473b85037dbSmrg 9474b85037dbSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9475b85037dbSmrg 9476b85037dbSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9477b85037dbSmrg BUILDPDFDOC=yes 9478b85037dbSmrgelse 9479b85037dbSmrg BUILDPDFDOC=no 9480b85037dbSmrgfi 9481b85037dbSmrg 9482b85037dbSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9483b85037dbSmrg 9484b85037dbSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9485b85037dbSmrg 9486b85037dbSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9487b85037dbSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9488b85037dbSmrgMAKE_PDF="$PS2PDF" 9489b85037dbSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9490b85037dbSmrg 9491b85037dbSmrgAC_SUBST(MAKE_TEXT) 9492b85037dbSmrgAC_SUBST(MAKE_PS) 9493b85037dbSmrgAC_SUBST(MAKE_PDF) 9494b85037dbSmrgAC_SUBST(MAKE_HTML) 9495b85037dbSmrg]) # XORG_CHECK_LINUXDOC 9496b85037dbSmrg 9497b85037dbSmrg# XORG_CHECK_DOCBOOK 9498b85037dbSmrg# ------------------- 9499b85037dbSmrg# Minimum version: 1.0.0 9500b85037dbSmrg# 9501b85037dbSmrg# Checks for the ability to build output formats from SGML DocBook source. 9502b85037dbSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9503b85037dbSmrg# indicates whether the necessary tools and files are found and, if set, 9504b85037dbSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9505b85037dbSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9506b85037dbSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9507b85037dbSmrg 9508b85037dbSmrgBUILDTXTDOC=no 9509b85037dbSmrgBUILDPDFDOC=no 9510b85037dbSmrgBUILDPSDOC=no 9511b85037dbSmrgBUILDHTMLDOC=no 9512b85037dbSmrg 9513b85037dbSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9514b85037dbSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9515b85037dbSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9516b85037dbSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9517b85037dbSmrg 9518b85037dbSmrgAC_MSG_CHECKING([whether to build text documentation]) 9519b85037dbSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9520b85037dbSmrg test x$BUILD_TXTDOC != xno; then 9521b85037dbSmrg BUILDTXTDOC=yes 9522b85037dbSmrgfi 9523b85037dbSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9524b85037dbSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9525b85037dbSmrg 9526b85037dbSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9527b85037dbSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9528b85037dbSmrg test x$BUILD_PDFDOC != xno; then 9529b85037dbSmrg BUILDPDFDOC=yes 9530b85037dbSmrgfi 9531b85037dbSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9532b85037dbSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9533b85037dbSmrg 9534b85037dbSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9535b85037dbSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9536b85037dbSmrg test x$BUILD_PSDOC != xno; then 9537b85037dbSmrg BUILDPSDOC=yes 9538b85037dbSmrgfi 9539b85037dbSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9540b85037dbSmrgAC_MSG_RESULT([$BUILDPSDOC]) 9541b85037dbSmrg 9542b85037dbSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9543b85037dbSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9544b85037dbSmrg test x$BUILD_HTMLDOC != xno; then 9545b85037dbSmrg BUILDHTMLDOC=yes 9546b85037dbSmrgfi 9547b85037dbSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9548b85037dbSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9549b85037dbSmrg 9550b85037dbSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9551b85037dbSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9552b85037dbSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9553b85037dbSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9554b85037dbSmrg 9555b85037dbSmrgAC_SUBST(MAKE_TEXT) 9556b85037dbSmrgAC_SUBST(MAKE_PS) 9557b85037dbSmrgAC_SUBST(MAKE_PDF) 9558b85037dbSmrgAC_SUBST(MAKE_HTML) 9559b85037dbSmrg]) # XORG_CHECK_DOCBOOK 9560b85037dbSmrg 9561b85037dbSmrg# XORG_WITH_XMLTO([MIN-VERSION]) 9562b85037dbSmrg# ---------------- 9563b85037dbSmrg# Minimum version: 1.5.0 9564b85037dbSmrg# 9565b85037dbSmrg# Documentation tools are not always available on all platforms and sometimes 9566b85037dbSmrg# not at the appropriate level. This macro enables a module to test for the 9567b85037dbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9568b85037dbSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9569b85037dbSmrg# as whether or not to use the xmlto package. 9570b85037dbSmrg# 9571b85037dbSmrg# Interface to module: 9572b85037dbSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9573b85037dbSmrg# XMLTO: returns the path of the xmlto program found 9574b85037dbSmrg# returns the path set by the user in the environment 9575b85037dbSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9576b85037dbSmrg# 'no' user instructs the module not to use xmlto 9577b85037dbSmrg# 9578b85037dbSmrg# Added in version 1.10.0 9579b85037dbSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9580b85037dbSmrg# xmlto for text output requires either lynx, links, or w3m browsers 9581b85037dbSmrg# 9582b85037dbSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9583b85037dbSmrg# 9584b85037dbSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9585b85037dbSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9586b85037dbSmrgAC_ARG_WITH(xmlto, 9587b85037dbSmrg AS_HELP_STRING([--with-xmlto], 9588b85037dbSmrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 9589b85037dbSmrg [use_xmlto=$withval], [use_xmlto=auto]) 9590b85037dbSmrg 9591b85037dbSmrgif test "x$use_xmlto" = x"auto"; then 9592b85037dbSmrg AC_PATH_PROG([XMLTO], [xmlto]) 9593b85037dbSmrg if test "x$XMLTO" = "x"; then 9594b85037dbSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9595b85037dbSmrg have_xmlto=no 9596b85037dbSmrg else 9597b85037dbSmrg have_xmlto=yes 9598b85037dbSmrg fi 9599b85037dbSmrgelif test "x$use_xmlto" = x"yes" ; then 9600b85037dbSmrg AC_PATH_PROG([XMLTO], [xmlto]) 9601b85037dbSmrg if test "x$XMLTO" = "x"; then 9602b85037dbSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9603b85037dbSmrg fi 9604b85037dbSmrg have_xmlto=yes 9605b85037dbSmrgelif test "x$use_xmlto" = x"no" ; then 9606b85037dbSmrg if test "x$XMLTO" != "x"; then 9607b85037dbSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9608b85037dbSmrg fi 9609b85037dbSmrg have_xmlto=no 9610b85037dbSmrgelse 9611b85037dbSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9612b85037dbSmrgfi 9613b85037dbSmrg 9614b85037dbSmrg# Test for a minimum version of xmlto, if provided. 9615b85037dbSmrgm4_ifval([$1], 9616b85037dbSmrg[if test "$have_xmlto" = yes; then 9617b85037dbSmrg # scrape the xmlto version 9618b85037dbSmrg AC_MSG_CHECKING([the xmlto version]) 9619b85037dbSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9620b85037dbSmrg AC_MSG_RESULT([$xmlto_version]) 9621b85037dbSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9622b85037dbSmrg [if test "x$use_xmlto" = xauto; then 9623b85037dbSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9624b85037dbSmrg have_xmlto=no 9625b85037dbSmrg else 9626b85037dbSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9627b85037dbSmrg fi]) 9628b85037dbSmrgfi]) 9629b85037dbSmrg 9630b85037dbSmrg# Test for the ability of xmlto to generate a text target 9631b85037dbSmrghave_xmlto_text=no 9632b85037dbSmrgcat > conftest.xml << "EOF" 9633b85037dbSmrgEOF 9634b85037dbSmrgAS_IF([test "$have_xmlto" = yes], 9635b85037dbSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9636b85037dbSmrg [have_xmlto_text=yes], 9637b85037dbSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9638b85037dbSmrgrm -f conftest.xml 9639b85037dbSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9640b85037dbSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9641b85037dbSmrg]) # XORG_WITH_XMLTO 9642b85037dbSmrg 9643b85037dbSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION]) 9644b85037dbSmrg# ---------------- 9645b85037dbSmrg# Minimum version: 1.5.0 9646b85037dbSmrg# 9647b85037dbSmrg# Documentation tools are not always available on all platforms and sometimes 9648b85037dbSmrg# not at the appropriate level. This macro enables a module to test for the 9649b85037dbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9650b85037dbSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9651b85037dbSmrg# as whether or not to use the asciidoc package. 9652b85037dbSmrg# 9653b85037dbSmrg# Interface to module: 9654b85037dbSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9655b85037dbSmrg# ASCIIDOC: returns the path of the asciidoc program found 9656b85037dbSmrg# returns the path set by the user in the environment 9657b85037dbSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9658b85037dbSmrg# 'no' user instructs the module not to use asciidoc 9659b85037dbSmrg# 9660b85037dbSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9661b85037dbSmrg# 9662b85037dbSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 9663b85037dbSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9664b85037dbSmrgAC_ARG_WITH(asciidoc, 9665b85037dbSmrg AS_HELP_STRING([--with-asciidoc], 9666b85037dbSmrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 9667b85037dbSmrg [use_asciidoc=$withval], [use_asciidoc=auto]) 9668b85037dbSmrg 9669b85037dbSmrgif test "x$use_asciidoc" = x"auto"; then 9670b85037dbSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9671b85037dbSmrg if test "x$ASCIIDOC" = "x"; then 9672b85037dbSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9673b85037dbSmrg have_asciidoc=no 9674b85037dbSmrg else 9675b85037dbSmrg have_asciidoc=yes 9676b85037dbSmrg fi 9677b85037dbSmrgelif test "x$use_asciidoc" = x"yes" ; then 9678b85037dbSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9679b85037dbSmrg if test "x$ASCIIDOC" = "x"; then 9680b85037dbSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9681b85037dbSmrg fi 9682b85037dbSmrg have_asciidoc=yes 9683b85037dbSmrgelif test "x$use_asciidoc" = x"no" ; then 9684b85037dbSmrg if test "x$ASCIIDOC" != "x"; then 9685b85037dbSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9686b85037dbSmrg fi 9687b85037dbSmrg have_asciidoc=no 9688b85037dbSmrgelse 9689b85037dbSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9690b85037dbSmrgfi 9691b85037dbSmrgm4_ifval([$1], 9692b85037dbSmrg[if test "$have_asciidoc" = yes; then 9693b85037dbSmrg # scrape the asciidoc version 9694b85037dbSmrg AC_MSG_CHECKING([the asciidoc version]) 9695b85037dbSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9696b85037dbSmrg AC_MSG_RESULT([$asciidoc_version]) 9697b85037dbSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 9698b85037dbSmrg [if test "x$use_asciidoc" = xauto; then 9699b85037dbSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9700b85037dbSmrg have_asciidoc=no 9701b85037dbSmrg else 9702b85037dbSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9703b85037dbSmrg fi]) 9704b85037dbSmrgfi]) 9705b85037dbSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9706b85037dbSmrg]) # XORG_WITH_ASCIIDOC 9707b85037dbSmrg 9708b85037dbSmrg# XORG_WITH_DOXYGEN([MIN-VERSION]) 9709b85037dbSmrg# -------------------------------- 9710b85037dbSmrg# Minimum version: 1.5.0 9711b85037dbSmrg# 9712b85037dbSmrg# Documentation tools are not always available on all platforms and sometimes 9713b85037dbSmrg# not at the appropriate level. This macro enables a module to test for the 9714b85037dbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9715b85037dbSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 9716b85037dbSmrg# as whether or not to use the doxygen package. 9717b85037dbSmrg# 9718b85037dbSmrg# Interface to module: 9719b85037dbSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9720b85037dbSmrg# DOXYGEN: returns the path of the doxygen program found 9721b85037dbSmrg# returns the path set by the user in the environment 9722b85037dbSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 9723b85037dbSmrg# 'no' user instructs the module not to use doxygen 9724b85037dbSmrg# 9725b85037dbSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9726b85037dbSmrg# 9727b85037dbSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 9728b85037dbSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 9729b85037dbSmrgAC_ARG_WITH(doxygen, 9730b85037dbSmrg AS_HELP_STRING([--with-doxygen], 9731b85037dbSmrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 9732b85037dbSmrg [use_doxygen=$withval], [use_doxygen=auto]) 9733b85037dbSmrg 9734b85037dbSmrgif test "x$use_doxygen" = x"auto"; then 9735b85037dbSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9736b85037dbSmrg if test "x$DOXYGEN" = "x"; then 9737b85037dbSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 9738b85037dbSmrg have_doxygen=no 9739b85037dbSmrg else 9740b85037dbSmrg have_doxygen=yes 9741b85037dbSmrg fi 9742b85037dbSmrgelif test "x$use_doxygen" = x"yes" ; then 9743b85037dbSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9744b85037dbSmrg if test "x$DOXYGEN" = "x"; then 9745b85037dbSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 9746b85037dbSmrg fi 9747b85037dbSmrg have_doxygen=yes 9748b85037dbSmrgelif test "x$use_doxygen" = x"no" ; then 9749b85037dbSmrg if test "x$DOXYGEN" != "x"; then 9750b85037dbSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 9751b85037dbSmrg fi 9752b85037dbSmrg have_doxygen=no 9753b85037dbSmrgelse 9754b85037dbSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 9755b85037dbSmrgfi 9756b85037dbSmrgm4_ifval([$1], 9757b85037dbSmrg[if test "$have_doxygen" = yes; then 9758b85037dbSmrg # scrape the doxygen version 9759b85037dbSmrg AC_MSG_CHECKING([the doxygen version]) 9760b85037dbSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 9761b85037dbSmrg AC_MSG_RESULT([$doxygen_version]) 9762b85037dbSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 9763b85037dbSmrg [if test "x$use_doxygen" = xauto; then 9764b85037dbSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 9765b85037dbSmrg have_doxygen=no 9766b85037dbSmrg else 9767b85037dbSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 9768b85037dbSmrg fi]) 9769b85037dbSmrgfi]) 9770b85037dbSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 9771b85037dbSmrg]) # XORG_WITH_DOXYGEN 9772b85037dbSmrg 9773b85037dbSmrg# XORG_WITH_GROFF 9774b85037dbSmrg# ---------------- 9775b85037dbSmrg# Minimum version: 1.6.0 9776b85037dbSmrg# 9777b85037dbSmrg# Documentation tools are not always available on all platforms and sometimes 9778b85037dbSmrg# not at the appropriate level. This macro enables a module to test for the 9779b85037dbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9780b85037dbSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 9781b85037dbSmrg# as whether or not to use the groff package. 9782b85037dbSmrg# 9783b85037dbSmrg# Interface to module: 9784b85037dbSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 9785b85037dbSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 9786b85037dbSmrg# HAVE_GROFF_MS: the -ms macros package 9787b85037dbSmrg# GROFF: returns the path of the groff program found 9788b85037dbSmrg# returns the path set by the user in the environment 9789b85037dbSmrg# --with-groff: 'yes' user instructs the module to use groff 9790b85037dbSmrg# 'no' user instructs the module not to use groff 9791b85037dbSmrg# 9792b85037dbSmrg# Added in version 1.9.0: 9793b85037dbSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 9794b85037dbSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 9795b85037dbSmrg# psselect from the psutils package. 9796b85037dbSmrg# the ghostcript package. Refer to the grohtml man pages 9797b85037dbSmrg# 9798b85037dbSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 9799b85037dbSmrg# 9800b85037dbSmrg# OS and distros often splits groff in a basic and full package, the former 9801b85037dbSmrg# having the groff program and the later having devices, fonts and macros 9802b85037dbSmrg# Checking for the groff executable is not enough. 9803b85037dbSmrg# 9804b85037dbSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 9805b85037dbSmrg# unset HAVE_GROFF or GROFF env variables. 9806b85037dbSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 9807b85037dbSmrg# 9808b85037dbSmrgAC_DEFUN([XORG_WITH_GROFF],[ 9809b85037dbSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 9810b85037dbSmrgAC_ARG_WITH(groff, 9811b85037dbSmrg AS_HELP_STRING([--with-groff], 9812b85037dbSmrg [Use groff to regenerate documentation (default: yes, if installed)]), 9813b85037dbSmrg [use_groff=$withval], [use_groff=auto]) 9814b85037dbSmrg 9815b85037dbSmrgif test "x$use_groff" = x"auto"; then 9816b85037dbSmrg AC_PATH_PROG([GROFF], [groff]) 9817b85037dbSmrg if test "x$GROFF" = "x"; then 9818b85037dbSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 9819b85037dbSmrg have_groff=no 9820b85037dbSmrg else 9821b85037dbSmrg have_groff=yes 9822b85037dbSmrg fi 9823b85037dbSmrgelif test "x$use_groff" = x"yes" ; then 9824b85037dbSmrg AC_PATH_PROG([GROFF], [groff]) 9825b85037dbSmrg if test "x$GROFF" = "x"; then 9826b85037dbSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 9827b85037dbSmrg fi 9828b85037dbSmrg have_groff=yes 9829b85037dbSmrgelif test "x$use_groff" = x"no" ; then 9830b85037dbSmrg if test "x$GROFF" != "x"; then 9831b85037dbSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 9832b85037dbSmrg fi 9833b85037dbSmrg have_groff=no 9834b85037dbSmrgelse 9835b85037dbSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 9836b85037dbSmrgfi 9837b85037dbSmrg 9838b85037dbSmrg# We have groff, test for the presence of the macro packages 9839b85037dbSmrgif test "x$have_groff" = x"yes"; then 9840b85037dbSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 9841b85037dbSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 9842b85037dbSmrg groff_ms_works=yes 9843b85037dbSmrg else 9844b85037dbSmrg groff_ms_works=no 9845b85037dbSmrg fi 9846b85037dbSmrg AC_MSG_RESULT([$groff_ms_works]) 9847b85037dbSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 9848b85037dbSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 9849b85037dbSmrg groff_mm_works=yes 9850b85037dbSmrg else 9851b85037dbSmrg groff_mm_works=no 9852b85037dbSmrg fi 9853b85037dbSmrg AC_MSG_RESULT([$groff_mm_works]) 9854b85037dbSmrgfi 9855b85037dbSmrg 9856b85037dbSmrg# We have groff, test for HTML dependencies, one command per package 9857b85037dbSmrgif test "x$have_groff" = x"yes"; then 9858b85037dbSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 9859b85037dbSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 9860b85037dbSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 9861b85037dbSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 9862b85037dbSmrg have_groff_html=yes 9863b85037dbSmrg else 9864b85037dbSmrg have_groff_html=no 9865b85037dbSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 9866b85037dbSmrg fi 9867b85037dbSmrgfi 9868b85037dbSmrg 9869b85037dbSmrg# Set Automake conditionals for Makefiles 9870b85037dbSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 9871b85037dbSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 9872b85037dbSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 9873b85037dbSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 9874b85037dbSmrg]) # XORG_WITH_GROFF 9875b85037dbSmrg 9876b85037dbSmrg# XORG_WITH_FOP 9877b85037dbSmrg# ---------------- 9878b85037dbSmrg# Minimum version: 1.6.0 9879b85037dbSmrg# 9880b85037dbSmrg# Documentation tools are not always available on all platforms and sometimes 9881b85037dbSmrg# not at the appropriate level. This macro enables a module to test for the 9882b85037dbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9883b85037dbSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 9884b85037dbSmrg# as whether or not to use the fop package. 9885b85037dbSmrg# 9886b85037dbSmrg# Interface to module: 9887b85037dbSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 9888b85037dbSmrg# FOP: returns the path of the fop program found 9889b85037dbSmrg# returns the path set by the user in the environment 9890b85037dbSmrg# --with-fop: 'yes' user instructs the module to use fop 9891b85037dbSmrg# 'no' user instructs the module not to use fop 9892b85037dbSmrg# 9893b85037dbSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 9894b85037dbSmrg# 9895b85037dbSmrgAC_DEFUN([XORG_WITH_FOP],[ 9896b85037dbSmrgAC_ARG_VAR([FOP], [Path to fop command]) 9897b85037dbSmrgAC_ARG_WITH(fop, 9898b85037dbSmrg AS_HELP_STRING([--with-fop], 9899b85037dbSmrg [Use fop to regenerate documentation (default: yes, if installed)]), 9900b85037dbSmrg [use_fop=$withval], [use_fop=auto]) 9901b85037dbSmrg 9902b85037dbSmrgif test "x$use_fop" = x"auto"; then 9903b85037dbSmrg AC_PATH_PROG([FOP], [fop]) 9904b85037dbSmrg if test "x$FOP" = "x"; then 9905b85037dbSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 9906b85037dbSmrg have_fop=no 9907b85037dbSmrg else 9908b85037dbSmrg have_fop=yes 9909b85037dbSmrg fi 9910b85037dbSmrgelif test "x$use_fop" = x"yes" ; then 9911b85037dbSmrg AC_PATH_PROG([FOP], [fop]) 9912b85037dbSmrg if test "x$FOP" = "x"; then 9913b85037dbSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 9914b85037dbSmrg fi 9915b85037dbSmrg have_fop=yes 9916b85037dbSmrgelif test "x$use_fop" = x"no" ; then 9917b85037dbSmrg if test "x$FOP" != "x"; then 9918b85037dbSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 9919b85037dbSmrg fi 9920b85037dbSmrg have_fop=no 9921b85037dbSmrgelse 9922b85037dbSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 9923b85037dbSmrgfi 9924b85037dbSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 9925b85037dbSmrg]) # XORG_WITH_FOP 9926b85037dbSmrg 9927b85037dbSmrg# XORG_WITH_PS2PDF 9928b85037dbSmrg# ---------------- 9929b85037dbSmrg# Minimum version: 1.6.0 9930b85037dbSmrg# 9931b85037dbSmrg# Documentation tools are not always available on all platforms and sometimes 9932b85037dbSmrg# not at the appropriate level. This macro enables a module to test for the 9933b85037dbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9934b85037dbSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 9935b85037dbSmrg# as whether or not to use the ps2pdf package. 9936b85037dbSmrg# 9937b85037dbSmrg# Interface to module: 9938b85037dbSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 9939b85037dbSmrg# PS2PDF: returns the path of the ps2pdf program found 9940b85037dbSmrg# returns the path set by the user in the environment 9941b85037dbSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 9942b85037dbSmrg# 'no' user instructs the module not to use ps2pdf 9943b85037dbSmrg# 9944b85037dbSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 9945b85037dbSmrg# 9946b85037dbSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 9947b85037dbSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 9948b85037dbSmrgAC_ARG_WITH(ps2pdf, 9949b85037dbSmrg AS_HELP_STRING([--with-ps2pdf], 9950b85037dbSmrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 9951b85037dbSmrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 9952b85037dbSmrg 9953b85037dbSmrgif test "x$use_ps2pdf" = x"auto"; then 9954b85037dbSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 9955b85037dbSmrg if test "x$PS2PDF" = "x"; then 9956b85037dbSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 9957b85037dbSmrg have_ps2pdf=no 9958b85037dbSmrg else 9959b85037dbSmrg have_ps2pdf=yes 9960b85037dbSmrg fi 9961b85037dbSmrgelif test "x$use_ps2pdf" = x"yes" ; then 9962b85037dbSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 9963b85037dbSmrg if test "x$PS2PDF" = "x"; then 9964b85037dbSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 9965b85037dbSmrg fi 9966b85037dbSmrg have_ps2pdf=yes 9967b85037dbSmrgelif test "x$use_ps2pdf" = x"no" ; then 9968b85037dbSmrg if test "x$PS2PDF" != "x"; then 9969b85037dbSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 9970b85037dbSmrg fi 9971b85037dbSmrg have_ps2pdf=no 9972b85037dbSmrgelse 9973b85037dbSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 9974b85037dbSmrgfi 9975b85037dbSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 9976b85037dbSmrg]) # XORG_WITH_PS2PDF 9977b85037dbSmrg 9978b85037dbSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 9979b85037dbSmrg# ---------------- 9980b85037dbSmrg# Minimum version: 1.6.0 9981b85037dbSmrg# 9982b85037dbSmrg# Documentation tools are not always available on all platforms and sometimes 9983b85037dbSmrg# not at the appropriate level. This macro enables a builder to skip all 9984b85037dbSmrg# documentation targets except traditional man pages. 9985b85037dbSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9986b85037dbSmrg# maximum flexibilty in controlling documentation building. 9987b85037dbSmrg# Refer to: 9988b85037dbSmrg# XORG_WITH_XMLTO --with-xmlto 9989b85037dbSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 9990b85037dbSmrg# XORG_WITH_DOXYGEN --with-doxygen 9991b85037dbSmrg# XORG_WITH_FOP --with-fop 9992b85037dbSmrg# XORG_WITH_GROFF --with-groff 9993b85037dbSmrg# XORG_WITH_PS2PDF --with-ps2pdf 9994b85037dbSmrg# 9995b85037dbSmrg# Interface to module: 9996b85037dbSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 9997b85037dbSmrg# --enable-docs: 'yes' user instructs the module to generate docs 9998b85037dbSmrg# 'no' user instructs the module not to generate docs 9999b85037dbSmrg# parm1: specify the default value, yes or no. 10000b85037dbSmrg# 10001b85037dbSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 10002b85037dbSmrgdefault=$1 10003b85037dbSmrgif test "x$default" = x ; then 10004b85037dbSmrg default="yes" 10005b85037dbSmrgfi 10006b85037dbSmrgAC_ARG_ENABLE(docs, 10007b85037dbSmrg AS_HELP_STRING([--enable-docs], 10008b85037dbSmrg [Enable building the documentation (default: yes)]), 10009b85037dbSmrg [build_docs=$enableval], [build_docs=$default]) 10010b85037dbSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10011b85037dbSmrgAC_MSG_CHECKING([whether to build documentation]) 10012b85037dbSmrgAC_MSG_RESULT([$build_docs]) 10013b85037dbSmrg]) # XORG_ENABLE_DOCS 10014b85037dbSmrg 10015b85037dbSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10016b85037dbSmrg# ---------------- 10017b85037dbSmrg# Minimum version: 1.6.0 10018b85037dbSmrg# 10019b85037dbSmrg# This macro enables a builder to skip all developer documentation. 10020b85037dbSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10021b85037dbSmrg# maximum flexibilty in controlling documentation building. 10022b85037dbSmrg# Refer to: 10023b85037dbSmrg# XORG_WITH_XMLTO --with-xmlto 10024b85037dbSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10025b85037dbSmrg# XORG_WITH_DOXYGEN --with-doxygen 10026b85037dbSmrg# XORG_WITH_FOP --with-fop 10027b85037dbSmrg# XORG_WITH_GROFF --with-groff 10028b85037dbSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10029b85037dbSmrg# 10030b85037dbSmrg# Interface to module: 10031b85037dbSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10032b85037dbSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10033b85037dbSmrg# 'no' user instructs the module not to generate developer docs 10034b85037dbSmrg# parm1: specify the default value, yes or no. 10035b85037dbSmrg# 10036b85037dbSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10037b85037dbSmrgdevel_default=$1 10038b85037dbSmrgif test "x$devel_default" = x ; then 10039b85037dbSmrg devel_default="yes" 10040b85037dbSmrgfi 10041b85037dbSmrgAC_ARG_ENABLE(devel-docs, 10042b85037dbSmrg AS_HELP_STRING([--enable-devel-docs], 10043b85037dbSmrg [Enable building the developer documentation (default: yes)]), 10044b85037dbSmrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 10045b85037dbSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10046b85037dbSmrgAC_MSG_CHECKING([whether to build developer documentation]) 10047b85037dbSmrgAC_MSG_RESULT([$build_devel_docs]) 10048b85037dbSmrg]) # XORG_ENABLE_DEVEL_DOCS 10049b85037dbSmrg 10050b85037dbSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 10051b85037dbSmrg# ---------------- 10052b85037dbSmrg# Minimum version: 1.6.0 10053b85037dbSmrg# 10054b85037dbSmrg# This macro enables a builder to skip all functional specification targets. 10055b85037dbSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10056b85037dbSmrg# maximum flexibilty in controlling documentation building. 10057b85037dbSmrg# Refer to: 10058b85037dbSmrg# XORG_WITH_XMLTO --with-xmlto 10059b85037dbSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10060b85037dbSmrg# XORG_WITH_DOXYGEN --with-doxygen 10061b85037dbSmrg# XORG_WITH_FOP --with-fop 10062b85037dbSmrg# XORG_WITH_GROFF --with-groff 10063b85037dbSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10064b85037dbSmrg# 10065b85037dbSmrg# Interface to module: 10066b85037dbSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10067b85037dbSmrg# --enable-specs: 'yes' user instructs the module to generate specs 10068b85037dbSmrg# 'no' user instructs the module not to generate specs 10069b85037dbSmrg# parm1: specify the default value, yes or no. 10070b85037dbSmrg# 10071b85037dbSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 10072b85037dbSmrgspec_default=$1 10073b85037dbSmrgif test "x$spec_default" = x ; then 10074b85037dbSmrg spec_default="yes" 10075b85037dbSmrgfi 10076b85037dbSmrgAC_ARG_ENABLE(specs, 10077b85037dbSmrg AS_HELP_STRING([--enable-specs], 10078b85037dbSmrg [Enable building the specs (default: yes)]), 10079b85037dbSmrg [build_specs=$enableval], [build_specs=$spec_default]) 10080b85037dbSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10081b85037dbSmrgAC_MSG_CHECKING([whether to build functional specifications]) 10082b85037dbSmrgAC_MSG_RESULT([$build_specs]) 10083b85037dbSmrg]) # XORG_ENABLE_SPECS 10084b85037dbSmrg 10085b85037dbSmrg# XORG_CHECK_MALLOC_ZERO 10086b85037dbSmrg# ---------------------- 10087b85037dbSmrg# Minimum version: 1.0.0 10088b85037dbSmrg# 10089b85037dbSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10090b85037dbSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 10091b85037dbSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10092b85037dbSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10093b85037dbSmrgAC_ARG_ENABLE(malloc0returnsnull, 10094b85037dbSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 10095b85037dbSmrg [malloc(0) returns NULL (default: auto)]), 10096b85037dbSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 10097b85037dbSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10098b85037dbSmrg 10099b85037dbSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 10100b85037dbSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10101b85037dbSmrg AC_RUN_IFELSE([ 10102b85037dbSmrgchar *malloc(); 10103b85037dbSmrgchar *realloc(); 10104b85037dbSmrgchar *calloc(); 10105b85037dbSmrgmain() { 10106b85037dbSmrg char *m0, *r0, *c0, *p; 10107b85037dbSmrg m0 = malloc(0); 10108b85037dbSmrg p = malloc(10); 10109b85037dbSmrg r0 = realloc(p,0); 10110b85037dbSmrg c0 = calloc(0); 10111b85037dbSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 10112b85037dbSmrg}], 10113b85037dbSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 10114b85037dbSmrg [MALLOC_ZERO_RETURNS_NULL=no], 10115b85037dbSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 10116b85037dbSmrgfi 10117b85037dbSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10118b85037dbSmrg 10119b85037dbSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10120b85037dbSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10121b85037dbSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10122b85037dbSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10123b85037dbSmrgelse 10124b85037dbSmrg MALLOC_ZERO_CFLAGS="" 10125b85037dbSmrg XMALLOC_ZERO_CFLAGS="" 10126b85037dbSmrg XTMALLOC_ZERO_CFLAGS="" 10127b85037dbSmrgfi 10128b85037dbSmrg 10129b85037dbSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 10130b85037dbSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 10131b85037dbSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10132b85037dbSmrg]) # XORG_CHECK_MALLOC_ZERO 10133b85037dbSmrg 10134b85037dbSmrg# XORG_WITH_LINT() 10135b85037dbSmrg# ---------------- 10136b85037dbSmrg# Minimum version: 1.1.0 10137b85037dbSmrg# 10138b85037dbSmrg# This macro enables the use of a tool that flags some suspicious and 10139b85037dbSmrg# non-portable constructs (likely to be bugs) in C language source code. 10140b85037dbSmrg# It will attempt to locate the tool and use appropriate options. 10141b85037dbSmrg# There are various lint type tools on different platforms. 10142b85037dbSmrg# 10143b85037dbSmrg# Interface to module: 10144b85037dbSmrg# LINT: returns the path to the tool found on the platform 10145b85037dbSmrg# or the value set to LINT on the configure cmd line 10146b85037dbSmrg# also an Automake conditional 10147b85037dbSmrg# LINT_FLAGS: an Automake variable with appropriate flags 10148b85037dbSmrg# 10149b85037dbSmrg# --with-lint: 'yes' user instructs the module to use lint 10150b85037dbSmrg# 'no' user instructs the module not to use lint (default) 10151b85037dbSmrg# 10152b85037dbSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10153b85037dbSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 10154b85037dbSmrg# 10155b85037dbSmrgAC_DEFUN([XORG_WITH_LINT],[ 10156b85037dbSmrg 10157b85037dbSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10158b85037dbSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10159b85037dbSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10160b85037dbSmrg [Use a lint-style source code checker (default: disabled)])], 10161b85037dbSmrg [use_lint=$withval], [use_lint=no]) 10162b85037dbSmrg 10163b85037dbSmrg# Obtain platform specific info like program name and options 10164b85037dbSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10165b85037dbSmrgcase $host_os in 10166b85037dbSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10167b85037dbSmrg lint_name=splint 10168b85037dbSmrg lint_options="-badflag" 10169b85037dbSmrg ;; 10170b85037dbSmrg *freebsd* | *netbsd*) 10171b85037dbSmrg lint_name=lint 10172b85037dbSmrg lint_options="-u -b" 10173b85037dbSmrg ;; 10174b85037dbSmrg *solaris*) 10175b85037dbSmrg lint_name=lint 10176b85037dbSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10177b85037dbSmrg ;; 10178b85037dbSmrgesac 10179b85037dbSmrg 10180b85037dbSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10181b85037dbSmrgif test "x$use_lint" = x"yes" ; then 10182b85037dbSmrg AC_PATH_PROG([LINT], [$lint_name]) 10183b85037dbSmrg if test "x$LINT" = "x"; then 10184b85037dbSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10185b85037dbSmrg fi 10186b85037dbSmrgelif test "x$use_lint" = x"no" ; then 10187b85037dbSmrg if test "x$LINT" != "x"; then 10188b85037dbSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10189b85037dbSmrg fi 10190b85037dbSmrgelse 10191b85037dbSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10192b85037dbSmrgfi 10193b85037dbSmrg 10194b85037dbSmrg# User supplied flags override default flags 10195b85037dbSmrgif test "x$LINT_FLAGS" != "x"; then 10196b85037dbSmrg lint_options=$LINT_FLAGS 10197b85037dbSmrgfi 10198b85037dbSmrg 10199b85037dbSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10200b85037dbSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10201b85037dbSmrg 10202b85037dbSmrg]) # XORG_WITH_LINT 10203b85037dbSmrg 10204b85037dbSmrg# XORG_LINT_LIBRARY(LIBNAME) 10205b85037dbSmrg# -------------------------- 10206b85037dbSmrg# Minimum version: 1.1.0 10207b85037dbSmrg# 10208b85037dbSmrg# Sets up flags for building lint libraries for checking programs that call 10209b85037dbSmrg# functions in the library. 10210b85037dbSmrg# 10211b85037dbSmrg# Interface to module: 10212b85037dbSmrg# LINTLIB - Automake variable with the name of lint library file to make 10213b85037dbSmrg# MAKE_LINT_LIB - Automake conditional 10214b85037dbSmrg# 10215b85037dbSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10216b85037dbSmrg# - 'no' user instructs the module not to create a lint library (default) 10217b85037dbSmrg 10218b85037dbSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 10219b85037dbSmrgAC_REQUIRE([XORG_WITH_LINT]) 10220b85037dbSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10221b85037dbSmrg [Create lint library (default: disabled)])], 10222b85037dbSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10223b85037dbSmrg 10224b85037dbSmrgif test "x$make_lint_lib" = x"yes" ; then 10225b85037dbSmrg LINTLIB=llib-l$1.ln 10226b85037dbSmrg if test "x$LINT" = "x"; then 10227b85037dbSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10228b85037dbSmrg fi 10229b85037dbSmrgelif test "x$make_lint_lib" != x"no" ; then 10230b85037dbSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10231b85037dbSmrgfi 10232b85037dbSmrg 10233b85037dbSmrgAC_SUBST(LINTLIB) 10234b85037dbSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10235b85037dbSmrg 10236b85037dbSmrg]) # XORG_LINT_LIBRARY 10237b85037dbSmrg 10238b85037dbSmrg# XORG_CWARNFLAGS 10239b85037dbSmrg# --------------- 10240b85037dbSmrg# Minimum version: 1.2.0 10241b85037dbSmrg# 10242b85037dbSmrg# Defines CWARNFLAGS to enable C compiler warnings. 10243b85037dbSmrg# 10244b85037dbSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 10245b85037dbSmrgAC_REQUIRE([AC_PROG_CC_C99]) 10246b85037dbSmrgif test "x$GCC" = xyes ; then 10247b85037dbSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 10248b85037dbSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 10249b85037dbSmrg-Wbad-function-cast -Wformat=2" 10250b85037dbSmrg case `$CC -dumpversion` in 10251b85037dbSmrg 3.4.* | 4.*) 10252b85037dbSmrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 10253b85037dbSmrg ;; 10254b85037dbSmrg esac 10255b85037dbSmrgelse 10256b85037dbSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10257b85037dbSmrg if test "x$SUNCC" = "xyes"; then 10258b85037dbSmrg CWARNFLAGS="-v" 10259b85037dbSmrg fi 10260b85037dbSmrgfi 10261b85037dbSmrgAC_SUBST(CWARNFLAGS) 10262b85037dbSmrg]) # XORG_CWARNFLAGS 10263b85037dbSmrg 10264b85037dbSmrg# XORG_STRICT_OPTION 10265b85037dbSmrg# ----------------------- 10266b85037dbSmrg# Minimum version: 1.3.0 10267b85037dbSmrg# 10268b85037dbSmrg# Add configure option to enable strict compilation 10269b85037dbSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 10270b85037dbSmrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 10271b85037dbSmrgAC_REQUIRE([AC_PROG_CC_C99]) 10272b85037dbSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 10273b85037dbSmrg 10274b85037dbSmrgAC_ARG_ENABLE(strict-compilation, 10275b85037dbSmrg AS_HELP_STRING([--enable-strict-compilation], 10276b85037dbSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 10277b85037dbSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 10278b85037dbSmrgif test "x$STRICT_COMPILE" = "xyes"; then 10279b85037dbSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10280b85037dbSmrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10281b85037dbSmrg if test "x$GCC" = xyes ; then 10282b85037dbSmrg STRICT_CFLAGS="-pedantic -Werror" 10283b85037dbSmrg elif test "x$SUNCC" = "xyes"; then 10284b85037dbSmrg STRICT_CFLAGS="-errwarn" 10285b85037dbSmrg elif test "x$INTELCC" = "xyes"; then 10286b85037dbSmrg STRICT_CFLAGS="-Werror" 10287b85037dbSmrg fi 10288b85037dbSmrgfi 10289b85037dbSmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 10290b85037dbSmrgAC_SUBST([CWARNFLAGS]) 10291b85037dbSmrg]) # XORG_STRICT_OPTION 10292b85037dbSmrg 10293b85037dbSmrg# XORG_DEFAULT_OPTIONS 10294b85037dbSmrg# -------------------- 10295b85037dbSmrg# Minimum version: 1.3.0 10296b85037dbSmrg# 10297b85037dbSmrg# Defines default options for X.Org modules. 10298b85037dbSmrg# 10299b85037dbSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 10300b85037dbSmrgAC_REQUIRE([AC_PROG_INSTALL]) 10301b85037dbSmrgXORG_CWARNFLAGS 10302b85037dbSmrgXORG_STRICT_OPTION 10303b85037dbSmrgXORG_RELEASE_VERSION 10304b85037dbSmrgXORG_CHANGELOG 10305b85037dbSmrgXORG_INSTALL 10306b85037dbSmrgXORG_MANPAGE_SECTIONS 10307b85037dbSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 10308b85037dbSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 10309b85037dbSmrg]) # XORG_DEFAULT_OPTIONS 10310b85037dbSmrg 10311b85037dbSmrg# XORG_INSTALL() 10312b85037dbSmrg# ---------------- 10313b85037dbSmrg# Minimum version: 1.4.0 10314b85037dbSmrg# 10315b85037dbSmrg# Defines the variable INSTALL_CMD as the command to copy 10316b85037dbSmrg# INSTALL from $prefix/share/util-macros. 10317b85037dbSmrg# 10318b85037dbSmrgAC_DEFUN([XORG_INSTALL], [ 10319b85037dbSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10320b85037dbSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 10321b85037dbSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 10322b85037dbSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 10323b85037dbSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 10324b85037dbSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 10325b85037dbSmrgAC_SUBST([INSTALL_CMD]) 10326b85037dbSmrg]) # XORG_INSTALL 10327b85037dbSmrgdnl Copyright 2005 Red Hat, Inc 10328b85037dbSmrgdnl 10329b85037dbSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 10330b85037dbSmrgdnl documentation for any purpose is hereby granted without fee, provided that 10331b85037dbSmrgdnl the above copyright notice appear in all copies and that both that 10332b85037dbSmrgdnl copyright notice and this permission notice appear in supporting 10333b85037dbSmrgdnl documentation. 10334b85037dbSmrgdnl 10335b85037dbSmrgdnl The above copyright notice and this permission notice shall be included 10336b85037dbSmrgdnl in all copies or substantial portions of the Software. 10337b85037dbSmrgdnl 10338b85037dbSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10339b85037dbSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10340b85037dbSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10341b85037dbSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10342b85037dbSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10343b85037dbSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10344b85037dbSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 10345b85037dbSmrgdnl 10346b85037dbSmrgdnl Except as contained in this notice, the name of the copyright holders shall 10347b85037dbSmrgdnl not be used in advertising or otherwise to promote the sale, use or 10348b85037dbSmrgdnl other dealings in this Software without prior written authorization 10349b85037dbSmrgdnl from the copyright holders. 10350b85037dbSmrgdnl 10351b85037dbSmrg 10352b85037dbSmrg# XORG_RELEASE_VERSION 10353b85037dbSmrg# -------------------- 10354b85037dbSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 10355b85037dbSmrg 10356b85037dbSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 10357b85037dbSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 10358b85037dbSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 10359b85037dbSmrg [Major version of this package]) 10360b85037dbSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 10361b85037dbSmrg if test "x$PVM" = "x"; then 10362b85037dbSmrg PVM="0" 10363b85037dbSmrg fi 10364b85037dbSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 10365b85037dbSmrg [$PVM], 10366b85037dbSmrg [Minor version of this package]) 10367b85037dbSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 10368b85037dbSmrg if test "x$PVP" = "x"; then 10369b85037dbSmrg PVP="0" 10370b85037dbSmrg fi 10371b85037dbSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 10372b85037dbSmrg [$PVP], 10373b85037dbSmrg [Patch version of this package]) 10374b85037dbSmrg]) 10375b85037dbSmrg 10376b85037dbSmrg# XORG_CHANGELOG() 10377b85037dbSmrg# ---------------- 10378b85037dbSmrg# Minimum version: 1.2.0 10379b85037dbSmrg# 10380b85037dbSmrg# Defines the variable CHANGELOG_CMD as the command to generate 10381b85037dbSmrg# ChangeLog from git. 10382b85037dbSmrg# 10383b85037dbSmrg# 10384b85037dbSmrgAC_DEFUN([XORG_CHANGELOG], [ 10385b85037dbSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 10386b85037dbSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 10387b85037dbSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 10388b85037dbSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 10389b85037dbSmrgAC_SUBST([CHANGELOG_CMD]) 10390b85037dbSmrg]) # XORG_CHANGELOG 10391b85037dbSmrg 10392b85037dbSmrgdnl Copyright 2005 Red Hat, Inc 10393b85037dbSmrgdnl 10394b85037dbSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 10395b85037dbSmrgdnl documentation for any purpose is hereby granted without fee, provided that 10396b85037dbSmrgdnl the above copyright notice appear in all copies and that both that 10397b85037dbSmrgdnl copyright notice and this permission notice appear in supporting 10398b85037dbSmrgdnl documentation. 10399b85037dbSmrgdnl 10400b85037dbSmrgdnl The above copyright notice and this permission notice shall be included 10401b85037dbSmrgdnl in all copies or substantial portions of the Software. 10402b85037dbSmrgdnl 10403b85037dbSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10404b85037dbSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10405b85037dbSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10406b85037dbSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10407b85037dbSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10408b85037dbSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10409b85037dbSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 10410b85037dbSmrgdnl 10411b85037dbSmrgdnl Except as contained in this notice, the name of the copyright holders shall 10412b85037dbSmrgdnl not be used in advertising or otherwise to promote the sale, use or 10413b85037dbSmrgdnl other dealings in this Software without prior written authorization 10414b85037dbSmrgdnl from the copyright holders. 10415b85037dbSmrgdnl 10416b85037dbSmrg 10417b85037dbSmrg# XORG_DRIVER_CHECK_EXT() 10418b85037dbSmrg# -------------------------- 10419b85037dbSmrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 10420b85037dbSmrg# is defined, then add $1 to $REQUIRED_MODULES. 10421b85037dbSmrg 10422b85037dbSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 10423b85037dbSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10424b85037dbSmrg SAVE_CFLAGS="$CFLAGS" 10425b85037dbSmrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 10426b85037dbSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 10427b85037dbSmrg#include "xorg-server.h" 10428b85037dbSmrg#if !defined $1 10429b85037dbSmrg#error $1 not defined 10430b85037dbSmrg#endif 10431b85037dbSmrg ]])], 10432b85037dbSmrg [_EXT_CHECK=yes], 10433b85037dbSmrg [_EXT_CHECK=no]) 10434b85037dbSmrg CFLAGS="$SAVE_CFLAGS" 10435b85037dbSmrg AC_MSG_CHECKING([if $1 is defined]) 10436b85037dbSmrg AC_MSG_RESULT([$_EXT_CHECK]) 10437b85037dbSmrg if test "$_EXT_CHECK" != no; then 10438b85037dbSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 10439b85037dbSmrg fi 10440b85037dbSmrg]) 10441b85037dbSmrg 10442