aclocal.m4 revision 7fe5393c
17fe5393cSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 215fb4814Smrg 315fb4814Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 47fe5393cSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 515fb4814Smrg# This file is free software; the Free Software Foundation 615fb4814Smrg# gives unlimited permission to copy and/or distribute it, 715fb4814Smrg# with or without modifications, as long as this notice is preserved. 815fb4814Smrg 915fb4814Smrg# This program is distributed in the hope that it will be useful, 1015fb4814Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1115fb4814Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1215fb4814Smrg# PARTICULAR PURPOSE. 1315fb4814Smrg 14b4d38c65Smrgm4_ifndef([AC_AUTOCONF_VERSION], 15b4d38c65Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16b4d38c65Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 17b4d38c65Smrg[m4_warning([this file was generated for autoconf 2.68. 18b4d38c65SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19b4d38c65SmrgIf you have problems, you may need to regenerate the build system entirely. 20b4d38c65SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21de78e416Smrg 2215fb4814Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23b4d38c65Smrg# 24b4d38c65Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 257fe5393cSmrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 267fe5393cSmrg# Inc. 27b4d38c65Smrg# Written by Gordon Matzigkeit, 1996 28b4d38c65Smrg# 29b4d38c65Smrg# This file is free software; the Free Software Foundation gives 30b4d38c65Smrg# unlimited permission to copy and/or distribute it, with or without 31b4d38c65Smrg# modifications, as long as this notice is preserved. 32b4d38c65Smrg 33b4d38c65Smrgm4_define([_LT_COPYING], [dnl 34b4d38c65Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 357fe5393cSmrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 367fe5393cSmrg# Inc. 37b4d38c65Smrg# Written by Gordon Matzigkeit, 1996 38b4d38c65Smrg# 39b4d38c65Smrg# This file is part of GNU Libtool. 40b4d38c65Smrg# 41b4d38c65Smrg# GNU Libtool is free software; you can redistribute it and/or 42b4d38c65Smrg# modify it under the terms of the GNU General Public License as 43b4d38c65Smrg# published by the Free Software Foundation; either version 2 of 44b4d38c65Smrg# the License, or (at your option) any later version. 45b4d38c65Smrg# 46b4d38c65Smrg# As a special exception to the GNU General Public License, 47b4d38c65Smrg# if you distribute this file as part of a program or library that 48b4d38c65Smrg# is built using GNU Libtool, you may include this file under the 49b4d38c65Smrg# same distribution terms that you use for the rest of that program. 50b4d38c65Smrg# 51b4d38c65Smrg# GNU Libtool is distributed in the hope that it will be useful, 52b4d38c65Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 53b4d38c65Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 54b4d38c65Smrg# GNU General Public License for more details. 55b4d38c65Smrg# 56b4d38c65Smrg# You should have received a copy of the GNU General Public License 57b4d38c65Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 58b4d38c65Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 59b4d38c65Smrg# obtained by writing to the Free Software Foundation, Inc., 60b4d38c65Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 61b4d38c65Smrg]) 6215fb4814Smrg 63b4d38c65Smrg# serial 57 LT_INIT 6415fb4814Smrg 6515fb4814Smrg 66b4d38c65Smrg# LT_PREREQ(VERSION) 67b4d38c65Smrg# ------------------ 68b4d38c65Smrg# Complain and exit if this libtool version is less that VERSION. 69b4d38c65Smrgm4_defun([LT_PREREQ], 70b4d38c65Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 71b4d38c65Smrg [m4_default([$3], 72b4d38c65Smrg [m4_fatal([Libtool version $1 or higher is required], 73b4d38c65Smrg 63)])], 74b4d38c65Smrg [$2])]) 75b410ddbeSmrg 76b410ddbeSmrg 77b4d38c65Smrg# _LT_CHECK_BUILDDIR 78b4d38c65Smrg# ------------------ 79b4d38c65Smrg# Complain if the absolute build directory name contains unusual characters 80b4d38c65Smrgm4_defun([_LT_CHECK_BUILDDIR], 81b4d38c65Smrg[case `pwd` in 82b4d38c65Smrg *\ * | *\ *) 83b4d38c65Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 84b4d38c65Smrgesac 85b4d38c65Smrg]) 86b4d38c65Smrg 87b4d38c65Smrg 88b4d38c65Smrg# LT_INIT([OPTIONS]) 89b4d38c65Smrg# ------------------ 90b4d38c65SmrgAC_DEFUN([LT_INIT], 91b4d38c65Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 92b4d38c65SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 93b4d38c65SmrgAC_BEFORE([$0], [LT_LANG])dnl 94b4d38c65SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 95b4d38c65SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 96b4d38c65Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 97b4d38c65Smrg 98b4d38c65Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 99b4d38c65Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 100b4d38c65Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 101b4d38c65Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 102b4d38c65Smrgdnl unless we require an AC_DEFUNed macro: 103b4d38c65SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 104b4d38c65SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 105b4d38c65SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 106b4d38c65SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 107b4d38c65Smrgm4_require([_LT_PROG_LTMAIN])dnl 108b4d38c65Smrg 109b4d38c65Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 110b4d38c65Smrg 111b4d38c65Smrgdnl Parse OPTIONS 112b4d38c65Smrg_LT_SET_OPTIONS([$0], [$1]) 11315fb4814Smrg 11415fb4814Smrg# This can be used to rebuild libtool when needed 115b4d38c65SmrgLIBTOOL_DEPS="$ltmain" 11615fb4814Smrg 11715fb4814Smrg# Always use our own libtool. 11815fb4814SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 11915fb4814SmrgAC_SUBST(LIBTOOL)dnl 12015fb4814Smrg 121b4d38c65Smrg_LT_SETUP 122b410ddbeSmrg 123b4d38c65Smrg# Only expand once: 124b4d38c65Smrgm4_define([LT_INIT]) 125b4d38c65Smrg])# LT_INIT 126b410ddbeSmrg 127b4d38c65Smrg# Old names: 128b4d38c65SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 129b4d38c65SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 130b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 131b4d38c65Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 132b4d38c65Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 133b4d38c65Smrg 134b4d38c65Smrg 135b4d38c65Smrg# _LT_CC_BASENAME(CC) 136b4d38c65Smrg# ------------------- 137b4d38c65Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 138b4d38c65Smrgm4_defun([_LT_CC_BASENAME], 139b4d38c65Smrg[for cc_temp in $1""; do 140b4d38c65Smrg case $cc_temp in 141b4d38c65Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 142b4d38c65Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 143b4d38c65Smrg \-*) ;; 144b4d38c65Smrg *) break;; 145b4d38c65Smrg esac 146b4d38c65Smrgdone 147b4d38c65Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 148b4d38c65Smrg]) 149b4d38c65Smrg 150b4d38c65Smrg 151b4d38c65Smrg# _LT_FILEUTILS_DEFAULTS 152b4d38c65Smrg# ---------------------- 153b4d38c65Smrg# It is okay to use these file commands and assume they have been set 154b4d38c65Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 155b4d38c65Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 156b4d38c65Smrg[: ${CP="cp -f"} 157b4d38c65Smrg: ${MV="mv -f"} 158b4d38c65Smrg: ${RM="rm -f"} 159b4d38c65Smrg])# _LT_FILEUTILS_DEFAULTS 160b4d38c65Smrg 161b4d38c65Smrg 162b4d38c65Smrg# _LT_SETUP 163b4d38c65Smrg# --------- 164b4d38c65Smrgm4_defun([_LT_SETUP], 165b4d38c65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16615fb4814SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 167b4d38c65SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 168b4d38c65SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 169b534f209Smrg 170b4d38c65Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 171b4d38c65Smrg_LT_DECL([], [host], [0])dnl 172b4d38c65Smrg_LT_DECL([], [host_os], [0])dnl 173b4d38c65Smrgdnl 174b4d38c65Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 175b4d38c65Smrg_LT_DECL([], [build], [0])dnl 176b4d38c65Smrg_LT_DECL([], [build_os], [0])dnl 177b4d38c65Smrgdnl 178b4d38c65SmrgAC_REQUIRE([AC_PROG_CC])dnl 179b4d38c65SmrgAC_REQUIRE([LT_PATH_LD])dnl 180b4d38c65SmrgAC_REQUIRE([LT_PATH_NM])dnl 181b4d38c65Smrgdnl 18215fb4814SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 183b4d38c65Smrgtest -z "$LN_S" && LN_S="ln -s" 184b4d38c65Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 18515fb4814Smrgdnl 186b4d38c65SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 187b4d38c65Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 188b4d38c65Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 189b4d38c65Smrgdnl 190b4d38c65Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 191b4d38c65Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 192b4d38c65Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 193b4d38c65Smrgm4_require([_LT_CMD_RELOAD])dnl 194b4d38c65Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 195b4d38c65Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 196b4d38c65Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 197b4d38c65Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 198b4d38c65Smrgm4_require([_LT_WITH_SYSROOT])dnl 199b4d38c65Smrg 200b4d38c65Smrg_LT_CONFIG_LIBTOOL_INIT([ 201b4d38c65Smrg# See if we are running on zsh, and set the options which allow our 202b4d38c65Smrg# commands through without removal of \ escapes INIT. 203b4d38c65Smrgif test -n "\${ZSH_VERSION+set}" ; then 204b4d38c65Smrg setopt NO_GLOB_SUBST 205b4d38c65Smrgfi 206b4d38c65Smrg]) 207b4d38c65Smrgif test -n "${ZSH_VERSION+set}" ; then 208b4d38c65Smrg setopt NO_GLOB_SUBST 209b4d38c65Smrgfi 21015fb4814Smrg 211b4d38c65Smrg_LT_CHECK_OBJDIR 212b410ddbeSmrg 213b4d38c65Smrgm4_require([_LT_TAG_COMPILER])dnl 21415fb4814Smrg 21515fb4814Smrgcase $host_os in 21615fb4814Smrgaix3*) 21715fb4814Smrg # AIX sometimes has problems with the GCC collect2 program. For some 21815fb4814Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 21915fb4814Smrg # vanish in a puff of smoke. 22015fb4814Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 22115fb4814Smrg COLLECT_NAMES= 22215fb4814Smrg export COLLECT_NAMES 22315fb4814Smrg fi 22415fb4814Smrg ;; 22515fb4814Smrgesac 22615fb4814Smrg 22715fb4814Smrg# Global variables: 228b4d38c65Smrgofile=libtool 22915fb4814Smrgcan_build_shared=yes 23015fb4814Smrg 23115fb4814Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 23215fb4814Smrg# which needs '.lib'). 23315fb4814Smrglibext=a 23415fb4814Smrg 235b4d38c65Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 236b534f209Smrg 23715fb4814Smrgold_CC="$CC" 23815fb4814Smrgold_CFLAGS="$CFLAGS" 23915fb4814Smrg 24015fb4814Smrg# Set sane defaults for various variables 24115fb4814Smrgtest -z "$CC" && CC=cc 24215fb4814Smrgtest -z "$LTCC" && LTCC=$CC 24315fb4814Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 24415fb4814Smrgtest -z "$LD" && LD=ld 24515fb4814Smrgtest -z "$ac_objext" && ac_objext=o 24615fb4814Smrg 24715fb4814Smrg_LT_CC_BASENAME([$compiler]) 24815fb4814Smrg 24915fb4814Smrg# Only perform the check for file, if the check method requires it 250b4d38c65Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 25115fb4814Smrgcase $deplibs_check_method in 25215fb4814Smrgfile_magic*) 25315fb4814Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 254b4d38c65Smrg _LT_PATH_MAGIC 25515fb4814Smrg fi 25615fb4814Smrg ;; 25715fb4814Smrgesac 25815fb4814Smrg 259b4d38c65Smrg# Use C for the default configuration in the libtool script 260b4d38c65SmrgLT_SUPPORTED_TAG([CC]) 261b4d38c65Smrg_LT_LANG_C_CONFIG 262b4d38c65Smrg_LT_LANG_DEFAULT_CONFIG 263b4d38c65Smrg_LT_CONFIG_COMMANDS 264b4d38c65Smrg])# _LT_SETUP 265b410ddbeSmrg 26615fb4814Smrg 267b4d38c65Smrg# _LT_PREPARE_SED_QUOTE_VARS 268b4d38c65Smrg# -------------------------- 269b4d38c65Smrg# Define a few sed substitution that help us do robust quoting. 270b4d38c65Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 271b4d38c65Smrg[# Backslashify metacharacters that are still active within 272b4d38c65Smrg# double-quoted strings. 273b4d38c65Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 27415fb4814Smrg 275b4d38c65Smrg# Same as above, but do not quote variable references. 276b4d38c65Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 277b410ddbeSmrg 278b4d38c65Smrg# Sed substitution to delay expansion of an escaped shell variable in a 279b4d38c65Smrg# double_quote_subst'ed string. 280b4d38c65Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 281b410ddbeSmrg 282b4d38c65Smrg# Sed substitution to delay expansion of an escaped single quote. 283b4d38c65Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 28415fb4814Smrg 285b4d38c65Smrg# Sed substitution to avoid accidental globbing in evaled expressions 286b4d38c65Smrgno_glob_subst='s/\*/\\\*/g' 287b4d38c65Smrg]) 28815fb4814Smrg 289b4d38c65Smrg# _LT_PROG_LTMAIN 290b4d38c65Smrg# --------------- 291b4d38c65Smrg# Note that this code is called both from `configure', and `config.status' 292b4d38c65Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 293b4d38c65Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 294b4d38c65Smrg# so we pass a copy along to make sure it has a sensible value anyway. 295b4d38c65Smrgm4_defun([_LT_PROG_LTMAIN], 296b4d38c65Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 297b4d38c65Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 298b4d38c65Smrgltmain="$ac_aux_dir/ltmain.sh" 299b4d38c65Smrg])# _LT_PROG_LTMAIN 30015fb4814Smrg 301b534f209Smrg 302b534f209Smrg 303b4d38c65Smrg# So that we can recreate a full libtool script including additional 304b4d38c65Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 305b4d38c65Smrg# in macros and then make a single call at the end using the `libtool' 306b4d38c65Smrg# label. 307b4d38c65Smrg 308b4d38c65Smrg 309b4d38c65Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 310b4d38c65Smrg# ---------------------------------------- 311b4d38c65Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 312b4d38c65Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 313b4d38c65Smrg[m4_ifval([$1], 314b4d38c65Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 315b4d38c65Smrg [$1 316b4d38c65Smrg])])]) 317b4d38c65Smrg 318b4d38c65Smrg# Initialize. 319b4d38c65Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 320b4d38c65Smrg 321b4d38c65Smrg 322b4d38c65Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 323b4d38c65Smrg# ------------------------------ 324b4d38c65Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 325b4d38c65Smrgm4_define([_LT_CONFIG_LIBTOOL], 326b4d38c65Smrg[m4_ifval([$1], 327b4d38c65Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 328b4d38c65Smrg [$1 329b4d38c65Smrg])])]) 330b4d38c65Smrg 331b4d38c65Smrg# Initialize. 332b4d38c65Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 333b4d38c65Smrg 334b4d38c65Smrg 335b4d38c65Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 336b4d38c65Smrg# ----------------------------------------------------- 337b4d38c65Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 338b4d38c65Smrg[_LT_CONFIG_LIBTOOL([$1]) 339b4d38c65Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 340b534f209Smrg]) 34115fb4814Smrg 34215fb4814Smrg 343b4d38c65Smrg# _LT_FORMAT_COMMENT([COMMENT]) 344b4d38c65Smrg# ----------------------------- 345b4d38c65Smrg# Add leading comment marks to the start of each line, and a trailing 346b4d38c65Smrg# full-stop to the whole comment if one is not present already. 347b4d38c65Smrgm4_define([_LT_FORMAT_COMMENT], 348b4d38c65Smrg[m4_ifval([$1], [ 349b4d38c65Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 350b4d38c65Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 351b4d38c65Smrg)]) 352b4d38c65Smrg 353b4d38c65Smrg 354b4d38c65Smrg 355b4d38c65Smrg 356b4d38c65Smrg 357b4d38c65Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 358b4d38c65Smrg# ------------------------------------------------------------------- 359b4d38c65Smrg# CONFIGNAME is the name given to the value in the libtool script. 360b4d38c65Smrg# VARNAME is the (base) name used in the configure script. 361b4d38c65Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 362b4d38c65Smrg# VARNAME. Any other value will be used directly. 363b4d38c65Smrgm4_define([_LT_DECL], 364b4d38c65Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 365b4d38c65Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 366b4d38c65Smrg [m4_ifval([$1], [$1], [$2])]) 367b4d38c65Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 368b4d38c65Smrg m4_ifval([$4], 369b4d38c65Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 370b4d38c65Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 371b4d38c65Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 372b4d38c65Smrg]) 37315fb4814Smrg 37415fb4814Smrg 375b4d38c65Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 376b4d38c65Smrg# -------------------------------------------------------- 377b4d38c65Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 37815fb4814Smrg 37915fb4814Smrg 380b4d38c65Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 381b4d38c65Smrg# ------------------------------------------------ 382b4d38c65Smrgm4_define([lt_decl_tag_varnames], 383b4d38c65Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 38415fb4814Smrg 38515fb4814Smrg 386b4d38c65Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 387b4d38c65Smrg# --------------------------------------------------------- 388b4d38c65Smrgm4_define([_lt_decl_filter], 389b4d38c65Smrg[m4_case([$#], 390b4d38c65Smrg [0], [m4_fatal([$0: too few arguments: $#])], 391b4d38c65Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 392b4d38c65Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 393b4d38c65Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 394b4d38c65Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 395b4d38c65Smrg]) 39615fb4814Smrg 39715fb4814Smrg 398b4d38c65Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 399b4d38c65Smrg# -------------------------------------------------- 400b4d38c65Smrgm4_define([lt_decl_quote_varnames], 401b4d38c65Smrg[_lt_decl_filter([value], [1], $@)]) 40215fb4814Smrg 40315fb4814Smrg 404b4d38c65Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 405b4d38c65Smrg# --------------------------------------------------- 406b4d38c65Smrgm4_define([lt_decl_dquote_varnames], 407b4d38c65Smrg[_lt_decl_filter([value], [2], $@)]) 40815fb4814Smrg 40915fb4814Smrg 410b4d38c65Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 411b4d38c65Smrg# --------------------------------------------------- 412b4d38c65Smrgm4_define([lt_decl_varnames_tagged], 413b4d38c65Smrg[m4_assert([$# <= 2])dnl 414b4d38c65Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 415b4d38c65Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 416b4d38c65Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 417b4d38c65Smrgm4_define([_lt_decl_varnames_tagged], 418b4d38c65Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 41915fb4814Smrg 42015fb4814Smrg 421b4d38c65Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 422b4d38c65Smrg# ------------------------------------------------ 423b4d38c65Smrgm4_define([lt_decl_all_varnames], 424b4d38c65Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 425b4d38c65Smrg m4_if([$2], [], 426b4d38c65Smrg m4_quote(lt_decl_varnames), 427b4d38c65Smrg m4_quote(m4_shift($@))))[]dnl 428b4d38c65Smrg]) 429b4d38c65Smrgm4_define([_lt_decl_all_varnames], 430b4d38c65Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 431b4d38c65Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 432b4d38c65Smrg]) 43315fb4814Smrg 43415fb4814Smrg 435b4d38c65Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 436b4d38c65Smrg# ------------------------------------ 437b4d38c65Smrg# Quote a variable value, and forward it to `config.status' so that its 438b4d38c65Smrg# declaration there will have the same value as in `configure'. VARNAME 439b4d38c65Smrg# must have a single quote delimited value for this to work. 440b4d38c65Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 441b4d38c65Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 442b534f209Smrg 44315fb4814Smrg 444b4d38c65Smrg# _LT_CONFIG_STATUS_DECLARATIONS 445b4d38c65Smrg# ------------------------------ 446b4d38c65Smrg# We delimit libtool config variables with single quotes, so when 447b4d38c65Smrg# we write them to config.status, we have to be sure to quote all 448b4d38c65Smrg# embedded single quotes properly. In configure, this macro expands 449b4d38c65Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 450b4d38c65Smrg# 451b4d38c65Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 452b4d38c65Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 453b4d38c65Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 454b4d38c65Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 455b4d38c65Smrg 456b4d38c65Smrg 457b4d38c65Smrg# _LT_LIBTOOL_TAGS 458b4d38c65Smrg# ---------------- 459b4d38c65Smrg# Output comment and list of tags supported by the script 460b4d38c65Smrgm4_defun([_LT_LIBTOOL_TAGS], 461b4d38c65Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 462b4d38c65Smrgavailable_tags="_LT_TAGS"dnl 463b4d38c65Smrg]) 46415fb4814Smrg 46515fb4814Smrg 466b4d38c65Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 467b4d38c65Smrg# ----------------------------------- 468b4d38c65Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 469b4d38c65Smrg# expand to a commented shell variable setting: 470b4d38c65Smrg# 471b4d38c65Smrg# # Some comment about what VAR is for. 472b4d38c65Smrg# visible_name=$lt_internal_name 473b4d38c65Smrgm4_define([_LT_LIBTOOL_DECLARE], 474b4d38c65Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 475b4d38c65Smrg [description])))[]dnl 476b4d38c65Smrgm4_pushdef([_libtool_name], 477b4d38c65Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 478b4d38c65Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 479b4d38c65Smrg [0], [_libtool_name=[$]$1], 480b4d38c65Smrg [1], [_libtool_name=$lt_[]$1], 481b4d38c65Smrg [2], [_libtool_name=$lt_[]$1], 482b4d38c65Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 483b4d38c65Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 484b4d38c65Smrg]) 48515fb4814Smrg 48615fb4814Smrg 487b4d38c65Smrg# _LT_LIBTOOL_CONFIG_VARS 488b4d38c65Smrg# ----------------------- 489b4d38c65Smrg# Produce commented declarations of non-tagged libtool config variables 490b4d38c65Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 491b4d38c65Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 492b4d38c65Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 493b4d38c65Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 494b4d38c65Smrg[m4_foreach([_lt_var], 495b4d38c65Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 496b4d38c65Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 497b4d38c65Smrg 498b4d38c65Smrg 499b4d38c65Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 500b4d38c65Smrg# ------------------------- 501b4d38c65Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 502b4d38c65Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 503b4d38c65Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 504b4d38c65Smrg 505b4d38c65Smrg 506b4d38c65Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 507b4d38c65Smrg# ------------------------------ 508b4d38c65Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 509b4d38c65Smrg 510b4d38c65Smrg 511b4d38c65Smrg# _LT_CONFIG_COMMANDS 512b4d38c65Smrg# ------------------- 513b4d38c65Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 514b4d38c65Smrg# variables for single and double quote escaping we saved from calls 515b4d38c65Smrg# to _LT_DECL, we can put quote escaped variables declarations 516b4d38c65Smrg# into `config.status', and then the shell code to quote escape them in 517b4d38c65Smrg# for loops in `config.status'. Finally, any additional code accumulated 518b4d38c65Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 519b4d38c65Smrgm4_defun([_LT_CONFIG_COMMANDS], 520b4d38c65Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 521b4d38c65Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 522b4d38c65Smrg dnl instead of duplicating it all over again into config.status, 523b4d38c65Smrg dnl then we will have config.status run $CONFIG_LT later, so it 524b4d38c65Smrg dnl needs to know what name is stored there: 525b4d38c65Smrg [AC_CONFIG_COMMANDS([libtool], 526b4d38c65Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 527b4d38c65Smrg dnl If the libtool generation code is destined for config.status, 528b4d38c65Smrg dnl expand the accumulated commands and init code now: 529b4d38c65Smrg [AC_CONFIG_COMMANDS([libtool], 530b4d38c65Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 531b4d38c65Smrg])#_LT_CONFIG_COMMANDS 532b4d38c65Smrg 533b4d38c65Smrg 534b4d38c65Smrg# Initialize. 535b4d38c65Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 536b4d38c65Smrg[ 537b4d38c65Smrg 538b4d38c65Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 539b4d38c65Smrg# if CDPATH is set. 540b4d38c65Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 541b4d38c65Smrg 542b4d38c65Smrgsed_quote_subst='$sed_quote_subst' 543b4d38c65Smrgdouble_quote_subst='$double_quote_subst' 544b4d38c65Smrgdelay_variable_subst='$delay_variable_subst' 545b4d38c65Smrg_LT_CONFIG_STATUS_DECLARATIONS 546b4d38c65SmrgLTCC='$LTCC' 547b4d38c65SmrgLTCFLAGS='$LTCFLAGS' 548b4d38c65Smrgcompiler='$compiler_DEFAULT' 549b4d38c65Smrg 550b4d38c65Smrg# A function that is used when there is no print builtin or printf. 551b4d38c65Smrgfunc_fallback_echo () 552b4d38c65Smrg{ 553b4d38c65Smrg eval 'cat <<_LTECHO_EOF 554b4d38c65Smrg\$[]1 555b4d38c65Smrg_LTECHO_EOF' 556b4d38c65Smrg} 557b4d38c65Smrg 558b4d38c65Smrg# Quote evaled strings. 559b4d38c65Smrgfor var in lt_decl_all_varnames([[ \ 560b4d38c65Smrg]], lt_decl_quote_varnames); do 561b4d38c65Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 562b4d38c65Smrg *[[\\\\\\\`\\"\\\$]]*) 563b4d38c65Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 564b534f209Smrg ;; 565b4d38c65Smrg *) 566b4d38c65Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 567b534f209Smrg ;; 56815fb4814Smrg esac 569b4d38c65Smrgdone 570b4d38c65Smrg 571b4d38c65Smrg# Double-quote double-evaled strings. 572b4d38c65Smrgfor var in lt_decl_all_varnames([[ \ 573b4d38c65Smrg]], lt_decl_dquote_varnames); do 574b4d38c65Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 575b4d38c65Smrg *[[\\\\\\\`\\"\\\$]]*) 576b4d38c65Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 577b534f209Smrg ;; 578b4d38c65Smrg *) 579b4d38c65Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 580b534f209Smrg ;; 581b534f209Smrg esac 582b4d38c65Smrgdone 583b4d38c65Smrg 584b4d38c65Smrg_LT_OUTPUT_LIBTOOL_INIT 585b4d38c65Smrg]) 586b4d38c65Smrg 587b4d38c65Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 588b4d38c65Smrg# ------------------------------------ 589b4d38c65Smrg# Generate a child script FILE with all initialization necessary to 590b4d38c65Smrg# reuse the environment learned by the parent script, and make the 591b4d38c65Smrg# file executable. If COMMENT is supplied, it is inserted after the 592b4d38c65Smrg# `#!' sequence but before initialization text begins. After this 593b4d38c65Smrg# macro, additional text can be appended to FILE to form the body of 594b4d38c65Smrg# the child script. The macro ends with non-zero status if the 595b4d38c65Smrg# file could not be fully written (such as if the disk is full). 596b4d38c65Smrgm4_ifdef([AS_INIT_GENERATED], 597b4d38c65Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 598b4d38c65Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 599b4d38c65Smrg[m4_require([AS_PREPARE])]dnl 600b4d38c65Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 601b4d38c65Smrg[lt_write_fail=0 602b4d38c65Smrgcat >$1 <<_ASEOF || lt_write_fail=1 603b4d38c65Smrg#! $SHELL 604b4d38c65Smrg# Generated by $as_me. 605b4d38c65Smrg$2 606b4d38c65SmrgSHELL=\${CONFIG_SHELL-$SHELL} 607b4d38c65Smrgexport SHELL 608b4d38c65Smrg_ASEOF 609b4d38c65Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 610b4d38c65SmrgAS_SHELL_SANITIZE 611b4d38c65Smrg_AS_PREPARE 612b4d38c65Smrgexec AS_MESSAGE_FD>&1 613b4d38c65Smrg_ASEOF 614b4d38c65Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 615b4d38c65Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 616b4d38c65Smrg 617b4d38c65Smrg# LT_OUTPUT 618b4d38c65Smrg# --------- 619b4d38c65Smrg# This macro allows early generation of the libtool script (before 620b4d38c65Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 621b4d38c65Smrg# tests. 622b4d38c65SmrgAC_DEFUN([LT_OUTPUT], 623b4d38c65Smrg[: ${CONFIG_LT=./config.lt} 624b4d38c65SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 625b4d38c65Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 626b4d38c65Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 627b4d38c65Smrg 628b4d38c65Smrgcat >>"$CONFIG_LT" <<\_LTEOF 629b4d38c65Smrglt_cl_silent=false 630b4d38c65Smrgexec AS_MESSAGE_LOG_FD>>config.log 631b4d38c65Smrg{ 632b4d38c65Smrg echo 633b4d38c65Smrg AS_BOX([Running $as_me.]) 634b4d38c65Smrg} >&AS_MESSAGE_LOG_FD 635b4d38c65Smrg 636b4d38c65Smrglt_cl_help="\ 637b4d38c65Smrg\`$as_me' creates a local libtool stub from the current configuration, 638b4d38c65Smrgfor use in further configure time tests before the real libtool is 639b4d38c65Smrggenerated. 640b4d38c65Smrg 641b4d38c65SmrgUsage: $[0] [[OPTIONS]] 642b4d38c65Smrg 643b4d38c65Smrg -h, --help print this help, then exit 644b4d38c65Smrg -V, --version print version number, then exit 645b4d38c65Smrg -q, --quiet do not print progress messages 646b4d38c65Smrg -d, --debug don't remove temporary files 647b4d38c65Smrg 648b4d38c65SmrgReport bugs to <bug-libtool@gnu.org>." 649b4d38c65Smrg 650b4d38c65Smrglt_cl_version="\ 651b4d38c65Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 652b4d38c65Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 653b4d38c65Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 654b4d38c65Smrg 6557fe5393cSmrgCopyright (C) 2010 Free Software Foundation, Inc. 656b4d38c65SmrgThis config.lt script is free software; the Free Software Foundation 657b4d38c65Smrggives unlimited permision to copy, distribute and modify it." 658b4d38c65Smrg 659b4d38c65Smrgwhile test $[#] != 0 660b4d38c65Smrgdo 661b4d38c65Smrg case $[1] in 662b4d38c65Smrg --version | --v* | -V ) 663b4d38c65Smrg echo "$lt_cl_version"; exit 0 ;; 664b4d38c65Smrg --help | --h* | -h ) 665b4d38c65Smrg echo "$lt_cl_help"; exit 0 ;; 666b4d38c65Smrg --debug | --d* | -d ) 667b4d38c65Smrg debug=: ;; 668b4d38c65Smrg --quiet | --q* | --silent | --s* | -q ) 669b4d38c65Smrg lt_cl_silent=: ;; 670b4d38c65Smrg 671b4d38c65Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 672b4d38c65SmrgTry \`$[0] --help' for more information.]) ;; 673b4d38c65Smrg 674b4d38c65Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 675b4d38c65SmrgTry \`$[0] --help' for more information.]) ;; 676b4d38c65Smrg esac 677b4d38c65Smrg shift 678b4d38c65Smrgdone 679b4d38c65Smrg 680b4d38c65Smrgif $lt_cl_silent; then 681b4d38c65Smrg exec AS_MESSAGE_FD>/dev/null 682b4d38c65Smrgfi 683b4d38c65Smrg_LTEOF 684b4d38c65Smrg 685b4d38c65Smrgcat >>"$CONFIG_LT" <<_LTEOF 686b4d38c65Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 687b4d38c65Smrg_LTEOF 688b4d38c65Smrg 689b4d38c65Smrgcat >>"$CONFIG_LT" <<\_LTEOF 690b4d38c65SmrgAC_MSG_NOTICE([creating $ofile]) 691b4d38c65Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 692b4d38c65SmrgAS_EXIT(0) 693b4d38c65Smrg_LTEOF 694b4d38c65Smrgchmod +x "$CONFIG_LT" 695b4d38c65Smrg 696b4d38c65Smrg# configure is writing to config.log, but config.lt does its own redirection, 697b4d38c65Smrg# appending to config.log, which fails on DOS, as config.log is still kept 698b4d38c65Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 699b4d38c65Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 700b4d38c65Smrglt_cl_success=: 701b4d38c65Smrgtest "$silent" = yes && 702b4d38c65Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 703b4d38c65Smrgexec AS_MESSAGE_LOG_FD>/dev/null 704b4d38c65Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 705b4d38c65Smrgexec AS_MESSAGE_LOG_FD>>config.log 706b4d38c65Smrg$lt_cl_success || AS_EXIT(1) 707b4d38c65Smrg])# LT_OUTPUT 708b4d38c65Smrg 709b4d38c65Smrg 710b4d38c65Smrg# _LT_CONFIG(TAG) 711b4d38c65Smrg# --------------- 712b4d38c65Smrg# If TAG is the built-in tag, create an initial libtool script with a 713b4d38c65Smrg# default configuration from the untagged config vars. Otherwise add code 714b4d38c65Smrg# to config.status for appending the configuration named by TAG from the 715b4d38c65Smrg# matching tagged config vars. 716b4d38c65Smrgm4_defun([_LT_CONFIG], 717b4d38c65Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 718b4d38c65Smrg_LT_CONFIG_SAVE_COMMANDS([ 719b4d38c65Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 720b4d38c65Smrg m4_if(_LT_TAG, [C], [ 721b4d38c65Smrg # See if we are running on zsh, and set the options which allow our 722b4d38c65Smrg # commands through without removal of \ escapes. 723b4d38c65Smrg if test -n "${ZSH_VERSION+set}" ; then 724b4d38c65Smrg setopt NO_GLOB_SUBST 725b4d38c65Smrg fi 726b4d38c65Smrg 727b4d38c65Smrg cfgfile="${ofile}T" 728b4d38c65Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 729b4d38c65Smrg $RM "$cfgfile" 730b4d38c65Smrg 731b4d38c65Smrg cat <<_LT_EOF >> "$cfgfile" 732b4d38c65Smrg#! $SHELL 733b4d38c65Smrg 734b4d38c65Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 735b4d38c65Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 736b4d38c65Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 737b4d38c65Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 738b4d38c65Smrg# 739b4d38c65Smrg_LT_COPYING 740b4d38c65Smrg_LT_LIBTOOL_TAGS 741b4d38c65Smrg 742b4d38c65Smrg# ### BEGIN LIBTOOL CONFIG 743b4d38c65Smrg_LT_LIBTOOL_CONFIG_VARS 744b4d38c65Smrg_LT_LIBTOOL_TAG_VARS 745b4d38c65Smrg# ### END LIBTOOL CONFIG 746b4d38c65Smrg 747b4d38c65Smrg_LT_EOF 748b4d38c65Smrg 749b4d38c65Smrg case $host_os in 750b4d38c65Smrg aix3*) 751b4d38c65Smrg cat <<\_LT_EOF >> "$cfgfile" 752b4d38c65Smrg# AIX sometimes has problems with the GCC collect2 program. For some 753b4d38c65Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 754b4d38c65Smrg# vanish in a puff of smoke. 755b4d38c65Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 756b4d38c65Smrg COLLECT_NAMES= 757b4d38c65Smrg export COLLECT_NAMES 758b4d38c65Smrgfi 759b4d38c65Smrg_LT_EOF 760b4d38c65Smrg ;; 761b4d38c65Smrg esac 762b4d38c65Smrg 763b4d38c65Smrg _LT_PROG_LTMAIN 764b4d38c65Smrg 765b4d38c65Smrg # We use sed instead of cat because bash on DJGPP gets confused if 766b4d38c65Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 767b4d38c65Smrg # text mode, it properly converts lines to CR/LF. This bash problem 768b4d38c65Smrg # is reportedly fixed, but why not run on old versions too? 769b4d38c65Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 770b4d38c65Smrg || (rm -f "$cfgfile"; exit 1) 771b4d38c65Smrg 772b4d38c65Smrg _LT_PROG_REPLACE_SHELLFNS 773b4d38c65Smrg 774b4d38c65Smrg mv -f "$cfgfile" "$ofile" || 775b4d38c65Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 776b4d38c65Smrg chmod +x "$ofile" 777b4d38c65Smrg], 778b4d38c65Smrg[cat <<_LT_EOF >> "$ofile" 779b4d38c65Smrg 780b4d38c65Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 781b4d38c65Smrgdnl in a comment (ie after a #). 782b4d38c65Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 783b4d38c65Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 784b4d38c65Smrg# ### END LIBTOOL TAG CONFIG: $1 785b4d38c65Smrg_LT_EOF 786b4d38c65Smrg])dnl /m4_if 787b4d38c65Smrg], 788b4d38c65Smrg[m4_if([$1], [], [ 789b4d38c65Smrg PACKAGE='$PACKAGE' 790b4d38c65Smrg VERSION='$VERSION' 791b4d38c65Smrg TIMESTAMP='$TIMESTAMP' 792b4d38c65Smrg RM='$RM' 793b4d38c65Smrg ofile='$ofile'], []) 794b4d38c65Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 795b4d38c65Smrg])# _LT_CONFIG 796b4d38c65Smrg 797b4d38c65Smrg 798b4d38c65Smrg# LT_SUPPORTED_TAG(TAG) 799b4d38c65Smrg# --------------------- 800b4d38c65Smrg# Trace this macro to discover what tags are supported by the libtool 801b4d38c65Smrg# --tag option, using: 802b4d38c65Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 803b4d38c65SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 804b4d38c65Smrg 805b4d38c65Smrg 806b4d38c65Smrg# C support is built-in for now 807b4d38c65Smrgm4_define([_LT_LANG_C_enabled], []) 808b4d38c65Smrgm4_define([_LT_TAGS], []) 809b4d38c65Smrg 810b4d38c65Smrg 811b4d38c65Smrg# LT_LANG(LANG) 812b4d38c65Smrg# ------------- 813b4d38c65Smrg# Enable libtool support for the given language if not already enabled. 814b4d38c65SmrgAC_DEFUN([LT_LANG], 815b4d38c65Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 816b4d38c65Smrgm4_case([$1], 817b4d38c65Smrg [C], [_LT_LANG(C)], 818b4d38c65Smrg [C++], [_LT_LANG(CXX)], 819b4d38c65Smrg [Java], [_LT_LANG(GCJ)], 820b4d38c65Smrg [Fortran 77], [_LT_LANG(F77)], 821b4d38c65Smrg [Fortran], [_LT_LANG(FC)], 822b4d38c65Smrg [Windows Resource], [_LT_LANG(RC)], 823b4d38c65Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 824b4d38c65Smrg [_LT_LANG($1)], 825b4d38c65Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 826b4d38c65Smrg])# LT_LANG 827b4d38c65Smrg 828b4d38c65Smrg 829b4d38c65Smrg# _LT_LANG(LANGNAME) 830b4d38c65Smrg# ------------------ 831b4d38c65Smrgm4_defun([_LT_LANG], 832b4d38c65Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 833b4d38c65Smrg [LT_SUPPORTED_TAG([$1])dnl 834b4d38c65Smrg m4_append([_LT_TAGS], [$1 ])dnl 835b4d38c65Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 836b4d38c65Smrg _LT_LANG_$1_CONFIG($1)])dnl 837b4d38c65Smrg])# _LT_LANG 838b4d38c65Smrg 839b4d38c65Smrg 840b4d38c65Smrg# _LT_LANG_DEFAULT_CONFIG 841b4d38c65Smrg# ----------------------- 842b4d38c65Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 843b4d38c65Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 844b4d38c65Smrg [LT_LANG(CXX)], 845b4d38c65Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 846b4d38c65Smrg 847b4d38c65SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 848b4d38c65Smrg [LT_LANG(F77)], 849b4d38c65Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 850b4d38c65Smrg 851b4d38c65SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 852b4d38c65Smrg [LT_LANG(FC)], 853b4d38c65Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 854b4d38c65Smrg 855b4d38c65Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 856b4d38c65Smrgdnl pulling things in needlessly. 857b4d38c65SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 858b4d38c65Smrg [LT_LANG(GCJ)], 859b4d38c65Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 860b4d38c65Smrg [LT_LANG(GCJ)], 861b4d38c65Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 862b4d38c65Smrg [LT_LANG(GCJ)], 863b4d38c65Smrg [m4_ifdef([AC_PROG_GCJ], 864b4d38c65Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 865b4d38c65Smrg m4_ifdef([A][M_PROG_GCJ], 866b4d38c65Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 867b4d38c65Smrg m4_ifdef([LT_PROG_GCJ], 868b4d38c65Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 869b4d38c65Smrg 870b4d38c65SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 871b4d38c65Smrg [LT_LANG(RC)], 872b4d38c65Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 873b4d38c65Smrg])# _LT_LANG_DEFAULT_CONFIG 874b4d38c65Smrg 875b4d38c65Smrg# Obsolete macros: 876b4d38c65SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 877b4d38c65SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 878b4d38c65SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 879b4d38c65SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 880b4d38c65SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 881b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 882b4d38c65Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 883b4d38c65Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 884b4d38c65Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 885b4d38c65Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 886b4d38c65Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 887b4d38c65Smrg 888b4d38c65Smrg 889b4d38c65Smrg# _LT_TAG_COMPILER 890b4d38c65Smrg# ---------------- 891b4d38c65Smrgm4_defun([_LT_TAG_COMPILER], 892b4d38c65Smrg[AC_REQUIRE([AC_PROG_CC])dnl 893b4d38c65Smrg 894b4d38c65Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 895b4d38c65Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 896b4d38c65Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 897b4d38c65Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 898b4d38c65Smrg 899b4d38c65Smrg# If no C compiler was specified, use CC. 900b4d38c65SmrgLTCC=${LTCC-"$CC"} 901b4d38c65Smrg 902b4d38c65Smrg# If no C compiler flags were specified, use CFLAGS. 903b4d38c65SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 904b4d38c65Smrg 905b4d38c65Smrg# Allow CC to be a program name with arguments. 906b4d38c65Smrgcompiler=$CC 907b4d38c65Smrg])# _LT_TAG_COMPILER 908b4d38c65Smrg 909b4d38c65Smrg 910b4d38c65Smrg# _LT_COMPILER_BOILERPLATE 911b4d38c65Smrg# ------------------------ 912b4d38c65Smrg# Check for compiler boilerplate output or warnings with 913b4d38c65Smrg# the simple compiler test code. 914b4d38c65Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 915b4d38c65Smrg[m4_require([_LT_DECL_SED])dnl 916b4d38c65Smrgac_outfile=conftest.$ac_objext 917b4d38c65Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 918b4d38c65Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 919b4d38c65Smrg_lt_compiler_boilerplate=`cat conftest.err` 920b4d38c65Smrg$RM conftest* 921b4d38c65Smrg])# _LT_COMPILER_BOILERPLATE 922b4d38c65Smrg 923b4d38c65Smrg 924b4d38c65Smrg# _LT_LINKER_BOILERPLATE 925b4d38c65Smrg# ---------------------- 926b4d38c65Smrg# Check for linker boilerplate output or warnings with 927b4d38c65Smrg# the simple link test code. 928b4d38c65Smrgm4_defun([_LT_LINKER_BOILERPLATE], 929b4d38c65Smrg[m4_require([_LT_DECL_SED])dnl 930b4d38c65Smrgac_outfile=conftest.$ac_objext 931b4d38c65Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 932b4d38c65Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 933b4d38c65Smrg_lt_linker_boilerplate=`cat conftest.err` 934b4d38c65Smrg$RM -r conftest* 935b4d38c65Smrg])# _LT_LINKER_BOILERPLATE 936b4d38c65Smrg 937b4d38c65Smrg# _LT_REQUIRED_DARWIN_CHECKS 938b4d38c65Smrg# ------------------------- 939b4d38c65Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 940b4d38c65Smrg case $host_os in 941b4d38c65Smrg rhapsody* | darwin*) 942b4d38c65Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 943b4d38c65Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 944b4d38c65Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 945b4d38c65Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 946b4d38c65Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 947b4d38c65Smrg _LT_DECL([], [DSYMUTIL], [1], 948b4d38c65Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 949b4d38c65Smrg _LT_DECL([], [NMEDIT], [1], 950b4d38c65Smrg [Tool to change global to local symbols on Mac OS X]) 951b4d38c65Smrg _LT_DECL([], [LIPO], [1], 952b4d38c65Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 953b4d38c65Smrg _LT_DECL([], [OTOOL], [1], 954b4d38c65Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 955b4d38c65Smrg _LT_DECL([], [OTOOL64], [1], 956b4d38c65Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 957b4d38c65Smrg 958b4d38c65Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 959b4d38c65Smrg [lt_cv_apple_cc_single_mod=no 960b4d38c65Smrg if test -z "${LT_MULTI_MODULE}"; then 961b4d38c65Smrg # By default we will add the -single_module flag. You can override 962b4d38c65Smrg # by either setting the environment variable LT_MULTI_MODULE 963b4d38c65Smrg # non-empty at configure time, or by adding -multi_module to the 964b4d38c65Smrg # link flags. 965b4d38c65Smrg rm -rf libconftest.dylib* 966b4d38c65Smrg echo "int foo(void){return 1;}" > conftest.c 967b4d38c65Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 968b4d38c65Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 969b4d38c65Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 970b4d38c65Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 971b4d38c65Smrg _lt_result=$? 9727fe5393cSmrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 973b4d38c65Smrg lt_cv_apple_cc_single_mod=yes 974b4d38c65Smrg else 975b4d38c65Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 976b4d38c65Smrg fi 977b4d38c65Smrg rm -rf libconftest.dylib* 978b4d38c65Smrg rm -f conftest.* 979b4d38c65Smrg fi]) 980b4d38c65Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 981b4d38c65Smrg [lt_cv_ld_exported_symbols_list], 982b4d38c65Smrg [lt_cv_ld_exported_symbols_list=no 983b4d38c65Smrg save_LDFLAGS=$LDFLAGS 984b4d38c65Smrg echo "_main" > conftest.sym 985b4d38c65Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 986b4d38c65Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 987b4d38c65Smrg [lt_cv_ld_exported_symbols_list=yes], 988b4d38c65Smrg [lt_cv_ld_exported_symbols_list=no]) 989b4d38c65Smrg LDFLAGS="$save_LDFLAGS" 990b4d38c65Smrg ]) 991b4d38c65Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 992b4d38c65Smrg [lt_cv_ld_force_load=no 993b4d38c65Smrg cat > conftest.c << _LT_EOF 994b4d38c65Smrgint forced_loaded() { return 2;} 995b4d38c65Smrg_LT_EOF 996b4d38c65Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 997b4d38c65Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 998b4d38c65Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 999b4d38c65Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1000b4d38c65Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1001b4d38c65Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1002b4d38c65Smrg cat > conftest.c << _LT_EOF 1003b4d38c65Smrgint main() { return 0;} 1004b4d38c65Smrg_LT_EOF 1005b4d38c65Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1006b4d38c65Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1007b4d38c65Smrg _lt_result=$? 10087fe5393cSmrg if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 1009b4d38c65Smrg lt_cv_ld_force_load=yes 1010b4d38c65Smrg else 1011b4d38c65Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1012b4d38c65Smrg fi 1013b4d38c65Smrg rm -f conftest.err libconftest.a conftest conftest.c 1014b4d38c65Smrg rm -rf conftest.dSYM 1015b4d38c65Smrg ]) 1016b4d38c65Smrg case $host_os in 1017b4d38c65Smrg rhapsody* | darwin1.[[012]]) 1018b4d38c65Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 1019b4d38c65Smrg darwin1.*) 1020b4d38c65Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1021b4d38c65Smrg darwin*) # darwin 5.x on 1022b4d38c65Smrg # if running on 10.5 or later, the deployment target defaults 1023b4d38c65Smrg # to the OS version, if on x86, and 10.4, the deployment 1024b4d38c65Smrg # target defaults to 10.4. Don't you love it? 1025b4d38c65Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1026b4d38c65Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1027b4d38c65Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1028b4d38c65Smrg 10.[[012]]*) 1029b4d38c65Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1030b4d38c65Smrg 10.*) 1031b4d38c65Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1032b4d38c65Smrg esac 1033b4d38c65Smrg ;; 1034b4d38c65Smrg esac 1035b4d38c65Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 1036b4d38c65Smrg _lt_dar_single_mod='$single_module' 1037b4d38c65Smrg fi 1038b4d38c65Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 1039b4d38c65Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 1040b4d38c65Smrg else 1041b4d38c65Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 1042b4d38c65Smrg fi 1043b4d38c65Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1044b4d38c65Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1045b4d38c65Smrg else 1046b4d38c65Smrg _lt_dsymutil= 1047b4d38c65Smrg fi 1048b4d38c65Smrg ;; 1049b4d38c65Smrg esac 1050b4d38c65Smrg]) 1051b4d38c65Smrg 1052b4d38c65Smrg 10537fe5393cSmrg# _LT_DARWIN_LINKER_FEATURES 10547fe5393cSmrg# -------------------------- 1055b4d38c65Smrg# Checks for linker and compiler features on darwin 1056b4d38c65Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1057b4d38c65Smrg[ 1058b4d38c65Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1059b4d38c65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1060b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1061b4d38c65Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1062b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1063b4d38c65Smrg if test "$lt_cv_ld_force_load" = "yes"; then 1064b4d38c65Smrg _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\"`' 1065b4d38c65Smrg else 1066b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1067b4d38c65Smrg fi 1068b4d38c65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1069b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1070b4d38c65Smrg case $cc_basename in 1071b4d38c65Smrg ifort*) _lt_dar_can_shared=yes ;; 1072b4d38c65Smrg *) _lt_dar_can_shared=$GCC ;; 1073b4d38c65Smrg esac 1074b4d38c65Smrg if test "$_lt_dar_can_shared" = "yes"; then 1075b4d38c65Smrg output_verbose_link_cmd=func_echo_all 1076b4d38c65Smrg _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}" 1077b4d38c65Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1078b4d38c65Smrg _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}" 1079b4d38c65Smrg _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}" 1080b4d38c65Smrg m4_if([$1], [CXX], 1081b4d38c65Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1082b4d38c65Smrg _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}" 1083b4d38c65Smrg _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}" 1084b4d38c65Smrg fi 1085b4d38c65Smrg],[]) 1086b4d38c65Smrg else 1087b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1088b4d38c65Smrg fi 1089b4d38c65Smrg]) 1090b4d38c65Smrg 1091b4d38c65Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1092b4d38c65Smrg# ---------------------------------- 1093b4d38c65Smrg# Links a minimal program and checks the executable 1094b4d38c65Smrg# for the system default hardcoded library path. In most cases, 1095b4d38c65Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 1096b4d38c65Smrg# the location of the communication and MPI libs are included too. 1097b4d38c65Smrg# If we don't find anything, use the default library path according 1098b4d38c65Smrg# to the aix ld manual. 1099b4d38c65Smrg# Store the results from the different compilers for each TAGNAME. 1100b4d38c65Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 1101b4d38c65Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1102b4d38c65Smrg[m4_require([_LT_DECL_SED])dnl 1103b4d38c65Smrgif test "${lt_cv_aix_libpath+set}" = set; then 1104b4d38c65Smrg aix_libpath=$lt_cv_aix_libpath 1105b4d38c65Smrgelse 1106b4d38c65Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1107b4d38c65Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1108b4d38c65Smrg lt_aix_libpath_sed='[ 1109b4d38c65Smrg /Import File Strings/,/^$/ { 1110b4d38c65Smrg /^0/ { 1111b4d38c65Smrg s/^0 *\([^ ]*\) *$/\1/ 1112b4d38c65Smrg p 1113b4d38c65Smrg } 1114b4d38c65Smrg }]' 1115b4d38c65Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1116b4d38c65Smrg # Check for a 64-bit object if we didn't find anything. 1117b4d38c65Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1118b4d38c65Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1119b4d38c65Smrg fi],[]) 1120b4d38c65Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1121b4d38c65Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1122b4d38c65Smrg fi 1123b4d38c65Smrg ]) 1124b4d38c65Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1125b4d38c65Smrgfi 1126b4d38c65Smrg])# _LT_SYS_MODULE_PATH_AIX 1127b4d38c65Smrg 1128b4d38c65Smrg 1129b4d38c65Smrg# _LT_SHELL_INIT(ARG) 1130b4d38c65Smrg# ------------------- 1131b4d38c65Smrgm4_define([_LT_SHELL_INIT], 1132b4d38c65Smrg[m4_divert_text([M4SH-INIT], [$1 1133b4d38c65Smrg])])# _LT_SHELL_INIT 1134b4d38c65Smrg 1135b4d38c65Smrg 1136b4d38c65Smrg 1137b4d38c65Smrg# _LT_PROG_ECHO_BACKSLASH 1138b4d38c65Smrg# ----------------------- 1139b4d38c65Smrg# Find how we can fake an echo command that does not interpret backslash. 1140b4d38c65Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 1141b4d38c65Smrg# of the generated configure script which will find a shell with a builtin 1142b4d38c65Smrg# printf (which we can use as an echo command). 1143b4d38c65Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1144b4d38c65Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1145b4d38c65SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1146b4d38c65SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1147b4d38c65Smrg 1148b4d38c65SmrgAC_MSG_CHECKING([how to print strings]) 1149b4d38c65Smrg# Test print first, because it will be a builtin if present. 1150b4d38c65Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1151b4d38c65Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1152b4d38c65Smrg ECHO='print -r --' 1153b4d38c65Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1154b4d38c65Smrg ECHO='printf %s\n' 1155b4d38c65Smrgelse 1156b4d38c65Smrg # Use this function as a fallback that always works. 1157b4d38c65Smrg func_fallback_echo () 1158b4d38c65Smrg { 1159b4d38c65Smrg eval 'cat <<_LTECHO_EOF 1160b4d38c65Smrg$[]1 1161b4d38c65Smrg_LTECHO_EOF' 1162b4d38c65Smrg } 1163b4d38c65Smrg ECHO='func_fallback_echo' 1164b4d38c65Smrgfi 1165b4d38c65Smrg 1166b4d38c65Smrg# func_echo_all arg... 1167b4d38c65Smrg# Invoke $ECHO with all args, space-separated. 1168b4d38c65Smrgfunc_echo_all () 1169b4d38c65Smrg{ 1170b4d38c65Smrg $ECHO "$*" 1171b4d38c65Smrg} 1172b4d38c65Smrg 1173b4d38c65Smrgcase "$ECHO" in 1174b4d38c65Smrg printf*) AC_MSG_RESULT([printf]) ;; 1175b4d38c65Smrg print*) AC_MSG_RESULT([print -r]) ;; 1176b4d38c65Smrg *) AC_MSG_RESULT([cat]) ;; 1177b4d38c65Smrgesac 1178b4d38c65Smrg 1179b4d38c65Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 1180b4d38c65Smrg[_AS_DETECT_SUGGESTED([ 1181b4d38c65Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1182b4d38c65Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1183b4d38c65Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1184b4d38c65Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1185b4d38c65Smrg PATH=/empty FPATH=/empty; export PATH FPATH 1186b4d38c65Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1187b4d38c65Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1188b4d38c65Smrg 1189b4d38c65Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1190b4d38c65Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1191b4d38c65Smrg])# _LT_PROG_ECHO_BACKSLASH 1192b4d38c65Smrg 1193b4d38c65Smrg 1194b4d38c65Smrg# _LT_WITH_SYSROOT 1195b4d38c65Smrg# ---------------- 1196b4d38c65SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1197b4d38c65Smrg[AC_MSG_CHECKING([for sysroot]) 1198b4d38c65SmrgAC_ARG_WITH([sysroot], 1199b4d38c65Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1200b4d38c65Smrg (or the compiler's sysroot if not specified).], 1201b4d38c65Smrg[], [with_sysroot=no]) 1202b4d38c65Smrg 1203b4d38c65Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 1204b4d38c65Smrgdnl in case the user passed a directory name. 1205b4d38c65Smrglt_sysroot= 1206b4d38c65Smrgcase ${with_sysroot} in #( 1207b4d38c65Smrg yes) 1208b4d38c65Smrg if test "$GCC" = yes; then 1209b4d38c65Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1210b4d38c65Smrg fi 1211b4d38c65Smrg ;; #( 1212b4d38c65Smrg /*) 1213b4d38c65Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1214b4d38c65Smrg ;; #( 1215b4d38c65Smrg no|'') 1216b4d38c65Smrg ;; #( 1217b4d38c65Smrg *) 1218b4d38c65Smrg AC_MSG_RESULT([${with_sysroot}]) 1219b4d38c65Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1220b4d38c65Smrg ;; 1221b4d38c65Smrgesac 1222b4d38c65Smrg 1223b4d38c65Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1224b4d38c65Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1225b4d38c65Smrg[dependent libraries, and in which our libraries should be installed.])]) 1226b4d38c65Smrg 1227b4d38c65Smrg# _LT_ENABLE_LOCK 1228b4d38c65Smrg# --------------- 1229b4d38c65Smrgm4_defun([_LT_ENABLE_LOCK], 1230b4d38c65Smrg[AC_ARG_ENABLE([libtool-lock], 1231b4d38c65Smrg [AS_HELP_STRING([--disable-libtool-lock], 1232b4d38c65Smrg [avoid locking (might break parallel builds)])]) 1233b4d38c65Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1234b4d38c65Smrg 1235b4d38c65Smrg# Some flags need to be propagated to the compiler or linker for good 1236b4d38c65Smrg# libtool support. 1237b4d38c65Smrgcase $host in 1238b4d38c65Smrgia64-*-hpux*) 1239b4d38c65Smrg # Find out which ABI we are using. 1240b4d38c65Smrg echo 'int i;' > conftest.$ac_ext 1241b4d38c65Smrg if AC_TRY_EVAL(ac_compile); then 1242b534f209Smrg case `/usr/bin/file conftest.$ac_objext` in 1243b4d38c65Smrg *ELF-32*) 1244b4d38c65Smrg HPUX_IA64_MODE="32" 1245b4d38c65Smrg ;; 1246b4d38c65Smrg *ELF-64*) 1247b4d38c65Smrg HPUX_IA64_MODE="64" 1248b4d38c65Smrg ;; 1249b534f209Smrg esac 1250b4d38c65Smrg fi 1251b4d38c65Smrg rm -rf conftest* 1252b4d38c65Smrg ;; 1253b4d38c65Smrg*-*-irix6*) 1254b4d38c65Smrg # Find out which ABI we are using. 1255b4d38c65Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1256b4d38c65Smrg if AC_TRY_EVAL(ac_compile); then 1257b4d38c65Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 1258b4d38c65Smrg case `/usr/bin/file conftest.$ac_objext` in 1259b4d38c65Smrg *32-bit*) 1260b4d38c65Smrg LD="${LD-ld} -melf32bsmip" 1261b4d38c65Smrg ;; 1262b4d38c65Smrg *N32*) 1263b4d38c65Smrg LD="${LD-ld} -melf32bmipn32" 1264b4d38c65Smrg ;; 1265b4d38c65Smrg *64-bit*) 1266b4d38c65Smrg LD="${LD-ld} -melf64bmip" 1267b4d38c65Smrg ;; 1268b4d38c65Smrg esac 1269b4d38c65Smrg else 1270b4d38c65Smrg case `/usr/bin/file conftest.$ac_objext` in 1271b4d38c65Smrg *32-bit*) 1272b4d38c65Smrg LD="${LD-ld} -32" 1273b4d38c65Smrg ;; 1274b4d38c65Smrg *N32*) 1275b4d38c65Smrg LD="${LD-ld} -n32" 1276b4d38c65Smrg ;; 1277b4d38c65Smrg *64-bit*) 1278b4d38c65Smrg LD="${LD-ld} -64" 1279b4d38c65Smrg ;; 1280b4d38c65Smrg esac 1281b4d38c65Smrg fi 128215fb4814Smrg fi 128315fb4814Smrg rm -rf conftest* 128415fb4814Smrg ;; 128515fb4814Smrg 1286de78e416Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1287b4d38c65Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 128815fb4814Smrg # Find out which ABI we are using. 128915fb4814Smrg echo 'int i;' > conftest.$ac_ext 129015fb4814Smrg if AC_TRY_EVAL(ac_compile); then 129115fb4814Smrg case `/usr/bin/file conftest.o` in 1292b4d38c65Smrg *32-bit*) 1293b4d38c65Smrg case $host in 1294b4d38c65Smrg x86_64-*kfreebsd*-gnu) 1295b4d38c65Smrg LD="${LD-ld} -m elf_i386_fbsd" 1296b4d38c65Smrg ;; 1297b4d38c65Smrg x86_64-*linux*) 1298b4d38c65Smrg LD="${LD-ld} -m elf_i386" 1299b4d38c65Smrg ;; 1300b4d38c65Smrg ppc64-*linux*|powerpc64-*linux*) 1301b4d38c65Smrg LD="${LD-ld} -m elf32ppclinux" 1302b4d38c65Smrg ;; 1303b4d38c65Smrg s390x-*linux*) 1304b4d38c65Smrg LD="${LD-ld} -m elf_s390" 1305b4d38c65Smrg ;; 1306b4d38c65Smrg sparc64-*linux*) 1307b4d38c65Smrg LD="${LD-ld} -m elf32_sparc" 1308b4d38c65Smrg ;; 1309b4d38c65Smrg esac 1310b4d38c65Smrg ;; 1311b4d38c65Smrg *64-bit*) 1312b4d38c65Smrg case $host in 1313b4d38c65Smrg x86_64-*kfreebsd*-gnu) 1314b4d38c65Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1315b4d38c65Smrg ;; 1316b4d38c65Smrg x86_64-*linux*) 1317b4d38c65Smrg LD="${LD-ld} -m elf_x86_64" 1318b4d38c65Smrg ;; 1319b4d38c65Smrg ppc*-*linux*|powerpc*-*linux*) 1320b4d38c65Smrg LD="${LD-ld} -m elf64ppc" 1321b4d38c65Smrg ;; 1322b4d38c65Smrg s390*-*linux*|s390*-*tpf*) 1323b4d38c65Smrg LD="${LD-ld} -m elf64_s390" 1324b4d38c65Smrg ;; 1325b4d38c65Smrg sparc*-*linux*) 1326b4d38c65Smrg LD="${LD-ld} -m elf64_sparc" 1327b4d38c65Smrg ;; 1328b4d38c65Smrg esac 1329b4d38c65Smrg ;; 133015fb4814Smrg esac 133115fb4814Smrg fi 133215fb4814Smrg rm -rf conftest* 133315fb4814Smrg ;; 133415fb4814Smrg 133515fb4814Smrg*-*-sco3.2v5*) 133615fb4814Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 133715fb4814Smrg SAVE_CFLAGS="$CFLAGS" 133815fb4814Smrg CFLAGS="$CFLAGS -belf" 133915fb4814Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 134015fb4814Smrg [AC_LANG_PUSH(C) 1341b4d38c65Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 134215fb4814Smrg AC_LANG_POP]) 134315fb4814Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 134415fb4814Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 134515fb4814Smrg CFLAGS="$SAVE_CFLAGS" 134615fb4814Smrg fi 134715fb4814Smrg ;; 13487fe5393cSmrgsparc*-*solaris*) 134915fb4814Smrg # Find out which ABI we are using. 135015fb4814Smrg echo 'int i;' > conftest.$ac_ext 135115fb4814Smrg if AC_TRY_EVAL(ac_compile); then 135215fb4814Smrg case `/usr/bin/file conftest.o` in 135315fb4814Smrg *64-bit*) 135415fb4814Smrg case $lt_cv_prog_gnu_ld in 13557fe5393cSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 1356b4d38c65Smrg *) 1357b4d38c65Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1358b4d38c65Smrg LD="${LD-ld} -64" 1359b4d38c65Smrg fi 1360b4d38c65Smrg ;; 1361b4d38c65Smrg esac 1362b4d38c65Smrg ;; 1363b4d38c65Smrg esac 136415fb4814Smrg fi 136515fb4814Smrg rm -rf conftest* 136615fb4814Smrg ;; 136715fb4814Smrgesac 136815fb4814Smrg 136915fb4814Smrgneed_locks="$enable_libtool_lock" 1370b4d38c65Smrg])# _LT_ENABLE_LOCK 1371b4d38c65Smrg 1372b4d38c65Smrg 1373b4d38c65Smrg# _LT_PROG_AR 1374b4d38c65Smrg# ----------- 1375b4d38c65Smrgm4_defun([_LT_PROG_AR], 1376b4d38c65Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1377b4d38c65Smrg: ${AR=ar} 1378b4d38c65Smrg: ${AR_FLAGS=cru} 1379b4d38c65Smrg_LT_DECL([], [AR], [1], [The archiver]) 1380b4d38c65Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1381b4d38c65Smrg 1382b4d38c65SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1383b4d38c65Smrg [lt_cv_ar_at_file=no 1384b4d38c65Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1385b4d38c65Smrg [echo conftest.$ac_objext > conftest.lst 1386b4d38c65Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1387b4d38c65Smrg AC_TRY_EVAL([lt_ar_try]) 1388b4d38c65Smrg if test "$ac_status" -eq 0; then 1389b4d38c65Smrg # Ensure the archiver fails upon bogus file names. 1390b4d38c65Smrg rm -f conftest.$ac_objext libconftest.a 1391b4d38c65Smrg AC_TRY_EVAL([lt_ar_try]) 1392b4d38c65Smrg if test "$ac_status" -ne 0; then 1393b4d38c65Smrg lt_cv_ar_at_file=@ 1394b4d38c65Smrg fi 1395b4d38c65Smrg fi 1396b4d38c65Smrg rm -f conftest.* libconftest.a 1397b4d38c65Smrg ]) 1398b4d38c65Smrg ]) 1399b4d38c65Smrg 1400b4d38c65Smrgif test "x$lt_cv_ar_at_file" = xno; then 1401b4d38c65Smrg archiver_list_spec= 1402b4d38c65Smrgelse 1403b4d38c65Smrg archiver_list_spec=$lt_cv_ar_at_file 1404b4d38c65Smrgfi 1405b4d38c65Smrg_LT_DECL([], [archiver_list_spec], [1], 1406b4d38c65Smrg [How to feed a file listing to the archiver]) 1407b4d38c65Smrg])# _LT_PROG_AR 1408b4d38c65Smrg 1409b4d38c65Smrg 1410b4d38c65Smrg# _LT_CMD_OLD_ARCHIVE 1411b4d38c65Smrg# ------------------- 1412b4d38c65Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1413b4d38c65Smrg[_LT_PROG_AR 1414b4d38c65Smrg 1415b4d38c65SmrgAC_CHECK_TOOL(STRIP, strip, :) 1416b4d38c65Smrgtest -z "$STRIP" && STRIP=: 1417b4d38c65Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1418b4d38c65Smrg 1419b4d38c65SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1420b4d38c65Smrgtest -z "$RANLIB" && RANLIB=: 1421b4d38c65Smrg_LT_DECL([], [RANLIB], [1], 1422b4d38c65Smrg [Commands used to install an old-style archive]) 1423b4d38c65Smrg 1424b4d38c65Smrg# Determine commands to create old-style static archives. 1425b4d38c65Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1426b4d38c65Smrgold_postinstall_cmds='chmod 644 $oldlib' 1427b4d38c65Smrgold_postuninstall_cmds= 1428b4d38c65Smrg 1429b4d38c65Smrgif test -n "$RANLIB"; then 1430b4d38c65Smrg case $host_os in 1431b4d38c65Smrg openbsd*) 14327fe5393cSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1433b4d38c65Smrg ;; 1434b4d38c65Smrg *) 14357fe5393cSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1436b4d38c65Smrg ;; 1437b4d38c65Smrg esac 14387fe5393cSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1439b4d38c65Smrgfi 144015fb4814Smrg 1441b4d38c65Smrgcase $host_os in 1442b4d38c65Smrg darwin*) 1443b4d38c65Smrg lock_old_archive_extraction=yes ;; 1444b4d38c65Smrg *) 1445b4d38c65Smrg lock_old_archive_extraction=no ;; 1446b4d38c65Smrgesac 1447b4d38c65Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1448b4d38c65Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1449b4d38c65Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1450b4d38c65Smrg [Commands used to build an old-style archive]) 1451b4d38c65Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 1452b4d38c65Smrg [Whether to use a lock for old archive extraction]) 1453b4d38c65Smrg])# _LT_CMD_OLD_ARCHIVE 145415fb4814Smrg 145515fb4814Smrg 1456b4d38c65Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 145715fb4814Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 145815fb4814Smrg# ---------------------------------------------------------------- 145915fb4814Smrg# Check whether the given compiler option works 1460b4d38c65SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1461b4d38c65Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1462b4d38c65Smrgm4_require([_LT_DECL_SED])dnl 146315fb4814SmrgAC_CACHE_CHECK([$1], [$2], 146415fb4814Smrg [$2=no 1465b4d38c65Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1466de78e416Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 146715fb4814Smrg lt_compiler_flag="$3" 146815fb4814Smrg # Insert the option either (1) after the last *FLAGS variable, or 146915fb4814Smrg # (2) before a word containing "conftest.", or (3) at the end. 147015fb4814Smrg # Note that $ac_compile itself does not contain backslashes and begins 147115fb4814Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 147215fb4814Smrg # The option is referenced via a variable to avoid confusing sed. 147315fb4814Smrg lt_compile=`echo "$ac_compile" | $SED \ 147415fb4814Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 147515fb4814Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 147615fb4814Smrg -e 's:$: $lt_compiler_flag:'` 1477b4d38c65Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 147815fb4814Smrg (eval "$lt_compile" 2>conftest.err) 147915fb4814Smrg ac_status=$? 148015fb4814Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1481b4d38c65Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 148215fb4814Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 148315fb4814Smrg # The compiler can only warn and ignore the option if not recognized 148415fb4814Smrg # So say no if there are warnings other than the usual output. 1485b4d38c65Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 148615fb4814Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 148715fb4814Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 148815fb4814Smrg $2=yes 148915fb4814Smrg fi 149015fb4814Smrg fi 1491b4d38c65Smrg $RM conftest* 149215fb4814Smrg]) 149315fb4814Smrg 149415fb4814Smrgif test x"[$]$2" = xyes; then 1495b4d38c65Smrg m4_if([$5], , :, [$5]) 149615fb4814Smrgelse 1497b4d38c65Smrg m4_if([$6], , :, [$6]) 149815fb4814Smrgfi 1499b4d38c65Smrg])# _LT_COMPILER_OPTION 150015fb4814Smrg 1501b4d38c65Smrg# Old name: 1502b4d38c65SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1503b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 1504b4d38c65Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 150515fb4814Smrg 1506b4d38c65Smrg 1507b4d38c65Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1508b4d38c65Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1509b4d38c65Smrg# ---------------------------------------------------- 1510b4d38c65Smrg# Check whether the given linker option works 1511b4d38c65SmrgAC_DEFUN([_LT_LINKER_OPTION], 1512b4d38c65Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1513b4d38c65Smrgm4_require([_LT_DECL_SED])dnl 1514de78e416SmrgAC_CACHE_CHECK([$1], [$2], 151515fb4814Smrg [$2=no 151615fb4814Smrg save_LDFLAGS="$LDFLAGS" 151715fb4814Smrg LDFLAGS="$LDFLAGS $3" 1518de78e416Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 151915fb4814Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 152015fb4814Smrg # The linker can only warn and ignore the option if not recognized 152115fb4814Smrg # So say no if there are warnings 152215fb4814Smrg if test -s conftest.err; then 152315fb4814Smrg # Append any errors to the config.log. 152415fb4814Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1525b4d38c65Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 152615fb4814Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 152715fb4814Smrg if diff conftest.exp conftest.er2 >/dev/null; then 152815fb4814Smrg $2=yes 152915fb4814Smrg fi 153015fb4814Smrg else 153115fb4814Smrg $2=yes 153215fb4814Smrg fi 153315fb4814Smrg fi 1534b4d38c65Smrg $RM -r conftest* 153515fb4814Smrg LDFLAGS="$save_LDFLAGS" 153615fb4814Smrg]) 153715fb4814Smrg 153815fb4814Smrgif test x"[$]$2" = xyes; then 1539b4d38c65Smrg m4_if([$4], , :, [$4]) 154015fb4814Smrgelse 1541b4d38c65Smrg m4_if([$5], , :, [$5]) 154215fb4814Smrgfi 1543b4d38c65Smrg])# _LT_LINKER_OPTION 154415fb4814Smrg 1545b4d38c65Smrg# Old name: 1546b4d38c65SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1547b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 1548b4d38c65Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1549b410ddbeSmrg 1550b4d38c65Smrg 1551b4d38c65Smrg# LT_CMD_MAX_LEN 1552b4d38c65Smrg#--------------- 1553b4d38c65SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1554b4d38c65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1555b4d38c65Smrg# find the maximum length of command line arguments 155615fb4814SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 155715fb4814SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 155815fb4814Smrg i=0 155915fb4814Smrg teststring="ABCD" 156015fb4814Smrg 156115fb4814Smrg case $build_os in 156215fb4814Smrg msdosdjgpp*) 156315fb4814Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 156415fb4814Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 156515fb4814Smrg # during glob expansion). Even if it were fixed, the result of this 156615fb4814Smrg # check would be larger than it should be. 156715fb4814Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 156815fb4814Smrg ;; 156915fb4814Smrg 157015fb4814Smrg gnu*) 157115fb4814Smrg # Under GNU Hurd, this test is not required because there is 157215fb4814Smrg # no limit to the length of command line arguments. 157315fb4814Smrg # Libtool will interpret -1 as no limit whatsoever 157415fb4814Smrg lt_cv_sys_max_cmd_len=-1; 157515fb4814Smrg ;; 157615fb4814Smrg 1577b4d38c65Smrg cygwin* | mingw* | cegcc*) 157815fb4814Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 157915fb4814Smrg # about 5 minutes as the teststring grows exponentially. 158015fb4814Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 158115fb4814Smrg # you end up with a "frozen" computer, even though with patience 158215fb4814Smrg # the test eventually succeeds (with a max line length of 256k). 158315fb4814Smrg # Instead, let's just punt: use the minimum linelength reported by 158415fb4814Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 158515fb4814Smrg lt_cv_sys_max_cmd_len=8192; 158615fb4814Smrg ;; 158715fb4814Smrg 1588b4d38c65Smrg mint*) 1589b4d38c65Smrg # On MiNT this can take a long time and run out of memory. 1590b4d38c65Smrg lt_cv_sys_max_cmd_len=8192; 1591b4d38c65Smrg ;; 1592b4d38c65Smrg 159315fb4814Smrg amigaos*) 159415fb4814Smrg # On AmigaOS with pdksh, this test takes hours, literally. 159515fb4814Smrg # So we just punt and use a minimum line length of 8192. 159615fb4814Smrg lt_cv_sys_max_cmd_len=8192; 159715fb4814Smrg ;; 159815fb4814Smrg 159915fb4814Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 160015fb4814Smrg # This has been around since 386BSD, at least. Likely further. 160115fb4814Smrg if test -x /sbin/sysctl; then 160215fb4814Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 160315fb4814Smrg elif test -x /usr/sbin/sysctl; then 160415fb4814Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 160515fb4814Smrg else 160615fb4814Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 160715fb4814Smrg fi 160815fb4814Smrg # And add a safety zone 160915fb4814Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 161015fb4814Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 161115fb4814Smrg ;; 161215fb4814Smrg 161315fb4814Smrg interix*) 161415fb4814Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 161515fb4814Smrg lt_cv_sys_max_cmd_len=196608 161615fb4814Smrg ;; 161715fb4814Smrg 161815fb4814Smrg osf*) 161915fb4814Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 162015fb4814Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 162115fb4814Smrg # nice to cause kernel panics so lets avoid the loop below. 162215fb4814Smrg # First set a reasonable default. 162315fb4814Smrg lt_cv_sys_max_cmd_len=16384 162415fb4814Smrg # 162515fb4814Smrg if test -x /sbin/sysconfig; then 162615fb4814Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 162715fb4814Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 162815fb4814Smrg esac 162915fb4814Smrg fi 163015fb4814Smrg ;; 163115fb4814Smrg sco3.2v5*) 163215fb4814Smrg lt_cv_sys_max_cmd_len=102400 163315fb4814Smrg ;; 163415fb4814Smrg sysv5* | sco5v6* | sysv4.2uw2*) 163515fb4814Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 163615fb4814Smrg if test -n "$kargmax"; then 1637b4d38c65Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 163815fb4814Smrg else 163915fb4814Smrg lt_cv_sys_max_cmd_len=32768 164015fb4814Smrg fi 164115fb4814Smrg ;; 164215fb4814Smrg *) 1643de78e416Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1644de78e416Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 1645de78e416Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1646de78e416Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1647de78e416Smrg else 1648b4d38c65Smrg # Make teststring a little bigger before we do anything with it. 1649b4d38c65Smrg # a 1K string should be a reasonable start. 1650b4d38c65Smrg for i in 1 2 3 4 5 6 7 8 ; do 1651b4d38c65Smrg teststring=$teststring$teststring 1652b4d38c65Smrg done 1653de78e416Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1654b4d38c65Smrg # If test is not a shell built-in, we'll probably end up computing a 1655b4d38c65Smrg # maximum length that is only half of the actual maximum length, but 1656b4d38c65Smrg # we can't tell. 16577fe5393cSmrg while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 1658b4d38c65Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1659de78e416Smrg test $i != 17 # 1/2 MB should be enough 1660de78e416Smrg do 1661de78e416Smrg i=`expr $i + 1` 1662de78e416Smrg teststring=$teststring$teststring 1663de78e416Smrg done 1664b4d38c65Smrg # Only check the string length outside the loop. 1665b4d38c65Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1666de78e416Smrg teststring= 1667b4d38c65Smrg # Add a significant safety factor because C++ compilers can tack on 1668b4d38c65Smrg # massive amounts of additional arguments before passing them to the 1669b4d38c65Smrg # linker. It appears as though 1/2 is a usable value. 1670de78e416Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1671de78e416Smrg fi 167215fb4814Smrg ;; 167315fb4814Smrg esac 167415fb4814Smrg]) 167515fb4814Smrgif test -n $lt_cv_sys_max_cmd_len ; then 167615fb4814Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 167715fb4814Smrgelse 167815fb4814Smrg AC_MSG_RESULT(none) 167915fb4814Smrgfi 1680b4d38c65Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1681b4d38c65Smrg_LT_DECL([], [max_cmd_len], [0], 1682b4d38c65Smrg [What is the maximum length of a command?]) 1683b4d38c65Smrg])# LT_CMD_MAX_LEN 168415fb4814Smrg 1685b4d38c65Smrg# Old name: 1686b4d38c65SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1687b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 1688b4d38c65Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1689b410ddbeSmrg 1690b4d38c65Smrg 1691b4d38c65Smrg# _LT_HEADER_DLFCN 1692b4d38c65Smrg# ---------------- 1693b4d38c65Smrgm4_defun([_LT_HEADER_DLFCN], 1694b4d38c65Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1695b4d38c65Smrg])# _LT_HEADER_DLFCN 169615fb4814Smrg 169715fb4814Smrg 1698b4d38c65Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1699b4d38c65Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1700b4d38c65Smrg# ---------------------------------------------------------------- 1701b4d38c65Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1702b4d38c65Smrg[m4_require([_LT_HEADER_DLFCN])dnl 170315fb4814Smrgif test "$cross_compiling" = yes; then : 170415fb4814Smrg [$4] 170515fb4814Smrgelse 170615fb4814Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 170715fb4814Smrg lt_status=$lt_dlunknown 1708b4d38c65Smrg cat > conftest.$ac_ext <<_LT_EOF 1709b4d38c65Smrg[#line $LINENO "configure" 171015fb4814Smrg#include "confdefs.h" 171115fb4814Smrg 171215fb4814Smrg#if HAVE_DLFCN_H 171315fb4814Smrg#include <dlfcn.h> 171415fb4814Smrg#endif 171515fb4814Smrg 171615fb4814Smrg#include <stdio.h> 171715fb4814Smrg 171815fb4814Smrg#ifdef RTLD_GLOBAL 171915fb4814Smrg# define LT_DLGLOBAL RTLD_GLOBAL 172015fb4814Smrg#else 172115fb4814Smrg# ifdef DL_GLOBAL 172215fb4814Smrg# define LT_DLGLOBAL DL_GLOBAL 172315fb4814Smrg# else 172415fb4814Smrg# define LT_DLGLOBAL 0 172515fb4814Smrg# endif 172615fb4814Smrg#endif 172715fb4814Smrg 172815fb4814Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 172915fb4814Smrg find out it does not work in some platform. */ 173015fb4814Smrg#ifndef LT_DLLAZY_OR_NOW 173115fb4814Smrg# ifdef RTLD_LAZY 173215fb4814Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 173315fb4814Smrg# else 173415fb4814Smrg# ifdef DL_LAZY 173515fb4814Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 173615fb4814Smrg# else 173715fb4814Smrg# ifdef RTLD_NOW 173815fb4814Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 173915fb4814Smrg# else 174015fb4814Smrg# ifdef DL_NOW 174115fb4814Smrg# define LT_DLLAZY_OR_NOW DL_NOW 174215fb4814Smrg# else 174315fb4814Smrg# define LT_DLLAZY_OR_NOW 0 174415fb4814Smrg# endif 174515fb4814Smrg# endif 174615fb4814Smrg# endif 174715fb4814Smrg# endif 174815fb4814Smrg#endif 174915fb4814Smrg 1750b4d38c65Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 1751b4d38c65Smrg correspondingly for the symbols needed. */ 1752b4d38c65Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1753b4d38c65Smrgint fnord () __attribute__((visibility("default"))); 1754b534f209Smrg#endif 1755b534f209Smrg 1756b4d38c65Smrgint fnord () { return 42; } 175715fb4814Smrgint main () 175815fb4814Smrg{ 175915fb4814Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 176015fb4814Smrg int status = $lt_dlunknown; 176115fb4814Smrg 176215fb4814Smrg if (self) 176315fb4814Smrg { 176415fb4814Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1765b4d38c65Smrg else 1766b4d38c65Smrg { 1767b4d38c65Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1768b4d38c65Smrg else puts (dlerror ()); 1769b4d38c65Smrg } 177015fb4814Smrg /* dlclose (self); */ 177115fb4814Smrg } 177215fb4814Smrg else 177315fb4814Smrg puts (dlerror ()); 177415fb4814Smrg 1775b4d38c65Smrg return status; 177615fb4814Smrg}] 1777b4d38c65Smrg_LT_EOF 177815fb4814Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 177915fb4814Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 178015fb4814Smrg lt_status=$? 178115fb4814Smrg case x$lt_status in 178215fb4814Smrg x$lt_dlno_uscore) $1 ;; 178315fb4814Smrg x$lt_dlneed_uscore) $2 ;; 178415fb4814Smrg x$lt_dlunknown|x*) $3 ;; 178515fb4814Smrg esac 178615fb4814Smrg else : 178715fb4814Smrg # compilation failed 178815fb4814Smrg $3 178915fb4814Smrg fi 179015fb4814Smrgfi 179115fb4814Smrgrm -fr conftest* 1792b4d38c65Smrg])# _LT_TRY_DLOPEN_SELF 179315fb4814Smrg 179415fb4814Smrg 1795b4d38c65Smrg# LT_SYS_DLOPEN_SELF 1796b4d38c65Smrg# ------------------ 1797b4d38c65SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1798b4d38c65Smrg[m4_require([_LT_HEADER_DLFCN])dnl 179915fb4814Smrgif test "x$enable_dlopen" != xyes; then 180015fb4814Smrg enable_dlopen=unknown 180115fb4814Smrg enable_dlopen_self=unknown 180215fb4814Smrg enable_dlopen_self_static=unknown 180315fb4814Smrgelse 180415fb4814Smrg lt_cv_dlopen=no 180515fb4814Smrg lt_cv_dlopen_libs= 180615fb4814Smrg 180715fb4814Smrg case $host_os in 180815fb4814Smrg beos*) 180915fb4814Smrg lt_cv_dlopen="load_add_on" 181015fb4814Smrg lt_cv_dlopen_libs= 181115fb4814Smrg lt_cv_dlopen_self=yes 181215fb4814Smrg ;; 181315fb4814Smrg 1814b4d38c65Smrg mingw* | pw32* | cegcc*) 181515fb4814Smrg lt_cv_dlopen="LoadLibrary" 181615fb4814Smrg lt_cv_dlopen_libs= 1817b4d38c65Smrg ;; 181815fb4814Smrg 181915fb4814Smrg cygwin*) 182015fb4814Smrg lt_cv_dlopen="dlopen" 182115fb4814Smrg lt_cv_dlopen_libs= 1822b4d38c65Smrg ;; 182315fb4814Smrg 182415fb4814Smrg darwin*) 182515fb4814Smrg # if libdl is installed we need to link against it 182615fb4814Smrg AC_CHECK_LIB([dl], [dlopen], 182715fb4814Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 182815fb4814Smrg lt_cv_dlopen="dyld" 182915fb4814Smrg lt_cv_dlopen_libs= 183015fb4814Smrg lt_cv_dlopen_self=yes 183115fb4814Smrg ]) 1832b4d38c65Smrg ;; 183315fb4814Smrg 183415fb4814Smrg *) 183515fb4814Smrg AC_CHECK_FUNC([shl_load], 183615fb4814Smrg [lt_cv_dlopen="shl_load"], 183715fb4814Smrg [AC_CHECK_LIB([dld], [shl_load], 1838b4d38c65Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 183915fb4814Smrg [AC_CHECK_FUNC([dlopen], 184015fb4814Smrg [lt_cv_dlopen="dlopen"], 184115fb4814Smrg [AC_CHECK_LIB([dl], [dlopen], 184215fb4814Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 184315fb4814Smrg [AC_CHECK_LIB([svld], [dlopen], 184415fb4814Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 184515fb4814Smrg [AC_CHECK_LIB([dld], [dld_link], 1846b4d38c65Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 184715fb4814Smrg ]) 184815fb4814Smrg ]) 184915fb4814Smrg ]) 185015fb4814Smrg ]) 185115fb4814Smrg ]) 185215fb4814Smrg ;; 185315fb4814Smrg esac 185415fb4814Smrg 185515fb4814Smrg if test "x$lt_cv_dlopen" != xno; then 185615fb4814Smrg enable_dlopen=yes 185715fb4814Smrg else 185815fb4814Smrg enable_dlopen=no 185915fb4814Smrg fi 186015fb4814Smrg 186115fb4814Smrg case $lt_cv_dlopen in 186215fb4814Smrg dlopen) 186315fb4814Smrg save_CPPFLAGS="$CPPFLAGS" 186415fb4814Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 186515fb4814Smrg 186615fb4814Smrg save_LDFLAGS="$LDFLAGS" 186715fb4814Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 186815fb4814Smrg 186915fb4814Smrg save_LIBS="$LIBS" 187015fb4814Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 187115fb4814Smrg 187215fb4814Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 187315fb4814Smrg lt_cv_dlopen_self, [dnl 1874b4d38c65Smrg _LT_TRY_DLOPEN_SELF( 187515fb4814Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 187615fb4814Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 187715fb4814Smrg ]) 187815fb4814Smrg 187915fb4814Smrg if test "x$lt_cv_dlopen_self" = xyes; then 188015fb4814Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 188115fb4814Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1882b4d38c65Smrg lt_cv_dlopen_self_static, [dnl 1883b4d38c65Smrg _LT_TRY_DLOPEN_SELF( 188415fb4814Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 188515fb4814Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 188615fb4814Smrg ]) 188715fb4814Smrg fi 188815fb4814Smrg 188915fb4814Smrg CPPFLAGS="$save_CPPFLAGS" 189015fb4814Smrg LDFLAGS="$save_LDFLAGS" 189115fb4814Smrg LIBS="$save_LIBS" 189215fb4814Smrg ;; 189315fb4814Smrg esac 189415fb4814Smrg 189515fb4814Smrg case $lt_cv_dlopen_self in 189615fb4814Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 189715fb4814Smrg *) enable_dlopen_self=unknown ;; 189815fb4814Smrg esac 189915fb4814Smrg 190015fb4814Smrg case $lt_cv_dlopen_self_static in 190115fb4814Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 190215fb4814Smrg *) enable_dlopen_self_static=unknown ;; 190315fb4814Smrg esac 190415fb4814Smrgfi 1905b4d38c65Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1906b4d38c65Smrg [Whether dlopen is supported]) 1907b4d38c65Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1908b4d38c65Smrg [Whether dlopen of programs is supported]) 1909b4d38c65Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1910b4d38c65Smrg [Whether dlopen of statically linked programs is supported]) 1911b4d38c65Smrg])# LT_SYS_DLOPEN_SELF 191215fb4814Smrg 1913b4d38c65Smrg# Old name: 1914b4d38c65SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1915b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 1916b4d38c65Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1917b410ddbeSmrg 1918b4d38c65Smrg 1919b4d38c65Smrg# _LT_COMPILER_C_O([TAGNAME]) 1920b4d38c65Smrg# --------------------------- 1921b4d38c65Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 1922b4d38c65Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1923b4d38c65Smrgm4_defun([_LT_COMPILER_C_O], 1924b4d38c65Smrg[m4_require([_LT_DECL_SED])dnl 1925b4d38c65Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1926b4d38c65Smrgm4_require([_LT_TAG_COMPILER])dnl 192715fb4814SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1928b4d38c65Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1929b4d38c65Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1930b4d38c65Smrg $RM -r conftest 2>/dev/null 193115fb4814Smrg mkdir conftest 193215fb4814Smrg cd conftest 193315fb4814Smrg mkdir out 1934de78e416Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 193515fb4814Smrg 193615fb4814Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 193715fb4814Smrg # Insert the option either (1) after the last *FLAGS variable, or 193815fb4814Smrg # (2) before a word containing "conftest.", or (3) at the end. 193915fb4814Smrg # Note that $ac_compile itself does not contain backslashes and begins 194015fb4814Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 194115fb4814Smrg lt_compile=`echo "$ac_compile" | $SED \ 194215fb4814Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 194315fb4814Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 194415fb4814Smrg -e 's:$: $lt_compiler_flag:'` 1945b4d38c65Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 194615fb4814Smrg (eval "$lt_compile" 2>out/conftest.err) 194715fb4814Smrg ac_status=$? 194815fb4814Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 1949b4d38c65Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 195015fb4814Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 195115fb4814Smrg then 195215fb4814Smrg # The compiler can only warn and ignore the option if not recognized 195315fb4814Smrg # So say no if there are warnings 1954b4d38c65Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 195515fb4814Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 195615fb4814Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1957b4d38c65Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 195815fb4814Smrg fi 195915fb4814Smrg fi 196015fb4814Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1961b4d38c65Smrg $RM conftest* 196215fb4814Smrg # SGI C++ compiler will create directory out/ii_files/ for 196315fb4814Smrg # template instantiation 1964b4d38c65Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 1965b4d38c65Smrg $RM out/* && rmdir out 196615fb4814Smrg cd .. 1967b4d38c65Smrg $RM -r conftest 1968b4d38c65Smrg $RM conftest* 196915fb4814Smrg]) 1970b4d38c65Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 1971b4d38c65Smrg [Does compiler simultaneously support -c and -o options?]) 1972b4d38c65Smrg])# _LT_COMPILER_C_O 197315fb4814Smrg 197415fb4814Smrg 1975b4d38c65Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 1976b4d38c65Smrg# ---------------------------------- 197715fb4814Smrg# Check to see if we can do hard links to lock some files if needed 1978b4d38c65Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 1979b4d38c65Smrg[m4_require([_LT_ENABLE_LOCK])dnl 1980b4d38c65Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1981b4d38c65Smrg_LT_COMPILER_C_O([$1]) 198215fb4814Smrg 198315fb4814Smrghard_links="nottested" 1984b4d38c65Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 198515fb4814Smrg # do not overwrite the value of need_locks provided by the user 198615fb4814Smrg AC_MSG_CHECKING([if we can lock with hard links]) 198715fb4814Smrg hard_links=yes 1988b4d38c65Smrg $RM conftest* 198915fb4814Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 199015fb4814Smrg touch conftest.a 199115fb4814Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 199215fb4814Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 199315fb4814Smrg AC_MSG_RESULT([$hard_links]) 199415fb4814Smrg if test "$hard_links" = no; then 199515fb4814Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 199615fb4814Smrg need_locks=warn 199715fb4814Smrg fi 199815fb4814Smrgelse 199915fb4814Smrg need_locks=no 200015fb4814Smrgfi 2001b4d38c65Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2002b4d38c65Smrg])# _LT_COMPILER_FILE_LOCKS 200315fb4814Smrg 200415fb4814Smrg 2005b4d38c65Smrg# _LT_CHECK_OBJDIR 2006b4d38c65Smrg# ---------------- 2007b4d38c65Smrgm4_defun([_LT_CHECK_OBJDIR], 200815fb4814Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 200915fb4814Smrg[rm -f .libs 2>/dev/null 201015fb4814Smrgmkdir .libs 2>/dev/null 201115fb4814Smrgif test -d .libs; then 201215fb4814Smrg lt_cv_objdir=.libs 201315fb4814Smrgelse 201415fb4814Smrg # MS-DOS does not allow filenames that begin with a dot. 201515fb4814Smrg lt_cv_objdir=_libs 201615fb4814Smrgfi 201715fb4814Smrgrmdir .libs 2>/dev/null]) 201815fb4814Smrgobjdir=$lt_cv_objdir 2019b4d38c65Smrg_LT_DECL([], [objdir], [0], 2020b4d38c65Smrg [The name of the directory that contains temporary libtool files])dnl 2021b4d38c65Smrgm4_pattern_allow([LT_OBJDIR])dnl 2022b4d38c65SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2023b4d38c65Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2024b4d38c65Smrg])# _LT_CHECK_OBJDIR 202515fb4814Smrg 202615fb4814Smrg 2027b4d38c65Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2028b4d38c65Smrg# -------------------------------------- 202915fb4814Smrg# Check hardcoding attributes. 2030b4d38c65Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 203115fb4814Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2032b4d38c65Smrg_LT_TAGVAR(hardcode_action, $1)= 2033b4d38c65Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2034b4d38c65Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2035b4d38c65Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 203615fb4814Smrg 2037b4d38c65Smrg # We can hardcode non-existent directories. 2038b4d38c65Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 203915fb4814Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 204015fb4814Smrg # have to relink, otherwise we might link with an installed library 204115fb4814Smrg # when we should be linking with a yet-to-be-installed one 2042b4d38c65Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2043b4d38c65Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 204415fb4814Smrg # Linking always hardcodes the temporary library directory. 2045b4d38c65Smrg _LT_TAGVAR(hardcode_action, $1)=relink 204615fb4814Smrg else 204715fb4814Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2048b4d38c65Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 204915fb4814Smrg fi 205015fb4814Smrgelse 205115fb4814Smrg # We cannot hardcode anything, or else we can only hardcode existing 205215fb4814Smrg # directories. 2053b4d38c65Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 205415fb4814Smrgfi 2055b4d38c65SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 205615fb4814Smrg 2057b4d38c65Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2058b4d38c65Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 205915fb4814Smrg # Fast installation is not supported 206015fb4814Smrg enable_fast_install=no 206115fb4814Smrgelif test "$shlibpath_overrides_runpath" = yes || 206215fb4814Smrg test "$enable_shared" = no; then 206315fb4814Smrg # Fast installation is not necessary 206415fb4814Smrg enable_fast_install=needless 206515fb4814Smrgfi 2066b4d38c65Smrg_LT_TAGDECL([], [hardcode_action], [0], 2067b4d38c65Smrg [How to hardcode a shared library path into an executable]) 2068b4d38c65Smrg])# _LT_LINKER_HARDCODE_LIBPATH 206915fb4814Smrg 207015fb4814Smrg 2071b4d38c65Smrg# _LT_CMD_STRIPLIB 2072b4d38c65Smrg# ---------------- 2073b4d38c65Smrgm4_defun([_LT_CMD_STRIPLIB], 2074b4d38c65Smrg[m4_require([_LT_DECL_EGREP]) 2075b4d38c65Smrgstriplib= 207615fb4814Smrgold_striplib= 207715fb4814SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2078b4d38c65Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 207915fb4814Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 208015fb4814Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 208115fb4814Smrg AC_MSG_RESULT([yes]) 208215fb4814Smrgelse 208315fb4814Smrg# FIXME - insert some real tests, host_os isn't really good enough 208415fb4814Smrg case $host_os in 2085b4d38c65Smrg darwin*) 2086b4d38c65Smrg if test -n "$STRIP" ; then 2087b4d38c65Smrg striplib="$STRIP -x" 2088b4d38c65Smrg old_striplib="$STRIP -S" 2089b4d38c65Smrg AC_MSG_RESULT([yes]) 2090b4d38c65Smrg else 2091b4d38c65Smrg AC_MSG_RESULT([no]) 2092b4d38c65Smrg fi 2093b4d38c65Smrg ;; 2094b4d38c65Smrg *) 2095b4d38c65Smrg AC_MSG_RESULT([no]) 209615fb4814Smrg ;; 209715fb4814Smrg esac 209815fb4814Smrgfi 2099b4d38c65Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2100b4d38c65Smrg_LT_DECL([], [striplib], [1]) 2101b4d38c65Smrg])# _LT_CMD_STRIPLIB 210215fb4814Smrg 210315fb4814Smrg 2104b4d38c65Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 210515fb4814Smrg# ----------------------------- 210615fb4814Smrg# PORTME Fill in your ld.so characteristics 2107b4d38c65Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2108b4d38c65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2109b4d38c65Smrgm4_require([_LT_DECL_EGREP])dnl 2110b4d38c65Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2111b4d38c65Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2112b4d38c65Smrgm4_require([_LT_DECL_SED])dnl 2113b4d38c65Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2114de78e416SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2115b4d38c65Smrgm4_if([$1], 2116b4d38c65Smrg [], [ 211715fb4814Smrgif test "$GCC" = yes; then 2118de78e416Smrg case $host_os in 2119de78e416Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2120de78e416Smrg *) lt_awk_arg="/^libraries:/" ;; 2121de78e416Smrg esac 2122b4d38c65Smrg case $host_os in 2123b4d38c65Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2124b4d38c65Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 2125b4d38c65Smrg esac 2126b4d38c65Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2127b4d38c65Smrg case $lt_search_path_spec in 2128b4d38c65Smrg *\;*) 212915fb4814Smrg # if the path contains ";" then we assume it to be the separator 213015fb4814Smrg # otherwise default to the standard path separator (i.e. ":") - it is 213115fb4814Smrg # assumed that no part of a normal pathname contains ";" but that should 213215fb4814Smrg # okay in the real world where ";" in dirpaths is itself problematic. 2133b4d38c65Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2134b4d38c65Smrg ;; 2135b4d38c65Smrg *) 2136b4d38c65Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2137b4d38c65Smrg ;; 2138b4d38c65Smrg esac 2139de78e416Smrg # Ok, now we have the path, separated by spaces, we can step through it 2140de78e416Smrg # and add multilib dir if necessary. 2141de78e416Smrg lt_tmp_lt_search_path_spec= 2142de78e416Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2143de78e416Smrg for lt_sys_path in $lt_search_path_spec; do 2144de78e416Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2145de78e416Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2146de78e416Smrg else 2147de78e416Smrg test -d "$lt_sys_path" && \ 2148de78e416Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2149de78e416Smrg fi 2150de78e416Smrg done 2151b4d38c65Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2152de78e416SmrgBEGIN {RS=" "; FS="/|\n";} { 2153de78e416Smrg lt_foo=""; 2154de78e416Smrg lt_count=0; 2155de78e416Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 2156de78e416Smrg if ($lt_i != "" && $lt_i != ".") { 2157de78e416Smrg if ($lt_i == "..") { 2158de78e416Smrg lt_count++; 2159de78e416Smrg } else { 2160de78e416Smrg if (lt_count == 0) { 2161de78e416Smrg lt_foo="/" $lt_i lt_foo; 2162de78e416Smrg } else { 2163de78e416Smrg lt_count--; 2164de78e416Smrg } 2165de78e416Smrg } 2166de78e416Smrg } 2167de78e416Smrg } 2168de78e416Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2169de78e416Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2170de78e416Smrg}'` 2171b4d38c65Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 2172b4d38c65Smrg # for these hosts. 2173b4d38c65Smrg case $host_os in 2174b4d38c65Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2175b4d38c65Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2176b4d38c65Smrg esac 2177b4d38c65Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 217815fb4814Smrgelse 217915fb4814Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2180de78e416Smrgfi]) 2181b4d38c65Smrglibrary_names_spec= 2182b4d38c65Smrglibname_spec='lib$name' 2183b4d38c65Smrgsoname_spec= 2184b4d38c65Smrgshrext_cmds=".so" 2185b4d38c65Smrgpostinstall_cmds= 2186b4d38c65Smrgpostuninstall_cmds= 2187b4d38c65Smrgfinish_cmds= 2188b4d38c65Smrgfinish_eval= 2189b4d38c65Smrgshlibpath_var= 2190b4d38c65Smrgshlibpath_overrides_runpath=unknown 2191b4d38c65Smrgversion_type=none 2192b4d38c65Smrgdynamic_linker="$host_os ld.so" 2193b4d38c65Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 219415fb4814Smrgneed_lib_prefix=unknown 219515fb4814Smrghardcode_into_libs=no 219615fb4814Smrg 219715fb4814Smrg# when you set need_version to no, make sure it does not cause -set_version 219815fb4814Smrg# flags to be left without arguments 219915fb4814Smrgneed_version=unknown 220015fb4814Smrg 220115fb4814Smrgcase $host_os in 220215fb4814Smrgaix3*) 22037fe5393cSmrg version_type=linux 220415fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 220515fb4814Smrg shlibpath_var=LIBPATH 220615fb4814Smrg 220715fb4814Smrg # AIX 3 has no versioning support, so we append a major version to the name. 220815fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 220915fb4814Smrg ;; 221015fb4814Smrg 2211b4d38c65Smrgaix[[4-9]]*) 22127fe5393cSmrg version_type=linux 221315fb4814Smrg need_lib_prefix=no 221415fb4814Smrg need_version=no 221515fb4814Smrg hardcode_into_libs=yes 221615fb4814Smrg if test "$host_cpu" = ia64; then 221715fb4814Smrg # AIX 5 supports IA64 221815fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 221915fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 222015fb4814Smrg else 222115fb4814Smrg # With GCC up to 2.95.x, collect2 would create an import file 222215fb4814Smrg # for dependence libraries. The import file would start with 222315fb4814Smrg # the line `#! .'. This would cause the generated library to 222415fb4814Smrg # depend on `.', always an invalid library. This was fixed in 222515fb4814Smrg # development snapshots of GCC prior to 3.0. 222615fb4814Smrg case $host_os in 222715fb4814Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 222815fb4814Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 222915fb4814Smrg echo ' yes ' 2230b4d38c65Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 223115fb4814Smrg : 223215fb4814Smrg else 223315fb4814Smrg can_build_shared=no 223415fb4814Smrg fi 223515fb4814Smrg ;; 223615fb4814Smrg esac 223715fb4814Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 223815fb4814Smrg # soname into executable. Probably we can add versioning support to 223915fb4814Smrg # collect2, so additional links can be useful in future. 224015fb4814Smrg if test "$aix_use_runtimelinking" = yes; then 224115fb4814Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 224215fb4814Smrg # instead of lib<name>.a to let people know that these are not 224315fb4814Smrg # typical AIX shared libraries. 224415fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 224515fb4814Smrg else 224615fb4814Smrg # We preserve .a as extension for shared libraries through AIX4.2 224715fb4814Smrg # and later when we are not doing run time linking. 224815fb4814Smrg library_names_spec='${libname}${release}.a $libname.a' 224915fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 225015fb4814Smrg fi 225115fb4814Smrg shlibpath_var=LIBPATH 225215fb4814Smrg fi 225315fb4814Smrg ;; 225415fb4814Smrg 225515fb4814Smrgamigaos*) 2256b4d38c65Smrg case $host_cpu in 2257b4d38c65Smrg powerpc) 2258b4d38c65Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2259b4d38c65Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2260b4d38c65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2261b4d38c65Smrg ;; 2262b4d38c65Smrg m68k) 2263b4d38c65Smrg library_names_spec='$libname.ixlibrary $libname.a' 2264b4d38c65Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2265b4d38c65Smrg 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' 2266b4d38c65Smrg ;; 2267b4d38c65Smrg esac 226815fb4814Smrg ;; 226915fb4814Smrg 227015fb4814Smrgbeos*) 227115fb4814Smrg library_names_spec='${libname}${shared_ext}' 227215fb4814Smrg dynamic_linker="$host_os ld.so" 227315fb4814Smrg shlibpath_var=LIBRARY_PATH 227415fb4814Smrg ;; 227515fb4814Smrg 227615fb4814Smrgbsdi[[45]]*) 22777fe5393cSmrg version_type=linux 227815fb4814Smrg need_version=no 227915fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 228015fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 228115fb4814Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 228215fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 228315fb4814Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 228415fb4814Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 228515fb4814Smrg # the default ld.so.conf also contains /usr/contrib/lib and 228615fb4814Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 228715fb4814Smrg # libtool to hard-code these into programs 228815fb4814Smrg ;; 228915fb4814Smrg 2290b4d38c65Smrgcygwin* | mingw* | pw32* | cegcc*) 229115fb4814Smrg version_type=windows 229215fb4814Smrg shrext_cmds=".dll" 229315fb4814Smrg need_version=no 229415fb4814Smrg need_lib_prefix=no 229515fb4814Smrg 2296b4d38c65Smrg case $GCC,$cc_basename in 2297b4d38c65Smrg yes,*) 2298b4d38c65Smrg # gcc 229915fb4814Smrg library_names_spec='$libname.dll.a' 230015fb4814Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 230115fb4814Smrg postinstall_cmds='base_file=`basename \${file}`~ 2302b4d38c65Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 230315fb4814Smrg dldir=$destdir/`dirname \$dlpath`~ 230415fb4814Smrg test -d \$dldir || mkdir -p \$dldir~ 230515fb4814Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2306b4d38c65Smrg chmod a+x \$dldir/$dlname~ 2307b4d38c65Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2308b4d38c65Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2309b4d38c65Smrg fi' 231015fb4814Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 231115fb4814Smrg dlpath=$dir/\$dldll~ 2312b4d38c65Smrg $RM \$dlpath' 231315fb4814Smrg shlibpath_overrides_runpath=yes 231415fb4814Smrg 231515fb4814Smrg case $host_os in 231615fb4814Smrg cygwin*) 231715fb4814Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 231815fb4814Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2319b4d38c65Smrgm4_if([$1], [],[ 2320b4d38c65Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 232115fb4814Smrg ;; 2322b4d38c65Smrg mingw* | cegcc*) 232315fb4814Smrg # MinGW DLLs use traditional 'lib' prefix 232415fb4814Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 232515fb4814Smrg ;; 232615fb4814Smrg pw32*) 232715fb4814Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 232815fb4814Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 232915fb4814Smrg ;; 233015fb4814Smrg esac 2331b4d38c65Smrg dynamic_linker='Win32 ld.exe' 2332b4d38c65Smrg ;; 2333b4d38c65Smrg 2334b4d38c65Smrg *,cl*) 2335b4d38c65Smrg # Native MSVC 2336b4d38c65Smrg libname_spec='$name' 2337b4d38c65Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2338b4d38c65Smrg library_names_spec='${libname}.dll.lib' 2339b4d38c65Smrg 2340b4d38c65Smrg case $build_os in 2341b4d38c65Smrg mingw*) 2342b4d38c65Smrg sys_lib_search_path_spec= 2343b4d38c65Smrg lt_save_ifs=$IFS 2344b4d38c65Smrg IFS=';' 2345b4d38c65Smrg for lt_path in $LIB 2346b4d38c65Smrg do 2347b4d38c65Smrg IFS=$lt_save_ifs 2348b4d38c65Smrg # Let DOS variable expansion print the short 8.3 style file name. 2349b4d38c65Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2350b4d38c65Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2351b4d38c65Smrg done 2352b4d38c65Smrg IFS=$lt_save_ifs 2353b4d38c65Smrg # Convert to MSYS style. 2354b4d38c65Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2355b4d38c65Smrg ;; 2356b4d38c65Smrg cygwin*) 2357b4d38c65Smrg # Convert to unix form, then to dos form, then back to unix form 2358b4d38c65Smrg # but this time dos style (no spaces!) so that the unix form looks 2359b4d38c65Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2360b4d38c65Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2361b4d38c65Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2362b4d38c65Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2363b4d38c65Smrg ;; 2364b4d38c65Smrg *) 2365b4d38c65Smrg sys_lib_search_path_spec="$LIB" 2366b4d38c65Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2367b4d38c65Smrg # It is most probably a Windows format PATH. 2368b4d38c65Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2369b4d38c65Smrg else 2370b4d38c65Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2371b4d38c65Smrg fi 2372b4d38c65Smrg # FIXME: find the short name or the path components, as spaces are 2373b4d38c65Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2374b4d38c65Smrg ;; 2375b4d38c65Smrg esac 2376b4d38c65Smrg 2377b4d38c65Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2378b4d38c65Smrg postinstall_cmds='base_file=`basename \${file}`~ 2379b4d38c65Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2380b4d38c65Smrg dldir=$destdir/`dirname \$dlpath`~ 2381b4d38c65Smrg test -d \$dldir || mkdir -p \$dldir~ 2382b4d38c65Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2383b4d38c65Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2384b4d38c65Smrg dlpath=$dir/\$dldll~ 2385b4d38c65Smrg $RM \$dlpath' 2386b4d38c65Smrg shlibpath_overrides_runpath=yes 2387b4d38c65Smrg dynamic_linker='Win32 link.exe' 238815fb4814Smrg ;; 238915fb4814Smrg 239015fb4814Smrg *) 2391b4d38c65Smrg # Assume MSVC wrapper 239215fb4814Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2393b4d38c65Smrg dynamic_linker='Win32 ld.exe' 239415fb4814Smrg ;; 239515fb4814Smrg esac 239615fb4814Smrg # FIXME: first we should search . and the directory the executable is in 239715fb4814Smrg shlibpath_var=PATH 239815fb4814Smrg ;; 239915fb4814Smrg 240015fb4814Smrgdarwin* | rhapsody*) 240115fb4814Smrg dynamic_linker="$host_os dyld" 240215fb4814Smrg version_type=darwin 240315fb4814Smrg need_lib_prefix=no 240415fb4814Smrg need_version=no 2405b4d38c65Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 240615fb4814Smrg soname_spec='${libname}${release}${major}$shared_ext' 240715fb4814Smrg shlibpath_overrides_runpath=yes 240815fb4814Smrg shlibpath_var=DYLD_LIBRARY_PATH 240915fb4814Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2410b4d38c65Smrgm4_if([$1], [],[ 2411b4d38c65Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 241215fb4814Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 241315fb4814Smrg ;; 241415fb4814Smrg 241515fb4814Smrgdgux*) 24167fe5393cSmrg version_type=linux 241715fb4814Smrg need_lib_prefix=no 241815fb4814Smrg need_version=no 241915fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 242015fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 242115fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 242215fb4814Smrg ;; 242315fb4814Smrg 24247fe5393cSmrgfreebsd1*) 24257fe5393cSmrg dynamic_linker=no 24267fe5393cSmrg ;; 24277fe5393cSmrg 242815fb4814Smrgfreebsd* | dragonfly*) 242915fb4814Smrg # DragonFly does not have aout. When/if they implement a new 243015fb4814Smrg # versioning mechanism, adjust this. 243115fb4814Smrg if test -x /usr/bin/objformat; then 243215fb4814Smrg objformat=`/usr/bin/objformat` 243315fb4814Smrg else 243415fb4814Smrg case $host_os in 24357fe5393cSmrg freebsd[[123]]*) objformat=aout ;; 243615fb4814Smrg *) objformat=elf ;; 243715fb4814Smrg esac 243815fb4814Smrg fi 243915fb4814Smrg version_type=freebsd-$objformat 244015fb4814Smrg case $version_type in 244115fb4814Smrg freebsd-elf*) 244215fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 244315fb4814Smrg need_version=no 244415fb4814Smrg need_lib_prefix=no 244515fb4814Smrg ;; 244615fb4814Smrg freebsd-*) 244715fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 244815fb4814Smrg need_version=yes 244915fb4814Smrg ;; 245015fb4814Smrg esac 245115fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 245215fb4814Smrg case $host_os in 24537fe5393cSmrg freebsd2*) 245415fb4814Smrg shlibpath_overrides_runpath=yes 245515fb4814Smrg ;; 245615fb4814Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 245715fb4814Smrg shlibpath_overrides_runpath=yes 245815fb4814Smrg hardcode_into_libs=yes 245915fb4814Smrg ;; 246015fb4814Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 246115fb4814Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 246215fb4814Smrg shlibpath_overrides_runpath=no 246315fb4814Smrg hardcode_into_libs=yes 246415fb4814Smrg ;; 2465de78e416Smrg *) # from 4.6 on, and DragonFly 246615fb4814Smrg shlibpath_overrides_runpath=yes 246715fb4814Smrg hardcode_into_libs=yes 246815fb4814Smrg ;; 246915fb4814Smrg esac 247015fb4814Smrg ;; 247115fb4814Smrg 247215fb4814Smrggnu*) 24737fe5393cSmrg version_type=linux 247415fb4814Smrg need_lib_prefix=no 247515fb4814Smrg need_version=no 247615fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 247715fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 247815fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 2479b4d38c65Smrg hardcode_into_libs=yes 2480b4d38c65Smrg ;; 2481b4d38c65Smrg 2482b4d38c65Smrghaiku*) 24837fe5393cSmrg version_type=linux 2484b4d38c65Smrg need_lib_prefix=no 2485b4d38c65Smrg need_version=no 2486b4d38c65Smrg dynamic_linker="$host_os runtime_loader" 2487b4d38c65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2488b4d38c65Smrg soname_spec='${libname}${release}${shared_ext}$major' 2489b4d38c65Smrg shlibpath_var=LIBRARY_PATH 2490b4d38c65Smrg shlibpath_overrides_runpath=yes 2491b4d38c65Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 249215fb4814Smrg hardcode_into_libs=yes 249315fb4814Smrg ;; 249415fb4814Smrg 249515fb4814Smrghpux9* | hpux10* | hpux11*) 249615fb4814Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 249715fb4814Smrg # link against other versions. 249815fb4814Smrg version_type=sunos 249915fb4814Smrg need_lib_prefix=no 250015fb4814Smrg need_version=no 250115fb4814Smrg case $host_cpu in 250215fb4814Smrg ia64*) 250315fb4814Smrg shrext_cmds='.so' 250415fb4814Smrg hardcode_into_libs=yes 250515fb4814Smrg dynamic_linker="$host_os dld.so" 250615fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 250715fb4814Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 250815fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 250915fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 251015fb4814Smrg if test "X$HPUX_IA64_MODE" = X32; then 251115fb4814Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 251215fb4814Smrg else 251315fb4814Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 251415fb4814Smrg fi 251515fb4814Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 251615fb4814Smrg ;; 2517b4d38c65Smrg hppa*64*) 2518b4d38c65Smrg shrext_cmds='.sl' 2519b4d38c65Smrg hardcode_into_libs=yes 2520b4d38c65Smrg dynamic_linker="$host_os dld.sl" 2521b4d38c65Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2522b4d38c65Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2523b4d38c65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2524b4d38c65Smrg soname_spec='${libname}${release}${shared_ext}$major' 2525b4d38c65Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2526b4d38c65Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2527b4d38c65Smrg ;; 2528b4d38c65Smrg *) 252915fb4814Smrg shrext_cmds='.sl' 253015fb4814Smrg dynamic_linker="$host_os dld.sl" 253115fb4814Smrg shlibpath_var=SHLIB_PATH 253215fb4814Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 253315fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 253415fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 253515fb4814Smrg ;; 253615fb4814Smrg esac 2537b4d38c65Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 253815fb4814Smrg postinstall_cmds='chmod 555 $lib' 2539b4d38c65Smrg # or fails outright, so override atomically: 2540b4d38c65Smrg install_override_mode=555 254115fb4814Smrg ;; 254215fb4814Smrg 2543de78e416Smrginterix[[3-9]]*) 25447fe5393cSmrg version_type=linux 254515fb4814Smrg need_lib_prefix=no 254615fb4814Smrg need_version=no 254715fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 254815fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 254915fb4814Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 255015fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 255115fb4814Smrg shlibpath_overrides_runpath=no 255215fb4814Smrg hardcode_into_libs=yes 255315fb4814Smrg ;; 255415fb4814Smrg 255515fb4814Smrgirix5* | irix6* | nonstopux*) 255615fb4814Smrg case $host_os in 255715fb4814Smrg nonstopux*) version_type=nonstopux ;; 255815fb4814Smrg *) 255915fb4814Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 25607fe5393cSmrg version_type=linux 256115fb4814Smrg else 256215fb4814Smrg version_type=irix 256315fb4814Smrg fi ;; 256415fb4814Smrg esac 256515fb4814Smrg need_lib_prefix=no 256615fb4814Smrg need_version=no 256715fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 256815fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 256915fb4814Smrg case $host_os in 257015fb4814Smrg irix5* | nonstopux*) 257115fb4814Smrg libsuff= shlibsuff= 257215fb4814Smrg ;; 257315fb4814Smrg *) 257415fb4814Smrg case $LD in # libtool.m4 will add one of these switches to LD 257515fb4814Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 257615fb4814Smrg libsuff= shlibsuff= libmagic=32-bit;; 257715fb4814Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 257815fb4814Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 257915fb4814Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 258015fb4814Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 258115fb4814Smrg *) libsuff= shlibsuff= libmagic=never-match;; 258215fb4814Smrg esac 258315fb4814Smrg ;; 258415fb4814Smrg esac 258515fb4814Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 258615fb4814Smrg shlibpath_overrides_runpath=no 258715fb4814Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 258815fb4814Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 258915fb4814Smrg hardcode_into_libs=yes 259015fb4814Smrg ;; 259115fb4814Smrg 259215fb4814Smrg# No shared lib support for Linux oldld, aout, or coff. 259315fb4814Smrglinux*oldld* | linux*aout* | linux*coff*) 259415fb4814Smrg dynamic_linker=no 259515fb4814Smrg ;; 259615fb4814Smrg 25977fe5393cSmrg# This must be Linux ELF. 2598b4d38c65Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 25997fe5393cSmrg version_type=linux 260015fb4814Smrg need_lib_prefix=no 260115fb4814Smrg need_version=no 260215fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 260315fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 260415fb4814Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 260515fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 260615fb4814Smrg shlibpath_overrides_runpath=no 2607b4d38c65Smrg 2608b4d38c65Smrg # Some binutils ld are patched to set DT_RUNPATH 2609b4d38c65Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2610b4d38c65Smrg [lt_cv_shlibpath_overrides_runpath=no 2611b4d38c65Smrg save_LDFLAGS=$LDFLAGS 2612b4d38c65Smrg save_libdir=$libdir 2613b4d38c65Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2614b4d38c65Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2615b4d38c65Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2616b4d38c65Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2617b4d38c65Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2618b4d38c65Smrg LDFLAGS=$save_LDFLAGS 2619b4d38c65Smrg libdir=$save_libdir 2620b4d38c65Smrg ]) 2621b4d38c65Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2622b4d38c65Smrg 262315fb4814Smrg # This implies no fast_install, which is unacceptable. 262415fb4814Smrg # Some rework will be needed to allow for fast_install 262515fb4814Smrg # before this can be enabled. 262615fb4814Smrg hardcode_into_libs=yes 2627b4d38c65Smrg 2628b4d38c65Smrg # Add ABI-specific directories to the system library path. 2629b4d38c65Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 263015fb4814Smrg 263115fb4814Smrg # Append ld.so.conf contents to the search path 263215fb4814Smrg if test -f /etc/ld.so.conf; then 2633b4d38c65Smrg 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' ' '` 2634de78e416Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2635b4d38c65Smrg 263615fb4814Smrg fi 263715fb4814Smrg 263815fb4814Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 263915fb4814Smrg # powerpc, because MkLinux only supported shared libraries with the 264015fb4814Smrg # GNU dynamic linker. Since this was broken with cross compilers, 264115fb4814Smrg # most powerpc-linux boxes support dynamic linking these days and 264215fb4814Smrg # people can always --disable-shared, the test was removed, and we 264315fb4814Smrg # assume the GNU/Linux dynamic linker is in use. 264415fb4814Smrg dynamic_linker='GNU/Linux ld.so' 264515fb4814Smrg ;; 264615fb4814Smrg 264715fb4814Smrgnetbsd*) 264815fb4814Smrg version_type=sunos 264915fb4814Smrg need_lib_prefix=no 265015fb4814Smrg need_version=no 2651b4d38c65Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 265215fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 265315fb4814Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 265415fb4814Smrg dynamic_linker='NetBSD (a.out) ld.so' 265515fb4814Smrg else 265615fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 265715fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 265815fb4814Smrg dynamic_linker='NetBSD ld.elf_so' 265915fb4814Smrg fi 266015fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 266115fb4814Smrg shlibpath_overrides_runpath=yes 266215fb4814Smrg hardcode_into_libs=yes 266315fb4814Smrg ;; 266415fb4814Smrg 266515fb4814Smrgnewsos6) 26667fe5393cSmrg version_type=linux 266715fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 266815fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 266915fb4814Smrg shlibpath_overrides_runpath=yes 267015fb4814Smrg ;; 267115fb4814Smrg 2672b4d38c65Smrg*nto* | *qnx*) 2673b4d38c65Smrg version_type=qnx 267415fb4814Smrg need_lib_prefix=no 267515fb4814Smrg need_version=no 267615fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 267715fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 267815fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 2679b4d38c65Smrg shlibpath_overrides_runpath=no 2680b4d38c65Smrg hardcode_into_libs=yes 2681b4d38c65Smrg dynamic_linker='ldqnx.so' 268215fb4814Smrg ;; 268315fb4814Smrg 268415fb4814Smrgopenbsd*) 268515fb4814Smrg version_type=sunos 268615fb4814Smrg sys_lib_dlsearch_path_spec="/usr/lib" 268715fb4814Smrg need_lib_prefix=no 268815fb4814Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 268915fb4814Smrg case $host_os in 2690b4d38c65Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2691b4d38c65Smrg *) need_version=no ;; 269215fb4814Smrg esac 269315fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 269415fb4814Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 269515fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 2696b4d38c65Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 269715fb4814Smrg case $host_os in 269815fb4814Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 269915fb4814Smrg shlibpath_overrides_runpath=no 270015fb4814Smrg ;; 270115fb4814Smrg *) 270215fb4814Smrg shlibpath_overrides_runpath=yes 270315fb4814Smrg ;; 270415fb4814Smrg esac 270515fb4814Smrg else 270615fb4814Smrg shlibpath_overrides_runpath=yes 270715fb4814Smrg fi 270815fb4814Smrg ;; 270915fb4814Smrg 271015fb4814Smrgos2*) 271115fb4814Smrg libname_spec='$name' 271215fb4814Smrg shrext_cmds=".dll" 271315fb4814Smrg need_lib_prefix=no 271415fb4814Smrg library_names_spec='$libname${shared_ext} $libname.a' 271515fb4814Smrg dynamic_linker='OS/2 ld.exe' 271615fb4814Smrg shlibpath_var=LIBPATH 271715fb4814Smrg ;; 271815fb4814Smrg 271915fb4814Smrgosf3* | osf4* | osf5*) 272015fb4814Smrg version_type=osf 272115fb4814Smrg need_lib_prefix=no 272215fb4814Smrg need_version=no 272315fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 272415fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 272515fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 272615fb4814Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 272715fb4814Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 272815fb4814Smrg ;; 272915fb4814Smrg 2730de78e416Smrgrdos*) 2731de78e416Smrg dynamic_linker=no 2732de78e416Smrg ;; 2733de78e416Smrg 273415fb4814Smrgsolaris*) 27357fe5393cSmrg version_type=linux 273615fb4814Smrg need_lib_prefix=no 273715fb4814Smrg need_version=no 273815fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 273915fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 274015fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 274115fb4814Smrg shlibpath_overrides_runpath=yes 274215fb4814Smrg hardcode_into_libs=yes 274315fb4814Smrg # ldd complains unless libraries are executable 274415fb4814Smrg postinstall_cmds='chmod +x $lib' 274515fb4814Smrg ;; 274615fb4814Smrg 274715fb4814Smrgsunos4*) 274815fb4814Smrg version_type=sunos 274915fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 275015fb4814Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 275115fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 275215fb4814Smrg shlibpath_overrides_runpath=yes 275315fb4814Smrg if test "$with_gnu_ld" = yes; then 275415fb4814Smrg need_lib_prefix=no 275515fb4814Smrg fi 275615fb4814Smrg need_version=yes 275715fb4814Smrg ;; 275815fb4814Smrg 275915fb4814Smrgsysv4 | sysv4.3*) 27607fe5393cSmrg version_type=linux 276115fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 276215fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 276315fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 276415fb4814Smrg case $host_vendor in 276515fb4814Smrg sni) 276615fb4814Smrg shlibpath_overrides_runpath=no 276715fb4814Smrg need_lib_prefix=no 276815fb4814Smrg runpath_var=LD_RUN_PATH 276915fb4814Smrg ;; 277015fb4814Smrg siemens) 277115fb4814Smrg need_lib_prefix=no 277215fb4814Smrg ;; 277315fb4814Smrg motorola) 277415fb4814Smrg need_lib_prefix=no 277515fb4814Smrg need_version=no 277615fb4814Smrg shlibpath_overrides_runpath=no 277715fb4814Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 277815fb4814Smrg ;; 277915fb4814Smrg esac 278015fb4814Smrg ;; 278115fb4814Smrg 278215fb4814Smrgsysv4*MP*) 278315fb4814Smrg if test -d /usr/nec ;then 27847fe5393cSmrg version_type=linux 278515fb4814Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 278615fb4814Smrg soname_spec='$libname${shared_ext}.$major' 278715fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 278815fb4814Smrg fi 278915fb4814Smrg ;; 279015fb4814Smrg 279115fb4814Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 279215fb4814Smrg version_type=freebsd-elf 279315fb4814Smrg need_lib_prefix=no 279415fb4814Smrg need_version=no 279515fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 279615fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 279715fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 2798b4d38c65Smrg shlibpath_overrides_runpath=yes 279915fb4814Smrg hardcode_into_libs=yes 280015fb4814Smrg if test "$with_gnu_ld" = yes; then 280115fb4814Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 280215fb4814Smrg else 280315fb4814Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 280415fb4814Smrg case $host_os in 280515fb4814Smrg sco3.2v5*) 280615fb4814Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 280715fb4814Smrg ;; 280815fb4814Smrg esac 280915fb4814Smrg fi 281015fb4814Smrg sys_lib_dlsearch_path_spec='/usr/lib' 281115fb4814Smrg ;; 281215fb4814Smrg 2813b4d38c65Smrgtpf*) 2814b4d38c65Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 28157fe5393cSmrg version_type=linux 2816b4d38c65Smrg need_lib_prefix=no 2817b4d38c65Smrg need_version=no 2818b4d38c65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2819b4d38c65Smrg shlibpath_var=LD_LIBRARY_PATH 2820b4d38c65Smrg shlibpath_overrides_runpath=no 2821b4d38c65Smrg hardcode_into_libs=yes 2822b4d38c65Smrg ;; 2823b4d38c65Smrg 282415fb4814Smrguts4*) 28257fe5393cSmrg version_type=linux 282615fb4814Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 282715fb4814Smrg soname_spec='${libname}${release}${shared_ext}$major' 282815fb4814Smrg shlibpath_var=LD_LIBRARY_PATH 282915fb4814Smrg ;; 283015fb4814Smrg 283115fb4814Smrg*) 283215fb4814Smrg dynamic_linker=no 283315fb4814Smrg ;; 283415fb4814Smrgesac 283515fb4814SmrgAC_MSG_RESULT([$dynamic_linker]) 283615fb4814Smrgtest "$dynamic_linker" = no && can_build_shared=no 283715fb4814Smrg 283815fb4814Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 283915fb4814Smrgif test "$GCC" = yes; then 284015fb4814Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 284115fb4814Smrgfi 2842b534f209Smrg 2843b4d38c65Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2844b4d38c65Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2845b4d38c65Smrgfi 2846b4d38c65Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2847b4d38c65Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2848b4d38c65Smrgfi 2849b534f209Smrg 2850b4d38c65Smrg_LT_DECL([], [variables_saved_for_relink], [1], 2851b4d38c65Smrg [Variables whose values should be saved in libtool wrapper scripts and 2852b4d38c65Smrg restored at link time]) 2853b4d38c65Smrg_LT_DECL([], [need_lib_prefix], [0], 2854b4d38c65Smrg [Do we need the "lib" prefix for modules?]) 2855b4d38c65Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2856b4d38c65Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2857b4d38c65Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2858b4d38c65Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2859b4d38c65Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2860b4d38c65Smrg [Is shlibpath searched before the hard-coded library search path?]) 2861b4d38c65Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2862b4d38c65Smrg_LT_DECL([], [library_names_spec], [1], 2863b4d38c65Smrg [[List of archive names. First name is the real one, the rest are links. 2864b4d38c65Smrg The last name is the one that the linker finds with -lNAME]]) 2865b4d38c65Smrg_LT_DECL([], [soname_spec], [1], 2866b4d38c65Smrg [[The coded name of the library, if different from the real name]]) 2867b4d38c65Smrg_LT_DECL([], [install_override_mode], [1], 2868b4d38c65Smrg [Permission mode override for installation of shared libraries]) 2869b4d38c65Smrg_LT_DECL([], [postinstall_cmds], [2], 2870b4d38c65Smrg [Command to use after installation of a shared archive]) 2871b4d38c65Smrg_LT_DECL([], [postuninstall_cmds], [2], 2872b4d38c65Smrg [Command to use after uninstallation of a shared archive]) 2873b4d38c65Smrg_LT_DECL([], [finish_cmds], [2], 2874b4d38c65Smrg [Commands used to finish a libtool library installation in a directory]) 2875b4d38c65Smrg_LT_DECL([], [finish_eval], [1], 2876b4d38c65Smrg [[As "finish_cmds", except a single script fragment to be evaled but 2877b4d38c65Smrg not shown]]) 2878b4d38c65Smrg_LT_DECL([], [hardcode_into_libs], [0], 2879b4d38c65Smrg [Whether we should hardcode library paths into libraries]) 2880b4d38c65Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2881b4d38c65Smrg [Compile-time system search path for libraries]) 2882b4d38c65Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2883b4d38c65Smrg [Run-time system search path for libraries]) 2884b4d38c65Smrg])# _LT_SYS_DYNAMIC_LINKER 2885b4d38c65Smrg 2886b4d38c65Smrg 2887b4d38c65Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 2888b4d38c65Smrg# -------------------------- 2889b4d38c65Smrg# find a file program which can recognize shared library 2890b4d38c65SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2891b4d38c65Smrg[m4_require([_LT_DECL_EGREP])dnl 2892b4d38c65SmrgAC_MSG_CHECKING([for $1]) 2893b4d38c65SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2894b4d38c65Smrg[case $MAGIC_CMD in 2895b4d38c65Smrg[[\\/*] | ?:[\\/]*]) 2896b4d38c65Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2897b4d38c65Smrg ;; 2898b4d38c65Smrg*) 2899b4d38c65Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2900b4d38c65Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2901b4d38c65Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2902b4d38c65Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2903b4d38c65Smrgdnl not every word. This closes a longstanding sh security hole. 2904b4d38c65Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 2905b4d38c65Smrg for ac_dir in $ac_dummy; do 290615fb4814Smrg IFS="$lt_save_ifs" 290715fb4814Smrg test -z "$ac_dir" && ac_dir=. 290815fb4814Smrg if test -f $ac_dir/$1; then 290915fb4814Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 291015fb4814Smrg if test -n "$file_magic_test_file"; then 291115fb4814Smrg case $deplibs_check_method in 291215fb4814Smrg "file_magic "*) 291315fb4814Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 291415fb4814Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 291515fb4814Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 291615fb4814Smrg $EGREP "$file_magic_regex" > /dev/null; then 291715fb4814Smrg : 291815fb4814Smrg else 2919b4d38c65Smrg cat <<_LT_EOF 1>&2 292015fb4814Smrg 292115fb4814Smrg*** Warning: the command libtool uses to detect shared libraries, 292215fb4814Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 292315fb4814Smrg*** The result is that libtool may fail to recognize shared libraries 292415fb4814Smrg*** as such. This will affect the creation of libtool libraries that 292515fb4814Smrg*** depend on shared libraries, but programs linked with such libtool 292615fb4814Smrg*** libraries will work regardless of this problem. Nevertheless, you 292715fb4814Smrg*** may want to report the problem to your system manager and/or to 292815fb4814Smrg*** bug-libtool@gnu.org 292915fb4814Smrg 2930b4d38c65Smrg_LT_EOF 293115fb4814Smrg fi ;; 293215fb4814Smrg esac 293315fb4814Smrg fi 293415fb4814Smrg break 293515fb4814Smrg fi 293615fb4814Smrg done 293715fb4814Smrg IFS="$lt_save_ifs" 293815fb4814Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 293915fb4814Smrg ;; 294015fb4814Smrgesac]) 294115fb4814SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 294215fb4814Smrgif test -n "$MAGIC_CMD"; then 294315fb4814Smrg AC_MSG_RESULT($MAGIC_CMD) 294415fb4814Smrgelse 294515fb4814Smrg AC_MSG_RESULT(no) 294615fb4814Smrgfi 2947b4d38c65Smrg_LT_DECL([], [MAGIC_CMD], [0], 2948b4d38c65Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2949b4d38c65Smrg])# _LT_PATH_TOOL_PREFIX 295015fb4814Smrg 2951b4d38c65Smrg# Old name: 2952b4d38c65SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2953b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 2954b4d38c65Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 295515fb4814Smrg 2956b4d38c65Smrg 2957b4d38c65Smrg# _LT_PATH_MAGIC 2958b4d38c65Smrg# -------------- 2959de78e416Smrg# find a file program which can recognize a shared library 2960b4d38c65Smrgm4_defun([_LT_PATH_MAGIC], 2961b4d38c65Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 296215fb4814Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 296315fb4814Smrg if test -n "$ac_tool_prefix"; then 2964b4d38c65Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 296515fb4814Smrg else 296615fb4814Smrg MAGIC_CMD=: 296715fb4814Smrg fi 296815fb4814Smrgfi 2969b4d38c65Smrg])# _LT_PATH_MAGIC 297015fb4814Smrg 297115fb4814Smrg 2972b4d38c65Smrg# LT_PATH_LD 297315fb4814Smrg# ---------- 297415fb4814Smrg# find the pathname to the GNU or non-GNU linker 2975b4d38c65SmrgAC_DEFUN([LT_PATH_LD], 2976b4d38c65Smrg[AC_REQUIRE([AC_PROG_CC])dnl 2977b534f209SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2978b534f209SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2979b4d38c65Smrgm4_require([_LT_DECL_SED])dnl 2980b4d38c65Smrgm4_require([_LT_DECL_EGREP])dnl 2981b4d38c65Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 2982b4d38c65Smrg 2983b4d38c65SmrgAC_ARG_WITH([gnu-ld], 2984b4d38c65Smrg [AS_HELP_STRING([--with-gnu-ld], 2985b4d38c65Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2986b4d38c65Smrg [test "$withval" = no || with_gnu_ld=yes], 2987b4d38c65Smrg [with_gnu_ld=no])dnl 2988b4d38c65Smrg 298915fb4814Smrgac_prog=ld 299015fb4814Smrgif test "$GCC" = yes; then 299115fb4814Smrg # Check if gcc -print-prog-name=ld gives a path. 299215fb4814Smrg AC_MSG_CHECKING([for ld used by $CC]) 299315fb4814Smrg case $host in 299415fb4814Smrg *-*-mingw*) 299515fb4814Smrg # gcc leaves a trailing carriage return which upsets mingw 299615fb4814Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 299715fb4814Smrg *) 299815fb4814Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 299915fb4814Smrg esac 300015fb4814Smrg case $ac_prog in 300115fb4814Smrg # Accept absolute paths. 300215fb4814Smrg [[\\/]]* | ?:[[\\/]]*) 300315fb4814Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 300415fb4814Smrg # Canonicalize the pathname of ld 3005b4d38c65Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3006b4d38c65Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3007b4d38c65Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 300815fb4814Smrg done 300915fb4814Smrg test -z "$LD" && LD="$ac_prog" 301015fb4814Smrg ;; 301115fb4814Smrg "") 301215fb4814Smrg # If it fails, then pretend we aren't using GCC. 301315fb4814Smrg ac_prog=ld 301415fb4814Smrg ;; 301515fb4814Smrg *) 301615fb4814Smrg # If it is relative, then search for the first ld in PATH. 301715fb4814Smrg with_gnu_ld=unknown 301815fb4814Smrg ;; 301915fb4814Smrg esac 302015fb4814Smrgelif test "$with_gnu_ld" = yes; then 302115fb4814Smrg AC_MSG_CHECKING([for GNU ld]) 302215fb4814Smrgelse 302315fb4814Smrg AC_MSG_CHECKING([for non-GNU ld]) 302415fb4814Smrgfi 302515fb4814SmrgAC_CACHE_VAL(lt_cv_path_LD, 302615fb4814Smrg[if test -z "$LD"; then 302715fb4814Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 302815fb4814Smrg for ac_dir in $PATH; do 302915fb4814Smrg IFS="$lt_save_ifs" 303015fb4814Smrg test -z "$ac_dir" && ac_dir=. 303115fb4814Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 303215fb4814Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 303315fb4814Smrg # Check to see if the program is GNU ld. I'd rather use --version, 303415fb4814Smrg # but apparently some variants of GNU ld only accept -v. 303515fb4814Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 303615fb4814Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 303715fb4814Smrg *GNU* | *'with BFD'*) 303815fb4814Smrg test "$with_gnu_ld" != no && break 303915fb4814Smrg ;; 304015fb4814Smrg *) 304115fb4814Smrg test "$with_gnu_ld" != yes && break 304215fb4814Smrg ;; 304315fb4814Smrg esac 304415fb4814Smrg fi 304515fb4814Smrg done 304615fb4814Smrg IFS="$lt_save_ifs" 304715fb4814Smrgelse 304815fb4814Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 304915fb4814Smrgfi]) 305015fb4814SmrgLD="$lt_cv_path_LD" 305115fb4814Smrgif test -n "$LD"; then 305215fb4814Smrg AC_MSG_RESULT($LD) 305315fb4814Smrgelse 305415fb4814Smrg AC_MSG_RESULT(no) 305515fb4814Smrgfi 305615fb4814Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3057b4d38c65Smrg_LT_PATH_LD_GNU 3058b4d38c65SmrgAC_SUBST([LD]) 305915fb4814Smrg 3060b4d38c65Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3061b4d38c65Smrg])# LT_PATH_LD 3062b410ddbeSmrg 3063b4d38c65Smrg# Old names: 3064b4d38c65SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3065b4d38c65SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3066b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 3067b4d38c65Smrgdnl AC_DEFUN([AM_PROG_LD], []) 3068b4d38c65Smrgdnl AC_DEFUN([AC_PROG_LD], []) 3069b4d38c65Smrg 3070b4d38c65Smrg 3071b4d38c65Smrg# _LT_PATH_LD_GNU 3072b4d38c65Smrg#- -------------- 3073b4d38c65Smrgm4_defun([_LT_PATH_LD_GNU], 3074b4d38c65Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 307515fb4814Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 307615fb4814Smrgcase `$LD -v 2>&1 </dev/null` in 307715fb4814Smrg*GNU* | *'with BFD'*) 307815fb4814Smrg lt_cv_prog_gnu_ld=yes 307915fb4814Smrg ;; 308015fb4814Smrg*) 308115fb4814Smrg lt_cv_prog_gnu_ld=no 308215fb4814Smrg ;; 308315fb4814Smrgesac]) 308415fb4814Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3085b4d38c65Smrg])# _LT_PATH_LD_GNU 308615fb4814Smrg 308715fb4814Smrg 3088b4d38c65Smrg# _LT_CMD_RELOAD 3089b4d38c65Smrg# -------------- 309015fb4814Smrg# find reload flag for linker 309115fb4814Smrg# -- PORTME Some linkers may need a different reload flag. 3092b4d38c65Smrgm4_defun([_LT_CMD_RELOAD], 309315fb4814Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 309415fb4814Smrg lt_cv_ld_reload_flag, 309515fb4814Smrg [lt_cv_ld_reload_flag='-r']) 309615fb4814Smrgreload_flag=$lt_cv_ld_reload_flag 309715fb4814Smrgcase $reload_flag in 309815fb4814Smrg"" | " "*) ;; 309915fb4814Smrg*) reload_flag=" $reload_flag" ;; 310015fb4814Smrgesac 310115fb4814Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 310215fb4814Smrgcase $host_os in 3103b4d38c65Smrg cygwin* | mingw* | pw32* | cegcc*) 3104b4d38c65Smrg if test "$GCC" != yes; then 3105b4d38c65Smrg reload_cmds=false 3106b4d38c65Smrg fi 3107b4d38c65Smrg ;; 310815fb4814Smrg darwin*) 310915fb4814Smrg if test "$GCC" = yes; then 311015fb4814Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 311115fb4814Smrg else 311215fb4814Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 311315fb4814Smrg fi 311415fb4814Smrg ;; 311515fb4814Smrgesac 3116b4d38c65Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3117b4d38c65Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3118b4d38c65Smrg])# _LT_CMD_RELOAD 311915fb4814Smrg 312015fb4814Smrg 3121b4d38c65Smrg# _LT_CHECK_MAGIC_METHOD 3122b4d38c65Smrg# ---------------------- 312315fb4814Smrg# how to check for library dependencies 312415fb4814Smrg# -- PORTME fill in with the dynamic library characteristics 3125b4d38c65Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3126b4d38c65Smrg[m4_require([_LT_DECL_EGREP]) 3127b4d38c65Smrgm4_require([_LT_DECL_OBJDUMP]) 3128b4d38c65SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 312915fb4814Smrglt_cv_deplibs_check_method, 313015fb4814Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 313115fb4814Smrglt_cv_file_magic_test_file= 313215fb4814Smrglt_cv_deplibs_check_method='unknown' 313315fb4814Smrg# Need to set the preceding variable on all platforms that support 313415fb4814Smrg# interlibrary dependencies. 313515fb4814Smrg# 'none' -- dependencies not supported. 313615fb4814Smrg# `unknown' -- same as none, but documents that we really don't know. 313715fb4814Smrg# 'pass_all' -- all dependencies passed with no checks. 313815fb4814Smrg# 'test_compile' -- check by making test program. 313915fb4814Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 314015fb4814Smrg# which responds to the $file_magic_cmd with a given extended regex. 314115fb4814Smrg# If you have `file' or equivalent on your system and you're not sure 314215fb4814Smrg# whether `pass_all' will *always* work, you probably want this one. 314315fb4814Smrg 314415fb4814Smrgcase $host_os in 3145b4d38c65Smrgaix[[4-9]]*) 314615fb4814Smrg lt_cv_deplibs_check_method=pass_all 314715fb4814Smrg ;; 314815fb4814Smrg 314915fb4814Smrgbeos*) 315015fb4814Smrg lt_cv_deplibs_check_method=pass_all 315115fb4814Smrg ;; 315215fb4814Smrg 315315fb4814Smrgbsdi[[45]]*) 315415fb4814Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 315515fb4814Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 315615fb4814Smrg lt_cv_file_magic_test_file=/shlib/libc.so 315715fb4814Smrg ;; 315815fb4814Smrg 315915fb4814Smrgcygwin*) 316015fb4814Smrg # func_win32_libid is a shell function defined in ltmain.sh 316115fb4814Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 316215fb4814Smrg lt_cv_file_magic_cmd='func_win32_libid' 316315fb4814Smrg ;; 316415fb4814Smrg 316515fb4814Smrgmingw* | pw32*) 316615fb4814Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 3167de78e416Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3168de78e416Smrg # unless we find 'file', for example because we are cross-compiling. 3169b4d38c65Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3170b4d38c65Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3171de78e416Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3172de78e416Smrg lt_cv_file_magic_cmd='func_win32_libid' 3173de78e416Smrg else 3174b4d38c65Smrg # Keep this pattern in sync with the one in func_win32_libid. 3175b4d38c65Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3176de78e416Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3177de78e416Smrg fi 317815fb4814Smrg ;; 317915fb4814Smrg 3180b4d38c65Smrgcegcc*) 3181b4d38c65Smrg # use the weaker test based on 'objdump'. See mingw*. 3182b4d38c65Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3183b4d38c65Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3184b4d38c65Smrg ;; 3185b4d38c65Smrg 318615fb4814Smrgdarwin* | rhapsody*) 318715fb4814Smrg lt_cv_deplibs_check_method=pass_all 318815fb4814Smrg ;; 318915fb4814Smrg 3190de78e416Smrgfreebsd* | dragonfly*) 3191b4d38c65Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 319215fb4814Smrg case $host_cpu in 319315fb4814Smrg i*86 ) 319415fb4814Smrg # Not sure whether the presence of OpenBSD here was a mistake. 319515fb4814Smrg # Let's accept both of them until this is cleared up. 319615fb4814Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 319715fb4814Smrg lt_cv_file_magic_cmd=/usr/bin/file 319815fb4814Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 319915fb4814Smrg ;; 320015fb4814Smrg esac 320115fb4814Smrg else 320215fb4814Smrg lt_cv_deplibs_check_method=pass_all 320315fb4814Smrg fi 320415fb4814Smrg ;; 320515fb4814Smrg 320615fb4814Smrggnu*) 320715fb4814Smrg lt_cv_deplibs_check_method=pass_all 320815fb4814Smrg ;; 320915fb4814Smrg 3210b4d38c65Smrghaiku*) 3211b4d38c65Smrg lt_cv_deplibs_check_method=pass_all 3212b4d38c65Smrg ;; 3213b4d38c65Smrg 321415fb4814Smrghpux10.20* | hpux11*) 321515fb4814Smrg lt_cv_file_magic_cmd=/usr/bin/file 321615fb4814Smrg case $host_cpu in 321715fb4814Smrg ia64*) 321815fb4814Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 321915fb4814Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 322015fb4814Smrg ;; 322115fb4814Smrg hppa*64*) 3222b4d38c65Smrg [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]'] 322315fb4814Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 322415fb4814Smrg ;; 322515fb4814Smrg *) 3226b4d38c65Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 322715fb4814Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 322815fb4814Smrg ;; 322915fb4814Smrg esac 323015fb4814Smrg ;; 323115fb4814Smrg 3232de78e416Smrginterix[[3-9]]*) 323315fb4814Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 323415fb4814Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 323515fb4814Smrg ;; 323615fb4814Smrg 323715fb4814Smrgirix5* | irix6* | nonstopux*) 323815fb4814Smrg case $LD in 323915fb4814Smrg *-32|*"-32 ") libmagic=32-bit;; 324015fb4814Smrg *-n32|*"-n32 ") libmagic=N32;; 324115fb4814Smrg *-64|*"-64 ") libmagic=64-bit;; 324215fb4814Smrg *) libmagic=never-match;; 324315fb4814Smrg esac 324415fb4814Smrg lt_cv_deplibs_check_method=pass_all 324515fb4814Smrg ;; 324615fb4814Smrg 32477fe5393cSmrg# This must be Linux ELF. 3248b4d38c65Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 324915fb4814Smrg lt_cv_deplibs_check_method=pass_all 325015fb4814Smrg ;; 325115fb4814Smrg 325215fb4814Smrgnetbsd*) 3253b4d38c65Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 325415fb4814Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 325515fb4814Smrg else 325615fb4814Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 325715fb4814Smrg fi 325815fb4814Smrg ;; 325915fb4814Smrg 326015fb4814Smrgnewos6*) 326115fb4814Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 326215fb4814Smrg lt_cv_file_magic_cmd=/usr/bin/file 326315fb4814Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 326415fb4814Smrg ;; 326515fb4814Smrg 3266b4d38c65Smrg*nto* | *qnx*) 3267b4d38c65Smrg lt_cv_deplibs_check_method=pass_all 326815fb4814Smrg ;; 326915fb4814Smrg 327015fb4814Smrgopenbsd*) 3271b4d38c65Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 327215fb4814Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 327315fb4814Smrg else 327415fb4814Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 327515fb4814Smrg fi 327615fb4814Smrg ;; 327715fb4814Smrg 327815fb4814Smrgosf3* | osf4* | osf5*) 327915fb4814Smrg lt_cv_deplibs_check_method=pass_all 328015fb4814Smrg ;; 328115fb4814Smrg 3282de78e416Smrgrdos*) 3283de78e416Smrg lt_cv_deplibs_check_method=pass_all 3284de78e416Smrg ;; 3285de78e416Smrg 328615fb4814Smrgsolaris*) 328715fb4814Smrg lt_cv_deplibs_check_method=pass_all 328815fb4814Smrg ;; 328915fb4814Smrg 3290b4d38c65Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3291b4d38c65Smrg lt_cv_deplibs_check_method=pass_all 3292b4d38c65Smrg ;; 3293b4d38c65Smrg 329415fb4814Smrgsysv4 | sysv4.3*) 329515fb4814Smrg case $host_vendor in 329615fb4814Smrg motorola) 329715fb4814Smrg 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]]' 329815fb4814Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 329915fb4814Smrg ;; 330015fb4814Smrg ncr) 330115fb4814Smrg lt_cv_deplibs_check_method=pass_all 330215fb4814Smrg ;; 330315fb4814Smrg sequent) 330415fb4814Smrg lt_cv_file_magic_cmd='/bin/file' 330515fb4814Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 330615fb4814Smrg ;; 330715fb4814Smrg sni) 330815fb4814Smrg lt_cv_file_magic_cmd='/bin/file' 330915fb4814Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 331015fb4814Smrg lt_cv_file_magic_test_file=/lib/libc.so 331115fb4814Smrg ;; 331215fb4814Smrg siemens) 331315fb4814Smrg lt_cv_deplibs_check_method=pass_all 331415fb4814Smrg ;; 331515fb4814Smrg pc) 331615fb4814Smrg lt_cv_deplibs_check_method=pass_all 331715fb4814Smrg ;; 331815fb4814Smrg esac 331915fb4814Smrg ;; 332015fb4814Smrg 3321b4d38c65Smrgtpf*) 332215fb4814Smrg lt_cv_deplibs_check_method=pass_all 332315fb4814Smrg ;; 332415fb4814Smrgesac 332515fb4814Smrg]) 3326b4d38c65Smrg 3327b4d38c65Smrgfile_magic_glob= 3328b4d38c65Smrgwant_nocaseglob=no 3329b4d38c65Smrgif test "$build" = "$host"; then 3330b4d38c65Smrg case $host_os in 3331b4d38c65Smrg mingw* | pw32*) 3332b4d38c65Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3333b4d38c65Smrg want_nocaseglob=yes 3334b4d38c65Smrg else 3335b4d38c65Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3336b4d38c65Smrg fi 3337b4d38c65Smrg ;; 3338b4d38c65Smrg esac 3339b4d38c65Smrgfi 3340b4d38c65Smrg 334115fb4814Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 334215fb4814Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 334315fb4814Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 334415fb4814Smrg 3345b4d38c65Smrg_LT_DECL([], [deplibs_check_method], [1], 3346b4d38c65Smrg [Method to check whether dependent libraries are shared objects]) 3347b4d38c65Smrg_LT_DECL([], [file_magic_cmd], [1], 3348b4d38c65Smrg [Command to use when deplibs_check_method = "file_magic"]) 3349b4d38c65Smrg_LT_DECL([], [file_magic_glob], [1], 3350b4d38c65Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3351b4d38c65Smrg_LT_DECL([], [want_nocaseglob], [1], 3352b4d38c65Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3353b4d38c65Smrg])# _LT_CHECK_MAGIC_METHOD 335415fb4814Smrg 3355b4d38c65Smrg 3356b4d38c65Smrg# LT_PATH_NM 335715fb4814Smrg# ---------- 3358b4d38c65Smrg# find the pathname to a BSD- or MS-compatible name lister 3359b4d38c65SmrgAC_DEFUN([LT_PATH_NM], 3360b4d38c65Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3361b4d38c65SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 336215fb4814Smrg[if test -n "$NM"; then 336315fb4814Smrg # Let the user override the test. 336415fb4814Smrg lt_cv_path_NM="$NM" 336515fb4814Smrgelse 336615fb4814Smrg lt_nm_to_check="${ac_tool_prefix}nm" 3367de78e416Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 336815fb4814Smrg lt_nm_to_check="$lt_nm_to_check nm" 336915fb4814Smrg fi 337015fb4814Smrg for lt_tmp_nm in $lt_nm_to_check; do 337115fb4814Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 337215fb4814Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 337315fb4814Smrg IFS="$lt_save_ifs" 337415fb4814Smrg test -z "$ac_dir" && ac_dir=. 337515fb4814Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 337615fb4814Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 337715fb4814Smrg # Check to see if the nm accepts a BSD-compat flag. 337815fb4814Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 337915fb4814Smrg # nm: unknown option "B" ignored 338015fb4814Smrg # Tru64's nm complains that /dev/null is an invalid object file 338115fb4814Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 338215fb4814Smrg */dev/null* | *'Invalid file or object type'*) 338315fb4814Smrg lt_cv_path_NM="$tmp_nm -B" 338415fb4814Smrg break 338515fb4814Smrg ;; 338615fb4814Smrg *) 338715fb4814Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 338815fb4814Smrg */dev/null*) 338915fb4814Smrg lt_cv_path_NM="$tmp_nm -p" 339015fb4814Smrg break 339115fb4814Smrg ;; 339215fb4814Smrg *) 339315fb4814Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 339415fb4814Smrg continue # so that we can try to find one that supports BSD flags 339515fb4814Smrg ;; 339615fb4814Smrg esac 339715fb4814Smrg ;; 339815fb4814Smrg esac 339915fb4814Smrg fi 340015fb4814Smrg done 340115fb4814Smrg IFS="$lt_save_ifs" 340215fb4814Smrg done 3403b4d38c65Smrg : ${lt_cv_path_NM=no} 340415fb4814Smrgfi]) 3405b4d38c65Smrgif test "$lt_cv_path_NM" != "no"; then 3406b4d38c65Smrg NM="$lt_cv_path_NM" 3407b4d38c65Smrgelse 3408b4d38c65Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3409b4d38c65Smrg if test -n "$DUMPBIN"; then : 3410b4d38c65Smrg # Let the user override the test. 3411b4d38c65Smrg else 3412b4d38c65Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3413b4d38c65Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3414b4d38c65Smrg *COFF*) 3415b4d38c65Smrg DUMPBIN="$DUMPBIN -symbols" 3416b4d38c65Smrg ;; 3417b4d38c65Smrg *) 3418b4d38c65Smrg DUMPBIN=: 3419b4d38c65Smrg ;; 3420b4d38c65Smrg esac 3421b4d38c65Smrg fi 3422b4d38c65Smrg AC_SUBST([DUMPBIN]) 3423b4d38c65Smrg if test "$DUMPBIN" != ":"; then 3424b4d38c65Smrg NM="$DUMPBIN" 3425b4d38c65Smrg fi 3426b4d38c65Smrgfi 3427b4d38c65Smrgtest -z "$NM" && NM=nm 3428b4d38c65SmrgAC_SUBST([NM]) 3429b4d38c65Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3430b4d38c65Smrg 3431b4d38c65SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3432b4d38c65Smrg [lt_cv_nm_interface="BSD nm" 3433b4d38c65Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3434b4d38c65Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3435b4d38c65Smrg (eval "$ac_compile" 2>conftest.err) 3436b4d38c65Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3437b4d38c65Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3438b4d38c65Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3439b4d38c65Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3440b4d38c65Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3441b4d38c65Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3442b4d38c65Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3443b4d38c65Smrg lt_cv_nm_interface="MS dumpbin" 3444b4d38c65Smrg fi 3445b4d38c65Smrg rm -f conftest*]) 3446b4d38c65Smrg])# LT_PATH_NM 344715fb4814Smrg 3448b4d38c65Smrg# Old names: 3449b4d38c65SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3450b4d38c65SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3451b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 3452b4d38c65Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3453b4d38c65Smrgdnl AC_DEFUN([AC_PROG_NM], []) 345415fb4814Smrg 3455b4d38c65Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3456b4d38c65Smrg# -------------------------------- 3457b4d38c65Smrg# how to determine the name of the shared library 3458b4d38c65Smrg# associated with a specific link library. 3459b4d38c65Smrg# -- PORTME fill in with the dynamic library characteristics 3460b4d38c65Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3461b4d38c65Smrg[m4_require([_LT_DECL_EGREP]) 3462b4d38c65Smrgm4_require([_LT_DECL_OBJDUMP]) 3463b4d38c65Smrgm4_require([_LT_DECL_DLLTOOL]) 3464b4d38c65SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3465b4d38c65Smrglt_cv_sharedlib_from_linklib_cmd, 3466b4d38c65Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3467b4d38c65Smrg 3468b4d38c65Smrgcase $host_os in 3469b4d38c65Smrgcygwin* | mingw* | pw32* | cegcc*) 3470b4d38c65Smrg # two different shell functions defined in ltmain.sh 3471b4d38c65Smrg # decide which to use based on capabilities of $DLLTOOL 3472b4d38c65Smrg case `$DLLTOOL --help 2>&1` in 3473b4d38c65Smrg *--identify-strict*) 3474b4d38c65Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3475b4d38c65Smrg ;; 3476b4d38c65Smrg *) 3477b4d38c65Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3478b4d38c65Smrg ;; 3479b4d38c65Smrg esac 3480b4d38c65Smrg ;; 3481b4d38c65Smrg*) 3482b4d38c65Smrg # fallback: assume linklib IS sharedlib 3483b4d38c65Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3484b4d38c65Smrg ;; 3485b4d38c65Smrgesac 3486b4d38c65Smrg]) 3487b4d38c65Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3488b4d38c65Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3489b4d38c65Smrg 3490b4d38c65Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3491b4d38c65Smrg [Command to associate shared and link libraries]) 3492b4d38c65Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3493b4d38c65Smrg 3494b4d38c65Smrg 3495b4d38c65Smrg# _LT_PATH_MANIFEST_TOOL 3496b4d38c65Smrg# ---------------------- 3497b4d38c65Smrg# locate the manifest tool 3498b4d38c65Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3499b4d38c65Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3500b4d38c65Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3501b4d38c65SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3502b4d38c65Smrg [lt_cv_path_mainfest_tool=no 3503b4d38c65Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3504b4d38c65Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3505b4d38c65Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3506b4d38c65Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3507b4d38c65Smrg lt_cv_path_mainfest_tool=yes 3508b4d38c65Smrg fi 3509b4d38c65Smrg rm -f conftest*]) 3510b4d38c65Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 3511b4d38c65Smrg MANIFEST_TOOL=: 3512b4d38c65Smrgfi 3513b4d38c65Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3514b4d38c65Smrg])# _LT_PATH_MANIFEST_TOOL 3515b4d38c65Smrg 3516b4d38c65Smrg 3517b4d38c65Smrg# LT_LIB_M 3518b4d38c65Smrg# -------- 351915fb4814Smrg# check for math library 3520b4d38c65SmrgAC_DEFUN([LT_LIB_M], 352115fb4814Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 352215fb4814SmrgLIBM= 352315fb4814Smrgcase $host in 3524b4d38c65Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 352515fb4814Smrg # These system don't have libm, or don't need it 352615fb4814Smrg ;; 352715fb4814Smrg*-ncr-sysv4.3*) 352815fb4814Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 352915fb4814Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 353015fb4814Smrg ;; 353115fb4814Smrg*) 353215fb4814Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 353315fb4814Smrg ;; 353415fb4814Smrgesac 3535b4d38c65SmrgAC_SUBST([LIBM]) 3536b4d38c65Smrg])# LT_LIB_M 353715fb4814Smrg 3538b4d38c65Smrg# Old name: 3539b4d38c65SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3540b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 3541b4d38c65Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 354215fb4814Smrg 354315fb4814Smrg 3544b4d38c65Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3545b4d38c65Smrg# ------------------------------- 3546b4d38c65Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3547b4d38c65Smrg[m4_require([_LT_TAG_COMPILER])dnl 354815fb4814Smrg 3549b4d38c65Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 355015fb4814Smrg 3551b4d38c65Smrgif test "$GCC" = yes; then 3552b4d38c65Smrg case $cc_basename in 3553b4d38c65Smrg nvcc*) 3554b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3555b4d38c65Smrg *) 3556b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3557b4d38c65Smrg esac 355815fb4814Smrg 3559b4d38c65Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3560b4d38c65Smrg lt_cv_prog_compiler_rtti_exceptions, 3561b4d38c65Smrg [-fno-rtti -fno-exceptions], [], 3562b4d38c65Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3563b534f209Smrgfi 3564b4d38c65Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3565b4d38c65Smrg [Compiler flag to turn off builtin functions]) 3566b4d38c65Smrg])# _LT_COMPILER_NO_RTTI 356715fb4814Smrg 356815fb4814Smrg 3569b4d38c65Smrg# _LT_CMD_GLOBAL_SYMBOLS 3570b4d38c65Smrg# ---------------------- 3571b4d38c65Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3572b4d38c65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3573b4d38c65SmrgAC_REQUIRE([AC_PROG_CC])dnl 3574b4d38c65SmrgAC_REQUIRE([AC_PROG_AWK])dnl 3575b4d38c65SmrgAC_REQUIRE([LT_PATH_NM])dnl 3576b4d38c65SmrgAC_REQUIRE([LT_PATH_LD])dnl 3577b4d38c65Smrgm4_require([_LT_DECL_SED])dnl 3578b4d38c65Smrgm4_require([_LT_DECL_EGREP])dnl 3579b4d38c65Smrgm4_require([_LT_TAG_COMPILER])dnl 358015fb4814Smrg 3581b4d38c65Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3582b4d38c65SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3583b4d38c65SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3584b4d38c65Smrg[ 3585b4d38c65Smrg# These are sane defaults that work on at least a few old systems. 3586b4d38c65Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 358715fb4814Smrg 3588b4d38c65Smrg# Character class describing NM global symbol codes. 3589b4d38c65Smrgsymcode='[[BCDEGRST]]' 3590b534f209Smrg 3591b4d38c65Smrg# Regexp to match symbols that can be accessed directly from C. 3592b4d38c65Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3593b534f209Smrg 3594b4d38c65Smrg# Define system-specific variables. 3595b534f209Smrgcase $host_os in 3596b4d38c65Smrgaix*) 3597b4d38c65Smrg symcode='[[BCDT]]' 3598b410ddbeSmrg ;; 3599b4d38c65Smrgcygwin* | mingw* | pw32* | cegcc*) 3600b4d38c65Smrg symcode='[[ABCDGISTW]]' 3601b4d38c65Smrg ;; 3602b4d38c65Smrghpux*) 3603b4d38c65Smrg if test "$host_cpu" = ia64; then 3604b4d38c65Smrg symcode='[[ABCDEGRST]]' 3605b534f209Smrg fi 3606b4d38c65Smrg ;; 3607b4d38c65Smrgirix* | nonstopux*) 3608b4d38c65Smrg symcode='[[BCDEGRST]]' 3609b4d38c65Smrg ;; 3610b4d38c65Smrgosf*) 3611b4d38c65Smrg symcode='[[BCDEGQRST]]' 3612b4d38c65Smrg ;; 3613b4d38c65Smrgsolaris*) 3614b4d38c65Smrg symcode='[[BDRT]]' 3615b4d38c65Smrg ;; 3616b4d38c65Smrgsco3.2v5*) 3617b4d38c65Smrg symcode='[[DT]]' 3618b4d38c65Smrg ;; 3619b4d38c65Smrgsysv4.2uw2*) 3620b4d38c65Smrg symcode='[[DT]]' 3621b4d38c65Smrg ;; 3622b4d38c65Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3623b4d38c65Smrg symcode='[[ABDT]]' 3624b4d38c65Smrg ;; 3625b4d38c65Smrgsysv4) 3626b4d38c65Smrg symcode='[[DFNSTU]]' 3627b4d38c65Smrg ;; 3628b410ddbeSmrgesac 362915fb4814Smrg 3630b4d38c65Smrg# If we're using GNU nm, then use its standard symbol codes. 3631b4d38c65Smrgcase `$NM -V 2>&1` in 3632b4d38c65Smrg*GNU* | *'with BFD'*) 3633b4d38c65Smrg symcode='[[ABCDGIRSTW]]' ;; 3634b4d38c65Smrgesac 363515fb4814Smrg 3636b4d38c65Smrg# Transform an extracted symbol line into a proper C declaration. 3637b4d38c65Smrg# Some systems (esp. on ia64) link data and code symbols differently, 3638b4d38c65Smrg# so use this general approach. 3639b4d38c65Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 364015fb4814Smrg 3641b4d38c65Smrg# Transform an extracted symbol line into symbol name and symbol address 3642b4d38c65Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3643b4d38c65Smrglt_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'" 364415fb4814Smrg 3645b4d38c65Smrg# Handle CRLF in mingw tool chain 3646b4d38c65Smrgopt_cr= 3647b4d38c65Smrgcase $build_os in 3648b4d38c65Smrgmingw*) 3649b4d38c65Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3650b4d38c65Smrg ;; 3651b4d38c65Smrgesac 365215fb4814Smrg 3653b4d38c65Smrg# Try without a prefix underscore, then with it. 3654b4d38c65Smrgfor ac_symprfx in "" "_"; do 365515fb4814Smrg 3656b4d38c65Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3657b4d38c65Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 365815fb4814Smrg 3659b4d38c65Smrg # Write the raw and C identifiers. 3660b4d38c65Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3661b4d38c65Smrg # Fake it for dumpbin and say T for any non-static function 3662b4d38c65Smrg # and D for any global variable. 3663b4d38c65Smrg # Also find C++ and __fastcall symbols from MSVC++, 3664b4d38c65Smrg # which start with @ or ?. 3665b4d38c65Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3666b4d38c65Smrg" {last_section=section; section=\$ 3};"\ 3667b4d38c65Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3668b4d38c65Smrg" \$ 0!~/External *\|/{next};"\ 3669b4d38c65Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3670b4d38c65Smrg" {if(hide[section]) next};"\ 3671b4d38c65Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3672b4d38c65Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3673b4d38c65Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3674b4d38c65Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3675b4d38c65Smrg" ' prfx=^$ac_symprfx]" 3676b4d38c65Smrg else 3677b4d38c65Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3678b4d38c65Smrg fi 3679b4d38c65Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 368015fb4814Smrg 3681b4d38c65Smrg # Check to see that the pipe works correctly. 3682b4d38c65Smrg pipe_works=no 368315fb4814Smrg 3684b4d38c65Smrg rm -f conftest* 3685b4d38c65Smrg cat > conftest.$ac_ext <<_LT_EOF 3686b4d38c65Smrg#ifdef __cplusplus 3687b4d38c65Smrgextern "C" { 3688b4d38c65Smrg#endif 3689b4d38c65Smrgchar nm_test_var; 3690b4d38c65Smrgvoid nm_test_func(void); 3691b4d38c65Smrgvoid nm_test_func(void){} 3692b4d38c65Smrg#ifdef __cplusplus 3693b4d38c65Smrg} 3694b4d38c65Smrg#endif 3695b4d38c65Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 3696b4d38c65Smrg_LT_EOF 3697b534f209Smrg 3698b4d38c65Smrg if AC_TRY_EVAL(ac_compile); then 3699b4d38c65Smrg # Now try to grab the symbols. 3700b4d38c65Smrg nlist=conftest.nm 3701b4d38c65Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3702b4d38c65Smrg # Try sorting and uniquifying the output. 3703b4d38c65Smrg if sort "$nlist" | uniq > "$nlist"T; then 3704b4d38c65Smrg mv -f "$nlist"T "$nlist" 3705b4d38c65Smrg else 3706b4d38c65Smrg rm -f "$nlist"T 3707b4d38c65Smrg fi 3708b534f209Smrg 3709b4d38c65Smrg # Make sure that we snagged all the symbols we need. 3710b4d38c65Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3711b4d38c65Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3712b4d38c65Smrg cat <<_LT_EOF > conftest.$ac_ext 3713b4d38c65Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3714b4d38c65Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3715b4d38c65Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 3716b4d38c65Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 3717b4d38c65Smrg# define LT@&t@_DLSYM_CONST 3718b4d38c65Smrg#elif defined(__osf__) 3719b4d38c65Smrg/* This system does not cope well with relocations in const data. */ 3720b4d38c65Smrg# define LT@&t@_DLSYM_CONST 3721b4d38c65Smrg#else 3722b4d38c65Smrg# define LT@&t@_DLSYM_CONST const 3723b4d38c65Smrg#endif 3724b534f209Smrg 3725b4d38c65Smrg#ifdef __cplusplus 3726b4d38c65Smrgextern "C" { 3727b4d38c65Smrg#endif 3728b534f209Smrg 3729b4d38c65Smrg_LT_EOF 3730b4d38c65Smrg # Now generate the symbol file. 3731b4d38c65Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3732b534f209Smrg 3733b4d38c65Smrg cat <<_LT_EOF >> conftest.$ac_ext 3734b534f209Smrg 3735b4d38c65Smrg/* The mapping between symbol names and symbols. */ 3736b4d38c65SmrgLT@&t@_DLSYM_CONST struct { 3737b4d38c65Smrg const char *name; 3738b4d38c65Smrg void *address; 3739b4d38c65Smrg} 3740b4d38c65Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3741b4d38c65Smrg{ 3742b4d38c65Smrg { "@PROGRAM@", (void *) 0 }, 3743b4d38c65Smrg_LT_EOF 3744b4d38c65Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3745b4d38c65Smrg cat <<\_LT_EOF >> conftest.$ac_ext 3746b4d38c65Smrg {0, (void *) 0} 3747b4d38c65Smrg}; 3748b534f209Smrg 3749b4d38c65Smrg/* This works around a problem in FreeBSD linker */ 3750b4d38c65Smrg#ifdef FREEBSD_WORKAROUND 3751b4d38c65Smrgstatic const void *lt_preloaded_setup() { 3752b4d38c65Smrg return lt__PROGRAM__LTX_preloaded_symbols; 3753b4d38c65Smrg} 3754b4d38c65Smrg#endif 3755b534f209Smrg 3756b4d38c65Smrg#ifdef __cplusplus 3757b4d38c65Smrg} 3758b4d38c65Smrg#endif 3759b4d38c65Smrg_LT_EOF 3760b4d38c65Smrg # Now try linking the two files. 3761b4d38c65Smrg mv conftest.$ac_objext conftstm.$ac_objext 3762b4d38c65Smrg lt_globsym_save_LIBS=$LIBS 3763b4d38c65Smrg lt_globsym_save_CFLAGS=$CFLAGS 3764b4d38c65Smrg LIBS="conftstm.$ac_objext" 3765b4d38c65Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3766b4d38c65Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3767b4d38c65Smrg pipe_works=yes 3768b4d38c65Smrg fi 3769b4d38c65Smrg LIBS=$lt_globsym_save_LIBS 3770b4d38c65Smrg CFLAGS=$lt_globsym_save_CFLAGS 3771b4d38c65Smrg else 3772b4d38c65Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3773b4d38c65Smrg fi 3774b4d38c65Smrg else 3775b4d38c65Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3776b4d38c65Smrg fi 377715fb4814Smrg else 3778b4d38c65Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 377915fb4814Smrg fi 378015fb4814Smrg else 3781b4d38c65Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3782b4d38c65Smrg cat conftest.$ac_ext >&5 378315fb4814Smrg fi 3784b4d38c65Smrg rm -rf conftest* conftst* 378515fb4814Smrg 3786b4d38c65Smrg # Do not use the global_symbol_pipe unless it works. 3787b4d38c65Smrg if test "$pipe_works" = yes; then 3788b4d38c65Smrg break 3789b4d38c65Smrg else 3790b4d38c65Smrg lt_cv_sys_global_symbol_pipe= 3791b4d38c65Smrg fi 3792b4d38c65Smrgdone 3793b4d38c65Smrg]) 3794b4d38c65Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3795b4d38c65Smrg lt_cv_sys_global_symbol_to_cdecl= 3796b4d38c65Smrgfi 3797b4d38c65Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3798b4d38c65Smrg AC_MSG_RESULT(failed) 379915fb4814Smrgelse 3800b4d38c65Smrg AC_MSG_RESULT(ok) 380115fb4814Smrgfi 380215fb4814Smrg 3803b4d38c65Smrg# Response file support. 3804b4d38c65Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3805b4d38c65Smrg nm_file_list_spec='@' 3806b4d38c65Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3807b4d38c65Smrg nm_file_list_spec='@' 3808b4d38c65Smrgfi 380915fb4814Smrg 3810b4d38c65Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3811b4d38c65Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 3812b4d38c65Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3813b4d38c65Smrg [Transform the output of nm in a proper C declaration]) 3814b4d38c65Smrg_LT_DECL([global_symbol_to_c_name_address], 3815b4d38c65Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3816b4d38c65Smrg [Transform the output of nm in a C name address pair]) 3817b4d38c65Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3818b4d38c65Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3819b4d38c65Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3820b4d38c65Smrg_LT_DECL([], [nm_file_list_spec], [1], 3821b4d38c65Smrg [Specify filename containing input files for $NM]) 3822b4d38c65Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 3823b4d38c65Smrg 3824b4d38c65Smrg 3825b4d38c65Smrg# _LT_COMPILER_PIC([TAGNAME]) 3826b4d38c65Smrg# --------------------------- 3827b4d38c65Smrgm4_defun([_LT_COMPILER_PIC], 3828b4d38c65Smrg[m4_require([_LT_TAG_COMPILER])dnl 3829b4d38c65Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3830b4d38c65Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3831b4d38c65Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 383215fb4814Smrg 3833b4d38c65Smrgm4_if([$1], [CXX], [ 3834b4d38c65Smrg # C++ specific cases for pic, static, wl, etc. 3835b4d38c65Smrg if test "$GXX" = yes; then 3836b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3837b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 383815fb4814Smrg 3839b4d38c65Smrg case $host_os in 3840b4d38c65Smrg aix*) 3841b4d38c65Smrg # All AIX code is PIC. 3842b534f209Smrg if test "$host_cpu" = ia64; then 3843b4d38c65Smrg # AIX 5 now supports IA64 processor 3844b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3845b410ddbeSmrg fi 3846b4d38c65Smrg ;; 3847b534f209Smrg 3848b4d38c65Smrg amigaos*) 3849b4d38c65Smrg case $host_cpu in 3850b4d38c65Smrg powerpc) 3851b4d38c65Smrg # see comment about AmigaOS4 .so support 3852b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3853b4d38c65Smrg ;; 3854b4d38c65Smrg m68k) 3855b4d38c65Smrg # FIXME: we need at least 68020 code to build shared libraries, but 3856b4d38c65Smrg # adding the `-m68020' flag to GCC prevents building anything better, 3857b4d38c65Smrg # like `-m68040'. 3858b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3859b4d38c65Smrg ;; 3860b4d38c65Smrg esac 3861b4d38c65Smrg ;; 3862b534f209Smrg 3863b4d38c65Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3864b4d38c65Smrg # PIC is the default for these OSes. 3865b534f209Smrg ;; 3866b4d38c65Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3867b4d38c65Smrg # This hack is so that the source file can tell whether it is being 3868b4d38c65Smrg # built for inclusion in a dll (and should export symbols for example). 3869b4d38c65Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3870b4d38c65Smrg # (--disable-auto-import) libraries 3871b4d38c65Smrg m4_if([$1], [GCJ], [], 3872b4d38c65Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3873b534f209Smrg ;; 3874b4d38c65Smrg darwin* | rhapsody*) 3875b4d38c65Smrg # PIC is the default on this platform 3876b4d38c65Smrg # Common symbols not allowed in MH_DYLIB files 3877b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3878b4d38c65Smrg ;; 3879b4d38c65Smrg *djgpp*) 3880b4d38c65Smrg # DJGPP does not support shared libraries at all 3881b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3882b4d38c65Smrg ;; 3883b4d38c65Smrg haiku*) 3884b4d38c65Smrg # PIC is the default for Haiku. 3885b4d38c65Smrg # The "-static" flag exists, but is broken. 3886b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 3887b4d38c65Smrg ;; 3888b4d38c65Smrg interix[[3-9]]*) 3889b4d38c65Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3890b4d38c65Smrg # Instead, we relocate shared libraries at runtime. 3891b4d38c65Smrg ;; 3892b4d38c65Smrg sysv4*MP*) 3893b4d38c65Smrg if test -d /usr/nec; then 3894b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3895b534f209Smrg fi 3896b534f209Smrg ;; 3897b4d38c65Smrg hpux*) 3898b4d38c65Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3899b4d38c65Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3900b4d38c65Smrg # sets the default TLS model and affects inlining. 3901b534f209Smrg case $host_cpu in 3902b4d38c65Smrg hppa*64*) 3903b4d38c65Smrg ;; 3904b534f209Smrg *) 3905b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3906b4d38c65Smrg ;; 3907b534f209Smrg esac 3908b4d38c65Smrg ;; 3909b4d38c65Smrg *qnx* | *nto*) 3910b4d38c65Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3911b4d38c65Smrg # it will coredump. 3912b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3913b534f209Smrg ;; 3914b534f209Smrg *) 3915b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3916b534f209Smrg ;; 3917b534f209Smrg esac 3918b4d38c65Smrg else 3919b4d38c65Smrg case $host_os in 3920b4d38c65Smrg aix[[4-9]]*) 3921b4d38c65Smrg # All AIX code is PIC. 3922b4d38c65Smrg if test "$host_cpu" = ia64; then 3923b4d38c65Smrg # AIX 5 now supports IA64 processor 3924b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3925b4d38c65Smrg else 3926b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3927b4d38c65Smrg fi 3928b534f209Smrg ;; 3929b4d38c65Smrg chorus*) 3930b4d38c65Smrg case $cc_basename in 3931b4d38c65Smrg cxch68*) 3932b4d38c65Smrg # Green Hills C++ Compiler 3933b4d38c65Smrg # _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" 3934b534f209Smrg ;; 3935b534f209Smrg esac 3936b534f209Smrg ;; 3937b4d38c65Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3938b4d38c65Smrg # This hack is so that the source file can tell whether it is being 3939b4d38c65Smrg # built for inclusion in a dll (and should export symbols for example). 3940b4d38c65Smrg m4_if([$1], [GCJ], [], 3941b4d38c65Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3942b4d38c65Smrg ;; 3943b4d38c65Smrg dgux*) 3944b4d38c65Smrg case $cc_basename in 3945b4d38c65Smrg ec++*) 3946b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3947b4d38c65Smrg ;; 3948b4d38c65Smrg ghcx*) 3949b4d38c65Smrg # Green Hills C++ Compiler 3950b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3951b4d38c65Smrg ;; 3952b4d38c65Smrg *) 3953b4d38c65Smrg ;; 3954b4d38c65Smrg esac 3955b4d38c65Smrg ;; 3956b4d38c65Smrg freebsd* | dragonfly*) 3957b4d38c65Smrg # FreeBSD uses GNU C++ 3958b4d38c65Smrg ;; 3959b4d38c65Smrg hpux9* | hpux10* | hpux11*) 3960b4d38c65Smrg case $cc_basename in 3961b4d38c65Smrg CC*) 3962b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3963b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3964b4d38c65Smrg if test "$host_cpu" != ia64; then 3965b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3966b4d38c65Smrg fi 3967b4d38c65Smrg ;; 3968b4d38c65Smrg aCC*) 3969b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3970b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3971b410ddbeSmrg case $host_cpu in 3972b4d38c65Smrg hppa*64*|ia64*) 3973b4d38c65Smrg # +Z the default 3974b410ddbeSmrg ;; 3975b410ddbeSmrg *) 3976b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3977b410ddbeSmrg ;; 3978b410ddbeSmrg esac 3979b4d38c65Smrg ;; 3980b4d38c65Smrg *) 3981b4d38c65Smrg ;; 3982b4d38c65Smrg esac 398315fb4814Smrg ;; 3984b4d38c65Smrg interix*) 3985b4d38c65Smrg # This is c89, which is MS Visual C++ (no shared libs) 3986b4d38c65Smrg # Anyone wants to do a port? 398715fb4814Smrg ;; 3988b4d38c65Smrg irix5* | irix6* | nonstopux*) 3989b4d38c65Smrg case $cc_basename in 3990b4d38c65Smrg CC*) 3991b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3992b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3993b4d38c65Smrg # CC pic flag -KPIC is the default. 3994b4d38c65Smrg ;; 3995b4d38c65Smrg *) 3996b4d38c65Smrg ;; 3997b4d38c65Smrg esac 3998b534f209Smrg ;; 3999b4d38c65Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4000b4d38c65Smrg case $cc_basename in 4001b4d38c65Smrg KCC*) 4002b4d38c65Smrg # KAI C++ Compiler 4003b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4004b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4005b4d38c65Smrg ;; 4006b4d38c65Smrg ecpc* ) 4007b4d38c65Smrg # old Intel C++ for x86_64 which still supported -KPIC. 4008b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4009b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4010b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4011b4d38c65Smrg ;; 4012b4d38c65Smrg icpc* ) 4013b4d38c65Smrg # Intel C++, used to be incompatible with GCC. 4014b4d38c65Smrg # ICC 10 doesn't accept -KPIC any more. 4015b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4016b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4017b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4018b4d38c65Smrg ;; 4019b4d38c65Smrg pgCC* | pgcpp*) 4020b4d38c65Smrg # Portland Group C++ compiler 4021b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4022b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4023b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4024b4d38c65Smrg ;; 4025b4d38c65Smrg cxx*) 4026b4d38c65Smrg # Compaq C++ 4027b4d38c65Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4028b4d38c65Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4029b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4030b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4031b4d38c65Smrg ;; 4032b4d38c65Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4033b4d38c65Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4034b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4035b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4036b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4037b4d38c65Smrg ;; 4038b4d38c65Smrg *) 4039b4d38c65Smrg case `$CC -V 2>&1 | sed 5q` in 4040b4d38c65Smrg *Sun\ C*) 4041b4d38c65Smrg # Sun C++ 5.9 4042b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4043b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4044b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4045b4d38c65Smrg ;; 4046b4d38c65Smrg esac 4047b4d38c65Smrg ;; 4048b4d38c65Smrg esac 4049b534f209Smrg ;; 4050b4d38c65Smrg lynxos*) 4051b4d38c65Smrg ;; 4052b4d38c65Smrg m88k*) 4053b4d38c65Smrg ;; 4054b4d38c65Smrg mvs*) 4055b4d38c65Smrg case $cc_basename in 4056b4d38c65Smrg cxx*) 4057b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4058b4d38c65Smrg ;; 4059b4d38c65Smrg *) 4060b4d38c65Smrg ;; 4061b410ddbeSmrg esac 406215fb4814Smrg ;; 4063b4d38c65Smrg netbsd*) 4064b534f209Smrg ;; 4065b4d38c65Smrg *qnx* | *nto*) 4066b4d38c65Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4067b4d38c65Smrg # it will coredump. 4068b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4069b4d38c65Smrg ;; 4070b4d38c65Smrg osf3* | osf4* | osf5*) 4071b4d38c65Smrg case $cc_basename in 4072b4d38c65Smrg KCC*) 4073b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4074b4d38c65Smrg ;; 4075b4d38c65Smrg RCC*) 4076b4d38c65Smrg # Rational C++ 2.4.1 4077b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4078b4d38c65Smrg ;; 4079b4d38c65Smrg cxx*) 4080b4d38c65Smrg # Digital/Compaq C++ 4081b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4082b4d38c65Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4083b4d38c65Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4084b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4085b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4086b4d38c65Smrg ;; 4087b4d38c65Smrg *) 4088b4d38c65Smrg ;; 4089b410ddbeSmrg esac 409015fb4814Smrg ;; 4091b4d38c65Smrg psos*) 409215fb4814Smrg ;; 4093b4d38c65Smrg solaris*) 4094b4d38c65Smrg case $cc_basename in 4095b4d38c65Smrg CC* | sunCC*) 4096b4d38c65Smrg # Sun C++ 4.2, 5.x and Centerline C++ 4097b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4098b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4099b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4100b4d38c65Smrg ;; 4101b4d38c65Smrg gcx*) 4102b4d38c65Smrg # Green Hills C++ Compiler 4103b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4104b4d38c65Smrg ;; 4105b4d38c65Smrg *) 4106b4d38c65Smrg ;; 4107b4d38c65Smrg esac 410815fb4814Smrg ;; 4109b4d38c65Smrg sunos4*) 4110b4d38c65Smrg case $cc_basename in 4111b4d38c65Smrg CC*) 4112b4d38c65Smrg # Sun C++ 4.x 4113b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4114b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4115b4d38c65Smrg ;; 4116b4d38c65Smrg lcc*) 4117b4d38c65Smrg # Lucid 4118b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4119b4d38c65Smrg ;; 4120b4d38c65Smrg *) 4121b4d38c65Smrg ;; 4122b4d38c65Smrg esac 4123b4d38c65Smrg ;; 4124b4d38c65Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4125b4d38c65Smrg case $cc_basename in 4126b4d38c65Smrg CC*) 4127b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4128b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4129b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4130b4d38c65Smrg ;; 4131b4d38c65Smrg esac 413215fb4814Smrg ;; 4133b4d38c65Smrg tandem*) 4134b4d38c65Smrg case $cc_basename in 4135b4d38c65Smrg NCC*) 4136b4d38c65Smrg # NonStop-UX NCC 3.20 4137b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4138b4d38c65Smrg ;; 4139b4d38c65Smrg *) 4140b4d38c65Smrg ;; 4141b4d38c65Smrg esac 414215fb4814Smrg ;; 4143b4d38c65Smrg vxworks*) 414415fb4814Smrg ;; 4145b534f209Smrg *) 4146b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 414715fb4814Smrg ;; 4148b534f209Smrg esac 4149b4d38c65Smrg fi 4150b4d38c65Smrg], 4151b4d38c65Smrg[ 4152b4d38c65Smrg if test "$GCC" = yes; then 4153b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4154b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4155b4d38c65Smrg 4156b4d38c65Smrg case $host_os in 4157b4d38c65Smrg aix*) 4158b4d38c65Smrg # All AIX code is PIC. 4159b4d38c65Smrg if test "$host_cpu" = ia64; then 4160b4d38c65Smrg # AIX 5 now supports IA64 processor 4161b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4162b4d38c65Smrg fi 4163b4d38c65Smrg ;; 4164b534f209Smrg 4165b4d38c65Smrg amigaos*) 4166b4d38c65Smrg case $host_cpu in 4167b4d38c65Smrg powerpc) 4168b4d38c65Smrg # see comment about AmigaOS4 .so support 4169b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4170b4d38c65Smrg ;; 4171b4d38c65Smrg m68k) 4172b4d38c65Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4173b4d38c65Smrg # adding the `-m68020' flag to GCC prevents building anything better, 4174b4d38c65Smrg # like `-m68040'. 4175b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4176b4d38c65Smrg ;; 4177b4d38c65Smrg esac 4178b4d38c65Smrg ;; 4179b534f209Smrg 4180b4d38c65Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4181b4d38c65Smrg # PIC is the default for these OSes. 4182b4d38c65Smrg ;; 4183b534f209Smrg 4184b4d38c65Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4185b4d38c65Smrg # This hack is so that the source file can tell whether it is being 4186b4d38c65Smrg # built for inclusion in a dll (and should export symbols for example). 4187b4d38c65Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4188b4d38c65Smrg # (--disable-auto-import) libraries 4189b4d38c65Smrg m4_if([$1], [GCJ], [], 4190b4d38c65Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4191b4d38c65Smrg ;; 4192b534f209Smrg 4193b4d38c65Smrg darwin* | rhapsody*) 4194b4d38c65Smrg # PIC is the default on this platform 4195b4d38c65Smrg # Common symbols not allowed in MH_DYLIB files 4196b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4197b4d38c65Smrg ;; 4198b534f209Smrg 4199b4d38c65Smrg haiku*) 4200b4d38c65Smrg # PIC is the default for Haiku. 4201b4d38c65Smrg # The "-static" flag exists, but is broken. 4202b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4203b4d38c65Smrg ;; 4204b534f209Smrg 4205b4d38c65Smrg hpux*) 4206b4d38c65Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4207b4d38c65Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4208b4d38c65Smrg # sets the default TLS model and affects inlining. 4209b4d38c65Smrg case $host_cpu in 4210b4d38c65Smrg hppa*64*) 4211b4d38c65Smrg # +Z the default 421215fb4814Smrg ;; 421315fb4814Smrg *) 4214b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4215b410ddbeSmrg ;; 4216b4d38c65Smrg esac 4217b4d38c65Smrg ;; 4218b410ddbeSmrg 4219b4d38c65Smrg interix[[3-9]]*) 4220b4d38c65Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4221b4d38c65Smrg # Instead, we relocate shared libraries at runtime. 4222b4d38c65Smrg ;; 4223b410ddbeSmrg 4224b4d38c65Smrg msdosdjgpp*) 4225b4d38c65Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4226b4d38c65Smrg # on systems that don't support them. 4227b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4228b4d38c65Smrg enable_shared=no 4229b4d38c65Smrg ;; 4230b410ddbeSmrg 4231b4d38c65Smrg *nto* | *qnx*) 4232b4d38c65Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4233b4d38c65Smrg # it will coredump. 4234b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4235b4d38c65Smrg ;; 4236b410ddbeSmrg 4237b4d38c65Smrg sysv4*MP*) 4238b4d38c65Smrg if test -d /usr/nec; then 4239b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4240b4d38c65Smrg fi 4241b4d38c65Smrg ;; 4242b410ddbeSmrg 4243b4d38c65Smrg *) 4244b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4245b4d38c65Smrg ;; 424615fb4814Smrg esac 4247b534f209Smrg 4248b534f209Smrg case $cc_basename in 4249b4d38c65Smrg nvcc*) # Cuda Compiler Driver 2.2 4250b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 42517fe5393cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 4252b4d38c65Smrg ;; 4253b4d38c65Smrg esac 4254b4d38c65Smrg else 4255b4d38c65Smrg # PORTME Check for flag to pass linker flags through the system compiler. 4256b4d38c65Smrg case $host_os in 4257b4d38c65Smrg aix*) 4258b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4259b4d38c65Smrg if test "$host_cpu" = ia64; then 4260b4d38c65Smrg # AIX 5 now supports IA64 processor 4261b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4262b4d38c65Smrg else 4263b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4264b4d38c65Smrg fi 4265b4d38c65Smrg ;; 4266b4d38c65Smrg 4267b4d38c65Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4268b4d38c65Smrg # This hack is so that the source file can tell whether it is being 4269b4d38c65Smrg # built for inclusion in a dll (and should export symbols for example). 4270b4d38c65Smrg m4_if([$1], [GCJ], [], 4271b4d38c65Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4272b4d38c65Smrg ;; 4273b4d38c65Smrg 4274b4d38c65Smrg hpux9* | hpux10* | hpux11*) 4275b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4276b4d38c65Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4277b4d38c65Smrg # not for PA HP-UX. 4278b4d38c65Smrg case $host_cpu in 4279b4d38c65Smrg hppa*64*|ia64*) 4280b4d38c65Smrg # +Z the default 428115fb4814Smrg ;; 428215fb4814Smrg *) 4283b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 428415fb4814Smrg ;; 4285b4d38c65Smrg esac 4286b4d38c65Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4287b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4288b4d38c65Smrg ;; 4289b534f209Smrg 4290b4d38c65Smrg irix5* | irix6* | nonstopux*) 4291b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4292b4d38c65Smrg # PIC (with -KPIC) is the default. 4293b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4294b4d38c65Smrg ;; 4295b4d38c65Smrg 4296b4d38c65Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4297b4d38c65Smrg case $cc_basename in 4298b4d38c65Smrg # old Intel for x86_64 which still supported -KPIC. 4299b4d38c65Smrg ecc*) 4300b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4301b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4302b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4303b4d38c65Smrg ;; 4304b4d38c65Smrg # icc used to be incompatible with GCC. 4305b4d38c65Smrg # ICC 10 doesn't accept -KPIC any more. 4306b4d38c65Smrg icc* | ifort*) 4307b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4308b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4309b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4310b4d38c65Smrg ;; 4311b4d38c65Smrg # Lahey Fortran 8.1. 4312b4d38c65Smrg lf95*) 4313b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4314b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4315b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4316b410ddbeSmrg ;; 4317b4d38c65Smrg nagfor*) 4318b4d38c65Smrg # NAG Fortran compiler 4319b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4320b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4321b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4322b534f209Smrg ;; 4323b4d38c65Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4324b4d38c65Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4325b4d38c65Smrg # which looks to be a dead project) 4326b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4327b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4328b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4329b4d38c65Smrg ;; 4330b4d38c65Smrg ccc*) 4331b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4332b4d38c65Smrg # All Alpha code is PIC. 4333b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4334b4d38c65Smrg ;; 4335b4d38c65Smrg xl* | bgxl* | bgf* | mpixl*) 4336b4d38c65Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4337b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4338b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4339b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 434015fb4814Smrg ;; 434115fb4814Smrg *) 4342b4d38c65Smrg case `$CC -V 2>&1 | sed 5q` in 43437fe5393cSmrg *Sun\ F* | *Sun*Fortran*) 4344b4d38c65Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4345b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4346b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4347b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4348b4d38c65Smrg ;; 4349b4d38c65Smrg *Sun\ C*) 4350b4d38c65Smrg # Sun C 5.9 4351b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4352b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4353b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4354b4d38c65Smrg ;; 4355b4d38c65Smrg esac 435615fb4814Smrg ;; 4357b4d38c65Smrg esac 4358b4d38c65Smrg ;; 435915fb4814Smrg 4360b4d38c65Smrg newsos6) 4361b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4362b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4363b4d38c65Smrg ;; 436415fb4814Smrg 4365b4d38c65Smrg *nto* | *qnx*) 4366b4d38c65Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4367b4d38c65Smrg # it will coredump. 4368b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4369b4d38c65Smrg ;; 437015fb4814Smrg 4371b4d38c65Smrg osf3* | osf4* | osf5*) 4372b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4373b4d38c65Smrg # All OSF/1 code is PIC. 4374b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4375b4d38c65Smrg ;; 437615fb4814Smrg 4377b4d38c65Smrg rdos*) 4378b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4379b4d38c65Smrg ;; 438015fb4814Smrg 4381b4d38c65Smrg solaris*) 4382b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4383b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4384b4d38c65Smrg case $cc_basename in 4385b4d38c65Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4386b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4387b4d38c65Smrg *) 4388b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4389b4d38c65Smrg esac 4390b4d38c65Smrg ;; 439115fb4814Smrg 4392b4d38c65Smrg sunos4*) 4393b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4394b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4395b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4396b4d38c65Smrg ;; 439715fb4814Smrg 4398b4d38c65Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4399b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4400b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4401b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4402b4d38c65Smrg ;; 440315fb4814Smrg 4404b4d38c65Smrg sysv4*MP*) 4405b4d38c65Smrg if test -d /usr/nec ;then 4406b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4407b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4408b4d38c65Smrg fi 4409b4d38c65Smrg ;; 441015fb4814Smrg 4411b4d38c65Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4412b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4413b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4414b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4415b4d38c65Smrg ;; 441615fb4814Smrg 4417b4d38c65Smrg unicos*) 4418b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4419b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4420b4d38c65Smrg ;; 442115fb4814Smrg 4422b4d38c65Smrg uts4*) 4423b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4424b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4425b4d38c65Smrg ;; 442615fb4814Smrg 4427b4d38c65Smrg *) 4428b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4429b4d38c65Smrg ;; 443015fb4814Smrg esac 4431b4d38c65Smrg fi 4432b4d38c65Smrg]) 4433b4d38c65Smrgcase $host_os in 4434b4d38c65Smrg # For platforms which do not support PIC, -DPIC is meaningless: 4435b4d38c65Smrg *djgpp*) 4436b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4437b4d38c65Smrg ;; 4438b4d38c65Smrg *) 4439b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4440b4d38c65Smrg ;; 4441b4d38c65Smrgesac 444215fb4814Smrg 4443b4d38c65SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4444b4d38c65Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4445b4d38c65Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4446b4d38c65Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4447b4d38c65Smrg 4448b4d38c65Smrg# 4449b4d38c65Smrg# Check to make sure the PIC flag actually works. 4450b4d38c65Smrg# 4451b4d38c65Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4452b4d38c65Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4453b4d38c65Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4454b4d38c65Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4455b4d38c65Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4456b4d38c65Smrg "" | " "*) ;; 4457b4d38c65Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4458b4d38c65Smrg esac], 4459b4d38c65Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4460b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 446115fb4814Smrgfi 4462b4d38c65Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4463b4d38c65Smrg [Additional compiler flags for building library objects]) 446415fb4814Smrg 4465b4d38c65Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4466b4d38c65Smrg [How to pass a linker flag through the compiler]) 4467b4d38c65Smrg# 4468b4d38c65Smrg# Check to make sure the static flag actually works. 4469b4d38c65Smrg# 4470b4d38c65Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4471b4d38c65Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4472b4d38c65Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4473b4d38c65Smrg $lt_tmp_static_flag, 4474b4d38c65Smrg [], 4475b4d38c65Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4476b4d38c65Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4477b4d38c65Smrg [Compiler flag to prevent dynamic linking]) 4478b4d38c65Smrg])# _LT_COMPILER_PIC 447983cab373Smrg 448015fb4814Smrg 4481b4d38c65Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 4482b4d38c65Smrg# ---------------------------- 4483b4d38c65Smrg# See if the linker supports building shared libraries. 4484b4d38c65Smrgm4_defun([_LT_LINKER_SHLIBS], 4485b4d38c65Smrg[AC_REQUIRE([LT_PATH_LD])dnl 4486b4d38c65SmrgAC_REQUIRE([LT_PATH_NM])dnl 4487b4d38c65Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4488b4d38c65Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4489b4d38c65Smrgm4_require([_LT_DECL_EGREP])dnl 4490b4d38c65Smrgm4_require([_LT_DECL_SED])dnl 4491b4d38c65Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4492b4d38c65Smrgm4_require([_LT_TAG_COMPILER])dnl 4493b4d38c65SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4494b4d38c65Smrgm4_if([$1], [CXX], [ 4495b4d38c65Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4496b4d38c65Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4497b4d38c65Smrg case $host_os in 4498b4d38c65Smrg aix[[4-9]]*) 4499b4d38c65Smrg # If we're using GNU nm, then we don't want the "-C" option. 4500b4d38c65Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4501b4d38c65Smrg # Also, AIX nm treats weak defined symbols like other global defined 4502b4d38c65Smrg # symbols, whereas GNU nm marks them as "W". 4503b4d38c65Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4504b4d38c65Smrg _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' 4505b4d38c65Smrg else 4506b4d38c65Smrg _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' 4507de78e416Smrg fi 4508de78e416Smrg ;; 4509b4d38c65Smrg pw32*) 4510b4d38c65Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4511b4d38c65Smrg ;; 4512b4d38c65Smrg cygwin* | mingw* | cegcc*) 4513b4d38c65Smrg case $cc_basename in 45147fe5393cSmrg cl*) ;; 4515b4d38c65Smrg *) 4516b4d38c65Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 4517b4d38c65Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4518b534f209Smrg ;; 4519b534f209Smrg esac 4520b4d38c65Smrg ;; 4521b4d38c65Smrg *) 4522b4d38c65Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4523b4d38c65Smrg ;; 4524b4d38c65Smrg esac 4525b4d38c65Smrg], [ 4526b4d38c65Smrg runpath_var= 4527b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 4528b4d38c65Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4529b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)= 4530b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4531b4d38c65Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 4532b4d38c65Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4533b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4534b4d38c65Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4535b4d38c65Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 4536b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4537b4d38c65Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4538b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 45397fe5393cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4540b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4541b4d38c65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4542b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4543b4d38c65Smrg _LT_TAGVAR(inherit_rpath, $1)=no 4544b4d38c65Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4545b4d38c65Smrg _LT_TAGVAR(module_cmds, $1)= 4546b4d38c65Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 4547b4d38c65Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4548b4d38c65Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4549b4d38c65Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4550b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4551b4d38c65Smrg # include_expsyms should be a list of space-separated symbols to be *always* 4552b4d38c65Smrg # included in the symbol list 4553b4d38c65Smrg _LT_TAGVAR(include_expsyms, $1)= 4554b4d38c65Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 4555b4d38c65Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4556b4d38c65Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4557b4d38c65Smrg # as well as any symbol that contains `d'. 4558b4d38c65Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4559b4d38c65Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4560b4d38c65Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 4561b4d38c65Smrg # the symbol is explicitly referenced. Since portable code cannot 4562b4d38c65Smrg # rely on this symbol name, it's probably fine to never include it in 4563b4d38c65Smrg # preloaded symbol tables. 4564b4d38c65Smrg # Exclude shared library initialization/finalization symbols. 4565b4d38c65Smrgdnl Note also adjust exclude_expsyms for C++ above. 4566b4d38c65Smrg extract_expsyms_cmds= 4567b534f209Smrg 4568b4d38c65Smrg case $host_os in 4569b4d38c65Smrg cygwin* | mingw* | pw32* | cegcc*) 4570b4d38c65Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4571b4d38c65Smrg # When not using gcc, we currently assume that we are using 4572b4d38c65Smrg # Microsoft Visual C++. 4573b4d38c65Smrg if test "$GCC" != yes; then 4574b4d38c65Smrg with_gnu_ld=no 4575de78e416Smrg fi 457615fb4814Smrg ;; 4577b4d38c65Smrg interix*) 4578b4d38c65Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4579b4d38c65Smrg with_gnu_ld=yes 4580b4d38c65Smrg ;; 4581b4d38c65Smrg openbsd*) 4582b4d38c65Smrg with_gnu_ld=no 4583b4d38c65Smrg ;; 458415fb4814Smrg esac 458515fb4814Smrg 4586b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 458715fb4814Smrg 4588b4d38c65Smrg # On some targets, GNU ld is compatible enough with the native linker 4589b4d38c65Smrg # that we're better off using the native interface for both. 4590b4d38c65Smrg lt_use_gnu_ld_interface=no 4591b4d38c65Smrg if test "$with_gnu_ld" = yes; then 4592b4d38c65Smrg case $host_os in 4593b4d38c65Smrg aix*) 4594b4d38c65Smrg # The AIX port of GNU ld has always aspired to compatibility 4595b4d38c65Smrg # with the native linker. However, as the warning in the GNU ld 4596b4d38c65Smrg # block says, versions before 2.19.5* couldn't really create working 4597b4d38c65Smrg # shared libraries, regardless of the interface used. 4598b4d38c65Smrg case `$LD -v 2>&1` in 4599b4d38c65Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4600b4d38c65Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4601b4d38c65Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4602b4d38c65Smrg *) 4603b4d38c65Smrg lt_use_gnu_ld_interface=yes 4604b4d38c65Smrg ;; 4605b4d38c65Smrg esac 4606b4d38c65Smrg ;; 4607b4d38c65Smrg *) 4608b4d38c65Smrg lt_use_gnu_ld_interface=yes 4609b4d38c65Smrg ;; 4610b4d38c65Smrg esac 4611b4d38c65Smrg fi 461215fb4814Smrg 4613b4d38c65Smrg if test "$lt_use_gnu_ld_interface" = yes; then 4614b4d38c65Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 4615b4d38c65Smrg wlarc='${wl}' 461615fb4814Smrg 4617b4d38c65Smrg # Set some defaults for GNU ld with shared library support. These 4618b4d38c65Smrg # are reset later if shared libraries are not supported. Putting them 4619b4d38c65Smrg # here allows them to be overridden if necessary. 4620b4d38c65Smrg runpath_var=LD_RUN_PATH 4621b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4622b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4623b4d38c65Smrg # ancient GNU ld didn't support --whole-archive et. al. 4624b4d38c65Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4625b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4626b4d38c65Smrg else 4627b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4628b4d38c65Smrg fi 4629b4d38c65Smrg supports_anon_versioning=no 4630b4d38c65Smrg case `$LD -v 2>&1` in 4631b4d38c65Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 4632b4d38c65Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4633b4d38c65Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4634b4d38c65Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4635b4d38c65Smrg *\ 2.11.*) ;; # other 2.11 versions 4636b4d38c65Smrg *) supports_anon_versioning=yes ;; 4637b4d38c65Smrg esac 463815fb4814Smrg 4639b4d38c65Smrg # See if GNU ld supports shared libraries. 4640b4d38c65Smrg case $host_os in 4641b4d38c65Smrg aix[[3-9]]*) 4642b4d38c65Smrg # On AIX/PPC, the GNU linker is very broken 4643b4d38c65Smrg if test "$host_cpu" != ia64; then 4644b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4645b4d38c65Smrg cat <<_LT_EOF 1>&2 464615fb4814Smrg 4647b4d38c65Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 4648b4d38c65Smrg*** to be unable to reliably create shared libraries on AIX. 4649b4d38c65Smrg*** Therefore, libtool is disabling shared libraries support. If you 4650b4d38c65Smrg*** really care for shared libraries, you may want to install binutils 4651b4d38c65Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4652b4d38c65Smrg*** You will then need to restart the configuration process. 465315fb4814Smrg 4654b4d38c65Smrg_LT_EOF 4655b4d38c65Smrg fi 4656b4d38c65Smrg ;; 465715fb4814Smrg 4658b4d38c65Smrg amigaos*) 4659b4d38c65Smrg case $host_cpu in 4660b4d38c65Smrg powerpc) 4661b4d38c65Smrg # see comment about AmigaOS4 .so support 4662b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4663b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4664b4d38c65Smrg ;; 4665b4d38c65Smrg m68k) 4666b4d38c65Smrg _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)' 4667b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4668b4d38c65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4669b4d38c65Smrg ;; 4670b4d38c65Smrg esac 4671b4d38c65Smrg ;; 467215fb4814Smrg 4673b4d38c65Smrg beos*) 4674b4d38c65Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4675b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4676b4d38c65Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4677b4d38c65Smrg # support --undefined. This deserves some investigation. FIXME 4678b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4679b4d38c65Smrg else 4680b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4681b4d38c65Smrg fi 4682b4d38c65Smrg ;; 468315fb4814Smrg 4684b4d38c65Smrg cygwin* | mingw* | pw32* | cegcc*) 4685b4d38c65Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4686b4d38c65Smrg # as there is no search path for DLLs. 4687b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4688b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4689b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4690b4d38c65Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4691b4d38c65Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4692b4d38c65Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 4693b4d38c65Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4694b4d38c65Smrg 4695b4d38c65Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4696b4d38c65Smrg _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' 4697b4d38c65Smrg # If the export-symbols file already is a .def file (1st line 4698b4d38c65Smrg # is EXPORTS), use it as is; otherwise, prepend... 4699b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4700b4d38c65Smrg cp $export_symbols $output_objdir/$soname.def; 4701b4d38c65Smrg else 4702b4d38c65Smrg echo EXPORTS > $output_objdir/$soname.def; 4703b4d38c65Smrg cat $export_symbols >> $output_objdir/$soname.def; 4704b4d38c65Smrg fi~ 4705b4d38c65Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4706b4d38c65Smrg else 4707b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4708b4d38c65Smrg fi 4709b4d38c65Smrg ;; 471015fb4814Smrg 4711b4d38c65Smrg haiku*) 4712b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4713b4d38c65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4714b4d38c65Smrg ;; 471515fb4814Smrg 4716b4d38c65Smrg interix[[3-9]]*) 4717b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4718b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4719b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4720b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4721b4d38c65Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4722b4d38c65Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4723b4d38c65Smrg # default) and relocated if they conflict, which is a slow very memory 4724b4d38c65Smrg # consuming and fragmenting process. To avoid this, we pick a random, 4725b4d38c65Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4726b4d38c65Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4727b4d38c65Smrg _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' 4728b4d38c65Smrg _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' 4729b4d38c65Smrg ;; 473015fb4814Smrg 4731b4d38c65Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4732b4d38c65Smrg tmp_diet=no 4733b4d38c65Smrg if test "$host_os" = linux-dietlibc; then 4734b4d38c65Smrg case $cc_basename in 4735b4d38c65Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4736b4d38c65Smrg esac 4737b4d38c65Smrg fi 4738b4d38c65Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4739b4d38c65Smrg && test "$tmp_diet" = no 4740b4d38c65Smrg then 4741b4d38c65Smrg tmp_addflag=' $pic_flag' 4742b4d38c65Smrg tmp_sharedflag='-shared' 4743b4d38c65Smrg case $cc_basename,$host_cpu in 4744b4d38c65Smrg pgcc*) # Portland Group C compiler 4745b4d38c65Smrg _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' 4746b4d38c65Smrg tmp_addflag=' $pic_flag' 4747b4d38c65Smrg ;; 4748b4d38c65Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 4749b4d38c65Smrg # Portland Group f77 and f90 compilers 4750b4d38c65Smrg _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' 4751b4d38c65Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 4752b4d38c65Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4753b4d38c65Smrg tmp_addflag=' -i_dynamic' ;; 4754b4d38c65Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4755b4d38c65Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4756b4d38c65Smrg ifc* | ifort*) # Intel Fortran compiler 4757b4d38c65Smrg tmp_addflag=' -nofor_main' ;; 4758b4d38c65Smrg lf95*) # Lahey Fortran 8.1 4759b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4760b4d38c65Smrg tmp_sharedflag='--shared' ;; 4761b4d38c65Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4762b4d38c65Smrg tmp_sharedflag='-qmkshrobj' 4763b4d38c65Smrg tmp_addflag= ;; 4764b4d38c65Smrg nvcc*) # Cuda Compiler Driver 2.2 4765b4d38c65Smrg _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' 4766b4d38c65Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4767b4d38c65Smrg ;; 4768b4d38c65Smrg esac 4769b4d38c65Smrg case `$CC -V 2>&1 | sed 5q` in 4770b4d38c65Smrg *Sun\ C*) # Sun C 5.9 4771b4d38c65Smrg _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' 4772b4d38c65Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4773b4d38c65Smrg tmp_sharedflag='-G' ;; 4774b4d38c65Smrg *Sun\ F*) # Sun Fortran 8.3 4775b4d38c65Smrg tmp_sharedflag='-G' ;; 4776b4d38c65Smrg esac 4777b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 477815fb4814Smrg 4779b4d38c65Smrg if test "x$supports_anon_versioning" = xyes; then 4780b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4781b4d38c65Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4782b4d38c65Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4783b4d38c65Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4784b4d38c65Smrg fi 478515fb4814Smrg 4786b4d38c65Smrg case $cc_basename in 4787b4d38c65Smrg xlf* | bgf* | bgxlf* | mpixlf*) 4788b4d38c65Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4789b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 47907fe5393cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 47917fe5393cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 4792b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4793b4d38c65Smrg if test "x$supports_anon_versioning" = xyes; then 4794b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4795b4d38c65Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4796b4d38c65Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4797b4d38c65Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4798b4d38c65Smrg fi 4799b4d38c65Smrg ;; 4800b4d38c65Smrg esac 4801b4d38c65Smrg else 4802b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4803b4d38c65Smrg fi 4804b4d38c65Smrg ;; 480515fb4814Smrg 4806b4d38c65Smrg netbsd*) 4807b4d38c65Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4808b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4809b4d38c65Smrg wlarc= 4810b4d38c65Smrg else 4811b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4812b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 4813b4d38c65Smrg fi 4814b4d38c65Smrg ;; 481515fb4814Smrg 4816b4d38c65Smrg solaris*) 4817b4d38c65Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4818b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4819b4d38c65Smrg cat <<_LT_EOF 1>&2 482015fb4814Smrg 4821b4d38c65Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4822b4d38c65Smrg*** create shared libraries on Solaris systems. Therefore, libtool 4823b4d38c65Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4824b4d38c65Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 4825b4d38c65Smrg*** your PATH or compiler configuration so that the native linker is 4826b4d38c65Smrg*** used, and then restart. 482715fb4814Smrg 4828b4d38c65Smrg_LT_EOF 4829b4d38c65Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4830b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4831b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 4832b4d38c65Smrg else 4833b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4834b4d38c65Smrg fi 4835b4d38c65Smrg ;; 483615fb4814Smrg 4837b4d38c65Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4838b4d38c65Smrg case `$LD -v 2>&1` in 4839b4d38c65Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4840b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4841b4d38c65Smrg cat <<_LT_EOF 1>&2 484215fb4814Smrg 4843b4d38c65Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4844b4d38c65Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4845b4d38c65Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4846b4d38c65Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4847b4d38c65Smrg*** your PATH or compiler configuration so that the native linker is 4848b4d38c65Smrg*** used, and then restart. 484915fb4814Smrg 4850b4d38c65Smrg_LT_EOF 4851b4d38c65Smrg ;; 4852b4d38c65Smrg *) 4853b4d38c65Smrg # For security reasons, it is highly recommended that you always 4854b4d38c65Smrg # use absolute paths for naming shared libraries, and exclude the 4855b4d38c65Smrg # DT_RUNPATH tag from executables and libraries. But doing so 4856b4d38c65Smrg # requires that you compile everything twice, which is a pain. 4857b4d38c65Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4858b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4859b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4860b4d38c65Smrg _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' 4861b4d38c65Smrg else 4862b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4863b4d38c65Smrg fi 4864b4d38c65Smrg ;; 4865b4d38c65Smrg esac 4866b4d38c65Smrg ;; 486715fb4814Smrg 4868b4d38c65Smrg sunos4*) 4869b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4870b4d38c65Smrg wlarc= 4871b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4872b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4873b4d38c65Smrg ;; 487415fb4814Smrg 4875b4d38c65Smrg *) 4876b4d38c65Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4877b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4878b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 4879b4d38c65Smrg else 4880b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4881b4d38c65Smrg fi 4882b4d38c65Smrg ;; 4883b4d38c65Smrg esac 488415fb4814Smrg 4885b4d38c65Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4886b4d38c65Smrg runpath_var= 4887b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4888b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4889b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4890b4d38c65Smrg fi 4891b4d38c65Smrg else 4892b4d38c65Smrg # PORTME fill in a description of your system's linker (not GNU ld) 4893b4d38c65Smrg case $host_os in 4894b4d38c65Smrg aix3*) 4895b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4896b4d38c65Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 4897b4d38c65Smrg _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' 4898b4d38c65Smrg # Note: this linker hardcodes the directories in LIBPATH if there 4899b4d38c65Smrg # are no directories specified by -L. 4900b4d38c65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4901b4d38c65Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4902b4d38c65Smrg # Neither direct hardcoding nor static linking is supported with a 4903b4d38c65Smrg # broken collect2. 4904b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4905b4d38c65Smrg fi 4906b4d38c65Smrg ;; 490715fb4814Smrg 4908b4d38c65Smrg aix[[4-9]]*) 4909b4d38c65Smrg if test "$host_cpu" = ia64; then 4910b4d38c65Smrg # On IA64, the linker does run time linking by default, so we don't 4911b4d38c65Smrg # have to do anything special. 4912b4d38c65Smrg aix_use_runtimelinking=no 4913b4d38c65Smrg exp_sym_flag='-Bexport' 4914b4d38c65Smrg no_entry_flag="" 4915b4d38c65Smrg else 4916b4d38c65Smrg # If we're using GNU nm, then we don't want the "-C" option. 4917b4d38c65Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4918b4d38c65Smrg # Also, AIX nm treats weak defined symbols like other global 4919b4d38c65Smrg # defined symbols, whereas GNU nm marks them as "W". 4920b4d38c65Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4921b4d38c65Smrg _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' 4922b4d38c65Smrg else 4923b4d38c65Smrg _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' 4924b4d38c65Smrg fi 4925b4d38c65Smrg aix_use_runtimelinking=no 492615fb4814Smrg 4927b4d38c65Smrg # Test if we are trying to use run time linking or normal 4928b4d38c65Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4929b4d38c65Smrg # need to do runtime linking. 4930b4d38c65Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4931b4d38c65Smrg for ld_flag in $LDFLAGS; do 4932b4d38c65Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4933b4d38c65Smrg aix_use_runtimelinking=yes 4934b4d38c65Smrg break 4935b4d38c65Smrg fi 4936b4d38c65Smrg done 4937b4d38c65Smrg ;; 4938b4d38c65Smrg esac 493915fb4814Smrg 4940b4d38c65Smrg exp_sym_flag='-bexport' 4941b4d38c65Smrg no_entry_flag='-bnoentry' 4942b4d38c65Smrg fi 494315fb4814Smrg 4944b4d38c65Smrg # When large executables or shared objects are built, AIX ld can 4945b4d38c65Smrg # have problems creating the table of contents. If linking a library 4946b4d38c65Smrg # or program results in "error TOC overflow" add -mminimal-toc to 4947b4d38c65Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4948b4d38c65Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 494915fb4814Smrg 4950b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='' 4951b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4952b4d38c65Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4953b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 4954b4d38c65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4955b4d38c65Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 495615fb4814Smrg 4957b4d38c65Smrg if test "$GCC" = yes; then 4958b4d38c65Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 4959b4d38c65Smrg # We only want to do this on AIX 4.2 and lower, the check 4960b4d38c65Smrg # below for broken collect2 doesn't work under 4.3+ 4961b4d38c65Smrg collect2name=`${CC} -print-prog-name=collect2` 4962b4d38c65Smrg if test -f "$collect2name" && 4963b4d38c65Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 4964b4d38c65Smrg then 4965b4d38c65Smrg # We have reworked collect2 4966b4d38c65Smrg : 4967b4d38c65Smrg else 4968b4d38c65Smrg # We have old collect2 4969b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4970b4d38c65Smrg # It fails to find uninstalled libraries when the uninstalled 4971b4d38c65Smrg # path is not listed in the libpath. Setting hardcode_minus_L 4972b4d38c65Smrg # to unsupported forces relinking 4973b4d38c65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4974b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4975b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4976b4d38c65Smrg fi 4977b4d38c65Smrg ;; 4978b4d38c65Smrg esac 4979b4d38c65Smrg shared_flag='-shared' 4980b4d38c65Smrg if test "$aix_use_runtimelinking" = yes; then 4981b4d38c65Smrg shared_flag="$shared_flag "'${wl}-G' 4982b4d38c65Smrg fi 4983b4d38c65Smrg else 4984b4d38c65Smrg # not using gcc 4985b4d38c65Smrg if test "$host_cpu" = ia64; then 4986b4d38c65Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4987b4d38c65Smrg # chokes on -Wl,-G. The following line is correct: 4988b4d38c65Smrg shared_flag='-G' 4989b4d38c65Smrg else 4990b4d38c65Smrg if test "$aix_use_runtimelinking" = yes; then 4991b4d38c65Smrg shared_flag='${wl}-G' 4992b4d38c65Smrg else 4993b4d38c65Smrg shared_flag='${wl}-bM:SRE' 4994b4d38c65Smrg fi 4995b4d38c65Smrg fi 4996b4d38c65Smrg fi 499715fb4814Smrg 4998b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 4999b4d38c65Smrg # It seems that -bexpall does not export symbols beginning with 5000b4d38c65Smrg # underscore (_), so it is better to generate a list of symbols to export. 5001b4d38c65Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5002b4d38c65Smrg if test "$aix_use_runtimelinking" = yes; then 5003b4d38c65Smrg # Warning - without using the other runtime loading flags (-brtl), 5004b4d38c65Smrg # -berok will link without error, but may produce a broken library. 5005b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5006b4d38c65Smrg # Determine the default libpath from the value encoded in an 5007b4d38c65Smrg # empty executable. 5008b4d38c65Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5009b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5010b4d38c65Smrg _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" 5011b4d38c65Smrg else 5012b4d38c65Smrg if test "$host_cpu" = ia64; then 5013b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5014b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5015b4d38c65Smrg _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" 5016b4d38c65Smrg else 5017b4d38c65Smrg # Determine the default libpath from the value encoded in an 5018b4d38c65Smrg # empty executable. 5019b4d38c65Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5020b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5021b4d38c65Smrg # Warning - without using the other run time loading flags, 5022b4d38c65Smrg # -berok will link without error, but may produce a broken library. 5023b4d38c65Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5024b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5025b4d38c65Smrg if test "$with_gnu_ld" = yes; then 5026b4d38c65Smrg # We only use this code for GNU lds that support --whole-archive. 5027b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5028b4d38c65Smrg else 5029b4d38c65Smrg # Exported symbols can be pulled into shared objects from archives 5030b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5031b4d38c65Smrg fi 5032b4d38c65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5033b4d38c65Smrg # This is similar to how AIX traditionally builds its shared libraries. 5034b4d38c65Smrg _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' 5035b4d38c65Smrg fi 5036b4d38c65Smrg fi 5037b4d38c65Smrg ;; 503815fb4814Smrg 5039b4d38c65Smrg amigaos*) 5040b4d38c65Smrg case $host_cpu in 5041b4d38c65Smrg powerpc) 5042b4d38c65Smrg # see comment about AmigaOS4 .so support 5043b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5044b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5045b4d38c65Smrg ;; 5046b4d38c65Smrg m68k) 5047b4d38c65Smrg _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)' 5048b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5049b4d38c65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5050b4d38c65Smrg ;; 5051b4d38c65Smrg esac 5052b4d38c65Smrg ;; 505315fb4814Smrg 5054b4d38c65Smrg bsdi[[45]]*) 5055b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5056b4d38c65Smrg ;; 505715fb4814Smrg 5058b4d38c65Smrg cygwin* | mingw* | pw32* | cegcc*) 5059b4d38c65Smrg # When not using gcc, we currently assume that we are using 5060b4d38c65Smrg # Microsoft Visual C++. 5061b4d38c65Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5062b4d38c65Smrg # no search path for DLLs. 5063b4d38c65Smrg case $cc_basename in 5064b4d38c65Smrg cl*) 5065b4d38c65Smrg # Native MSVC 5066b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5067b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5068b4d38c65Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5069b4d38c65Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5070b4d38c65Smrg # Tell ltmain to make .lib files, not .a files. 5071b4d38c65Smrg libext=lib 5072b4d38c65Smrg # Tell ltmain to make .dll files, not .so files. 5073b4d38c65Smrg shrext_cmds=".dll" 5074b4d38c65Smrg # FIXME: Setting linknames here is a bad hack. 5075b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5076b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5077b4d38c65Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5078b4d38c65Smrg else 5079b4d38c65Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5080b4d38c65Smrg fi~ 5081b4d38c65Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5082b4d38c65Smrg linknames=' 5083b4d38c65Smrg # The linker will not automatically build a static lib if we build a DLL. 5084b4d38c65Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5085b4d38c65Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5086b4d38c65Smrg _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' 5087b4d38c65Smrg # Don't use ranlib 5088b4d38c65Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5089b4d38c65Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5090b4d38c65Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5091b4d38c65Smrg case $lt_outputfile in 5092b4d38c65Smrg *.exe|*.EXE) ;; 5093b4d38c65Smrg *) 5094b4d38c65Smrg lt_outputfile="$lt_outputfile.exe" 5095b4d38c65Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 5096b4d38c65Smrg ;; 5097b4d38c65Smrg esac~ 5098b4d38c65Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5099b4d38c65Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5100b4d38c65Smrg $RM "$lt_outputfile.manifest"; 5101b4d38c65Smrg fi' 5102b4d38c65Smrg ;; 5103b4d38c65Smrg *) 5104b4d38c65Smrg # Assume MSVC wrapper 5105b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5106b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5107b4d38c65Smrg # Tell ltmain to make .lib files, not .a files. 5108b4d38c65Smrg libext=lib 5109b4d38c65Smrg # Tell ltmain to make .dll files, not .so files. 5110b4d38c65Smrg shrext_cmds=".dll" 5111b4d38c65Smrg # FIXME: Setting linknames here is a bad hack. 5112b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5113b4d38c65Smrg # The linker will automatically build a .lib file if we build a DLL. 5114b4d38c65Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5115b4d38c65Smrg # FIXME: Should let the user specify the lib program. 5116b4d38c65Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5117b4d38c65Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5118b4d38c65Smrg ;; 5119b4d38c65Smrg esac 5120b4d38c65Smrg ;; 512115fb4814Smrg 5122b4d38c65Smrg darwin* | rhapsody*) 5123b4d38c65Smrg _LT_DARWIN_LINKER_FEATURES($1) 5124b4d38c65Smrg ;; 5125b410ddbeSmrg 5126b4d38c65Smrg dgux*) 5127b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5128b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5129b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5130b4d38c65Smrg ;; 513115fb4814Smrg 51327fe5393cSmrg freebsd1*) 51337fe5393cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 51347fe5393cSmrg ;; 51357fe5393cSmrg 5136b4d38c65Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5137b4d38c65Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 5138b4d38c65Smrg # does not break anything, and helps significantly (at the cost of a little 5139b4d38c65Smrg # extra space). 5140b4d38c65Smrg freebsd2.2*) 5141b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5142b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5143b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5144b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5145b4d38c65Smrg ;; 514615fb4814Smrg 5147b4d38c65Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 51487fe5393cSmrg freebsd2*) 5149b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5150b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5151b4d38c65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5152b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5153b4d38c65Smrg ;; 515415fb4814Smrg 5155b4d38c65Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5156b4d38c65Smrg freebsd* | dragonfly*) 5157b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5158b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5159b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5160b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5161b4d38c65Smrg ;; 516215fb4814Smrg 5163b4d38c65Smrg hpux9*) 5164b4d38c65Smrg if test "$GCC" = yes; then 5165b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5166b4d38c65Smrg else 5167b4d38c65Smrg _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' 5168b4d38c65Smrg fi 5169b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5170b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5171b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5172b410ddbeSmrg 5173b4d38c65Smrg # hardcode_minus_L: Not really in the search PATH, 5174b4d38c65Smrg # but as the default location of the library. 5175b4d38c65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5176b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5177b410ddbeSmrg ;; 517815fb4814Smrg 5179b4d38c65Smrg hpux10*) 5180b4d38c65Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5181b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5182b4d38c65Smrg else 5183b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5184b4d38c65Smrg fi 5185b4d38c65Smrg if test "$with_gnu_ld" = no; then 5186b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 51877fe5393cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 5188b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5189b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5190b4d38c65Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5191b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5192b4d38c65Smrg # hardcode_minus_L: Not really in the search PATH, 5193b4d38c65Smrg # but as the default location of the library. 5194b4d38c65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5195b4d38c65Smrg fi 5196b4d38c65Smrg ;; 519715fb4814Smrg 5198b4d38c65Smrg hpux11*) 5199b4d38c65Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5200b4d38c65Smrg case $host_cpu in 5201b4d38c65Smrg hppa*64*) 5202b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5203b4d38c65Smrg ;; 5204b4d38c65Smrg ia64*) 5205b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5206b4d38c65Smrg ;; 5207b4d38c65Smrg *) 5208b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5209b4d38c65Smrg ;; 5210b4d38c65Smrg esac 5211b4d38c65Smrg else 5212b4d38c65Smrg case $host_cpu in 5213b4d38c65Smrg hppa*64*) 5214b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5215b4d38c65Smrg ;; 5216b4d38c65Smrg ia64*) 5217b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5218b4d38c65Smrg ;; 5219b4d38c65Smrg *) 5220b4d38c65Smrg m4_if($1, [], [ 5221b4d38c65Smrg # Older versions of the 11.00 compiler do not understand -b yet 5222b4d38c65Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5223b4d38c65Smrg _LT_LINKER_OPTION([if $CC understands -b], 5224b4d38c65Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5225b4d38c65Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5226b4d38c65Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5227b4d38c65Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5228b4d38c65Smrg ;; 5229b4d38c65Smrg esac 5230b4d38c65Smrg fi 5231b4d38c65Smrg if test "$with_gnu_ld" = no; then 5232b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5233b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 523415fb4814Smrg 5235b4d38c65Smrg case $host_cpu in 5236b4d38c65Smrg hppa*64*|ia64*) 5237b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5238b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5239b4d38c65Smrg ;; 5240b4d38c65Smrg *) 5241b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5242b4d38c65Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5243b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 524415fb4814Smrg 5245b4d38c65Smrg # hardcode_minus_L: Not really in the search PATH, 5246b4d38c65Smrg # but as the default location of the library. 5247b4d38c65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5248b4d38c65Smrg ;; 5249b4d38c65Smrg esac 5250b4d38c65Smrg fi 5251b4d38c65Smrg ;; 525215fb4814Smrg 5253b4d38c65Smrg irix5* | irix6* | nonstopux*) 5254b4d38c65Smrg if test "$GCC" = yes; then 5255b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 5256b4d38c65Smrg # Try to use the -exported_symbol ld option, if it does not 5257b4d38c65Smrg # work, assume that -exports_file does not work either and 5258b4d38c65Smrg # implicitly export all symbols. 5259b4d38c65Smrg # This should be the same for all languages, so no per-tag cache variable. 5260b4d38c65Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5261b4d38c65Smrg [lt_cv_irix_exported_symbol], 5262b4d38c65Smrg [save_LDFLAGS="$LDFLAGS" 5263b4d38c65Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5264b4d38c65Smrg AC_LINK_IFELSE( 5265b4d38c65Smrg [AC_LANG_SOURCE( 5266b4d38c65Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5267b4d38c65Smrg [C++], [[int foo (void) { return 0; }]], 5268b4d38c65Smrg [Fortran 77], [[ 5269b4d38c65Smrg subroutine foo 5270b4d38c65Smrg end]], 5271b4d38c65Smrg [Fortran], [[ 5272b4d38c65Smrg subroutine foo 5273b4d38c65Smrg end]])])], 5274b4d38c65Smrg [lt_cv_irix_exported_symbol=yes], 5275b4d38c65Smrg [lt_cv_irix_exported_symbol=no]) 5276b4d38c65Smrg LDFLAGS="$save_LDFLAGS"]) 5277b4d38c65Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 5278b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 5279b4d38c65Smrg fi 5280b4d38c65Smrg else 5281b4d38c65Smrg _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' 5282b4d38c65Smrg _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' 5283b4d38c65Smrg fi 5284b4d38c65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5285b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5286b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5287b4d38c65Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5288b4d38c65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5289b4d38c65Smrg ;; 529015fb4814Smrg 5291b4d38c65Smrg netbsd*) 5292b4d38c65Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5293b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5294b4d38c65Smrg else 5295b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5296b4d38c65Smrg fi 5297b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5298b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5299b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5300b4d38c65Smrg ;; 530115fb4814Smrg 5302b4d38c65Smrg newsos6) 5303b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5304b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5305b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5306b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5307b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5308b4d38c65Smrg ;; 530915fb4814Smrg 5310b4d38c65Smrg *nto* | *qnx*) 5311b4d38c65Smrg ;; 531215fb4814Smrg 5313b4d38c65Smrg openbsd*) 5314b4d38c65Smrg if test -f /usr/libexec/ld.so; then 5315b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5316b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5317b4d38c65Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5318b4d38c65Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5319b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5320b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5321b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5322b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5323b4d38c65Smrg else 5324b4d38c65Smrg case $host_os in 5325b4d38c65Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5326b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5327b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5328b4d38c65Smrg ;; 5329b4d38c65Smrg *) 5330b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5331b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5332b4d38c65Smrg ;; 5333b4d38c65Smrg esac 5334b4d38c65Smrg fi 5335b4d38c65Smrg else 5336b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5337b4d38c65Smrg fi 5338b4d38c65Smrg ;; 533915fb4814Smrg 5340b4d38c65Smrg os2*) 5341b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5342b4d38c65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5343b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5344b4d38c65Smrg _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' 5345b4d38c65Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5346b4d38c65Smrg ;; 534715fb4814Smrg 5348b4d38c65Smrg osf3*) 5349b4d38c65Smrg if test "$GCC" = yes; then 5350b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5351b4d38c65Smrg _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' 5352b4d38c65Smrg else 5353b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5354b4d38c65Smrg _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' 5355b4d38c65Smrg fi 5356b4d38c65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5357b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5358b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5359b4d38c65Smrg ;; 536015fb4814Smrg 5361b4d38c65Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5362b4d38c65Smrg if test "$GCC" = yes; then 5363b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5364b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 5365b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5366b4d38c65Smrg else 5367b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5368b4d38c65Smrg _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' 5369b4d38c65Smrg _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~ 5370b4d38c65Smrg $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' 537115fb4814Smrg 5372b4d38c65Smrg # Both c and cxx compiler support -rpath directly 5373b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5374b4d38c65Smrg fi 5375b4d38c65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5376b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5377b4d38c65Smrg ;; 537815fb4814Smrg 5379b4d38c65Smrg solaris*) 5380b4d38c65Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5381b4d38c65Smrg if test "$GCC" = yes; then 5382b4d38c65Smrg wlarc='${wl}' 5383b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5384b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5385b4d38c65Smrg $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5386b4d38c65Smrg else 5387b4d38c65Smrg case `$CC -V 2>&1` in 5388b4d38c65Smrg *"Compilers 5.0"*) 5389b4d38c65Smrg wlarc='' 5390b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5391b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5392b4d38c65Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5393b4d38c65Smrg ;; 5394b4d38c65Smrg *) 5395b4d38c65Smrg wlarc='${wl}' 5396b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5397b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5398b4d38c65Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5399b4d38c65Smrg ;; 5400b4d38c65Smrg esac 5401b4d38c65Smrg fi 5402b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5403b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5404b4d38c65Smrg case $host_os in 5405b4d38c65Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5406b4d38c65Smrg *) 5407b4d38c65Smrg # The compiler driver will combine and reorder linker options, 5408b4d38c65Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 5409b4d38c65Smrg # but is careful enough not to reorder. 5410b4d38c65Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5411b4d38c65Smrg if test "$GCC" = yes; then 5412b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5413b4d38c65Smrg else 5414b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5415b4d38c65Smrg fi 5416b4d38c65Smrg ;; 5417b4d38c65Smrg esac 5418b4d38c65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5419b4d38c65Smrg ;; 542015fb4814Smrg 5421b4d38c65Smrg sunos4*) 5422b4d38c65Smrg if test "x$host_vendor" = xsequent; then 5423b4d38c65Smrg # Use $CC to link under sequent, because it throws in some extra .o 5424b4d38c65Smrg # files that make .init and .fini sections work. 5425b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5426b4d38c65Smrg else 5427b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5428b4d38c65Smrg fi 5429b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5430b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5431b4d38c65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5432b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5433b4d38c65Smrg ;; 543415fb4814Smrg 5435b4d38c65Smrg sysv4) 5436b4d38c65Smrg case $host_vendor in 5437b4d38c65Smrg sni) 5438b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5439b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5440b4d38c65Smrg ;; 5441b4d38c65Smrg siemens) 5442b4d38c65Smrg ## LD is ld it makes a PLAMLIB 5443b4d38c65Smrg ## CC just makes a GrossModule. 5444b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5445b4d38c65Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5446b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5447b4d38c65Smrg ;; 5448b4d38c65Smrg motorola) 5449b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5450b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5451b4d38c65Smrg ;; 5452b4d38c65Smrg esac 5453b4d38c65Smrg runpath_var='LD_RUN_PATH' 5454b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5455b4d38c65Smrg ;; 545615fb4814Smrg 5457b4d38c65Smrg sysv4.3*) 5458b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5459b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5460b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5461b4d38c65Smrg ;; 546215fb4814Smrg 5463b4d38c65Smrg sysv4*MP*) 5464b4d38c65Smrg if test -d /usr/nec; then 5465b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5466b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5467b4d38c65Smrg runpath_var=LD_RUN_PATH 5468b4d38c65Smrg hardcode_runpath_var=yes 5469b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5470b4d38c65Smrg fi 5471b4d38c65Smrg ;; 547215fb4814Smrg 5473b4d38c65Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5474b4d38c65Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5475b4d38c65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5476b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5477b4d38c65Smrg runpath_var='LD_RUN_PATH' 547815fb4814Smrg 5479b4d38c65Smrg if test "$GCC" = yes; then 5480b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5481b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5482b4d38c65Smrg else 5483b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5484b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5485b4d38c65Smrg fi 5486b4d38c65Smrg ;; 548715fb4814Smrg 5488b4d38c65Smrg sysv5* | sco3.2v5* | sco5v6*) 5489b4d38c65Smrg # Note: We can NOT use -z defs as we might desire, because we do not 5490b4d38c65Smrg # link with -lc, and that would cause any symbols used from libc to 5491b4d38c65Smrg # always be unresolved, which means just about no library would 5492b4d38c65Smrg # ever link correctly. If we're not using GNU ld we use -z text 5493b4d38c65Smrg # though, which does catch some bad symbols but isn't as heavy-handed 5494b4d38c65Smrg # as -z defs. 5495b4d38c65Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5496b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5497b4d38c65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5498b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5499b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5500b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5501b4d38c65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5502b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5503b4d38c65Smrg runpath_var='LD_RUN_PATH' 550415fb4814Smrg 5505b4d38c65Smrg if test "$GCC" = yes; then 5506b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5507b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5508b4d38c65Smrg else 5509b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5510b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5511b4d38c65Smrg fi 5512b4d38c65Smrg ;; 551315fb4814Smrg 5514b4d38c65Smrg uts4*) 5515b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5516b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5517b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5518b4d38c65Smrg ;; 551915fb4814Smrg 5520b4d38c65Smrg *) 5521b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5522b4d38c65Smrg ;; 5523b4d38c65Smrg esac 552415fb4814Smrg 5525b4d38c65Smrg if test x$host_vendor = xsni; then 5526b4d38c65Smrg case $host in 5527b4d38c65Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5528b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5529b4d38c65Smrg ;; 5530b4d38c65Smrg esac 5531b4d38c65Smrg fi 5532b4d38c65Smrg fi 5533b4d38c65Smrg]) 5534b4d38c65SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5535b4d38c65Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 553615fb4814Smrg 5537b4d38c65Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 553815fb4814Smrg 5539b4d38c65Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5540b4d38c65Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5541b4d38c65Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 5542b4d38c65Smrg [The commands to extract the exported symbol list from a shared archive]) 554315fb4814Smrg 5544b4d38c65Smrg# 5545b4d38c65Smrg# Do we need to explicitly link libc? 5546b4d38c65Smrg# 5547b4d38c65Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5548b4d38c65Smrgx|xyes) 5549b4d38c65Smrg # Assume -lc should be added 5550b4d38c65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 555115fb4814Smrg 5552b4d38c65Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5553b4d38c65Smrg case $_LT_TAGVAR(archive_cmds, $1) in 5554b4d38c65Smrg *'~'*) 5555b4d38c65Smrg # FIXME: we may have to deal with multi-command sequences. 5556b4d38c65Smrg ;; 5557b4d38c65Smrg '$CC '*) 5558b4d38c65Smrg # Test whether the compiler implicitly links with -lc since on some 5559b4d38c65Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5560b4d38c65Smrg # to ld, don't add -lc before -lgcc. 5561b4d38c65Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5562b4d38c65Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5563b4d38c65Smrg [$RM conftest* 5564b4d38c65Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5565b4d38c65Smrg 5566b4d38c65Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5567b4d38c65Smrg soname=conftest 5568b4d38c65Smrg lib=conftest 5569b4d38c65Smrg libobjs=conftest.$ac_objext 5570b4d38c65Smrg deplibs= 5571b4d38c65Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5572b4d38c65Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5573b4d38c65Smrg compiler_flags=-v 5574b4d38c65Smrg linker_flags=-v 5575b4d38c65Smrg verstring= 5576b4d38c65Smrg output_objdir=. 5577b4d38c65Smrg libname=conftest 5578b4d38c65Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5579b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 5580b4d38c65Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5581b4d38c65Smrg then 5582b4d38c65Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5583b4d38c65Smrg else 5584b4d38c65Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5585b4d38c65Smrg fi 5586b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5587b4d38c65Smrg else 5588b4d38c65Smrg cat conftest.err 1>&5 5589b4d38c65Smrg fi 5590b4d38c65Smrg $RM conftest* 5591b4d38c65Smrg ]) 5592b4d38c65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5593b4d38c65Smrg ;; 5594b4d38c65Smrg esac 5595b4d38c65Smrg fi 5596b4d38c65Smrg ;; 5597b4d38c65Smrgesac 559815fb4814Smrg 5599b4d38c65Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5600b4d38c65Smrg [Whether or not to add -lc for building shared libraries]) 5601b4d38c65Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5602b4d38c65Smrg [enable_shared_with_static_runtimes], [0], 5603b4d38c65Smrg [Whether or not to disallow shared libs when runtime libs are static]) 5604b4d38c65Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5605b4d38c65Smrg [Compiler flag to allow reflexive dlopens]) 5606b4d38c65Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5607b4d38c65Smrg [Compiler flag to generate shared objects directly from archives]) 5608b4d38c65Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 5609b4d38c65Smrg [Whether the compiler copes with passing no objects directly]) 5610b4d38c65Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5611b4d38c65Smrg [Create an old-style archive from a shared archive]) 5612b4d38c65Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5613b4d38c65Smrg [Create a temporary old-style archive to link instead of a shared archive]) 5614b4d38c65Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5615b4d38c65Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5616b4d38c65Smrg_LT_TAGDECL([], [module_cmds], [2], 5617b4d38c65Smrg [Commands used to build a loadable module if different from building 5618b4d38c65Smrg a shared archive.]) 5619b4d38c65Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5620b4d38c65Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 5621b4d38c65Smrg [Whether we are building with GNU ld or not]) 5622b4d38c65Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5623b4d38c65Smrg [Flag that allows shared libraries with undefined symbols to be built]) 5624b4d38c65Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 5625b4d38c65Smrg [Flag that enforces no undefined symbols]) 5626b4d38c65Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5627b4d38c65Smrg [Flag to hardcode $libdir into a binary during linking. 5628b4d38c65Smrg This must work even if $libdir does not exist]) 56297fe5393cSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 56307fe5393cSmrg [[If ld is used when linking, flag to hardcode $libdir into a binary 56317fe5393cSmrg during linking. This must work even if $libdir does not exist]]) 5632b4d38c65Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5633b4d38c65Smrg [Whether we need a single "-rpath" flag with a separated argument]) 5634b4d38c65Smrg_LT_TAGDECL([], [hardcode_direct], [0], 5635b4d38c65Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5636b4d38c65Smrg DIR into the resulting binary]) 5637b4d38c65Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5638b4d38c65Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5639b4d38c65Smrg DIR into the resulting binary and the resulting library dependency is 5640b4d38c65Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5641b4d38c65Smrg library is relocated]) 5642b4d38c65Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5643b4d38c65Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5644b4d38c65Smrg into the resulting binary]) 5645b4d38c65Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5646b4d38c65Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5647b4d38c65Smrg into the resulting binary]) 5648b4d38c65Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 5649b4d38c65Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 5650b4d38c65Smrg into the library and all subsequent libraries and executables linked 5651b4d38c65Smrg against it]) 5652b4d38c65Smrg_LT_TAGDECL([], [inherit_rpath], [0], 5653b4d38c65Smrg [Set to yes if linker adds runtime paths of dependent libraries 5654b4d38c65Smrg to runtime path list]) 5655b4d38c65Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 5656b4d38c65Smrg [Whether libtool must link a program against all its dependency libraries]) 5657b4d38c65Smrg_LT_TAGDECL([], [always_export_symbols], [0], 5658b4d38c65Smrg [Set to "yes" if exported symbols are required]) 5659b4d38c65Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5660b4d38c65Smrg [The commands to list exported symbols]) 5661b4d38c65Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 5662b4d38c65Smrg [Symbols that should not be listed in the preloaded symbols]) 5663b4d38c65Smrg_LT_TAGDECL([], [include_expsyms], [1], 5664b4d38c65Smrg [Symbols that must always be exported]) 5665b4d38c65Smrg_LT_TAGDECL([], [prelink_cmds], [2], 5666b4d38c65Smrg [Commands necessary for linking programs (against libraries) with templates]) 5667b4d38c65Smrg_LT_TAGDECL([], [postlink_cmds], [2], 5668b4d38c65Smrg [Commands necessary for finishing linking programs]) 5669b4d38c65Smrg_LT_TAGDECL([], [file_list_spec], [1], 5670b4d38c65Smrg [Specify filename containing input files]) 5671b4d38c65Smrgdnl FIXME: Not yet implemented 5672b4d38c65Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5673b4d38c65Smrgdnl [Compiler flag to generate thread safe objects]) 5674b4d38c65Smrg])# _LT_LINKER_SHLIBS 5675b4d38c65Smrg 5676b4d38c65Smrg 5677b4d38c65Smrg# _LT_LANG_C_CONFIG([TAG]) 5678b4d38c65Smrg# ------------------------ 5679b4d38c65Smrg# Ensure that the configuration variables for a C compiler are suitably 5680b4d38c65Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5681b4d38c65Smrg# the compiler configuration to `libtool'. 5682b4d38c65Smrgm4_defun([_LT_LANG_C_CONFIG], 5683b4d38c65Smrg[m4_require([_LT_DECL_EGREP])dnl 5684b4d38c65Smrglt_save_CC="$CC" 5685b4d38c65SmrgAC_LANG_PUSH(C) 568615fb4814Smrg 5687b4d38c65Smrg# Source file extension for C test sources. 5688b4d38c65Smrgac_ext=c 568915fb4814Smrg 5690b4d38c65Smrg# Object file extension for compiled C test sources. 5691b4d38c65Smrgobjext=o 5692b4d38c65Smrg_LT_TAGVAR(objext, $1)=$objext 569315fb4814Smrg 5694b4d38c65Smrg# Code to be used in simple compile tests 5695b4d38c65Smrglt_simple_compile_test_code="int some_variable = 0;" 569615fb4814Smrg 5697b4d38c65Smrg# Code to be used in simple link tests 5698b4d38c65Smrglt_simple_link_test_code='int main(){return(0);}' 569915fb4814Smrg 5700b4d38c65Smrg_LT_TAG_COMPILER 5701b4d38c65Smrg# Save the default compiler, since it gets overwritten when the other 5702b4d38c65Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5703b4d38c65Smrgcompiler_DEFAULT=$CC 570415fb4814Smrg 5705b4d38c65Smrg# save warnings/boilerplate of simple test code 5706b4d38c65Smrg_LT_COMPILER_BOILERPLATE 5707b4d38c65Smrg_LT_LINKER_BOILERPLATE 570815fb4814Smrg 5709b4d38c65Smrgif test -n "$compiler"; then 5710b4d38c65Smrg _LT_COMPILER_NO_RTTI($1) 5711b4d38c65Smrg _LT_COMPILER_PIC($1) 5712b4d38c65Smrg _LT_COMPILER_C_O($1) 5713b4d38c65Smrg _LT_COMPILER_FILE_LOCKS($1) 5714b4d38c65Smrg _LT_LINKER_SHLIBS($1) 5715b4d38c65Smrg _LT_SYS_DYNAMIC_LINKER($1) 5716b4d38c65Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 5717b4d38c65Smrg LT_SYS_DLOPEN_SELF 5718b4d38c65Smrg _LT_CMD_STRIPLIB 5719b4d38c65Smrg 5720b4d38c65Smrg # Report which library types will actually be built 5721b4d38c65Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5722b4d38c65Smrg AC_MSG_RESULT([$can_build_shared]) 5723b4d38c65Smrg 5724b4d38c65Smrg AC_MSG_CHECKING([whether to build shared libraries]) 5725b4d38c65Smrg test "$can_build_shared" = "no" && enable_shared=no 5726b4d38c65Smrg 5727b4d38c65Smrg # On AIX, shared libraries and static libraries use the same namespace, and 5728b4d38c65Smrg # are all built from PIC. 5729b4d38c65Smrg case $host_os in 5730b4d38c65Smrg aix3*) 5731b4d38c65Smrg test "$enable_shared" = yes && enable_static=no 5732b4d38c65Smrg if test -n "$RANLIB"; then 5733b4d38c65Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5734b4d38c65Smrg postinstall_cmds='$RANLIB $lib' 5735b4d38c65Smrg fi 5736b4d38c65Smrg ;; 573715fb4814Smrg 5738b4d38c65Smrg aix[[4-9]]*) 5739b4d38c65Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5740b4d38c65Smrg test "$enable_shared" = yes && enable_static=no 5741b4d38c65Smrg fi 5742b4d38c65Smrg ;; 5743b4d38c65Smrg esac 5744b4d38c65Smrg AC_MSG_RESULT([$enable_shared]) 574515fb4814Smrg 5746b4d38c65Smrg AC_MSG_CHECKING([whether to build static libraries]) 5747b4d38c65Smrg # Make sure either enable_shared or enable_static is yes. 5748b4d38c65Smrg test "$enable_shared" = yes || enable_static=yes 5749b4d38c65Smrg AC_MSG_RESULT([$enable_static]) 575015fb4814Smrg 5751b4d38c65Smrg _LT_CONFIG($1) 5752b4d38c65Smrgfi 5753b4d38c65SmrgAC_LANG_POP 5754b4d38c65SmrgCC="$lt_save_CC" 5755b4d38c65Smrg])# _LT_LANG_C_CONFIG 575615fb4814Smrg 575715fb4814Smrg 5758b4d38c65Smrg# _LT_LANG_CXX_CONFIG([TAG]) 5759b4d38c65Smrg# -------------------------- 5760b4d38c65Smrg# Ensure that the configuration variables for a C++ compiler are suitably 5761b4d38c65Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5762b4d38c65Smrg# the compiler configuration to `libtool'. 5763b4d38c65Smrgm4_defun([_LT_LANG_CXX_CONFIG], 5764b4d38c65Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5765b4d38c65Smrgm4_require([_LT_DECL_EGREP])dnl 5766b4d38c65Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5767b4d38c65Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5768b4d38c65Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5769b4d38c65Smrg (test "X$CXX" != "Xg++"))) ; then 5770b4d38c65Smrg AC_PROG_CXXCPP 5771b4d38c65Smrgelse 5772b4d38c65Smrg _lt_caught_CXX_error=yes 5773b4d38c65Smrgfi 577415fb4814Smrg 5775b4d38c65SmrgAC_LANG_PUSH(C++) 5776b4d38c65Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5777b4d38c65Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 5778b4d38c65Smrg_LT_TAGVAR(always_export_symbols, $1)=no 5779b4d38c65Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5780b4d38c65Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 5781b4d38c65Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5782b4d38c65Smrg_LT_TAGVAR(hardcode_direct, $1)=no 5783b4d38c65Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5784b4d38c65Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 57857fe5393cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5786b4d38c65Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5787b4d38c65Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5788b4d38c65Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5789b4d38c65Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 5790b4d38c65Smrg_LT_TAGVAR(inherit_rpath, $1)=no 5791b4d38c65Smrg_LT_TAGVAR(module_cmds, $1)= 5792b4d38c65Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 5793b4d38c65Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5794b4d38c65Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5795b4d38c65Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 5796b4d38c65Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5797b4d38c65Smrg_LT_TAGVAR(no_undefined_flag, $1)= 5798b4d38c65Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5799b4d38c65Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 580015fb4814Smrg 5801b4d38c65Smrg# Source file extension for C++ test sources. 5802b4d38c65Smrgac_ext=cpp 580315fb4814Smrg 5804b4d38c65Smrg# Object file extension for compiled C++ test sources. 5805b4d38c65Smrgobjext=o 5806b4d38c65Smrg_LT_TAGVAR(objext, $1)=$objext 5807b4d38c65Smrg 5808b4d38c65Smrg# No sense in running all these tests if we already determined that 5809b4d38c65Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 5810b4d38c65Smrg# are currently assumed to apply to all compilers on this platform, 5811b4d38c65Smrg# and will be corrupted by setting them based on a non-working compiler. 5812b4d38c65Smrgif test "$_lt_caught_CXX_error" != yes; then 5813b4d38c65Smrg # Code to be used in simple compile tests 5814b4d38c65Smrg lt_simple_compile_test_code="int some_variable = 0;" 5815b4d38c65Smrg 5816b4d38c65Smrg # Code to be used in simple link tests 5817b4d38c65Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5818b4d38c65Smrg 5819b4d38c65Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5820b4d38c65Smrg _LT_TAG_COMPILER 5821b4d38c65Smrg 5822b4d38c65Smrg # save warnings/boilerplate of simple test code 5823b4d38c65Smrg _LT_COMPILER_BOILERPLATE 5824b4d38c65Smrg _LT_LINKER_BOILERPLATE 5825b4d38c65Smrg 5826b4d38c65Smrg # Allow CC to be a program name with arguments. 5827b4d38c65Smrg lt_save_CC=$CC 5828b4d38c65Smrg lt_save_CFLAGS=$CFLAGS 5829b4d38c65Smrg lt_save_LD=$LD 5830b4d38c65Smrg lt_save_GCC=$GCC 5831b4d38c65Smrg GCC=$GXX 5832b4d38c65Smrg lt_save_with_gnu_ld=$with_gnu_ld 5833b4d38c65Smrg lt_save_path_LD=$lt_cv_path_LD 5834b4d38c65Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5835b4d38c65Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5836b4d38c65Smrg else 5837b4d38c65Smrg $as_unset lt_cv_prog_gnu_ld 5838b4d38c65Smrg fi 5839b4d38c65Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 5840b4d38c65Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 5841b4d38c65Smrg else 5842b4d38c65Smrg $as_unset lt_cv_path_LD 5843b4d38c65Smrg fi 5844b4d38c65Smrg test -z "${LDCXX+set}" || LD=$LDCXX 5845b4d38c65Smrg CC=${CXX-"c++"} 5846b4d38c65Smrg CFLAGS=$CXXFLAGS 5847b4d38c65Smrg compiler=$CC 5848b4d38c65Smrg _LT_TAGVAR(compiler, $1)=$CC 5849b4d38c65Smrg _LT_CC_BASENAME([$compiler]) 585015fb4814Smrg 5851b4d38c65Smrg if test -n "$compiler"; then 5852b4d38c65Smrg # We don't want -fno-exception when compiling C++ code, so set the 5853b4d38c65Smrg # no_builtin_flag separately 5854b4d38c65Smrg if test "$GXX" = yes; then 5855b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5856b4d38c65Smrg else 5857b4d38c65Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5858b4d38c65Smrg fi 585915fb4814Smrg 5860b4d38c65Smrg if test "$GXX" = yes; then 5861b4d38c65Smrg # Set up default GNU C++ configuration 586215fb4814Smrg 5863b4d38c65Smrg LT_PATH_LD 586415fb4814Smrg 5865b4d38c65Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5866b4d38c65Smrg # archiving commands below assume that GNU ld is being used. 5867b4d38c65Smrg if test "$with_gnu_ld" = yes; then 5868b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5869b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 587015fb4814Smrg 5871b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5872b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 587315fb4814Smrg 5874b4d38c65Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5875b4d38c65Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5876b4d38c65Smrg # investigate it a little bit more. (MM) 5877b4d38c65Smrg wlarc='${wl}' 587815fb4814Smrg 5879b4d38c65Smrg # ancient GNU ld didn't support --whole-archive et. al. 5880b4d38c65Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5881b4d38c65Smrg $GREP 'no-whole-archive' > /dev/null; then 5882b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5883b4d38c65Smrg else 5884b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5885b4d38c65Smrg fi 5886b4d38c65Smrg else 5887b4d38c65Smrg with_gnu_ld=no 5888b4d38c65Smrg wlarc= 5889b4d38c65Smrg 5890b4d38c65Smrg # A generic and very simple default shared library creation 5891b4d38c65Smrg # command for GNU C++ for the case where it uses the native 5892b4d38c65Smrg # linker, instead of GNU ld. If possible, this setting should 5893b4d38c65Smrg # overridden to take advantage of the native linker features on 5894b4d38c65Smrg # the platform it is being used on. 5895b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5896b4d38c65Smrg fi 589715fb4814Smrg 5898b4d38c65Smrg # Commands to make compiler produce verbose output that lists 5899b4d38c65Smrg # what "hidden" libraries, object files and flags are used when 5900b4d38c65Smrg # linking a shared library. 5901b4d38c65Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 590215fb4814Smrg 5903b4d38c65Smrg else 5904b4d38c65Smrg GXX=no 5905b4d38c65Smrg with_gnu_ld=no 5906b4d38c65Smrg wlarc= 5907b4d38c65Smrg fi 590815fb4814Smrg 5909b4d38c65Smrg # PORTME: fill in a description of your system's C++ link characteristics 5910b4d38c65Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5911b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5912b4d38c65Smrg case $host_os in 5913b4d38c65Smrg aix3*) 5914b4d38c65Smrg # FIXME: insert proper C++ library support 5915b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5916b4d38c65Smrg ;; 5917b4d38c65Smrg aix[[4-9]]*) 5918b4d38c65Smrg if test "$host_cpu" = ia64; then 5919b4d38c65Smrg # On IA64, the linker does run time linking by default, so we don't 5920b4d38c65Smrg # have to do anything special. 5921b4d38c65Smrg aix_use_runtimelinking=no 5922b4d38c65Smrg exp_sym_flag='-Bexport' 5923b4d38c65Smrg no_entry_flag="" 5924b4d38c65Smrg else 5925b4d38c65Smrg aix_use_runtimelinking=no 5926b4d38c65Smrg 5927b4d38c65Smrg # Test if we are trying to use run time linking or normal 5928b4d38c65Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5929b4d38c65Smrg # need to do runtime linking. 5930b4d38c65Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5931b4d38c65Smrg for ld_flag in $LDFLAGS; do 5932b4d38c65Smrg case $ld_flag in 5933b4d38c65Smrg *-brtl*) 5934b4d38c65Smrg aix_use_runtimelinking=yes 5935b4d38c65Smrg break 5936b4d38c65Smrg ;; 5937b4d38c65Smrg esac 5938b4d38c65Smrg done 5939b4d38c65Smrg ;; 5940b4d38c65Smrg esac 594183cab373Smrg 5942b4d38c65Smrg exp_sym_flag='-bexport' 5943b4d38c65Smrg no_entry_flag='-bnoentry' 5944b4d38c65Smrg fi 594515fb4814Smrg 5946b4d38c65Smrg # When large executables or shared objects are built, AIX ld can 5947b4d38c65Smrg # have problems creating the table of contents. If linking a library 5948b4d38c65Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5949b4d38c65Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5950b4d38c65Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5951b4d38c65Smrg 5952b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='' 5953b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5954b4d38c65Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5955b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5956b4d38c65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5957b4d38c65Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5958b4d38c65Smrg 5959b4d38c65Smrg if test "$GXX" = yes; then 5960b4d38c65Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5961b4d38c65Smrg # We only want to do this on AIX 4.2 and lower, the check 5962b4d38c65Smrg # below for broken collect2 doesn't work under 4.3+ 5963b4d38c65Smrg collect2name=`${CC} -print-prog-name=collect2` 5964b4d38c65Smrg if test -f "$collect2name" && 5965b4d38c65Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5966b4d38c65Smrg then 5967b4d38c65Smrg # We have reworked collect2 5968b4d38c65Smrg : 5969b4d38c65Smrg else 5970b4d38c65Smrg # We have old collect2 5971b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5972b4d38c65Smrg # It fails to find uninstalled libraries when the uninstalled 5973b4d38c65Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5974b4d38c65Smrg # to unsupported forces relinking 5975b4d38c65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5976b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5977b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5978b4d38c65Smrg fi 5979b4d38c65Smrg esac 5980b4d38c65Smrg shared_flag='-shared' 5981b4d38c65Smrg if test "$aix_use_runtimelinking" = yes; then 5982b4d38c65Smrg shared_flag="$shared_flag "'${wl}-G' 5983b4d38c65Smrg fi 5984b4d38c65Smrg else 5985b4d38c65Smrg # not using gcc 5986b4d38c65Smrg if test "$host_cpu" = ia64; then 5987b4d38c65Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5988b4d38c65Smrg # chokes on -Wl,-G. The following line is correct: 5989b4d38c65Smrg shared_flag='-G' 5990b4d38c65Smrg else 5991b4d38c65Smrg if test "$aix_use_runtimelinking" = yes; then 5992b4d38c65Smrg shared_flag='${wl}-G' 5993b4d38c65Smrg else 5994b4d38c65Smrg shared_flag='${wl}-bM:SRE' 5995b4d38c65Smrg fi 5996b4d38c65Smrg fi 5997b4d38c65Smrg fi 599815fb4814Smrg 5999b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6000b4d38c65Smrg # It seems that -bexpall does not export symbols beginning with 6001b4d38c65Smrg # underscore (_), so it is better to generate a list of symbols to 6002b4d38c65Smrg # export. 6003b4d38c65Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6004b4d38c65Smrg if test "$aix_use_runtimelinking" = yes; then 6005b4d38c65Smrg # Warning - without using the other runtime loading flags (-brtl), 6006b4d38c65Smrg # -berok will link without error, but may produce a broken library. 6007b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6008b4d38c65Smrg # Determine the default libpath from the value encoded in an empty 6009b4d38c65Smrg # executable. 6010b4d38c65Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6011b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6012b4d38c65Smrg 6013b4d38c65Smrg _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" 6014b4d38c65Smrg else 6015b4d38c65Smrg if test "$host_cpu" = ia64; then 6016b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6017b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6018b4d38c65Smrg _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" 6019b4d38c65Smrg else 6020b4d38c65Smrg # Determine the default libpath from the value encoded in an 6021b4d38c65Smrg # empty executable. 6022b4d38c65Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6023b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6024b4d38c65Smrg # Warning - without using the other run time loading flags, 6025b4d38c65Smrg # -berok will link without error, but may produce a broken library. 6026b4d38c65Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6027b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6028b4d38c65Smrg if test "$with_gnu_ld" = yes; then 6029b4d38c65Smrg # We only use this code for GNU lds that support --whole-archive. 6030b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6031b4d38c65Smrg else 6032b4d38c65Smrg # Exported symbols can be pulled into shared objects from archives 6033b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6034b4d38c65Smrg fi 6035b4d38c65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6036b4d38c65Smrg # This is similar to how AIX traditionally builds its shared 6037b4d38c65Smrg # libraries. 6038b4d38c65Smrg _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' 6039b4d38c65Smrg fi 6040b4d38c65Smrg fi 6041b4d38c65Smrg ;; 6042b4d38c65Smrg 6043b4d38c65Smrg beos*) 6044b4d38c65Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6045b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6046b4d38c65Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6047b4d38c65Smrg # support --undefined. This deserves some investigation. FIXME 6048b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6049b4d38c65Smrg else 6050b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6051b4d38c65Smrg fi 6052b4d38c65Smrg ;; 6053b4d38c65Smrg 6054b4d38c65Smrg chorus*) 6055b4d38c65Smrg case $cc_basename in 6056b4d38c65Smrg *) 6057b4d38c65Smrg # FIXME: insert proper C++ library support 6058b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6059b4d38c65Smrg ;; 6060b4d38c65Smrg esac 6061b4d38c65Smrg ;; 606215fb4814Smrg 6063b4d38c65Smrg cygwin* | mingw* | pw32* | cegcc*) 6064b4d38c65Smrg case $GXX,$cc_basename in 6065b4d38c65Smrg ,cl* | no,cl*) 6066b4d38c65Smrg # Native MSVC 6067b4d38c65Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6068b4d38c65Smrg # no search path for DLLs. 6069b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6070b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6071b4d38c65Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6072b4d38c65Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6073b4d38c65Smrg # Tell ltmain to make .lib files, not .a files. 6074b4d38c65Smrg libext=lib 6075b4d38c65Smrg # Tell ltmain to make .dll files, not .so files. 6076b4d38c65Smrg shrext_cmds=".dll" 6077b4d38c65Smrg # FIXME: Setting linknames here is a bad hack. 6078b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6079b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6080b4d38c65Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6081b4d38c65Smrg else 6082b4d38c65Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6083b4d38c65Smrg fi~ 6084b4d38c65Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6085b4d38c65Smrg linknames=' 6086b4d38c65Smrg # The linker will not automatically build a static lib if we build a DLL. 6087b4d38c65Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6088b4d38c65Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6089b4d38c65Smrg # Don't use ranlib 6090b4d38c65Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6091b4d38c65Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6092b4d38c65Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6093b4d38c65Smrg case $lt_outputfile in 6094b4d38c65Smrg *.exe|*.EXE) ;; 6095b4d38c65Smrg *) 6096b4d38c65Smrg lt_outputfile="$lt_outputfile.exe" 6097b4d38c65Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6098b4d38c65Smrg ;; 6099b4d38c65Smrg esac~ 6100b4d38c65Smrg func_to_tool_file "$lt_outputfile"~ 6101b4d38c65Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6102b4d38c65Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6103b4d38c65Smrg $RM "$lt_outputfile.manifest"; 6104b4d38c65Smrg fi' 6105b4d38c65Smrg ;; 6106b4d38c65Smrg *) 6107b4d38c65Smrg # g++ 6108b4d38c65Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6109b4d38c65Smrg # as there is no search path for DLLs. 6110b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6111b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6112b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6113b4d38c65Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6114b4d38c65Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6115b4d38c65Smrg 6116b4d38c65Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6117b4d38c65Smrg _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' 6118b4d38c65Smrg # If the export-symbols file already is a .def file (1st line 6119b4d38c65Smrg # is EXPORTS), use it as is; otherwise, prepend... 6120b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6121b4d38c65Smrg cp $export_symbols $output_objdir/$soname.def; 6122b4d38c65Smrg else 6123b4d38c65Smrg echo EXPORTS > $output_objdir/$soname.def; 6124b4d38c65Smrg cat $export_symbols >> $output_objdir/$soname.def; 6125b4d38c65Smrg fi~ 6126b4d38c65Smrg $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' 6127b4d38c65Smrg else 6128b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6129b4d38c65Smrg fi 6130b4d38c65Smrg ;; 6131b4d38c65Smrg esac 6132b4d38c65Smrg ;; 6133b4d38c65Smrg darwin* | rhapsody*) 6134b4d38c65Smrg _LT_DARWIN_LINKER_FEATURES($1) 6135b4d38c65Smrg ;; 613615fb4814Smrg 6137b4d38c65Smrg dgux*) 6138b4d38c65Smrg case $cc_basename in 6139b4d38c65Smrg ec++*) 6140b4d38c65Smrg # FIXME: insert proper C++ library support 6141b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6142b4d38c65Smrg ;; 6143b4d38c65Smrg ghcx*) 6144b4d38c65Smrg # Green Hills C++ Compiler 6145b4d38c65Smrg # FIXME: insert proper C++ library support 6146b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6147b4d38c65Smrg ;; 6148b4d38c65Smrg *) 6149b4d38c65Smrg # FIXME: insert proper C++ library support 6150b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6151b4d38c65Smrg ;; 6152b4d38c65Smrg esac 6153b4d38c65Smrg ;; 6154b410ddbeSmrg 61557fe5393cSmrg freebsd[[12]]*) 6156b4d38c65Smrg # C++ shared libraries reported to be fairly broken before 6157b4d38c65Smrg # switch to ELF 6158b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6159b4d38c65Smrg ;; 616015fb4814Smrg 6161b4d38c65Smrg freebsd-elf*) 6162b4d38c65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6163b4d38c65Smrg ;; 616415fb4814Smrg 6165b4d38c65Smrg freebsd* | dragonfly*) 6166b4d38c65Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6167b4d38c65Smrg # conventions 6168b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6169b4d38c65Smrg ;; 617015fb4814Smrg 6171b4d38c65Smrg gnu*) 6172b4d38c65Smrg ;; 617315fb4814Smrg 6174b4d38c65Smrg haiku*) 6175b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6176b4d38c65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6177b4d38c65Smrg ;; 617815fb4814Smrg 6179b4d38c65Smrg hpux9*) 6180b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6181b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6182b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6183b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6184b4d38c65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6185b4d38c65Smrg # but as the default 6186b4d38c65Smrg # location of the library. 6187b4d38c65Smrg 6188b4d38c65Smrg case $cc_basename in 6189b4d38c65Smrg CC*) 6190b4d38c65Smrg # FIXME: insert proper C++ library support 6191b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6192b4d38c65Smrg ;; 6193b4d38c65Smrg aCC*) 6194b4d38c65Smrg _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' 6195b4d38c65Smrg # Commands to make compiler produce verbose output that lists 6196b4d38c65Smrg # what "hidden" libraries, object files and flags are used when 6197b4d38c65Smrg # linking a shared library. 6198b4d38c65Smrg # 6199b4d38c65Smrg # There doesn't appear to be a way to prevent this compiler from 6200b4d38c65Smrg # explicitly linking system object files so we need to strip them 6201b4d38c65Smrg # from the output so that they don't get included in the library 6202b4d38c65Smrg # dependencies. 6203b4d38c65Smrg 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"' 6204b4d38c65Smrg ;; 6205b4d38c65Smrg *) 6206b4d38c65Smrg if test "$GXX" = yes; then 6207b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6208b4d38c65Smrg else 6209b4d38c65Smrg # FIXME: insert proper C++ library support 6210b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6211b4d38c65Smrg fi 6212b4d38c65Smrg ;; 6213b4d38c65Smrg esac 6214b4d38c65Smrg ;; 621515fb4814Smrg 6216b4d38c65Smrg hpux10*|hpux11*) 6217b4d38c65Smrg if test $with_gnu_ld = no; then 6218b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6219b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6220b4d38c65Smrg 6221b4d38c65Smrg case $host_cpu in 6222b4d38c65Smrg hppa*64*|ia64*) 6223b4d38c65Smrg ;; 6224b4d38c65Smrg *) 6225b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6226b4d38c65Smrg ;; 6227b4d38c65Smrg esac 6228b4d38c65Smrg fi 6229b4d38c65Smrg case $host_cpu in 6230b4d38c65Smrg hppa*64*|ia64*) 6231b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6232b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6233b4d38c65Smrg ;; 6234b4d38c65Smrg *) 6235b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6236b4d38c65Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6237b4d38c65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6238b4d38c65Smrg # but as the default 6239b4d38c65Smrg # location of the library. 6240b4d38c65Smrg ;; 6241b4d38c65Smrg esac 624215fb4814Smrg 6243b4d38c65Smrg case $cc_basename in 6244b4d38c65Smrg CC*) 6245b4d38c65Smrg # FIXME: insert proper C++ library support 6246b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6247b4d38c65Smrg ;; 6248b4d38c65Smrg aCC*) 6249b4d38c65Smrg case $host_cpu in 6250b4d38c65Smrg hppa*64*) 6251b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6252b4d38c65Smrg ;; 6253b4d38c65Smrg ia64*) 6254b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6255b4d38c65Smrg ;; 6256b4d38c65Smrg *) 6257b4d38c65Smrg _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' 6258b4d38c65Smrg ;; 6259b4d38c65Smrg esac 6260b4d38c65Smrg # Commands to make compiler produce verbose output that lists 6261b4d38c65Smrg # what "hidden" libraries, object files and flags are used when 6262b4d38c65Smrg # linking a shared library. 6263b4d38c65Smrg # 6264b4d38c65Smrg # There doesn't appear to be a way to prevent this compiler from 6265b4d38c65Smrg # explicitly linking system object files so we need to strip them 6266b4d38c65Smrg # from the output so that they don't get included in the library 6267b4d38c65Smrg # dependencies. 6268b4d38c65Smrg 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"' 6269b4d38c65Smrg ;; 6270b4d38c65Smrg *) 6271b4d38c65Smrg if test "$GXX" = yes; then 6272b4d38c65Smrg if test $with_gnu_ld = no; then 6273b4d38c65Smrg case $host_cpu in 6274b4d38c65Smrg hppa*64*) 6275b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6276b4d38c65Smrg ;; 6277b4d38c65Smrg ia64*) 6278b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6279b4d38c65Smrg ;; 6280b4d38c65Smrg *) 6281b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6282b4d38c65Smrg ;; 6283b4d38c65Smrg esac 6284b4d38c65Smrg fi 6285b4d38c65Smrg else 6286b4d38c65Smrg # FIXME: insert proper C++ library support 6287b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6288b4d38c65Smrg fi 6289b4d38c65Smrg ;; 6290b4d38c65Smrg esac 6291b4d38c65Smrg ;; 629215fb4814Smrg 6293b4d38c65Smrg interix[[3-9]]*) 6294b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6295b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6296b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6297b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6298b4d38c65Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6299b4d38c65Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6300b4d38c65Smrg # default) and relocated if they conflict, which is a slow very memory 6301b4d38c65Smrg # consuming and fragmenting process. To avoid this, we pick a random, 6302b4d38c65Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6303b4d38c65Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6304b4d38c65Smrg _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' 6305b4d38c65Smrg _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' 6306b4d38c65Smrg ;; 6307b4d38c65Smrg irix5* | irix6*) 6308b4d38c65Smrg case $cc_basename in 6309b4d38c65Smrg CC*) 6310b4d38c65Smrg # SGI C++ 6311b4d38c65Smrg _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' 6312b4d38c65Smrg 6313b4d38c65Smrg # Archives containing C++ object files must be created using 6314b4d38c65Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6315b4d38c65Smrg # necessary to make sure instantiated templates are included 6316b4d38c65Smrg # in the archive. 6317b4d38c65Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6318b4d38c65Smrg ;; 6319b4d38c65Smrg *) 6320b4d38c65Smrg if test "$GXX" = yes; then 6321b4d38c65Smrg if test "$with_gnu_ld" = no; then 6322b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6323b4d38c65Smrg else 6324b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' 6325b4d38c65Smrg fi 6326b4d38c65Smrg fi 6327b4d38c65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6328b4d38c65Smrg ;; 6329b4d38c65Smrg esac 6330b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6331b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6332b4d38c65Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 6333b4d38c65Smrg ;; 633415fb4814Smrg 6335b4d38c65Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6336b4d38c65Smrg case $cc_basename in 6337b4d38c65Smrg KCC*) 6338b4d38c65Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 633915fb4814Smrg 6340b4d38c65Smrg # KCC will only create a shared library if the output file 6341b4d38c65Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6342b4d38c65Smrg # to its proper name (with version) after linking. 6343b4d38c65Smrg _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' 6344b4d38c65Smrg _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' 6345b4d38c65Smrg # Commands to make compiler produce verbose output that lists 6346b4d38c65Smrg # what "hidden" libraries, object files and flags are used when 6347b4d38c65Smrg # linking a shared library. 6348b4d38c65Smrg # 6349b4d38c65Smrg # There doesn't appear to be a way to prevent this compiler from 6350b4d38c65Smrg # explicitly linking system object files so we need to strip them 6351b4d38c65Smrg # from the output so that they don't get included in the library 6352b4d38c65Smrg # dependencies. 6353b4d38c65Smrg 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"' 6354b4d38c65Smrg 6355b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6356b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6357b4d38c65Smrg 6358b4d38c65Smrg # Archives containing C++ object files must be created using 6359b4d38c65Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6360b4d38c65Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6361b4d38c65Smrg ;; 6362b4d38c65Smrg icpc* | ecpc* ) 6363b4d38c65Smrg # Intel C++ 6364b4d38c65Smrg with_gnu_ld=yes 6365b4d38c65Smrg # version 8.0 and above of icpc choke on multiply defined symbols 6366b4d38c65Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6367b4d38c65Smrg # earlier do not add the objects themselves. 6368b4d38c65Smrg case `$CC -V 2>&1` in 6369b4d38c65Smrg *"Version 7."*) 6370b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6371b4d38c65Smrg _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' 6372b4d38c65Smrg ;; 6373b4d38c65Smrg *) # Version 8.0 or newer 6374b4d38c65Smrg tmp_idyn= 6375b4d38c65Smrg case $host_cpu in 6376b4d38c65Smrg ia64*) tmp_idyn=' -i_dynamic';; 6377b4d38c65Smrg esac 6378b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6379b4d38c65Smrg _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' 6380b4d38c65Smrg ;; 6381b4d38c65Smrg esac 6382b4d38c65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6383b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6384b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6385b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6386b4d38c65Smrg ;; 6387b4d38c65Smrg pgCC* | pgcpp*) 6388b4d38c65Smrg # Portland Group C++ compiler 6389b4d38c65Smrg case `$CC -V` in 6390b4d38c65Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6391b4d38c65Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6392b4d38c65Smrg rm -rf $tpldir~ 6393b4d38c65Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6394b4d38c65Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6395b4d38c65Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6396b4d38c65Smrg rm -rf $tpldir~ 6397b4d38c65Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6398b4d38c65Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6399b4d38c65Smrg $RANLIB $oldlib' 6400b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6401b4d38c65Smrg rm -rf $tpldir~ 6402b4d38c65Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6403b4d38c65Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6404b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6405b4d38c65Smrg rm -rf $tpldir~ 6406b4d38c65Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6407b4d38c65Smrg $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' 6408b4d38c65Smrg ;; 6409b4d38c65Smrg *) # Version 6 and above use weak symbols 6410b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6411b4d38c65Smrg _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' 6412b4d38c65Smrg ;; 6413b4d38c65Smrg esac 641415fb4814Smrg 6415b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6416b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6417b4d38c65Smrg _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' 6418b4d38c65Smrg ;; 6419b4d38c65Smrg cxx*) 6420b4d38c65Smrg # Compaq C++ 6421b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6422b4d38c65Smrg _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' 642315fb4814Smrg 6424b4d38c65Smrg runpath_var=LD_RUN_PATH 6425b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6426b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 642715fb4814Smrg 6428b4d38c65Smrg # Commands to make compiler produce verbose output that lists 6429b4d38c65Smrg # what "hidden" libraries, object files and flags are used when 6430b4d38c65Smrg # linking a shared library. 6431b4d38c65Smrg # 6432b4d38c65Smrg # There doesn't appear to be a way to prevent this compiler from 6433b4d38c65Smrg # explicitly linking system object files so we need to strip them 6434b4d38c65Smrg # from the output so that they don't get included in the library 6435b4d38c65Smrg # dependencies. 6436b4d38c65Smrg 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' 6437b4d38c65Smrg ;; 6438b4d38c65Smrg xl* | mpixl* | bgxl*) 6439b4d38c65Smrg # IBM XL 8.0 on PPC, with GNU ld 6440b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6441b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6442b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6443b4d38c65Smrg if test "x$supports_anon_versioning" = xyes; then 6444b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6445b4d38c65Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6446b4d38c65Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6447b4d38c65Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6448b4d38c65Smrg fi 6449b4d38c65Smrg ;; 6450b4d38c65Smrg *) 6451b4d38c65Smrg case `$CC -V 2>&1 | sed 5q` in 6452b4d38c65Smrg *Sun\ C*) 6453b4d38c65Smrg # Sun C++ 5.9 6454b4d38c65Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6455b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6456b4d38c65Smrg _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' 6457b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6458b4d38c65Smrg _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' 6459b4d38c65Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6460b4d38c65Smrg 6461b4d38c65Smrg # Not sure whether something based on 6462b4d38c65Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6463b4d38c65Smrg # would be better. 6464b4d38c65Smrg output_verbose_link_cmd='func_echo_all' 6465b4d38c65Smrg 6466b4d38c65Smrg # Archives containing C++ object files must be created using 6467b4d38c65Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6468b4d38c65Smrg # necessary to make sure instantiated templates are included 6469b4d38c65Smrg # in the archive. 6470b4d38c65Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6471b4d38c65Smrg ;; 6472b4d38c65Smrg esac 6473b4d38c65Smrg ;; 6474b4d38c65Smrg esac 6475b4d38c65Smrg ;; 647615fb4814Smrg 6477b4d38c65Smrg lynxos*) 6478b4d38c65Smrg # FIXME: insert proper C++ library support 6479b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6480b4d38c65Smrg ;; 648115fb4814Smrg 6482b4d38c65Smrg m88k*) 6483b4d38c65Smrg # FIXME: insert proper C++ library support 6484b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6485b4d38c65Smrg ;; 648615fb4814Smrg 6487b4d38c65Smrg mvs*) 6488b4d38c65Smrg case $cc_basename in 6489b4d38c65Smrg cxx*) 6490b4d38c65Smrg # FIXME: insert proper C++ library support 6491b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6492b4d38c65Smrg ;; 6493b4d38c65Smrg *) 6494b4d38c65Smrg # FIXME: insert proper C++ library support 6495b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6496b4d38c65Smrg ;; 6497b4d38c65Smrg esac 6498b4d38c65Smrg ;; 649915fb4814Smrg 6500b4d38c65Smrg netbsd*) 6501b4d38c65Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6502b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6503b4d38c65Smrg wlarc= 6504b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6505b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6506b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6507b4d38c65Smrg fi 6508b4d38c65Smrg # Workaround some broken pre-1.5 toolchains 6509b4d38c65Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6510b4d38c65Smrg ;; 651115fb4814Smrg 6512b4d38c65Smrg *nto* | *qnx*) 6513b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6514b4d38c65Smrg ;; 651515fb4814Smrg 6516b4d38c65Smrg openbsd2*) 6517b4d38c65Smrg # C++ shared libraries are fairly broken 6518b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6519b4d38c65Smrg ;; 652015fb4814Smrg 6521b4d38c65Smrg openbsd*) 6522b4d38c65Smrg if test -f /usr/libexec/ld.so; then 6523b4d38c65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6524b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6525b4d38c65Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6526b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6527b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6528b4d38c65Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6529b4d38c65Smrg _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' 6530b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6531b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6532b4d38c65Smrg fi 6533b4d38c65Smrg output_verbose_link_cmd=func_echo_all 6534b4d38c65Smrg else 6535b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6536b4d38c65Smrg fi 6537b4d38c65Smrg ;; 653815fb4814Smrg 6539b4d38c65Smrg osf3* | osf4* | osf5*) 6540b4d38c65Smrg case $cc_basename in 6541b4d38c65Smrg KCC*) 6542b4d38c65Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6543b4d38c65Smrg 6544b4d38c65Smrg # KCC will only create a shared library if the output file 6545b4d38c65Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6546b4d38c65Smrg # to its proper name (with version) after linking. 6547b4d38c65Smrg _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' 6548b4d38c65Smrg 6549b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6550b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6551b4d38c65Smrg 6552b4d38c65Smrg # Archives containing C++ object files must be created using 6553b4d38c65Smrg # the KAI C++ compiler. 6554b4d38c65Smrg case $host in 6555b4d38c65Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6556b4d38c65Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6557b4d38c65Smrg esac 6558b4d38c65Smrg ;; 6559b4d38c65Smrg RCC*) 6560b4d38c65Smrg # Rational C++ 2.4.1 6561b4d38c65Smrg # FIXME: insert proper C++ library support 6562b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6563b4d38c65Smrg ;; 6564b4d38c65Smrg cxx*) 6565b4d38c65Smrg case $host in 6566b4d38c65Smrg osf3*) 6567b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6568b4d38c65Smrg _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' 6569b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6570b4d38c65Smrg ;; 6571b4d38c65Smrg *) 6572b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6573b4d38c65Smrg _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' 6574b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6575b4d38c65Smrg echo "-hidden">> $lib.exp~ 6576b4d38c65Smrg $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~ 6577b4d38c65Smrg $RM $lib.exp' 6578b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6579b4d38c65Smrg ;; 6580b4d38c65Smrg esac 658115fb4814Smrg 6582b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 658315fb4814Smrg 6584b4d38c65Smrg # Commands to make compiler produce verbose output that lists 6585b4d38c65Smrg # what "hidden" libraries, object files and flags are used when 6586b4d38c65Smrg # linking a shared library. 6587b4d38c65Smrg # 6588b4d38c65Smrg # There doesn't appear to be a way to prevent this compiler from 6589b4d38c65Smrg # explicitly linking system object files so we need to strip them 6590b4d38c65Smrg # from the output so that they don't get included in the library 6591b4d38c65Smrg # dependencies. 6592b4d38c65Smrg 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"' 6593b4d38c65Smrg ;; 6594b4d38c65Smrg *) 6595b4d38c65Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6596b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6597b4d38c65Smrg case $host in 6598b4d38c65Smrg osf3*) 6599b4d38c65Smrg _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' 6600b4d38c65Smrg ;; 6601b4d38c65Smrg *) 6602b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6603b4d38c65Smrg ;; 6604b4d38c65Smrg esac 6605b4d38c65Smrg 6606b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6607b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6608b4d38c65Smrg 6609b4d38c65Smrg # Commands to make compiler produce verbose output that lists 6610b4d38c65Smrg # what "hidden" libraries, object files and flags are used when 6611b4d38c65Smrg # linking a shared library. 6612b4d38c65Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6613b4d38c65Smrg 6614b4d38c65Smrg else 6615b4d38c65Smrg # FIXME: insert proper C++ library support 6616b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6617b4d38c65Smrg fi 6618b4d38c65Smrg ;; 6619b4d38c65Smrg esac 6620b4d38c65Smrg ;; 662115fb4814Smrg 6622b4d38c65Smrg psos*) 6623b4d38c65Smrg # FIXME: insert proper C++ library support 6624b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6625b4d38c65Smrg ;; 662615fb4814Smrg 6627b4d38c65Smrg sunos4*) 6628b4d38c65Smrg case $cc_basename in 6629b4d38c65Smrg CC*) 6630b4d38c65Smrg # Sun C++ 4.x 6631b4d38c65Smrg # FIXME: insert proper C++ library support 6632b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6633b4d38c65Smrg ;; 6634b4d38c65Smrg lcc*) 6635b4d38c65Smrg # Lucid 6636b4d38c65Smrg # FIXME: insert proper C++ library support 6637b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6638b4d38c65Smrg ;; 6639b4d38c65Smrg *) 6640b4d38c65Smrg # FIXME: insert proper C++ library support 6641b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6642b4d38c65Smrg ;; 6643b4d38c65Smrg esac 6644b4d38c65Smrg ;; 664515fb4814Smrg 6646b4d38c65Smrg solaris*) 6647b4d38c65Smrg case $cc_basename in 6648b4d38c65Smrg CC* | sunCC*) 6649b4d38c65Smrg # Sun C++ 4.2, 5.x and Centerline C++ 6650b4d38c65Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6651b4d38c65Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6652b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6653b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6654b4d38c65Smrg $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' 6655b4d38c65Smrg 6656b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6657b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6658b4d38c65Smrg case $host_os in 6659b4d38c65Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6660b4d38c65Smrg *) 6661b4d38c65Smrg # The compiler driver will combine and reorder linker options, 6662b4d38c65Smrg # but understands `-z linker_flag'. 6663b4d38c65Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6664b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6665b4d38c65Smrg ;; 6666b4d38c65Smrg esac 6667b4d38c65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 666815fb4814Smrg 6669b4d38c65Smrg output_verbose_link_cmd='func_echo_all' 667015fb4814Smrg 6671b4d38c65Smrg # Archives containing C++ object files must be created using 6672b4d38c65Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6673b4d38c65Smrg # necessary to make sure instantiated templates are included 6674b4d38c65Smrg # in the archive. 6675b4d38c65Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6676b4d38c65Smrg ;; 6677b4d38c65Smrg gcx*) 6678b4d38c65Smrg # Green Hills C++ Compiler 6679b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 668015fb4814Smrg 6681b4d38c65Smrg # The C++ compiler must be used to create the archive. 6682b4d38c65Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6683b4d38c65Smrg ;; 6684b4d38c65Smrg *) 6685b4d38c65Smrg # GNU C++ compiler with Solaris linker 6686b4d38c65Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6687b4d38c65Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6688b4d38c65Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6689b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6690b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6691b4d38c65Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6692b4d38c65Smrg 6693b4d38c65Smrg # Commands to make compiler produce verbose output that lists 6694b4d38c65Smrg # what "hidden" libraries, object files and flags are used when 6695b4d38c65Smrg # linking a shared library. 6696b4d38c65Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6697b4d38c65Smrg else 6698b4d38c65Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6699b4d38c65Smrg # platform. 6700b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6701b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6702b4d38c65Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6703b4d38c65Smrg 6704b4d38c65Smrg # Commands to make compiler produce verbose output that lists 6705b4d38c65Smrg # what "hidden" libraries, object files and flags are used when 6706b4d38c65Smrg # linking a shared library. 6707b4d38c65Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6708b4d38c65Smrg fi 6709b4d38c65Smrg 6710b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6711b4d38c65Smrg case $host_os in 6712b4d38c65Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6713b4d38c65Smrg *) 6714b4d38c65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6715b4d38c65Smrg ;; 6716b4d38c65Smrg esac 6717b4d38c65Smrg fi 6718b4d38c65Smrg ;; 6719b4d38c65Smrg esac 6720b4d38c65Smrg ;; 672115fb4814Smrg 6722b4d38c65Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6723b4d38c65Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6724b4d38c65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6725b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6726b4d38c65Smrg runpath_var='LD_RUN_PATH' 672715fb4814Smrg 6728b4d38c65Smrg case $cc_basename in 6729b4d38c65Smrg CC*) 6730b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6731b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6732b4d38c65Smrg ;; 6733b4d38c65Smrg *) 6734b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6735b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6736b4d38c65Smrg ;; 6737b4d38c65Smrg esac 6738b4d38c65Smrg ;; 673915fb4814Smrg 6740b4d38c65Smrg sysv5* | sco3.2v5* | sco5v6*) 6741b4d38c65Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6742b4d38c65Smrg # link with -lc, and that would cause any symbols used from libc to 6743b4d38c65Smrg # always be unresolved, which means just about no library would 6744b4d38c65Smrg # ever link correctly. If we're not using GNU ld we use -z text 6745b4d38c65Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6746b4d38c65Smrg # as -z defs. 6747b4d38c65Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6748b4d38c65Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6749b4d38c65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6750b4d38c65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6751b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6752b4d38c65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6753b4d38c65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6754b4d38c65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6755b4d38c65Smrg runpath_var='LD_RUN_PATH' 675615fb4814Smrg 6757b4d38c65Smrg case $cc_basename in 6758b4d38c65Smrg CC*) 6759b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6760b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6761b4d38c65Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6762b4d38c65Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 6763b4d38c65Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6764b4d38c65Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 6765b4d38c65Smrg ;; 6766b4d38c65Smrg *) 6767b4d38c65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6768b4d38c65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6769b4d38c65Smrg ;; 6770b4d38c65Smrg esac 6771b4d38c65Smrg ;; 677215fb4814Smrg 6773b4d38c65Smrg tandem*) 6774b4d38c65Smrg case $cc_basename in 6775b4d38c65Smrg NCC*) 6776b4d38c65Smrg # NonStop-UX NCC 3.20 6777b4d38c65Smrg # FIXME: insert proper C++ library support 6778b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6779b4d38c65Smrg ;; 6780b4d38c65Smrg *) 6781b4d38c65Smrg # FIXME: insert proper C++ library support 6782b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6783b4d38c65Smrg ;; 6784b4d38c65Smrg esac 6785b4d38c65Smrg ;; 678615fb4814Smrg 6787b4d38c65Smrg vxworks*) 6788b4d38c65Smrg # FIXME: insert proper C++ library support 6789b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6790b4d38c65Smrg ;; 679115fb4814Smrg 6792b4d38c65Smrg *) 6793b4d38c65Smrg # FIXME: insert proper C++ library support 6794b4d38c65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6795b4d38c65Smrg ;; 6796b4d38c65Smrg esac 679715fb4814Smrg 6798b4d38c65Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6799b4d38c65Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6800b4d38c65Smrg 6801b4d38c65Smrg _LT_TAGVAR(GCC, $1)="$GXX" 6802b4d38c65Smrg _LT_TAGVAR(LD, $1)="$LD" 6803b4d38c65Smrg 6804b4d38c65Smrg ## CAVEAT EMPTOR: 6805b4d38c65Smrg ## There is no encapsulation within the following macros, do not change 6806b4d38c65Smrg ## the running order or otherwise move them around unless you know exactly 6807b4d38c65Smrg ## what you are doing... 6808b4d38c65Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 6809b4d38c65Smrg _LT_COMPILER_PIC($1) 6810b4d38c65Smrg _LT_COMPILER_C_O($1) 6811b4d38c65Smrg _LT_COMPILER_FILE_LOCKS($1) 6812b4d38c65Smrg _LT_LINKER_SHLIBS($1) 6813b4d38c65Smrg _LT_SYS_DYNAMIC_LINKER($1) 6814b4d38c65Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6815b4d38c65Smrg 6816b4d38c65Smrg _LT_CONFIG($1) 6817b4d38c65Smrg fi # test -n "$compiler" 6818b4d38c65Smrg 6819b4d38c65Smrg CC=$lt_save_CC 6820b4d38c65Smrg CFLAGS=$lt_save_CFLAGS 6821b4d38c65Smrg LDCXX=$LD 6822b4d38c65Smrg LD=$lt_save_LD 6823b4d38c65Smrg GCC=$lt_save_GCC 6824b4d38c65Smrg with_gnu_ld=$lt_save_with_gnu_ld 6825b4d38c65Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 6826b4d38c65Smrg lt_cv_path_LD=$lt_save_path_LD 6827b4d38c65Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6828b4d38c65Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6829b4d38c65Smrgfi # test "$_lt_caught_CXX_error" != yes 683015fb4814Smrg 6831b4d38c65SmrgAC_LANG_POP 6832b4d38c65Smrg])# _LT_LANG_CXX_CONFIG 683315fb4814Smrg 683415fb4814Smrg 6835b4d38c65Smrg# _LT_FUNC_STRIPNAME_CNF 6836b4d38c65Smrg# ---------------------- 6837b4d38c65Smrg# func_stripname_cnf prefix suffix name 6838b4d38c65Smrg# strip PREFIX and SUFFIX off of NAME. 6839b4d38c65Smrg# PREFIX and SUFFIX must not contain globbing or regex special 6840b4d38c65Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 6841b4d38c65Smrg# dot (in which case that matches only a dot). 6842b4d38c65Smrg# 6843b4d38c65Smrg# This function is identical to the (non-XSI) version of func_stripname, 6844b4d38c65Smrg# except this one can be used by m4 code that may be executed by configure, 6845b4d38c65Smrg# rather than the libtool script. 6846b4d38c65Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6847b4d38c65SmrgAC_REQUIRE([_LT_DECL_SED]) 6848b4d38c65SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6849b4d38c65Smrgfunc_stripname_cnf () 6850b4d38c65Smrg{ 6851b4d38c65Smrg case ${2} in 6852b4d38c65Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6853b4d38c65Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6854b534f209Smrg esac 6855b4d38c65Smrg} # func_stripname_cnf 6856b4d38c65Smrg])# _LT_FUNC_STRIPNAME_CNF 685715fb4814Smrg 6858b4d38c65Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6859b4d38c65Smrg# --------------------------------- 6860b4d38c65Smrg# Figure out "hidden" library dependencies from verbose 6861b4d38c65Smrg# compiler output when linking a shared library. 6862b4d38c65Smrg# Parse the compiler output and extract the necessary 6863b4d38c65Smrg# objects, libraries and library flags. 6864b4d38c65Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6865b4d38c65Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6866b4d38c65SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6867b4d38c65Smrg# Dependencies to place before and after the object being linked: 6868b4d38c65Smrg_LT_TAGVAR(predep_objects, $1)= 6869b4d38c65Smrg_LT_TAGVAR(postdep_objects, $1)= 6870b4d38c65Smrg_LT_TAGVAR(predeps, $1)= 6871b4d38c65Smrg_LT_TAGVAR(postdeps, $1)= 6872b4d38c65Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 687315fb4814Smrg 6874b4d38c65Smrgdnl we can't use the lt_simple_compile_test_code here, 6875b4d38c65Smrgdnl because it contains code intended for an executable, 6876b4d38c65Smrgdnl not a library. It's possible we should let each 6877b4d38c65Smrgdnl tag define a new lt_????_link_test_code variable, 6878b4d38c65Smrgdnl but it's only used here... 6879b4d38c65Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6880b4d38c65Smrgint a; 6881b4d38c65Smrgvoid foo (void) { a = 0; } 6882b4d38c65Smrg_LT_EOF 6883b4d38c65Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6884b4d38c65Smrgclass Foo 6885b4d38c65Smrg{ 6886b4d38c65Smrgpublic: 6887b4d38c65Smrg Foo (void) { a = 0; } 6888b4d38c65Smrgprivate: 6889b4d38c65Smrg int a; 6890b4d38c65Smrg}; 6891b4d38c65Smrg_LT_EOF 6892b4d38c65Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6893b4d38c65Smrg subroutine foo 6894b4d38c65Smrg implicit none 6895b4d38c65Smrg integer*4 a 6896b4d38c65Smrg a=0 6897b4d38c65Smrg return 6898b4d38c65Smrg end 6899b4d38c65Smrg_LT_EOF 6900b4d38c65Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6901b4d38c65Smrg subroutine foo 6902b4d38c65Smrg implicit none 6903b4d38c65Smrg integer a 6904b4d38c65Smrg a=0 6905b4d38c65Smrg return 6906b4d38c65Smrg end 6907b4d38c65Smrg_LT_EOF 6908b4d38c65Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6909b4d38c65Smrgpublic class foo { 6910b4d38c65Smrg private int a; 6911b4d38c65Smrg public void bar (void) { 6912b4d38c65Smrg a = 0; 6913b4d38c65Smrg } 6914b4d38c65Smrg}; 6915b4d38c65Smrg_LT_EOF 6916b534f209Smrg]) 6917b410ddbeSmrg 6918b4d38c65Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 6919b4d38c65Smrgcase "$CC $CFLAGS " in #( 6920b4d38c65Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6921b4d38c65Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 6922b4d38c65Smrgesac 692315fb4814Smrg 6924b4d38c65Smrgdnl Parse the compiler output and extract the necessary 6925b4d38c65Smrgdnl objects, libraries and library flags. 6926b4d38c65Smrgif AC_TRY_EVAL(ac_compile); then 6927b4d38c65Smrg # Parse the compiler output and extract the necessary 6928b4d38c65Smrg # objects, libraries and library flags. 692915fb4814Smrg 6930b4d38c65Smrg # Sentinel used to keep track of whether or not we are before 6931b4d38c65Smrg # the conftest object file. 6932b4d38c65Smrg pre_test_object_deps_done=no 693315fb4814Smrg 6934b4d38c65Smrg for p in `eval "$output_verbose_link_cmd"`; do 6935b4d38c65Smrg case ${prev}${p} in 693615fb4814Smrg 6937b4d38c65Smrg -L* | -R* | -l*) 6938b4d38c65Smrg # Some compilers place space between "-{L,R}" and the path. 6939b4d38c65Smrg # Remove the space. 6940b4d38c65Smrg if test $p = "-L" || 6941b4d38c65Smrg test $p = "-R"; then 6942b4d38c65Smrg prev=$p 6943b4d38c65Smrg continue 6944b4d38c65Smrg fi 694515fb4814Smrg 6946b4d38c65Smrg # Expand the sysroot to ease extracting the directories later. 6947b4d38c65Smrg if test -z "$prev"; then 6948b4d38c65Smrg case $p in 6949b4d38c65Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 6950b4d38c65Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 6951b4d38c65Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 6952b4d38c65Smrg esac 6953b4d38c65Smrg fi 6954b4d38c65Smrg case $p in 6955b4d38c65Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 6956b4d38c65Smrg esac 6957b4d38c65Smrg if test "$pre_test_object_deps_done" = no; then 6958b4d38c65Smrg case ${prev} in 6959b4d38c65Smrg -L | -R) 6960b4d38c65Smrg # Internal compiler library paths should come after those 6961b4d38c65Smrg # provided the user. The postdeps already come after the 6962b4d38c65Smrg # user supplied libs so there is no need to process them. 6963b4d38c65Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 6964b4d38c65Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 6965b4d38c65Smrg else 6966b4d38c65Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 6967b4d38c65Smrg fi 6968b4d38c65Smrg ;; 6969b4d38c65Smrg # The "-l" case would never come before the object being 6970b4d38c65Smrg # linked, so don't bother handling this case. 6971b4d38c65Smrg esac 6972b4d38c65Smrg else 6973b4d38c65Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 6974b4d38c65Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 6975b4d38c65Smrg else 6976b4d38c65Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 6977b4d38c65Smrg fi 6978b4d38c65Smrg fi 6979b4d38c65Smrg prev= 6980b4d38c65Smrg ;; 698115fb4814Smrg 6982b4d38c65Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 6983b4d38c65Smrg *.$objext) 6984b4d38c65Smrg # This assumes that the test object file only shows up 6985b4d38c65Smrg # once in the compiler output. 6986b4d38c65Smrg if test "$p" = "conftest.$objext"; then 6987b4d38c65Smrg pre_test_object_deps_done=yes 6988b4d38c65Smrg continue 6989b4d38c65Smrg fi 699015fb4814Smrg 6991b4d38c65Smrg if test "$pre_test_object_deps_done" = no; then 6992b4d38c65Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 6993b4d38c65Smrg _LT_TAGVAR(predep_objects, $1)="$p" 6994b4d38c65Smrg else 6995b4d38c65Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 6996b4d38c65Smrg fi 6997b4d38c65Smrg else 6998b4d38c65Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 6999b4d38c65Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 7000b4d38c65Smrg else 7001b4d38c65Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7002b4d38c65Smrg fi 7003b4d38c65Smrg fi 7004b4d38c65Smrg ;; 700515fb4814Smrg 7006b4d38c65Smrg *) ;; # Ignore the rest. 700715fb4814Smrg 7008b4d38c65Smrg esac 7009b4d38c65Smrg done 7010b4d38c65Smrg 7011b4d38c65Smrg # Clean up. 7012b4d38c65Smrg rm -f a.out a.exe 7013b4d38c65Smrgelse 7014b4d38c65Smrg echo "libtool.m4: error: problem compiling $1 test program" 7015b4d38c65Smrgfi 7016b4d38c65Smrg 7017b4d38c65Smrg$RM -f confest.$objext 7018b4d38c65SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 7019b4d38c65Smrg 7020b4d38c65Smrg# PORTME: override above test on systems where it is broken 7021b4d38c65Smrgm4_if([$1], [CXX], 7022b4d38c65Smrg[case $host_os in 7023b4d38c65Smrginterix[[3-9]]*) 7024b4d38c65Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7025b4d38c65Smrg # hack all around it, let's just trust "g++" to DTRT. 7026b4d38c65Smrg _LT_TAGVAR(predep_objects,$1)= 7027b4d38c65Smrg _LT_TAGVAR(postdep_objects,$1)= 7028b4d38c65Smrg _LT_TAGVAR(postdeps,$1)= 7029b534f209Smrg ;; 7030b4d38c65Smrg 7031b4d38c65Smrglinux*) 7032b4d38c65Smrg case `$CC -V 2>&1 | sed 5q` in 7033b4d38c65Smrg *Sun\ C*) 7034b4d38c65Smrg # Sun C++ 5.9 7035b4d38c65Smrg 7036b4d38c65Smrg # The more standards-conforming stlport4 library is 7037b4d38c65Smrg # incompatible with the Cstd library. Avoid specifying 7038b4d38c65Smrg # it if it's in CXXFLAGS. Ignore libCrun as 7039b4d38c65Smrg # -library=stlport4 depends on it. 7040b4d38c65Smrg case " $CXX $CXXFLAGS " in 7041b4d38c65Smrg *" -library=stlport4 "*) 7042b4d38c65Smrg solaris_use_stlport4=yes 7043b4d38c65Smrg ;; 7044b4d38c65Smrg esac 7045b4d38c65Smrg 7046b4d38c65Smrg if test "$solaris_use_stlport4" != yes; then 7047b4d38c65Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7048b4d38c65Smrg fi 7049b4d38c65Smrg ;; 7050b4d38c65Smrg esac 7051b534f209Smrg ;; 7052b4d38c65Smrg 7053b534f209Smrgsolaris*) 7054b4d38c65Smrg case $cc_basename in 7055b4d38c65Smrg CC* | sunCC*) 7056b4d38c65Smrg # The more standards-conforming stlport4 library is 7057b4d38c65Smrg # incompatible with the Cstd library. Avoid specifying 7058b4d38c65Smrg # it if it's in CXXFLAGS. Ignore libCrun as 7059b4d38c65Smrg # -library=stlport4 depends on it. 7060b4d38c65Smrg case " $CXX $CXXFLAGS " in 7061b4d38c65Smrg *" -library=stlport4 "*) 7062b4d38c65Smrg solaris_use_stlport4=yes 7063b4d38c65Smrg ;; 7064b4d38c65Smrg esac 706515fb4814Smrg 7066b4d38c65Smrg # Adding this requires a known-good setup of shared libraries for 7067b4d38c65Smrg # Sun compiler versions before 5.6, else PIC objects from an old 7068b4d38c65Smrg # archive will be linked into the output, leading to subtle bugs. 7069b4d38c65Smrg if test "$solaris_use_stlport4" != yes; then 7070b4d38c65Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7071b4d38c65Smrg fi 7072b4d38c65Smrg ;; 7073b4d38c65Smrg esac 7074b534f209Smrg ;; 7075b534f209Smrgesac 7076b4d38c65Smrg]) 707715fb4814Smrg 7078b4d38c65Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 7079b4d38c65Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7080b534f209Smrgesac 7081b4d38c65Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7082b4d38c65Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7083b4d38c65Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7084b4d38c65Smrgfi 7085b4d38c65Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7086b4d38c65Smrg [The directories searched by this compiler when creating a shared library]) 7087b4d38c65Smrg_LT_TAGDECL([], [predep_objects], [1], 7088b4d38c65Smrg [Dependencies to place before and after the objects being linked to 7089b4d38c65Smrg create a shared library]) 7090b4d38c65Smrg_LT_TAGDECL([], [postdep_objects], [1]) 7091b4d38c65Smrg_LT_TAGDECL([], [predeps], [1]) 7092b4d38c65Smrg_LT_TAGDECL([], [postdeps], [1]) 7093b4d38c65Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7094b4d38c65Smrg [The library search path used internally by the compiler when linking 7095b4d38c65Smrg a shared library]) 7096b4d38c65Smrg])# _LT_SYS_HIDDEN_LIBDEPS 7097b4d38c65Smrg 7098b4d38c65Smrg 7099b4d38c65Smrg# _LT_LANG_F77_CONFIG([TAG]) 7100b4d38c65Smrg# -------------------------- 7101b4d38c65Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 7102b4d38c65Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7103b4d38c65Smrg# to write the compiler configuration to `libtool'. 7104b4d38c65Smrgm4_defun([_LT_LANG_F77_CONFIG], 7105b4d38c65Smrg[AC_LANG_PUSH(Fortran 77) 7106b4d38c65Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 7107b4d38c65Smrg _lt_disable_F77=yes 7108b4d38c65Smrgfi 710915fb4814Smrg 7110b4d38c65Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7111b4d38c65Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7112b4d38c65Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7113b4d38c65Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7114b4d38c65Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7115b4d38c65Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7116b4d38c65Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7117b4d38c65Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 71187fe5393cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7119b4d38c65Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7120b4d38c65Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7121b4d38c65Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7122b4d38c65Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7123b4d38c65Smrg_LT_TAGVAR(module_cmds, $1)= 7124b4d38c65Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7125b4d38c65Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7126b4d38c65Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7127b4d38c65Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7128b4d38c65Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7129b4d38c65Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7130b4d38c65Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7131b4d38c65Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7132b410ddbeSmrg 7133b4d38c65Smrg# Source file extension for f77 test sources. 7134b4d38c65Smrgac_ext=f 713515fb4814Smrg 7136b4d38c65Smrg# Object file extension for compiled f77 test sources. 7137b4d38c65Smrgobjext=o 7138b4d38c65Smrg_LT_TAGVAR(objext, $1)=$objext 7139b4d38c65Smrg 7140b4d38c65Smrg# No sense in running all these tests if we already determined that 7141b4d38c65Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 7142b4d38c65Smrg# are currently assumed to apply to all compilers on this platform, 7143b4d38c65Smrg# and will be corrupted by setting them based on a non-working compiler. 7144b4d38c65Smrgif test "$_lt_disable_F77" != yes; then 7145b4d38c65Smrg # Code to be used in simple compile tests 7146b4d38c65Smrg lt_simple_compile_test_code="\ 7147b4d38c65Smrg subroutine t 7148b4d38c65Smrg return 7149b4d38c65Smrg end 7150b4d38c65Smrg" 7151b410ddbeSmrg 7152b4d38c65Smrg # Code to be used in simple link tests 7153b4d38c65Smrg lt_simple_link_test_code="\ 7154b4d38c65Smrg program t 7155b4d38c65Smrg end 7156b4d38c65Smrg" 7157b410ddbeSmrg 7158b4d38c65Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7159b4d38c65Smrg _LT_TAG_COMPILER 7160b4d38c65Smrg 7161b4d38c65Smrg # save warnings/boilerplate of simple test code 7162b4d38c65Smrg _LT_COMPILER_BOILERPLATE 7163b4d38c65Smrg _LT_LINKER_BOILERPLATE 7164b4d38c65Smrg 7165b4d38c65Smrg # Allow CC to be a program name with arguments. 7166b4d38c65Smrg lt_save_CC="$CC" 7167b4d38c65Smrg lt_save_GCC=$GCC 7168b4d38c65Smrg lt_save_CFLAGS=$CFLAGS 7169b4d38c65Smrg CC=${F77-"f77"} 7170b4d38c65Smrg CFLAGS=$FFLAGS 7171b4d38c65Smrg compiler=$CC 7172b4d38c65Smrg _LT_TAGVAR(compiler, $1)=$CC 7173b4d38c65Smrg _LT_CC_BASENAME([$compiler]) 7174b4d38c65Smrg GCC=$G77 7175b4d38c65Smrg if test -n "$compiler"; then 7176b4d38c65Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7177b4d38c65Smrg AC_MSG_RESULT([$can_build_shared]) 717815fb4814Smrg 7179b4d38c65Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7180b4d38c65Smrg test "$can_build_shared" = "no" && enable_shared=no 718115fb4814Smrg 7182b4d38c65Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7183b4d38c65Smrg # are all built from PIC. 7184b4d38c65Smrg case $host_os in 7185b4d38c65Smrg aix3*) 7186b4d38c65Smrg test "$enable_shared" = yes && enable_static=no 7187b4d38c65Smrg if test -n "$RANLIB"; then 7188b4d38c65Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7189b4d38c65Smrg postinstall_cmds='$RANLIB $lib' 7190b4d38c65Smrg fi 7191b4d38c65Smrg ;; 7192b4d38c65Smrg aix[[4-9]]*) 7193b4d38c65Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7194b4d38c65Smrg test "$enable_shared" = yes && enable_static=no 7195b4d38c65Smrg fi 7196b4d38c65Smrg ;; 7197b4d38c65Smrg esac 7198b4d38c65Smrg AC_MSG_RESULT([$enable_shared]) 7199b4d38c65Smrg 7200b4d38c65Smrg AC_MSG_CHECKING([whether to build static libraries]) 7201b4d38c65Smrg # Make sure either enable_shared or enable_static is yes. 7202b4d38c65Smrg test "$enable_shared" = yes || enable_static=yes 7203b4d38c65Smrg AC_MSG_RESULT([$enable_static]) 7204b4d38c65Smrg 7205b4d38c65Smrg _LT_TAGVAR(GCC, $1)="$G77" 7206b4d38c65Smrg _LT_TAGVAR(LD, $1)="$LD" 7207b4d38c65Smrg 7208b4d38c65Smrg ## CAVEAT EMPTOR: 7209b4d38c65Smrg ## There is no encapsulation within the following macros, do not change 7210b4d38c65Smrg ## the running order or otherwise move them around unless you know exactly 7211b4d38c65Smrg ## what you are doing... 7212b4d38c65Smrg _LT_COMPILER_PIC($1) 7213b4d38c65Smrg _LT_COMPILER_C_O($1) 7214b4d38c65Smrg _LT_COMPILER_FILE_LOCKS($1) 7215b4d38c65Smrg _LT_LINKER_SHLIBS($1) 7216b4d38c65Smrg _LT_SYS_DYNAMIC_LINKER($1) 7217b4d38c65Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7218b4d38c65Smrg 7219b4d38c65Smrg _LT_CONFIG($1) 7220b4d38c65Smrg fi # test -n "$compiler" 7221b4d38c65Smrg 7222b4d38c65Smrg GCC=$lt_save_GCC 7223b4d38c65Smrg CC="$lt_save_CC" 7224b4d38c65Smrg CFLAGS="$lt_save_CFLAGS" 7225b4d38c65Smrgfi # test "$_lt_disable_F77" != yes 722615fb4814Smrg 7227b4d38c65SmrgAC_LANG_POP 7228b4d38c65Smrg])# _LT_LANG_F77_CONFIG 7229b410ddbeSmrg 7230b410ddbeSmrg 7231b4d38c65Smrg# _LT_LANG_FC_CONFIG([TAG]) 7232b4d38c65Smrg# ------------------------- 7233b4d38c65Smrg# Ensure that the configuration variables for a Fortran compiler are 7234b4d38c65Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7235b4d38c65Smrg# to write the compiler configuration to `libtool'. 7236b4d38c65Smrgm4_defun([_LT_LANG_FC_CONFIG], 7237b4d38c65Smrg[AC_LANG_PUSH(Fortran) 7238b4d38c65Smrg 7239b4d38c65Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 7240b4d38c65Smrg _lt_disable_FC=yes 7241b4d38c65Smrgfi 7242b410ddbeSmrg 7243b4d38c65Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7244b4d38c65Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7245b4d38c65Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7246b4d38c65Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7247b4d38c65Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7248b4d38c65Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7249b4d38c65Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7250b4d38c65Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 72517fe5393cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7252b4d38c65Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7253b4d38c65Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7254b4d38c65Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7255b4d38c65Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7256b4d38c65Smrg_LT_TAGVAR(module_cmds, $1)= 7257b4d38c65Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7258b4d38c65Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7259b4d38c65Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7260b4d38c65Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7261b4d38c65Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7262b4d38c65Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7263b4d38c65Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7264b4d38c65Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7265b4d38c65Smrg 7266b4d38c65Smrg# Source file extension for fc test sources. 7267b4d38c65Smrgac_ext=${ac_fc_srcext-f} 7268b4d38c65Smrg 7269b4d38c65Smrg# Object file extension for compiled fc test sources. 7270b4d38c65Smrgobjext=o 7271b4d38c65Smrg_LT_TAGVAR(objext, $1)=$objext 7272b4d38c65Smrg 7273b4d38c65Smrg# No sense in running all these tests if we already determined that 7274b4d38c65Smrg# the FC compiler isn't working. Some variables (like enable_shared) 7275b4d38c65Smrg# are currently assumed to apply to all compilers on this platform, 7276b4d38c65Smrg# and will be corrupted by setting them based on a non-working compiler. 7277b4d38c65Smrgif test "$_lt_disable_FC" != yes; then 7278b4d38c65Smrg # Code to be used in simple compile tests 7279b4d38c65Smrg lt_simple_compile_test_code="\ 7280b4d38c65Smrg subroutine t 7281b4d38c65Smrg return 7282b4d38c65Smrg end 7283b4d38c65Smrg" 7284b410ddbeSmrg 7285b4d38c65Smrg # Code to be used in simple link tests 7286b4d38c65Smrg lt_simple_link_test_code="\ 7287b4d38c65Smrg program t 7288b4d38c65Smrg end 7289b4d38c65Smrg" 729015fb4814Smrg 7291b4d38c65Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7292b4d38c65Smrg _LT_TAG_COMPILER 7293b410ddbeSmrg 7294b4d38c65Smrg # save warnings/boilerplate of simple test code 7295b4d38c65Smrg _LT_COMPILER_BOILERPLATE 7296b4d38c65Smrg _LT_LINKER_BOILERPLATE 7297b410ddbeSmrg 7298b4d38c65Smrg # Allow CC to be a program name with arguments. 7299b4d38c65Smrg lt_save_CC="$CC" 7300b4d38c65Smrg lt_save_GCC=$GCC 7301b4d38c65Smrg lt_save_CFLAGS=$CFLAGS 7302b4d38c65Smrg CC=${FC-"f95"} 7303b4d38c65Smrg CFLAGS=$FCFLAGS 7304b4d38c65Smrg compiler=$CC 7305b4d38c65Smrg GCC=$ac_cv_fc_compiler_gnu 7306b410ddbeSmrg 7307b4d38c65Smrg _LT_TAGVAR(compiler, $1)=$CC 7308b4d38c65Smrg _LT_CC_BASENAME([$compiler]) 7309b4d38c65Smrg 7310b4d38c65Smrg if test -n "$compiler"; then 7311b4d38c65Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7312b4d38c65Smrg AC_MSG_RESULT([$can_build_shared]) 7313b4d38c65Smrg 7314b4d38c65Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7315b4d38c65Smrg test "$can_build_shared" = "no" && enable_shared=no 7316b4d38c65Smrg 7317b4d38c65Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7318b4d38c65Smrg # are all built from PIC. 731915fb4814Smrg case $host_os in 7320b4d38c65Smrg aix3*) 7321b4d38c65Smrg test "$enable_shared" = yes && enable_static=no 7322b4d38c65Smrg if test -n "$RANLIB"; then 7323b4d38c65Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7324b4d38c65Smrg postinstall_cmds='$RANLIB $lib' 7325b4d38c65Smrg fi 7326b4d38c65Smrg ;; 7327b4d38c65Smrg aix[[4-9]]*) 7328b4d38c65Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7329b4d38c65Smrg test "$enable_shared" = yes && enable_static=no 7330b534f209Smrg fi 7331b4d38c65Smrg ;; 7332b534f209Smrg esac 7333b4d38c65Smrg AC_MSG_RESULT([$enable_shared]) 7334b4d38c65Smrg 7335b4d38c65Smrg AC_MSG_CHECKING([whether to build static libraries]) 7336b4d38c65Smrg # Make sure either enable_shared or enable_static is yes. 7337b4d38c65Smrg test "$enable_shared" = yes || enable_static=yes 7338b4d38c65Smrg AC_MSG_RESULT([$enable_static]) 7339b4d38c65Smrg 7340b4d38c65Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7341b4d38c65Smrg _LT_TAGVAR(LD, $1)="$LD" 7342b4d38c65Smrg 7343b4d38c65Smrg ## CAVEAT EMPTOR: 7344b4d38c65Smrg ## There is no encapsulation within the following macros, do not change 7345b4d38c65Smrg ## the running order or otherwise move them around unless you know exactly 7346b4d38c65Smrg ## what you are doing... 7347b4d38c65Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7348b4d38c65Smrg _LT_COMPILER_PIC($1) 7349b4d38c65Smrg _LT_COMPILER_C_O($1) 7350b4d38c65Smrg _LT_COMPILER_FILE_LOCKS($1) 7351b4d38c65Smrg _LT_LINKER_SHLIBS($1) 7352b4d38c65Smrg _LT_SYS_DYNAMIC_LINKER($1) 7353b4d38c65Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7354b4d38c65Smrg 7355b4d38c65Smrg _LT_CONFIG($1) 7356b4d38c65Smrg fi # test -n "$compiler" 7357b4d38c65Smrg 7358b4d38c65Smrg GCC=$lt_save_GCC 7359b4d38c65Smrg CC=$lt_save_CC 7360b4d38c65Smrg CFLAGS=$lt_save_CFLAGS 7361b4d38c65Smrgfi # test "$_lt_disable_FC" != yes 7362b534f209Smrg 7363b4d38c65SmrgAC_LANG_POP 7364b4d38c65Smrg])# _LT_LANG_FC_CONFIG 7365b534f209Smrg 7366b534f209Smrg 7367b4d38c65Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 7368b4d38c65Smrg# -------------------------- 7369b4d38c65Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7370b4d38c65Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7371b4d38c65Smrg# to write the compiler configuration to `libtool'. 7372b4d38c65Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 7373b4d38c65Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7374b4d38c65SmrgAC_LANG_SAVE 7375b534f209Smrg 7376b4d38c65Smrg# Source file extension for Java test sources. 7377b4d38c65Smrgac_ext=java 7378b534f209Smrg 7379b4d38c65Smrg# Object file extension for compiled Java test sources. 7380b4d38c65Smrgobjext=o 7381b4d38c65Smrg_LT_TAGVAR(objext, $1)=$objext 7382b534f209Smrg 7383b4d38c65Smrg# Code to be used in simple compile tests 7384b4d38c65Smrglt_simple_compile_test_code="class foo {}" 7385b534f209Smrg 7386b4d38c65Smrg# Code to be used in simple link tests 7387b4d38c65Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7388b534f209Smrg 7389b4d38c65Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7390b4d38c65Smrg_LT_TAG_COMPILER 7391b534f209Smrg 7392b4d38c65Smrg# save warnings/boilerplate of simple test code 7393b4d38c65Smrg_LT_COMPILER_BOILERPLATE 7394b4d38c65Smrg_LT_LINKER_BOILERPLATE 7395b534f209Smrg 7396b4d38c65Smrg# Allow CC to be a program name with arguments. 7397b4d38c65Smrglt_save_CC=$CC 7398b4d38c65Smrglt_save_CFLAGS=$CFLAGS 7399b4d38c65Smrglt_save_GCC=$GCC 7400b4d38c65SmrgGCC=yes 7401b4d38c65SmrgCC=${GCJ-"gcj"} 7402b4d38c65SmrgCFLAGS=$GCJFLAGS 7403b4d38c65Smrgcompiler=$CC 7404b4d38c65Smrg_LT_TAGVAR(compiler, $1)=$CC 7405b4d38c65Smrg_LT_TAGVAR(LD, $1)="$LD" 7406b4d38c65Smrg_LT_CC_BASENAME([$compiler]) 7407b534f209Smrg 7408b4d38c65Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7409b4d38c65Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7410b534f209Smrg 7411b4d38c65Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7412b4d38c65Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7413b4d38c65Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7414b534f209Smrg 7415b4d38c65Smrgif test -n "$compiler"; then 7416b4d38c65Smrg _LT_COMPILER_NO_RTTI($1) 7417b4d38c65Smrg _LT_COMPILER_PIC($1) 7418b4d38c65Smrg _LT_COMPILER_C_O($1) 7419b4d38c65Smrg _LT_COMPILER_FILE_LOCKS($1) 7420b4d38c65Smrg _LT_LINKER_SHLIBS($1) 7421b4d38c65Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7422b534f209Smrg 7423b4d38c65Smrg _LT_CONFIG($1) 7424b4d38c65Smrgfi 7425b534f209Smrg 7426b4d38c65SmrgAC_LANG_RESTORE 7427b534f209Smrg 7428b4d38c65SmrgGCC=$lt_save_GCC 7429b4d38c65SmrgCC=$lt_save_CC 7430b4d38c65SmrgCFLAGS=$lt_save_CFLAGS 7431b4d38c65Smrg])# _LT_LANG_GCJ_CONFIG 7432b534f209Smrg 7433b534f209Smrg 7434b4d38c65Smrg# _LT_LANG_RC_CONFIG([TAG]) 7435b4d38c65Smrg# ------------------------- 7436b4d38c65Smrg# Ensure that the configuration variables for the Windows resource compiler 7437b4d38c65Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7438b4d38c65Smrg# to write the compiler configuration to `libtool'. 7439b4d38c65Smrgm4_defun([_LT_LANG_RC_CONFIG], 7440b4d38c65Smrg[AC_REQUIRE([LT_PROG_RC])dnl 7441b4d38c65SmrgAC_LANG_SAVE 7442b534f209Smrg 7443b4d38c65Smrg# Source file extension for RC test sources. 7444b4d38c65Smrgac_ext=rc 7445b534f209Smrg 7446b4d38c65Smrg# Object file extension for compiled RC test sources. 7447b4d38c65Smrgobjext=o 7448b4d38c65Smrg_LT_TAGVAR(objext, $1)=$objext 7449b534f209Smrg 7450b4d38c65Smrg# Code to be used in simple compile tests 7451b4d38c65Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7452b534f209Smrg 7453b4d38c65Smrg# Code to be used in simple link tests 7454b4d38c65Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 7455b534f209Smrg 7456b4d38c65Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7457b4d38c65Smrg_LT_TAG_COMPILER 7458b534f209Smrg 7459b4d38c65Smrg# save warnings/boilerplate of simple test code 7460b4d38c65Smrg_LT_COMPILER_BOILERPLATE 7461b4d38c65Smrg_LT_LINKER_BOILERPLATE 7462b534f209Smrg 7463b4d38c65Smrg# Allow CC to be a program name with arguments. 7464b4d38c65Smrglt_save_CC="$CC" 7465b4d38c65Smrglt_save_CFLAGS=$CFLAGS 7466b4d38c65Smrglt_save_GCC=$GCC 7467b4d38c65SmrgGCC= 7468b4d38c65SmrgCC=${RC-"windres"} 7469b4d38c65SmrgCFLAGS= 7470b4d38c65Smrgcompiler=$CC 7471b4d38c65Smrg_LT_TAGVAR(compiler, $1)=$CC 7472b4d38c65Smrg_LT_CC_BASENAME([$compiler]) 7473b4d38c65Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7474b534f209Smrg 7475b4d38c65Smrgif test -n "$compiler"; then 7476b4d38c65Smrg : 7477b4d38c65Smrg _LT_CONFIG($1) 7478b4d38c65Smrgfi 7479b534f209Smrg 7480b4d38c65SmrgGCC=$lt_save_GCC 7481b4d38c65SmrgAC_LANG_RESTORE 7482b4d38c65SmrgCC=$lt_save_CC 7483b4d38c65SmrgCFLAGS=$lt_save_CFLAGS 7484b4d38c65Smrg])# _LT_LANG_RC_CONFIG 7485b534f209Smrg 7486b534f209Smrg 7487b4d38c65Smrg# LT_PROG_GCJ 7488b4d38c65Smrg# ----------- 7489b4d38c65SmrgAC_DEFUN([LT_PROG_GCJ], 7490b4d38c65Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7491b4d38c65Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7492b4d38c65Smrg [AC_CHECK_TOOL(GCJ, gcj,) 7493b4d38c65Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7494b4d38c65Smrg AC_SUBST(GCJFLAGS)])])[]dnl 7495b4d38c65Smrg]) 7496b534f209Smrg 7497b4d38c65Smrg# Old name: 7498b4d38c65SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7499b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 7500b4d38c65Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7501b534f209Smrg 7502b534f209Smrg 7503b4d38c65Smrg# LT_PROG_RC 7504b4d38c65Smrg# ---------- 7505b4d38c65SmrgAC_DEFUN([LT_PROG_RC], 7506b4d38c65Smrg[AC_CHECK_TOOL(RC, windres,) 7507b4d38c65Smrg]) 750815fb4814Smrg 7509b4d38c65Smrg# Old name: 7510b4d38c65SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7511b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 7512b4d38c65Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 7513b534f209Smrg 7514b534f209Smrg 7515b4d38c65Smrg# _LT_DECL_EGREP 7516b4d38c65Smrg# -------------- 7517b4d38c65Smrg# If we don't have a new enough Autoconf to choose the best grep 7518b4d38c65Smrg# available, choose the one first in the user's PATH. 7519b4d38c65Smrgm4_defun([_LT_DECL_EGREP], 7520b4d38c65Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7521b4d38c65SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7522b4d38c65Smrgtest -z "$GREP" && GREP=grep 7523b4d38c65Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7524b4d38c65Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7525b4d38c65Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7526b4d38c65Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7527b4d38c65SmrgAC_SUBST([GREP]) 7528b4d38c65Smrg]) 7529b534f209Smrg 7530b534f209Smrg 7531b4d38c65Smrg# _LT_DECL_OBJDUMP 7532b4d38c65Smrg# -------------- 7533b4d38c65Smrg# If we don't have a new enough Autoconf to choose the best objdump 7534b4d38c65Smrg# available, choose the one first in the user's PATH. 7535b4d38c65Smrgm4_defun([_LT_DECL_OBJDUMP], 7536b4d38c65Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7537b4d38c65Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7538b4d38c65Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7539b4d38c65SmrgAC_SUBST([OBJDUMP]) 7540b4d38c65Smrg]) 7541b534f209Smrg 7542b4d38c65Smrg# _LT_DECL_DLLTOOL 7543b4d38c65Smrg# ---------------- 7544b4d38c65Smrg# Ensure DLLTOOL variable is set. 7545b4d38c65Smrgm4_defun([_LT_DECL_DLLTOOL], 7546b4d38c65Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7547b4d38c65Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7548b4d38c65Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7549b4d38c65SmrgAC_SUBST([DLLTOOL]) 7550b4d38c65Smrg]) 7551b534f209Smrg 7552b4d38c65Smrg# _LT_DECL_SED 7553b4d38c65Smrg# ------------ 7554b4d38c65Smrg# Check for a fully-functional sed program, that truncates 7555b4d38c65Smrg# as few characters as possible. Prefer GNU sed if found. 7556b4d38c65Smrgm4_defun([_LT_DECL_SED], 7557b4d38c65Smrg[AC_PROG_SED 7558b4d38c65Smrgtest -z "$SED" && SED=sed 7559b4d38c65SmrgXsed="$SED -e 1s/^X//" 7560b4d38c65Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7561b4d38c65Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7562b4d38c65Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7563b4d38c65Smrg])# _LT_DECL_SED 7564b534f209Smrg 7565b4d38c65Smrgm4_ifndef([AC_PROG_SED], [ 7566b4d38c65Smrg# NOTE: This macro has been submitted for inclusion into # 7567b4d38c65Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7568b4d38c65Smrg# a released version of Autoconf we should remove this # 7569b4d38c65Smrg# macro and use it instead. # 7570b4d38c65Smrg 7571b4d38c65Smrgm4_defun([AC_PROG_SED], 7572b4d38c65Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7573b4d38c65SmrgAC_CACHE_VAL(lt_cv_path_SED, 7574b4d38c65Smrg[# Loop through the user's path and test for sed and gsed. 7575b4d38c65Smrg# Then use that list of sed's as ones to test for truncation. 7576b4d38c65Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7577b4d38c65Smrgfor as_dir in $PATH 7578b4d38c65Smrgdo 7579b4d38c65Smrg IFS=$as_save_IFS 7580b4d38c65Smrg test -z "$as_dir" && as_dir=. 7581b4d38c65Smrg for lt_ac_prog in sed gsed; do 7582b4d38c65Smrg for ac_exec_ext in '' $ac_executable_extensions; do 7583b4d38c65Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7584b4d38c65Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7585b534f209Smrg fi 7586b4d38c65Smrg done 7587b4d38c65Smrg done 7588b4d38c65Smrgdone 7589b4d38c65SmrgIFS=$as_save_IFS 7590b4d38c65Smrglt_ac_max=0 7591b4d38c65Smrglt_ac_count=0 7592b4d38c65Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7593b4d38c65Smrg# along with /bin/sed that truncates output. 7594b4d38c65Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7595b4d38c65Smrg test ! -f $lt_ac_sed && continue 7596b4d38c65Smrg cat /dev/null > conftest.in 7597b4d38c65Smrg lt_ac_count=0 7598b4d38c65Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7599b4d38c65Smrg # Check for GNU sed and select it if it is found. 7600b4d38c65Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7601b4d38c65Smrg lt_cv_path_SED=$lt_ac_sed 7602b4d38c65Smrg break 7603b4d38c65Smrg fi 7604b4d38c65Smrg while true; do 7605b4d38c65Smrg cat conftest.in conftest.in >conftest.tmp 7606b4d38c65Smrg mv conftest.tmp conftest.in 7607b4d38c65Smrg cp conftest.in conftest.nl 7608b4d38c65Smrg echo >>conftest.nl 7609b4d38c65Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7610b4d38c65Smrg cmp -s conftest.out conftest.nl || break 7611b4d38c65Smrg # 10000 chars as input seems more than enough 7612b4d38c65Smrg test $lt_ac_count -gt 10 && break 7613b4d38c65Smrg lt_ac_count=`expr $lt_ac_count + 1` 7614b4d38c65Smrg if test $lt_ac_count -gt $lt_ac_max; then 7615b4d38c65Smrg lt_ac_max=$lt_ac_count 7616b4d38c65Smrg lt_cv_path_SED=$lt_ac_sed 7617b4d38c65Smrg fi 7618b4d38c65Smrg done 7619b4d38c65Smrgdone 7620b4d38c65Smrg]) 7621b4d38c65SmrgSED=$lt_cv_path_SED 7622b4d38c65SmrgAC_SUBST([SED]) 7623b4d38c65SmrgAC_MSG_RESULT([$SED]) 7624b4d38c65Smrg])#AC_PROG_SED 7625b4d38c65Smrg])#m4_ifndef 7626b534f209Smrg 7627b4d38c65Smrg# Old name: 7628b4d38c65SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7629b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 7630b4d38c65Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7631b534f209Smrg 7632b534f209Smrg 7633b4d38c65Smrg# _LT_CHECK_SHELL_FEATURES 7634b4d38c65Smrg# ------------------------ 7635b4d38c65Smrg# Find out whether the shell is Bourne or XSI compatible, 7636b4d38c65Smrg# or has some other useful features. 7637b4d38c65Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7638b4d38c65Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7639b4d38c65Smrg# Try some XSI features 7640b4d38c65Smrgxsi_shell=no 7641b4d38c65Smrg( _lt_dummy="a/b/c" 7642b4d38c65Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7643b4d38c65Smrg = c,a/b,b/c, \ 7644b4d38c65Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7645b4d38c65Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7646b4d38c65Smrg && xsi_shell=yes 7647b4d38c65SmrgAC_MSG_RESULT([$xsi_shell]) 7648b4d38c65Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7649b4d38c65Smrg 7650b4d38c65SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7651b4d38c65Smrglt_shell_append=no 7652b4d38c65Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7653b4d38c65Smrg >/dev/null 2>&1 \ 7654b4d38c65Smrg && lt_shell_append=yes 7655b4d38c65SmrgAC_MSG_RESULT([$lt_shell_append]) 7656b4d38c65Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7657b4d38c65Smrg 7658b4d38c65Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7659b4d38c65Smrg lt_unset=unset 7660b4d38c65Smrgelse 7661b4d38c65Smrg lt_unset=false 7662b4d38c65Smrgfi 7663b4d38c65Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7664b4d38c65Smrg 7665b4d38c65Smrg# test EBCDIC or ASCII 7666b4d38c65Smrgcase `echo X|tr X '\101'` in 7667b4d38c65Smrg A) # ASCII based system 7668b4d38c65Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7669b4d38c65Smrg lt_SP2NL='tr \040 \012' 7670b4d38c65Smrg lt_NL2SP='tr \015\012 \040\040' 7671b4d38c65Smrg ;; 7672b4d38c65Smrg *) # EBCDIC based system 7673b4d38c65Smrg lt_SP2NL='tr \100 \n' 7674b4d38c65Smrg lt_NL2SP='tr \r\n \100\100' 7675b4d38c65Smrg ;; 7676b4d38c65Smrgesac 7677b4d38c65Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7678b4d38c65Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7679b4d38c65Smrg])# _LT_CHECK_SHELL_FEATURES 7680b4d38c65Smrg 7681b4d38c65Smrg 7682b4d38c65Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7683b4d38c65Smrg# ------------------------------------------------------ 7684b4d38c65Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7685b4d38c65Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7686b4d38c65Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 7687b4d38c65Smrg[dnl { 7688b4d38c65Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 7689b4d38c65Smrg$1 ()\ 7690b4d38c65Smrg{\ 7691b4d38c65Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7692b4d38c65Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7693b4d38c65Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7694b4d38c65Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7695b4d38c65Smrgtest 0 -eq $? || _lt_function_replace_fail=: 7696b4d38c65Smrg]) 7697b534f209Smrg 769815fb4814Smrg 7699b4d38c65Smrg# _LT_PROG_REPLACE_SHELLFNS 7700b4d38c65Smrg# ------------------------- 7701b4d38c65Smrg# Replace existing portable implementations of several shell functions with 7702b4d38c65Smrg# equivalent extended shell implementations where those features are available.. 7703b4d38c65Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7704b4d38c65Smrg[if test x"$xsi_shell" = xyes; then 7705b4d38c65Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7706b4d38c65Smrg case ${1} in 7707b4d38c65Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7708b4d38c65Smrg * ) func_dirname_result="${3}" ;; 7709b4d38c65Smrg esac]) 7710b4d38c65Smrg 7711b4d38c65Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7712b4d38c65Smrg func_basename_result="${1##*/}"]) 7713b4d38c65Smrg 7714b4d38c65Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7715b4d38c65Smrg case ${1} in 7716b4d38c65Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7717b4d38c65Smrg * ) func_dirname_result="${3}" ;; 7718b4d38c65Smrg esac 7719b4d38c65Smrg func_basename_result="${1##*/}"]) 772015fb4814Smrg 7721b4d38c65Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7722b4d38c65Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7723b4d38c65Smrg # positional parameters, so assign one to ordinary parameter first. 7724b4d38c65Smrg func_stripname_result=${3} 7725b4d38c65Smrg func_stripname_result=${func_stripname_result#"${1}"} 7726b4d38c65Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 772715fb4814Smrg 7728b4d38c65Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7729b4d38c65Smrg func_split_long_opt_name=${1%%=*} 7730b4d38c65Smrg func_split_long_opt_arg=${1#*=}]) 773115fb4814Smrg 7732b4d38c65Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7733b4d38c65Smrg func_split_short_opt_arg=${1#??} 7734b4d38c65Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 773515fb4814Smrg 7736b4d38c65Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7737b4d38c65Smrg case ${1} in 7738b4d38c65Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7739b4d38c65Smrg *) func_lo2o_result=${1} ;; 7740b4d38c65Smrg esac]) 774115fb4814Smrg 7742b4d38c65Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 774315fb4814Smrg 7744b4d38c65Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 774515fb4814Smrg 7746b4d38c65Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7747b4d38c65Smrgfi 774815fb4814Smrg 7749b4d38c65Smrgif test x"$lt_shell_append" = xyes; then 7750b4d38c65Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 775115fb4814Smrg 7752b4d38c65Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7753b4d38c65Smrg func_quote_for_eval "${2}" 7754b4d38c65Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7755b4d38c65Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 775615fb4814Smrg 7757b4d38c65Smrg # Save a `func_append' function call where possible by direct use of '+=' 7758b4d38c65Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7759b4d38c65Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7760b4d38c65Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7761b4d38c65Smrg test 0 -eq $? || _lt_function_replace_fail=: 7762b4d38c65Smrgelse 7763b4d38c65Smrg # Save a `func_append' function call even when '+=' is not available 7764b4d38c65Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7765b4d38c65Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7766b4d38c65Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7767b4d38c65Smrg test 0 -eq $? || _lt_function_replace_fail=: 7768b4d38c65Smrgfi 776915fb4814Smrg 7770b4d38c65Smrgif test x"$_lt_function_replace_fail" = x":"; then 7771b4d38c65Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7772b4d38c65Smrgfi 7773b4d38c65Smrg]) 777415fb4814Smrg 7775b4d38c65Smrg# _LT_PATH_CONVERSION_FUNCTIONS 7776b4d38c65Smrg# ----------------------------- 7777b4d38c65Smrg# Determine which file name conversion functions should be used by 7778b4d38c65Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7779b4d38c65Smrg# for certain cross-compile configurations and native mingw. 7780b4d38c65Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7781b4d38c65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7782b4d38c65SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7783b4d38c65SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 7784b4d38c65SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7785b4d38c65Smrg[case $host in 7786b4d38c65Smrg *-*-mingw* ) 7787b4d38c65Smrg case $build in 7788b4d38c65Smrg *-*-mingw* ) # actually msys 7789b4d38c65Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7790b4d38c65Smrg ;; 7791b4d38c65Smrg *-*-cygwin* ) 7792b4d38c65Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7793b4d38c65Smrg ;; 7794b4d38c65Smrg * ) # otherwise, assume *nix 7795b4d38c65Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7796b4d38c65Smrg ;; 7797b4d38c65Smrg esac 7798b4d38c65Smrg ;; 7799b4d38c65Smrg *-*-cygwin* ) 7800b4d38c65Smrg case $build in 7801b4d38c65Smrg *-*-mingw* ) # actually msys 7802b4d38c65Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7803b4d38c65Smrg ;; 7804b4d38c65Smrg *-*-cygwin* ) 7805b4d38c65Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7806b4d38c65Smrg ;; 7807b4d38c65Smrg * ) # otherwise, assume *nix 7808b4d38c65Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7809b4d38c65Smrg ;; 7810b4d38c65Smrg esac 7811b4d38c65Smrg ;; 7812b4d38c65Smrg * ) # unhandled hosts (and "normal" native builds) 7813b4d38c65Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7814b4d38c65Smrg ;; 7815b4d38c65Smrgesac 7816b4d38c65Smrg]) 7817b4d38c65Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 7818b4d38c65SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7819b4d38c65Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7820b4d38c65Smrg [0], [convert $build file names to $host format])dnl 7821b4d38c65Smrg 7822b4d38c65SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7823b4d38c65SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7824b4d38c65Smrg[#assume ordinary cross tools, or native build. 7825b4d38c65Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 7826b4d38c65Smrgcase $host in 7827b4d38c65Smrg *-*-mingw* ) 7828b4d38c65Smrg case $build in 7829b4d38c65Smrg *-*-mingw* ) # actually msys 7830b4d38c65Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7831b4d38c65Smrg ;; 7832b4d38c65Smrg esac 7833b4d38c65Smrg ;; 7834b4d38c65Smrgesac 7835b4d38c65Smrg]) 7836b4d38c65Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7837b4d38c65SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7838b4d38c65Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7839b4d38c65Smrg [0], [convert $build files to toolchain format])dnl 7840b4d38c65Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 7841b410ddbeSmrg 7842b4d38c65Smrg# Helper functions for option handling. -*- Autoconf -*- 7843b4d38c65Smrg# 7844b4d38c65Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 7845b4d38c65Smrg# Inc. 7846b4d38c65Smrg# Written by Gary V. Vaughan, 2004 7847b4d38c65Smrg# 7848b4d38c65Smrg# This file is free software; the Free Software Foundation gives 7849b4d38c65Smrg# unlimited permission to copy and/or distribute it, with or without 7850b4d38c65Smrg# modifications, as long as this notice is preserved. 7851b410ddbeSmrg 7852b4d38c65Smrg# serial 7 ltoptions.m4 7853b410ddbeSmrg 7854b4d38c65Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7855b4d38c65SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 7856b410ddbeSmrg 7857b410ddbeSmrg 7858b4d38c65Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 7859b4d38c65Smrg# ------------------------------------------ 7860b4d38c65Smrgm4_define([_LT_MANGLE_OPTION], 7861b4d38c65Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 7862b410ddbeSmrg 786315fb4814Smrg 7864b4d38c65Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 7865b4d38c65Smrg# --------------------------------------- 7866b4d38c65Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 7867b4d38c65Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 7868b4d38c65Smrg# saved as a flag. 7869b4d38c65Smrgm4_define([_LT_SET_OPTION], 7870b4d38c65Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 7871b4d38c65Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 7872b4d38c65Smrg _LT_MANGLE_DEFUN([$1], [$2]), 7873b4d38c65Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 7874b4d38c65Smrg]) 787515fb4814Smrg 7876de78e416Smrg 7877b4d38c65Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 7878b4d38c65Smrg# ------------------------------------------------------------ 7879b4d38c65Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7880b4d38c65Smrgm4_define([_LT_IF_OPTION], 7881b4d38c65Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 7882b4d38c65Smrg 7883b4d38c65Smrg 7884b4d38c65Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 7885b4d38c65Smrg# ------------------------------------------------------- 7886b4d38c65Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 7887b4d38c65Smrg# are set. 7888b4d38c65Smrgm4_define([_LT_UNLESS_OPTIONS], 7889b4d38c65Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7890b4d38c65Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 7891b4d38c65Smrg [m4_define([$0_found])])])[]dnl 7892b4d38c65Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 7893b4d38c65Smrg])[]dnl 7894b4d38c65Smrg]) 789515fb4814Smrg 789615fb4814Smrg 7897b4d38c65Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 7898b4d38c65Smrg# ---------------------------------------- 7899b4d38c65Smrg# OPTION-LIST is a space-separated list of Libtool options associated 7900b4d38c65Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 7901b4d38c65Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 7902b4d38c65Smrg# the unknown option and exit. 7903b4d38c65Smrgm4_defun([_LT_SET_OPTIONS], 7904b4d38c65Smrg[# Set options 7905b4d38c65Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7906b4d38c65Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 7907b4d38c65Smrg 7908b4d38c65Smrgm4_if([$1],[LT_INIT],[ 7909b4d38c65Smrg dnl 7910b4d38c65Smrg dnl Simply set some default values (i.e off) if boolean options were not 7911b4d38c65Smrg dnl specified: 7912b4d38c65Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 7913b4d38c65Smrg ]) 7914b4d38c65Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 7915b4d38c65Smrg ]) 7916b4d38c65Smrg dnl 7917b4d38c65Smrg dnl If no reference was made to various pairs of opposing options, then 7918b4d38c65Smrg dnl we run the default mode handler for the pair. For example, if neither 7919b4d38c65Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 7920b4d38c65Smrg dnl archives by default: 7921b4d38c65Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 7922b4d38c65Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 7923b4d38c65Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 7924b4d38c65Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 7925b4d38c65Smrg [_LT_ENABLE_FAST_INSTALL]) 7926b4d38c65Smrg ]) 7927b4d38c65Smrg])# _LT_SET_OPTIONS 792815fb4814Smrg 7929b534f209Smrg 7930b534f209Smrg 7931b4d38c65Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 7932b4d38c65Smrg# ----------------------------------------- 7933b4d38c65Smrgm4_define([_LT_MANGLE_DEFUN], 7934b4d38c65Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 7935b534f209Smrg 7936b534f209Smrg 7937b4d38c65Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 7938b4d38c65Smrg# ----------------------------------------------- 7939b4d38c65Smrgm4_define([LT_OPTION_DEFINE], 7940b4d38c65Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 7941b4d38c65Smrg])# LT_OPTION_DEFINE 7942b534f209Smrg 7943b534f209Smrg 7944b4d38c65Smrg# dlopen 7945b4d38c65Smrg# ------ 7946b4d38c65SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 7947b534f209Smrg]) 7948b534f209Smrg 7949b4d38c65SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 7950b4d38c65Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 7951b4d38c65SmrgAC_DIAGNOSE([obsolete], 7952b4d38c65Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7953b4d38c65Smrgput the `dlopen' option into LT_INIT's first parameter.]) 7954b4d38c65Smrg]) 7955b534f209Smrg 7956b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 7957b4d38c65Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 795815fb4814Smrg 795915fb4814Smrg 7960b4d38c65Smrg# win32-dll 7961b4d38c65Smrg# --------- 7962b4d38c65Smrg# Declare package support for building win32 dll's. 7963b4d38c65SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 7964b4d38c65Smrg[enable_win32_dll=yes 796515fb4814Smrg 7966b4d38c65Smrgcase $host in 7967b4d38c65Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 7968b4d38c65Smrg AC_CHECK_TOOL(AS, as, false) 7969b4d38c65Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7970b4d38c65Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7971b4d38c65Smrg ;; 7972b4d38c65Smrgesac 7973b410ddbeSmrg 7974b4d38c65Smrgtest -z "$AS" && AS=as 7975b4d38c65Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 797615fb4814Smrg 7977b4d38c65Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7978b4d38c65Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 797915fb4814Smrg 7980b4d38c65Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7981b4d38c65Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 7982b4d38c65Smrg])# win32-dll 7983b410ddbeSmrg 7984b4d38c65SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 7985b4d38c65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7986b4d38c65Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 7987b4d38c65SmrgAC_DIAGNOSE([obsolete], 7988b4d38c65Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7989b4d38c65Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 799015fb4814Smrg]) 799115fb4814Smrg 7992b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 7993b4d38c65Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 799415fb4814Smrg 7995b410ddbeSmrg 7996b4d38c65Smrg# _LT_ENABLE_SHARED([DEFAULT]) 7997b4d38c65Smrg# ---------------------------- 7998b4d38c65Smrg# implement the --enable-shared flag, and supports the `shared' and 7999b4d38c65Smrg# `disable-shared' LT_INIT options. 8000b4d38c65Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8001b4d38c65Smrgm4_define([_LT_ENABLE_SHARED], 8002b4d38c65Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8003b4d38c65SmrgAC_ARG_ENABLE([shared], 8004b4d38c65Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8005b4d38c65Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8006b4d38c65Smrg [p=${PACKAGE-default} 8007b4d38c65Smrg case $enableval in 8008b4d38c65Smrg yes) enable_shared=yes ;; 8009b4d38c65Smrg no) enable_shared=no ;; 8010b4d38c65Smrg *) 8011b4d38c65Smrg enable_shared=no 8012b4d38c65Smrg # Look at the argument we got. We use all the common list separators. 8013b4d38c65Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8014b4d38c65Smrg for pkg in $enableval; do 8015b4d38c65Smrg IFS="$lt_save_ifs" 8016b4d38c65Smrg if test "X$pkg" = "X$p"; then 8017b4d38c65Smrg enable_shared=yes 8018b4d38c65Smrg fi 8019b4d38c65Smrg done 8020b4d38c65Smrg IFS="$lt_save_ifs" 8021b4d38c65Smrg ;; 8022b4d38c65Smrg esac], 8023b4d38c65Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8024b4d38c65Smrg 8025b4d38c65Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8026b4d38c65Smrg [Whether or not to build shared libraries]) 8027b4d38c65Smrg])# _LT_ENABLE_SHARED 8028b4d38c65Smrg 8029b4d38c65SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8030b4d38c65SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8031b4d38c65Smrg 8032b4d38c65Smrg# Old names: 8033b4d38c65SmrgAC_DEFUN([AC_ENABLE_SHARED], 8034b4d38c65Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8035b410ddbeSmrg]) 8036b4d38c65Smrg 8037b4d38c65SmrgAC_DEFUN([AC_DISABLE_SHARED], 8038b4d38c65Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8039b4d38c65Smrg]) 8040b4d38c65Smrg 8041b4d38c65SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8042b4d38c65SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8043b4d38c65Smrg 8044b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 8045b4d38c65Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8046b4d38c65Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8047b4d38c65Smrg 8048b4d38c65Smrg 8049b4d38c65Smrg 8050b4d38c65Smrg# _LT_ENABLE_STATIC([DEFAULT]) 8051b4d38c65Smrg# ---------------------------- 8052b4d38c65Smrg# implement the --enable-static flag, and support the `static' and 8053b4d38c65Smrg# `disable-static' LT_INIT options. 8054b4d38c65Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8055b4d38c65Smrgm4_define([_LT_ENABLE_STATIC], 8056b4d38c65Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8057b4d38c65SmrgAC_ARG_ENABLE([static], 8058b4d38c65Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8059b4d38c65Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8060b4d38c65Smrg [p=${PACKAGE-default} 8061b4d38c65Smrg case $enableval in 8062b4d38c65Smrg yes) enable_static=yes ;; 8063b4d38c65Smrg no) enable_static=no ;; 8064b4d38c65Smrg *) 8065b4d38c65Smrg enable_static=no 8066b4d38c65Smrg # Look at the argument we got. We use all the common list separators. 8067b4d38c65Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8068b4d38c65Smrg for pkg in $enableval; do 8069b4d38c65Smrg IFS="$lt_save_ifs" 8070b4d38c65Smrg if test "X$pkg" = "X$p"; then 8071b4d38c65Smrg enable_static=yes 8072b4d38c65Smrg fi 8073b4d38c65Smrg done 8074b4d38c65Smrg IFS="$lt_save_ifs" 8075b4d38c65Smrg ;; 8076b4d38c65Smrg esac], 8077b4d38c65Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8078b4d38c65Smrg 8079b4d38c65Smrg _LT_DECL([build_old_libs], [enable_static], [0], 8080b4d38c65Smrg [Whether or not to build static libraries]) 8081b4d38c65Smrg])# _LT_ENABLE_STATIC 8082b4d38c65Smrg 8083b4d38c65SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8084b4d38c65SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8085b4d38c65Smrg 8086b4d38c65Smrg# Old names: 8087b4d38c65SmrgAC_DEFUN([AC_ENABLE_STATIC], 8088b4d38c65Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8089b4d38c65Smrg]) 8090b4d38c65Smrg 8091b4d38c65SmrgAC_DEFUN([AC_DISABLE_STATIC], 8092b4d38c65Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8093b4d38c65Smrg]) 8094b4d38c65Smrg 8095b4d38c65SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8096b4d38c65SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8097b4d38c65Smrg 8098b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 8099b4d38c65Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8100b4d38c65Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8101b4d38c65Smrg 8102b4d38c65Smrg 8103b4d38c65Smrg 8104b4d38c65Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8105b4d38c65Smrg# ---------------------------------- 8106b4d38c65Smrg# implement the --enable-fast-install flag, and support the `fast-install' 8107b4d38c65Smrg# and `disable-fast-install' LT_INIT options. 8108b4d38c65Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8109b4d38c65Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 8110b4d38c65Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8111b4d38c65SmrgAC_ARG_ENABLE([fast-install], 8112b4d38c65Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8113b4d38c65Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8114b4d38c65Smrg [p=${PACKAGE-default} 8115b4d38c65Smrg case $enableval in 8116b4d38c65Smrg yes) enable_fast_install=yes ;; 8117b4d38c65Smrg no) enable_fast_install=no ;; 8118b4d38c65Smrg *) 8119b4d38c65Smrg enable_fast_install=no 8120b4d38c65Smrg # Look at the argument we got. We use all the common list separators. 8121b4d38c65Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8122b4d38c65Smrg for pkg in $enableval; do 8123b4d38c65Smrg IFS="$lt_save_ifs" 8124b4d38c65Smrg if test "X$pkg" = "X$p"; then 8125b4d38c65Smrg enable_fast_install=yes 8126b4d38c65Smrg fi 8127b4d38c65Smrg done 8128b4d38c65Smrg IFS="$lt_save_ifs" 8129b4d38c65Smrg ;; 8130b4d38c65Smrg esac], 8131b4d38c65Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8132b4d38c65Smrg 8133b4d38c65Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 8134b4d38c65Smrg [Whether or not to optimize for fast installation])dnl 8135b4d38c65Smrg])# _LT_ENABLE_FAST_INSTALL 8136b4d38c65Smrg 8137b4d38c65SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8138b4d38c65SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8139b4d38c65Smrg 8140b4d38c65Smrg# Old names: 8141b4d38c65SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8142b4d38c65Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8143b4d38c65SmrgAC_DIAGNOSE([obsolete], 8144b4d38c65Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8145b4d38c65Smrgthe `fast-install' option into LT_INIT's first parameter.]) 8146b4d38c65Smrg]) 8147b4d38c65Smrg 8148b4d38c65SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8149b4d38c65Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8150b4d38c65SmrgAC_DIAGNOSE([obsolete], 8151b4d38c65Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8152b4d38c65Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 8153b4d38c65Smrg]) 8154b4d38c65Smrg 8155b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 8156b4d38c65Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8157b4d38c65Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8158b4d38c65Smrg 8159b4d38c65Smrg 8160b4d38c65Smrg# _LT_WITH_PIC([MODE]) 8161b4d38c65Smrg# -------------------- 8162b4d38c65Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 8163b4d38c65Smrg# LT_INIT options. 8164b4d38c65Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 8165b4d38c65Smrgm4_define([_LT_WITH_PIC], 8166b4d38c65Smrg[AC_ARG_WITH([pic], 81677fe5393cSmrg [AS_HELP_STRING([--with-pic], 8168b4d38c65Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 81697fe5393cSmrg [pic_mode="$withval"], 8170b4d38c65Smrg [pic_mode=default]) 8171b4d38c65Smrg 8172b4d38c65Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 8173b4d38c65Smrg 8174b4d38c65Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8175b4d38c65Smrg])# _LT_WITH_PIC 8176b4d38c65Smrg 8177b4d38c65SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8178b4d38c65SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8179b4d38c65Smrg 8180b4d38c65Smrg# Old name: 8181b4d38c65SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8182b4d38c65Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8183b4d38c65SmrgAC_DIAGNOSE([obsolete], 8184b4d38c65Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8185b4d38c65Smrgput the `pic-only' option into LT_INIT's first parameter.]) 8186b4d38c65Smrg]) 8187b4d38c65Smrg 8188b4d38c65Smrgdnl aclocal-1.4 backwards compatibility: 8189b4d38c65Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8190b4d38c65Smrg 8191b4d38c65Smrg 8192b4d38c65Smrgm4_define([_LTDL_MODE], []) 8193b4d38c65SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8194b4d38c65Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8195b4d38c65SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8196b4d38c65Smrg [m4_define([_LTDL_MODE], [recursive])]) 8197b4d38c65SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8198b4d38c65Smrg [m4_define([_LTDL_MODE], [subproject])]) 8199b4d38c65Smrg 8200b4d38c65Smrgm4_define([_LTDL_TYPE], []) 8201b4d38c65SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8202b4d38c65Smrg [m4_define([_LTDL_TYPE], [installable])]) 8203b4d38c65SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8204b4d38c65Smrg [m4_define([_LTDL_TYPE], [convenience])]) 8205b4d38c65Smrg 8206b4d38c65Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8207b4d38c65Smrg# 8208b4d38c65Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 8209b4d38c65Smrg# Written by Gary V. Vaughan, 2004 8210b4d38c65Smrg# 8211b4d38c65Smrg# This file is free software; the Free Software Foundation gives 8212b4d38c65Smrg# unlimited permission to copy and/or distribute it, with or without 8213b4d38c65Smrg# modifications, as long as this notice is preserved. 8214b4d38c65Smrg 8215b4d38c65Smrg# serial 6 ltsugar.m4 8216b4d38c65Smrg 8217b4d38c65Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8218b4d38c65SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8219b4d38c65Smrg 8220b4d38c65Smrg 8221b4d38c65Smrg# lt_join(SEP, ARG1, [ARG2...]) 8222b4d38c65Smrg# ----------------------------- 8223b4d38c65Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8224b4d38c65Smrg# associated separator. 8225b4d38c65Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8226b4d38c65Smrg# versions in m4sugar had bugs. 8227b4d38c65Smrgm4_define([lt_join], 8228b4d38c65Smrg[m4_if([$#], [1], [], 8229b4d38c65Smrg [$#], [2], [[$2]], 8230b4d38c65Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8231b4d38c65Smrgm4_define([_lt_join], 8232b4d38c65Smrg[m4_if([$#$2], [2], [], 8233b4d38c65Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8234b4d38c65Smrg 8235b4d38c65Smrg 8236b4d38c65Smrg# lt_car(LIST) 8237b4d38c65Smrg# lt_cdr(LIST) 8238b4d38c65Smrg# ------------ 8239b4d38c65Smrg# Manipulate m4 lists. 8240b4d38c65Smrg# These macros are necessary as long as will still need to support 8241b4d38c65Smrg# Autoconf-2.59 which quotes differently. 8242b4d38c65Smrgm4_define([lt_car], [[$1]]) 8243b4d38c65Smrgm4_define([lt_cdr], 8244b4d38c65Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8245b4d38c65Smrg [$#], 1, [], 8246b4d38c65Smrg [m4_dquote(m4_shift($@))])]) 8247b4d38c65Smrgm4_define([lt_unquote], $1) 8248b4d38c65Smrg 8249b4d38c65Smrg 8250b4d38c65Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8251b4d38c65Smrg# ------------------------------------------ 8252b4d38c65Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 8253b4d38c65Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8254b4d38c65Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8255b4d38c65Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8256b4d38c65Smrg# than defined and empty). 8257b4d38c65Smrg# 8258b4d38c65Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8259b4d38c65Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8260b4d38c65Smrgm4_define([lt_append], 8261b4d38c65Smrg[m4_define([$1], 8262b4d38c65Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8263b4d38c65Smrg 8264b4d38c65Smrg 8265b4d38c65Smrg 8266b4d38c65Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8267b4d38c65Smrg# ---------------------------------------------------------- 8268b4d38c65Smrg# Produce a SEP delimited list of all paired combinations of elements of 8269b4d38c65Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8270b4d38c65Smrg# has the form PREFIXmINFIXSUFFIXn. 8271b4d38c65Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8272b4d38c65Smrgm4_define([lt_combine], 8273b4d38c65Smrg[m4_if(m4_eval([$# > 3]), [1], 8274b4d38c65Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8275b4d38c65Smrg[[m4_foreach([_Lt_prefix], [$2], 8276b4d38c65Smrg [m4_foreach([_Lt_suffix], 8277b4d38c65Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8278b4d38c65Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8279b4d38c65Smrg 8280b4d38c65Smrg 8281b4d38c65Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8282b4d38c65Smrg# ----------------------------------------------------------------------- 8283b4d38c65Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8284b4d38c65Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8285b4d38c65Smrgm4_define([lt_if_append_uniq], 8286b4d38c65Smrg[m4_ifdef([$1], 8287b4d38c65Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8288b4d38c65Smrg [lt_append([$1], [$2], [$3])$4], 8289b4d38c65Smrg [$5])], 8290b4d38c65Smrg [lt_append([$1], [$2], [$3])$4])]) 8291b4d38c65Smrg 8292b4d38c65Smrg 8293b4d38c65Smrg# lt_dict_add(DICT, KEY, VALUE) 8294b4d38c65Smrg# ----------------------------- 8295b4d38c65Smrgm4_define([lt_dict_add], 8296b4d38c65Smrg[m4_define([$1($2)], [$3])]) 8297b4d38c65Smrg 8298b4d38c65Smrg 8299b4d38c65Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8300b4d38c65Smrg# -------------------------------------------- 8301b4d38c65Smrgm4_define([lt_dict_add_subkey], 8302b4d38c65Smrg[m4_define([$1($2:$3)], [$4])]) 8303b4d38c65Smrg 8304b4d38c65Smrg 8305b4d38c65Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8306b4d38c65Smrg# ---------------------------------- 8307b4d38c65Smrgm4_define([lt_dict_fetch], 8308b4d38c65Smrg[m4_ifval([$3], 8309b4d38c65Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8310b4d38c65Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8311b4d38c65Smrg 8312b4d38c65Smrg 8313b4d38c65Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8314b4d38c65Smrg# ----------------------------------------------------------------- 8315b4d38c65Smrgm4_define([lt_if_dict_fetch], 8316b4d38c65Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8317b4d38c65Smrg [$5], 8318b4d38c65Smrg [$6])]) 8319b4d38c65Smrg 8320b4d38c65Smrg 8321b4d38c65Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8322b4d38c65Smrg# -------------------------------------------------------------- 8323b4d38c65Smrgm4_define([lt_dict_filter], 8324b4d38c65Smrg[m4_if([$5], [], [], 8325b4d38c65Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8326b4d38c65Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8327b4d38c65Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8328b4d38c65Smrg]) 8329b4d38c65Smrg 8330b4d38c65Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8331b4d38c65Smrg# 8332b4d38c65Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 8333b4d38c65Smrg# Written by Scott James Remnant, 2004 8334b4d38c65Smrg# 8335b4d38c65Smrg# This file is free software; the Free Software Foundation gives 8336b4d38c65Smrg# unlimited permission to copy and/or distribute it, with or without 8337b4d38c65Smrg# modifications, as long as this notice is preserved. 8338b4d38c65Smrg 8339b4d38c65Smrg# @configure_input@ 8340b4d38c65Smrg 83417fe5393cSmrg# serial 3293 ltversion.m4 8342b4d38c65Smrg# This file is part of GNU Libtool 8343b4d38c65Smrg 83447fe5393cSmrgm4_define([LT_PACKAGE_VERSION], [2.4]) 83457fe5393cSmrgm4_define([LT_PACKAGE_REVISION], [1.3293]) 8346b4d38c65Smrg 8347b4d38c65SmrgAC_DEFUN([LTVERSION_VERSION], 83487fe5393cSmrg[macro_version='2.4' 83497fe5393cSmrgmacro_revision='1.3293' 8350b4d38c65Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8351b4d38c65Smrg_LT_DECL(, macro_revision, 0) 8352b410ddbeSmrg]) 835315fb4814Smrg 8354b4d38c65Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8355b4d38c65Smrg# 8356b4d38c65Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 8357b4d38c65Smrg# Written by Scott James Remnant, 2004. 8358b4d38c65Smrg# 8359b4d38c65Smrg# This file is free software; the Free Software Foundation gives 8360b4d38c65Smrg# unlimited permission to copy and/or distribute it, with or without 8361b4d38c65Smrg# modifications, as long as this notice is preserved. 8362b4d38c65Smrg 8363b4d38c65Smrg# serial 5 lt~obsolete.m4 8364b4d38c65Smrg 8365b4d38c65Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 8366b4d38c65Smrg# 8367b4d38c65Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 8368b4d38c65Smrg# which have later been changed to m4_define as they aren't part of the 8369b4d38c65Smrg# exported API, or moved to Autoconf or Automake where they belong. 8370b4d38c65Smrg# 8371b4d38c65Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8372b4d38c65Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8373b4d38c65Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 8374b4d38c65Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8375b4d38c65Smrg# and doesn't know about Autoconf macros at all.) 8376b4d38c65Smrg# 8377b4d38c65Smrg# So we provide this file, which has a silly filename so it's always 8378b4d38c65Smrg# included after everything else. This provides aclocal with the 8379b4d38c65Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8380b4d38c65Smrg# because those macros already exist, or will be overwritten later. 8381b4d38c65Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8382b4d38c65Smrg# 8383b4d38c65Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8384b4d38c65Smrg# Yes, that means every name once taken will need to remain here until 8385b4d38c65Smrg# we give up compatibility with versions before 1.7, at which point 8386b4d38c65Smrg# we need to keep only those names which we still refer to. 8387b4d38c65Smrg 8388b4d38c65Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8389b4d38c65SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8390b4d38c65Smrg 8391b4d38c65Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8392b4d38c65Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8393b4d38c65Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8394b4d38c65Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8395b4d38c65Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8396b4d38c65Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8397b4d38c65Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8398b4d38c65Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8399b4d38c65Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8400b4d38c65Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8401b4d38c65Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8402b4d38c65Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8403b4d38c65Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8404b4d38c65Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8405b4d38c65Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8406b4d38c65Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8407b4d38c65Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8408b4d38c65Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8409b4d38c65Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8410b4d38c65Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8411b4d38c65Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8412b4d38c65Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8413b4d38c65Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8414b4d38c65Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8415b4d38c65Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8416b4d38c65Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8417b4d38c65Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8418b4d38c65Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8419b4d38c65Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8420b4d38c65Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8421b4d38c65Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8422b4d38c65Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8423b4d38c65Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8424b4d38c65Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8425b4d38c65Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8426b4d38c65Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8427b4d38c65Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8428b4d38c65Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8429b4d38c65Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8430b4d38c65Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8431b4d38c65Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8432b4d38c65Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8433b4d38c65Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8434b4d38c65Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8435b4d38c65Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8436b4d38c65Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8437b4d38c65Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8438b4d38c65Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8439b4d38c65Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8440b4d38c65Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8441b4d38c65Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8442b4d38c65Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8443b4d38c65Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8444b4d38c65Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8445b4d38c65Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8446b4d38c65Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8447b4d38c65Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8448b4d38c65Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8449b4d38c65Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8450b4d38c65Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8451b4d38c65Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 8452b4d38c65Smrg 8453b534f209Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 8454b4d38c65Smrg# serial 1 (pkg-config-0.24) 8455b534f209Smrg# 8456b534f209Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 8457b410ddbeSmrg# 8458b534f209Smrg# This program is free software; you can redistribute it and/or modify 8459b534f209Smrg# it under the terms of the GNU General Public License as published by 8460b534f209Smrg# the Free Software Foundation; either version 2 of the License, or 8461b534f209Smrg# (at your option) any later version. 8462b410ddbeSmrg# 8463b534f209Smrg# This program is distributed in the hope that it will be useful, but 8464b534f209Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 8465b534f209Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8466b534f209Smrg# General Public License for more details. 8467b534f209Smrg# 8468b534f209Smrg# You should have received a copy of the GNU General Public License 8469b534f209Smrg# along with this program; if not, write to the Free Software 8470b534f209Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 8471b534f209Smrg# 8472b534f209Smrg# As a special exception to the GNU General Public License, if you 8473b534f209Smrg# distribute this file as part of a program that contains a 8474b534f209Smrg# configuration script generated by Autoconf, you may include it under 8475b534f209Smrg# the same distribution terms that you use for the rest of that program. 847615fb4814Smrg 8477b534f209Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 8478b534f209Smrg# ---------------------------------- 8479b534f209SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 8480b534f209Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 8481b534f209Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 8482b4d38c65SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 8483b4d38c65SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 8484b4d38c65SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 8485b4d38c65Smrg 8486b534f209Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8487b534f209Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8488b534f209Smrgfi 8489b534f209Smrgif test -n "$PKG_CONFIG"; then 8490b534f209Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 8491b534f209Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8492b534f209Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8493b534f209Smrg AC_MSG_RESULT([yes]) 8494b534f209Smrg else 8495b534f209Smrg AC_MSG_RESULT([no]) 8496b534f209Smrg PKG_CONFIG="" 8497b410ddbeSmrg fi 8498b534f209Smrgfi[]dnl 8499b534f209Smrg])# PKG_PROG_PKG_CONFIG 850015fb4814Smrg 8501b534f209Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8502b534f209Smrg# 8503b534f209Smrg# Check to see whether a particular set of modules exists. Similar 8504b534f209Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8505b534f209Smrg# 8506b4d38c65Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8507b4d38c65Smrg# only at the first occurence in configure.ac, so if the first place 8508b4d38c65Smrg# it's called might be skipped (such as if it is within an "if", you 8509b4d38c65Smrg# have to call PKG_CHECK_EXISTS manually 8510b534f209Smrg# -------------------------------------------------------------- 8511b534f209SmrgAC_DEFUN([PKG_CHECK_EXISTS], 8512b534f209Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8513b534f209Smrgif test -n "$PKG_CONFIG" && \ 8514b534f209Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8515b4d38c65Smrg m4_default([$2], [:]) 8516b534f209Smrgm4_ifvaln([$3], [else 8517b534f209Smrg $3])dnl 8518b534f209Smrgfi]) 851915fb4814Smrg 8520b534f209Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8521b534f209Smrg# --------------------------------------------- 8522b534f209Smrgm4_define([_PKG_CONFIG], 8523b4d38c65Smrg[if test -n "$$1"; then 8524b4d38c65Smrg pkg_cv_[]$1="$$1" 8525b4d38c65Smrg elif test -n "$PKG_CONFIG"; then 8526b4d38c65Smrg PKG_CHECK_EXISTS([$3], 8527b4d38c65Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 8528b4d38c65Smrg [pkg_failed=yes]) 8529b4d38c65Smrg else 8530b4d38c65Smrg pkg_failed=untried 8531b534f209Smrgfi[]dnl 8532b534f209Smrg])# _PKG_CONFIG 853315fb4814Smrg 8534b534f209Smrg# _PKG_SHORT_ERRORS_SUPPORTED 8535b534f209Smrg# ----------------------------- 8536b534f209SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8537b534f209Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8538b534f209Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8539b534f209Smrg _pkg_short_errors_supported=yes 8540b534f209Smrgelse 8541b534f209Smrg _pkg_short_errors_supported=no 8542b534f209Smrgfi[]dnl 8543b534f209Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 854415fb4814Smrg 854515fb4814Smrg 8546b534f209Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8547b534f209Smrg# [ACTION-IF-NOT-FOUND]) 8548b534f209Smrg# 8549b534f209Smrg# 8550b534f209Smrg# Note that if there is a possibility the first call to 8551b534f209Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8552b534f209Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8553b534f209Smrg# 8554b534f209Smrg# 8555b534f209Smrg# -------------------------------------------------------------- 8556b534f209SmrgAC_DEFUN([PKG_CHECK_MODULES], 8557b534f209Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8558b534f209SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8559b534f209SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 856015fb4814Smrg 8561b534f209Smrgpkg_failed=no 8562b534f209SmrgAC_MSG_CHECKING([for $1]) 856315fb4814Smrg 8564b534f209Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8565b534f209Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 856615fb4814Smrg 8567b534f209Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8568b534f209Smrgand $1[]_LIBS to avoid the need to call pkg-config. 8569b534f209SmrgSee the pkg-config man page for more details.]) 8570b410ddbeSmrg 8571b534f209Smrgif test $pkg_failed = yes; then 8572b4d38c65Smrg AC_MSG_RESULT([no]) 8573b534f209Smrg _PKG_SHORT_ERRORS_SUPPORTED 8574b534f209Smrg if test $_pkg_short_errors_supported = yes; then 8575b4d38c65Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 8576b534f209Smrg else 8577b4d38c65Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 8578b534f209Smrg fi 8579b534f209Smrg # Put the nasty error message in config.log where it belongs 8580b534f209Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8581b410ddbeSmrg 8582b4d38c65Smrg m4_default([$4], [AC_MSG_ERROR( 8583b534f209Smrg[Package requirements ($2) were not met: 8584b410ddbeSmrg 8585b534f209Smrg$$1_PKG_ERRORS 858615fb4814Smrg 8587b534f209SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8588b534f209Smrginstalled software in a non-standard prefix. 858915fb4814Smrg 8590b4d38c65Smrg_PKG_TEXT]) 8591b4d38c65Smrg ]) 8592b534f209Smrgelif test $pkg_failed = untried; then 8593b4d38c65Smrg AC_MSG_RESULT([no]) 8594b4d38c65Smrg m4_default([$4], [AC_MSG_FAILURE( 8595b534f209Smrg[The pkg-config script could not be found or is too old. Make sure it 8596b534f209Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 8597b534f209Smrgpath to pkg-config. 859815fb4814Smrg 8599b534f209Smrg_PKG_TEXT 8600b410ddbeSmrg 8601b4d38c65SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 8602b4d38c65Smrg ]) 8603b534f209Smrgelse 8604b534f209Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8605b534f209Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8606b534f209Smrg AC_MSG_RESULT([yes]) 8607b4d38c65Smrg $3 8608b534f209Smrgfi[]dnl 8609b534f209Smrg])# PKG_CHECK_MODULES 8610b410ddbeSmrg 86117fe5393cSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 86127fe5393cSmrg# 86137fe5393cSmrg# This file is free software; the Free Software Foundation 86147fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 86157fe5393cSmrg# with or without modifications, as long as this notice is preserved. 8616b410ddbeSmrg 86177fe5393cSmrg# AM_AUTOMAKE_VERSION(VERSION) 86187fe5393cSmrg# ---------------------------- 86197fe5393cSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 86207fe5393cSmrg# generated from the m4 files accompanying Automake X.Y. 86217fe5393cSmrg# (This private macro should not be called outside this file.) 86227fe5393cSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 86237fe5393cSmrg[am__api_version='1.11' 86247fe5393cSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 86257fe5393cSmrgdnl require some minimum version. Point them to the right macro. 86267fe5393cSmrgm4_if([$1], [1.11.1], [], 86277fe5393cSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 86287fe5393cSmrg]) 86297fe5393cSmrg 86307fe5393cSmrg# _AM_AUTOCONF_VERSION(VERSION) 86317fe5393cSmrg# ----------------------------- 86327fe5393cSmrg# aclocal traces this macro to find the Autoconf version. 86337fe5393cSmrg# This is a private macro too. Using m4_define simplifies 86347fe5393cSmrg# the logic in aclocal, which can simply ignore this definition. 86357fe5393cSmrgm4_define([_AM_AUTOCONF_VERSION], []) 86367fe5393cSmrg 86377fe5393cSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 86387fe5393cSmrg# ------------------------------- 86397fe5393cSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 86407fe5393cSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 86417fe5393cSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 86427fe5393cSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 86437fe5393cSmrgm4_ifndef([AC_AUTOCONF_VERSION], 86447fe5393cSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 86457fe5393cSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 86467fe5393cSmrg 86477fe5393cSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 86487fe5393cSmrg 86497fe5393cSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8650b534f209Smrg# 86517fe5393cSmrg# This file is free software; the Free Software Foundation 86527fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 86537fe5393cSmrg# with or without modifications, as long as this notice is preserved. 86547fe5393cSmrg 86557fe5393cSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 86567fe5393cSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 86577fe5393cSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 8658b534f209Smrg# 86597fe5393cSmrg# Of course, Automake must honor this variable whenever it calls a 86607fe5393cSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 86617fe5393cSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 86627fe5393cSmrg# depending on how configure is run. This is pretty annoying, since 86637fe5393cSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 86647fe5393cSmrg# source directory, any form will work fine, but in subdirectories a 86657fe5393cSmrg# relative path needs to be adjusted first. 86667fe5393cSmrg# 86677fe5393cSmrg# $ac_aux_dir/missing 86687fe5393cSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 86697fe5393cSmrg# $top_srcdir/$ac_aux_dir/missing 86707fe5393cSmrg# fails if $ac_aux_dir is absolute, 86717fe5393cSmrg# fails when called from a subdirectory in a VPATH build with 86727fe5393cSmrg# a relative $ac_aux_dir 8673b534f209Smrg# 86747fe5393cSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86757fe5393cSmrg# are both prefixed by $srcdir. In an in-source build this is usually 86767fe5393cSmrg# harmless because $srcdir is `.', but things will broke when you 86777fe5393cSmrg# start a VPATH build or use an absolute $srcdir. 8678b534f209Smrg# 86797fe5393cSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 86807fe5393cSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 86817fe5393cSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 86827fe5393cSmrg# and then we would define $MISSING as 86837fe5393cSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 86847fe5393cSmrg# This will work as long as MISSING is not called from configure, because 86857fe5393cSmrg# unfortunately $(top_srcdir) has no meaning in configure. 86867fe5393cSmrg# However there are other variables, like CC, which are often used in 86877fe5393cSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 86887fe5393cSmrg# 86897fe5393cSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 86907fe5393cSmrg# absolute PATH. The drawback is that using absolute paths prevent a 86917fe5393cSmrg# configured tree to be moved without reconfiguration. 8692b410ddbeSmrg 86937fe5393cSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 86947fe5393cSmrg[dnl Rely on autoconf to set up CDPATH properly. 86957fe5393cSmrgAC_PREREQ([2.50])dnl 86967fe5393cSmrg# expand $ac_aux_dir to an absolute path 86977fe5393cSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 86987fe5393cSmrg]) 86997fe5393cSmrg 87007fe5393cSmrg# AM_CONDITIONAL -*- Autoconf -*- 87017fe5393cSmrg 87027fe5393cSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 87037fe5393cSmrg# Free Software Foundation, Inc. 8704b534f209Smrg# 87057fe5393cSmrg# This file is free software; the Free Software Foundation 87067fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 87077fe5393cSmrg# with or without modifications, as long as this notice is preserved. 870815fb4814Smrg 87097fe5393cSmrg# serial 9 871015fb4814Smrg 87117fe5393cSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 87127fe5393cSmrg# ------------------------------------- 87137fe5393cSmrg# Define a conditional. 87147fe5393cSmrgAC_DEFUN([AM_CONDITIONAL], 87157fe5393cSmrg[AC_PREREQ(2.52)dnl 87167fe5393cSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 87177fe5393cSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 87187fe5393cSmrgAC_SUBST([$1_TRUE])dnl 87197fe5393cSmrgAC_SUBST([$1_FALSE])dnl 87207fe5393cSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 87217fe5393cSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 87227fe5393cSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 87237fe5393cSmrgif $2; then 87247fe5393cSmrg $1_TRUE= 87257fe5393cSmrg $1_FALSE='#' 8726b534f209Smrgelse 87277fe5393cSmrg $1_TRUE='#' 87287fe5393cSmrg $1_FALSE= 8729b534f209Smrgfi 87307fe5393cSmrgAC_CONFIG_COMMANDS_PRE( 87317fe5393cSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 87327fe5393cSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 87337fe5393cSmrgUsually this means the macro was only invoked conditionally.]]) 87347fe5393cSmrgfi])]) 873515fb4814Smrg 87367fe5393cSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 87377fe5393cSmrg# Free Software Foundation, Inc. 8738b534f209Smrg# 87397fe5393cSmrg# This file is free software; the Free Software Foundation 87407fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 87417fe5393cSmrg# with or without modifications, as long as this notice is preserved. 874215fb4814Smrg 87437fe5393cSmrg# serial 10 874415fb4814Smrg 87457fe5393cSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 87467fe5393cSmrg# written in clear, in which case automake, when reading aclocal.m4, 87477fe5393cSmrg# will think it sees a *use*, and therefore will trigger all it's 87487fe5393cSmrg# C support machinery. Also note that it means that autoscan, seeing 87497fe5393cSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 8750b410ddbeSmrg 8751b410ddbeSmrg 87527fe5393cSmrg# _AM_DEPENDENCIES(NAME) 87537fe5393cSmrg# ---------------------- 87547fe5393cSmrg# See how the compiler implements dependency checking. 87557fe5393cSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 87567fe5393cSmrg# We try a few techniques and use that to set a single cache variable. 87577fe5393cSmrg# 87587fe5393cSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 87597fe5393cSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 87607fe5393cSmrg# dependency, and given that the user is not expected to run this macro, 87617fe5393cSmrg# just rely on AC_PROG_CC. 87627fe5393cSmrgAC_DEFUN([_AM_DEPENDENCIES], 87637fe5393cSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 87647fe5393cSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 87657fe5393cSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 87667fe5393cSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 8767b410ddbeSmrg 87687fe5393cSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 87697fe5393cSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 87707fe5393cSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 87717fe5393cSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 87727fe5393cSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 87737fe5393cSmrg [depcc="$$1" am_compiler_list=]) 877415fb4814Smrg 87757fe5393cSmrgAC_CACHE_CHECK([dependency style of $depcc], 87767fe5393cSmrg [am_cv_$1_dependencies_compiler_type], 87777fe5393cSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 87787fe5393cSmrg # We make a subdir and do the tests there. Otherwise we can end up 87797fe5393cSmrg # making bogus files that we don't know about and never remove. For 87807fe5393cSmrg # instance it was reported that on HP-UX the gcc test will end up 87817fe5393cSmrg # making a dummy file named `D' -- because `-MD' means `put the output 87827fe5393cSmrg # in D'. 87837fe5393cSmrg mkdir conftest.dir 87847fe5393cSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 87857fe5393cSmrg # using a relative directory. 87867fe5393cSmrg cp "$am_depcomp" conftest.dir 87877fe5393cSmrg cd conftest.dir 87887fe5393cSmrg # We will build objects and dependencies in a subdirectory because 87897fe5393cSmrg # it helps to detect inapplicable dependency modes. For instance 87907fe5393cSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 87917fe5393cSmrg # side effect of compilation, but ICC will put the dependencies in 87927fe5393cSmrg # the current directory while Tru64 will put them in the object 87937fe5393cSmrg # directory. 87947fe5393cSmrg mkdir sub 8795de78e416Smrg 87967fe5393cSmrg am_cv_$1_dependencies_compiler_type=none 87977fe5393cSmrg if test "$am_compiler_list" = ""; then 87987fe5393cSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 87997fe5393cSmrg fi 88007fe5393cSmrg am__universal=false 88017fe5393cSmrg m4_case([$1], [CC], 88027fe5393cSmrg [case " $depcc " in #( 88037fe5393cSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 88047fe5393cSmrg esac], 88057fe5393cSmrg [CXX], 88067fe5393cSmrg [case " $depcc " in #( 88077fe5393cSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 88087fe5393cSmrg esac]) 88097fe5393cSmrg 88107fe5393cSmrg for depmode in $am_compiler_list; do 88117fe5393cSmrg # Setup a source with many dependencies, because some compilers 88127fe5393cSmrg # like to wrap large dependency lists on column 80 (with \), and 88137fe5393cSmrg # we should not choose a depcomp mode which is confused by this. 88147fe5393cSmrg # 88157fe5393cSmrg # We need to recreate these files for each test, as the compiler may 88167fe5393cSmrg # overwrite some of them when testing with obscure command lines. 88177fe5393cSmrg # This happens at least with the AIX C compiler. 88187fe5393cSmrg : > sub/conftest.c 88197fe5393cSmrg for i in 1 2 3 4 5 6; do 88207fe5393cSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 88217fe5393cSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 88227fe5393cSmrg # Solaris 8's {/usr,}/bin/sh. 88237fe5393cSmrg touch sub/conftst$i.h 88247fe5393cSmrg done 88257fe5393cSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 88267fe5393cSmrg 88277fe5393cSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 88287fe5393cSmrg # mode. It turns out that the SunPro C++ compiler does not properly 88297fe5393cSmrg # handle `-M -o', and we need to detect this. Also, some Intel 88307fe5393cSmrg # versions had trouble with output in subdirs 88317fe5393cSmrg am__obj=sub/conftest.${OBJEXT-o} 88327fe5393cSmrg am__minus_obj="-o $am__obj" 88337fe5393cSmrg case $depmode in 88347fe5393cSmrg gcc) 88357fe5393cSmrg # This depmode causes a compiler race in universal mode. 88367fe5393cSmrg test "$am__universal" = false || continue 88377fe5393cSmrg ;; 88387fe5393cSmrg nosideeffect) 88397fe5393cSmrg # after this tag, mechanisms are not by side-effect, so they'll 88407fe5393cSmrg # only be used when explicitly requested 88417fe5393cSmrg if test "x$enable_dependency_tracking" = xyes; then 88427fe5393cSmrg continue 88437fe5393cSmrg else 88447fe5393cSmrg break 88457fe5393cSmrg fi 88467fe5393cSmrg ;; 88477fe5393cSmrg msvisualcpp | msvcmsys) 88487fe5393cSmrg # This compiler won't grok `-c -o', but also, the minuso test has 88497fe5393cSmrg # not run yet. These depmodes are late enough in the game, and 88507fe5393cSmrg # so weak that their functioning should not be impacted. 88517fe5393cSmrg am__obj=conftest.${OBJEXT-o} 88527fe5393cSmrg am__minus_obj= 88537fe5393cSmrg ;; 88547fe5393cSmrg none) break ;; 8855b534f209Smrg esac 88567fe5393cSmrg if depmode=$depmode \ 88577fe5393cSmrg source=sub/conftest.c object=$am__obj \ 88587fe5393cSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 88597fe5393cSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 88607fe5393cSmrg >/dev/null 2>conftest.err && 88617fe5393cSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 88627fe5393cSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 88637fe5393cSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 88647fe5393cSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 88657fe5393cSmrg # icc doesn't choke on unknown options, it will just issue warnings 88667fe5393cSmrg # or remarks (even with -Werror). So we grep stderr for any message 88677fe5393cSmrg # that says an option was ignored or not supported. 88687fe5393cSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 88697fe5393cSmrg # icc: Command line warning: ignoring option '-M'; no argument required 88707fe5393cSmrg # The diagnosis changed in icc 8.0: 88717fe5393cSmrg # icc: Command line remark: option '-MP' not supported 88727fe5393cSmrg if (grep 'ignoring option' conftest.err || 88737fe5393cSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 88747fe5393cSmrg am_cv_$1_dependencies_compiler_type=$depmode 88757fe5393cSmrg break 88767fe5393cSmrg fi 88777fe5393cSmrg fi 88787fe5393cSmrg done 88797fe5393cSmrg 88807fe5393cSmrg cd .. 88817fe5393cSmrg rm -rf conftest.dir 88827fe5393cSmrgelse 88837fe5393cSmrg am_cv_$1_dependencies_compiler_type=none 8884b534f209Smrgfi 88857fe5393cSmrg]) 88867fe5393cSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 88877fe5393cSmrgAM_CONDITIONAL([am__fastdep$1], [ 88887fe5393cSmrg test "x$enable_dependency_tracking" != xno \ 88897fe5393cSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 88907fe5393cSmrg]) 8891de78e416Smrg 8892de78e416Smrg 88937fe5393cSmrg# AM_SET_DEPDIR 88947fe5393cSmrg# ------------- 88957fe5393cSmrg# Choose a directory name for dependency files. 88967fe5393cSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 88977fe5393cSmrgAC_DEFUN([AM_SET_DEPDIR], 88987fe5393cSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 88997fe5393cSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 89007fe5393cSmrg]) 8901b4d38c65Smrg 8902b4d38c65Smrg 89037fe5393cSmrg# AM_DEP_TRACK 89047fe5393cSmrg# ------------ 89057fe5393cSmrgAC_DEFUN([AM_DEP_TRACK], 89067fe5393cSmrg[AC_ARG_ENABLE(dependency-tracking, 89077fe5393cSmrg[ --disable-dependency-tracking speeds up one-time build 89087fe5393cSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 89097fe5393cSmrgif test "x$enable_dependency_tracking" != xno; then 89107fe5393cSmrg am_depcomp="$ac_aux_dir/depcomp" 89117fe5393cSmrg AMDEPBACKSLASH='\' 8912b4d38c65Smrgfi 89137fe5393cSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 89147fe5393cSmrgAC_SUBST([AMDEPBACKSLASH])dnl 89157fe5393cSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 89167fe5393cSmrg]) 8917b4d38c65Smrg 89187fe5393cSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 8919b4d38c65Smrg 89207fe5393cSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 89217fe5393cSmrg# Free Software Foundation, Inc. 8922b4d38c65Smrg# 89237fe5393cSmrg# This file is free software; the Free Software Foundation 89247fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 89257fe5393cSmrg# with or without modifications, as long as this notice is preserved. 8926b410ddbeSmrg 89277fe5393cSmrg#serial 5 8928b410ddbeSmrg 89297fe5393cSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 89307fe5393cSmrg# ------------------------------ 89317fe5393cSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 89327fe5393cSmrg[{ 89337fe5393cSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 89347fe5393cSmrg # are listed without --file. Let's play safe and only enable the eval 89357fe5393cSmrg # if we detect the quoting. 89367fe5393cSmrg case $CONFIG_FILES in 89377fe5393cSmrg *\'*) eval set x "$CONFIG_FILES" ;; 89387fe5393cSmrg *) set x $CONFIG_FILES ;; 89397fe5393cSmrg esac 89407fe5393cSmrg shift 89417fe5393cSmrg for mf 89427fe5393cSmrg do 89437fe5393cSmrg # Strip MF so we end up with the name of the file. 89447fe5393cSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 89457fe5393cSmrg # Check whether this is an Automake generated Makefile or not. 89467fe5393cSmrg # We used to match only the files named `Makefile.in', but 89477fe5393cSmrg # some people rename them; so instead we look at the file content. 89487fe5393cSmrg # Grep'ing the first line is not enough: some people post-process 89497fe5393cSmrg # each Makefile.in and add a new line on top of each file to say so. 89507fe5393cSmrg # Grep'ing the whole file is not good either: AIX grep has a line 89517fe5393cSmrg # limit of 2048, but all sed's we know have understand at least 4000. 89527fe5393cSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 89537fe5393cSmrg dirpart=`AS_DIRNAME("$mf")` 89547fe5393cSmrg else 89557fe5393cSmrg continue 89567fe5393cSmrg fi 89577fe5393cSmrg # Extract the definition of DEPDIR, am__include, and am__quote 89587fe5393cSmrg # from the Makefile without running `make'. 89597fe5393cSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 89607fe5393cSmrg test -z "$DEPDIR" && continue 89617fe5393cSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 89627fe5393cSmrg test -z "am__include" && continue 89637fe5393cSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 89647fe5393cSmrg # When using ansi2knr, U may be empty or an underscore; expand it 89657fe5393cSmrg U=`sed -n 's/^U = //p' < "$mf"` 89667fe5393cSmrg # Find all dependency output files, they are included files with 89677fe5393cSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 89687fe5393cSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 89697fe5393cSmrg # expansion. 89707fe5393cSmrg for file in `sed -n " 89717fe5393cSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 89727fe5393cSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 89737fe5393cSmrg # Make sure the directory exists. 89747fe5393cSmrg test -f "$dirpart/$file" && continue 89757fe5393cSmrg fdir=`AS_DIRNAME(["$file"])` 89767fe5393cSmrg AS_MKDIR_P([$dirpart/$fdir]) 89777fe5393cSmrg # echo "creating $dirpart/$file" 89787fe5393cSmrg echo '# dummy' > "$dirpart/$file" 89797fe5393cSmrg done 89807fe5393cSmrg done 89817fe5393cSmrg} 89827fe5393cSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 8983b410ddbeSmrg 8984b410ddbeSmrg 89857fe5393cSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 89867fe5393cSmrg# ----------------------------- 89877fe5393cSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 89887fe5393cSmrg# 89897fe5393cSmrg# This code is only required when automatic dependency tracking 89907fe5393cSmrg# is enabled. FIXME. This creates each `.P' file that we will 89917fe5393cSmrg# need in order to bootstrap the dependency handling code. 89927fe5393cSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 89937fe5393cSmrg[AC_CONFIG_COMMANDS([depfiles], 89947fe5393cSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 89957fe5393cSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 89967fe5393cSmrg]) 8997b410ddbeSmrg 89987fe5393cSmrg# Do all the work for Automake. -*- Autoconf -*- 8999b410ddbeSmrg 90007fe5393cSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 90017fe5393cSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 9002b410ddbeSmrg# 90037fe5393cSmrg# This file is free software; the Free Software Foundation 90047fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 90057fe5393cSmrg# with or without modifications, as long as this notice is preserved. 9006b4d38c65Smrg 90077fe5393cSmrg# serial 16 900815fb4814Smrg 90097fe5393cSmrg# This macro actually does too much. Some checks are only needed if 90107fe5393cSmrg# your package does certain things. But this isn't really a big deal. 901115fb4814Smrg 90127fe5393cSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 90137fe5393cSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 90147fe5393cSmrg# ----------------------------------------------- 90157fe5393cSmrg# The call with PACKAGE and VERSION arguments is the old style 90167fe5393cSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 90177fe5393cSmrg# and VERSION should now be passed to AC_INIT and removed from 90187fe5393cSmrg# the call to AM_INIT_AUTOMAKE. 90197fe5393cSmrg# We support both call styles for the transition. After 90207fe5393cSmrg# the next Automake release, Autoconf can make the AC_INIT 90217fe5393cSmrg# arguments mandatory, and then we can depend on a new Autoconf 90227fe5393cSmrg# release and drop the old call support. 90237fe5393cSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 90247fe5393cSmrg[AC_PREREQ([2.62])dnl 90257fe5393cSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 90267fe5393cSmrgdnl the ones we care about. 90277fe5393cSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 90287fe5393cSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 90297fe5393cSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 90307fe5393cSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 90317fe5393cSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 90327fe5393cSmrg # is not polluted with repeated "-I." 90337fe5393cSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 90347fe5393cSmrg # test to see if srcdir already configured 90357fe5393cSmrg if test -f $srcdir/config.status; then 90367fe5393cSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 90377fe5393cSmrg fi 903815fb4814Smrgfi 903915fb4814Smrg 90407fe5393cSmrg# test whether we have cygpath 90417fe5393cSmrgif test -z "$CYGPATH_W"; then 90427fe5393cSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 90437fe5393cSmrg CYGPATH_W='cygpath -w' 90447fe5393cSmrg else 90457fe5393cSmrg CYGPATH_W=echo 90467fe5393cSmrg fi 9047b534f209Smrgfi 90487fe5393cSmrgAC_SUBST([CYGPATH_W]) 904915fb4814Smrg 90507fe5393cSmrg# Define the identity of the package. 90517fe5393cSmrgdnl Distinguish between old-style and new-style calls. 90527fe5393cSmrgm4_ifval([$2], 90537fe5393cSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 90547fe5393cSmrg AC_SUBST([PACKAGE], [$1])dnl 90557fe5393cSmrg AC_SUBST([VERSION], [$2])], 90567fe5393cSmrg[_AM_SET_OPTIONS([$1])dnl 90577fe5393cSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 90587fe5393cSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 90597fe5393cSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 90607fe5393cSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 90617fe5393cSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 906215fb4814Smrg 90637fe5393cSmrg_AM_IF_OPTION([no-define],, 90647fe5393cSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 90657fe5393cSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 906615fb4814Smrg 90677fe5393cSmrg# Some tools Automake needs. 90687fe5393cSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 90697fe5393cSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 90707fe5393cSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 90717fe5393cSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 90727fe5393cSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 90737fe5393cSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 90747fe5393cSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 90757fe5393cSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 90767fe5393cSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 90777fe5393cSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 90787fe5393cSmrg# We need awk for the "check" target. The system "awk" is bad on 90797fe5393cSmrg# some platforms. 90807fe5393cSmrgAC_REQUIRE([AC_PROG_AWK])dnl 90817fe5393cSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 90827fe5393cSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 90837fe5393cSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 90847fe5393cSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 90857fe5393cSmrg [_AM_PROG_TAR([v7])])]) 90867fe5393cSmrg_AM_IF_OPTION([no-dependencies],, 90877fe5393cSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 90887fe5393cSmrg [_AM_DEPENDENCIES(CC)], 90897fe5393cSmrg [define([AC_PROG_CC], 90907fe5393cSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 90917fe5393cSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 90927fe5393cSmrg [_AM_DEPENDENCIES(CXX)], 90937fe5393cSmrg [define([AC_PROG_CXX], 90947fe5393cSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 90957fe5393cSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 90967fe5393cSmrg [_AM_DEPENDENCIES(OBJC)], 90977fe5393cSmrg [define([AC_PROG_OBJC], 90987fe5393cSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 90997fe5393cSmrg]) 91007fe5393cSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 91017fe5393cSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 91027fe5393cSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 91037fe5393cSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 91047fe5393cSmrgAC_CONFIG_COMMANDS_PRE(dnl 91057fe5393cSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 91067fe5393cSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 91077fe5393cSmrg]) 910815fb4814Smrg 91097fe5393cSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 91107fe5393cSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 91117fe5393cSmrgdnl mangled by Autoconf and run in a shell conditional statement. 91127fe5393cSmrgm4_define([_AC_COMPILER_EXEEXT], 91137fe5393cSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 91147fe5393cSmrg 91157fe5393cSmrg 91167fe5393cSmrg# When config.status generates a header, we must update the stamp-h file. 91177fe5393cSmrg# This file resides in the same directory as the config header 91187fe5393cSmrg# that is generated. The stamp files are numbered to have different names. 91197fe5393cSmrg 91207fe5393cSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 91217fe5393cSmrg# loop where config.status creates the headers, so we can generate 91227fe5393cSmrg# our stamp files there. 91237fe5393cSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 91247fe5393cSmrg[# Compute $1's index in $config_headers. 91257fe5393cSmrg_am_arg=$1 91267fe5393cSmrg_am_stamp_count=1 91277fe5393cSmrgfor _am_header in $config_headers :; do 91287fe5393cSmrg case $_am_header in 91297fe5393cSmrg $_am_arg | $_am_arg:* ) 91307fe5393cSmrg break ;; 91317fe5393cSmrg * ) 91327fe5393cSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 91337fe5393cSmrg esac 91347fe5393cSmrgdone 91357fe5393cSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 91367fe5393cSmrg 91377fe5393cSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 9138b4d38c65Smrg# 91397fe5393cSmrg# This file is free software; the Free Software Foundation 91407fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 91417fe5393cSmrg# with or without modifications, as long as this notice is preserved. 91427fe5393cSmrg 91437fe5393cSmrg# AM_PROG_INSTALL_SH 91447fe5393cSmrg# ------------------ 91457fe5393cSmrg# Define $install_sh. 91467fe5393cSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 91477fe5393cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 91487fe5393cSmrgif test x"${install_sh}" != xset; then 91497fe5393cSmrg case $am_aux_dir in 91507fe5393cSmrg *\ * | *\ *) 91517fe5393cSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 91527fe5393cSmrg *) 91537fe5393cSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 91547fe5393cSmrg esac 91557fe5393cSmrgfi 91567fe5393cSmrgAC_SUBST(install_sh)]) 91577fe5393cSmrg 91587fe5393cSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 9159b4d38c65Smrg# 91607fe5393cSmrg# This file is free software; the Free Software Foundation 91617fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 91627fe5393cSmrg# with or without modifications, as long as this notice is preserved. 916315fb4814Smrg 91647fe5393cSmrg# serial 2 91657fe5393cSmrg 91667fe5393cSmrg# Check whether the underlying file-system supports filenames 91677fe5393cSmrg# with a leading dot. For instance MS-DOS doesn't. 91687fe5393cSmrgAC_DEFUN([AM_SET_LEADING_DOT], 91697fe5393cSmrg[rm -rf .tst 2>/dev/null 91707fe5393cSmrgmkdir .tst 2>/dev/null 91717fe5393cSmrgif test -d .tst; then 91727fe5393cSmrg am__leading_dot=. 917315fb4814Smrgelse 91747fe5393cSmrg am__leading_dot=_ 9175b534f209Smrgfi 91767fe5393cSmrgrmdir .tst 2>/dev/null 91777fe5393cSmrgAC_SUBST([am__leading_dot])]) 917815fb4814Smrg 91797fe5393cSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 91807fe5393cSmrg# From Jim Meyering 9181b4d38c65Smrg 91827fe5393cSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 91837fe5393cSmrg# Free Software Foundation, Inc. 9184b4d38c65Smrg# 91857fe5393cSmrg# This file is free software; the Free Software Foundation 91867fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 91877fe5393cSmrg# with or without modifications, as long as this notice is preserved. 918815fb4814Smrg 91897fe5393cSmrg# serial 5 919015fb4814Smrg 91917fe5393cSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 91927fe5393cSmrg# ---------------------------------- 91937fe5393cSmrg# Control maintainer-specific portions of Makefiles. 91947fe5393cSmrg# Default is to disable them, unless `enable' is passed literally. 91957fe5393cSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 91967fe5393cSmrg# can override the default with the --enable/--disable switch. 91977fe5393cSmrgAC_DEFUN([AM_MAINTAINER_MODE], 91987fe5393cSmrg[m4_case(m4_default([$1], [disable]), 91997fe5393cSmrg [enable], [m4_define([am_maintainer_other], [disable])], 92007fe5393cSmrg [disable], [m4_define([am_maintainer_other], [enable])], 92017fe5393cSmrg [m4_define([am_maintainer_other], [enable]) 92027fe5393cSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 92037fe5393cSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 92047fe5393cSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 92057fe5393cSmrg AC_ARG_ENABLE([maintainer-mode], 92067fe5393cSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 92077fe5393cSmrg (and sometimes confusing) to the casual installer], 92087fe5393cSmrg [USE_MAINTAINER_MODE=$enableval], 92097fe5393cSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 92107fe5393cSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 92117fe5393cSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 92127fe5393cSmrg MAINT=$MAINTAINER_MODE_TRUE 92137fe5393cSmrg AC_SUBST([MAINT])dnl 92147fe5393cSmrg] 92157fe5393cSmrg) 9216b534f209Smrg 92177fe5393cSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 92187fe5393cSmrg 92197fe5393cSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 92207fe5393cSmrg 92217fe5393cSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 9222b4d38c65Smrg# 92237fe5393cSmrg# This file is free software; the Free Software Foundation 92247fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 92257fe5393cSmrg# with or without modifications, as long as this notice is preserved. 922615fb4814Smrg 92277fe5393cSmrg# serial 4 92287fe5393cSmrg 92297fe5393cSmrg# AM_MAKE_INCLUDE() 92307fe5393cSmrg# ----------------- 92317fe5393cSmrg# Check to see how make treats includes. 92327fe5393cSmrgAC_DEFUN([AM_MAKE_INCLUDE], 92337fe5393cSmrg[am_make=${MAKE-make} 92347fe5393cSmrgcat > confinc << 'END' 92357fe5393cSmrgam__doit: 92367fe5393cSmrg @echo this is the am__doit target 92377fe5393cSmrg.PHONY: am__doit 92387fe5393cSmrgEND 92397fe5393cSmrg# If we don't find an include directive, just comment out the code. 92407fe5393cSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 92417fe5393cSmrgam__include="#" 92427fe5393cSmrgam__quote= 92437fe5393cSmrg_am_result=none 92447fe5393cSmrg# First try GNU make style include. 92457fe5393cSmrgecho "include confinc" > confmf 92467fe5393cSmrg# Ignore all kinds of additional output from `make'. 92477fe5393cSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 92487fe5393cSmrg*the\ am__doit\ target*) 92497fe5393cSmrg am__include=include 92507fe5393cSmrg am__quote= 92517fe5393cSmrg _am_result=GNU 92527fe5393cSmrg ;; 92537fe5393cSmrgesac 92547fe5393cSmrg# Now try BSD make style include. 92557fe5393cSmrgif test "$am__include" = "#"; then 92567fe5393cSmrg echo '.include "confinc"' > confmf 92577fe5393cSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 92587fe5393cSmrg *the\ am__doit\ target*) 92597fe5393cSmrg am__include=.include 92607fe5393cSmrg am__quote="\"" 92617fe5393cSmrg _am_result=BSD 92627fe5393cSmrg ;; 92637fe5393cSmrg esac 9264b4d38c65Smrgfi 92657fe5393cSmrgAC_SUBST([am__include]) 92667fe5393cSmrgAC_SUBST([am__quote]) 92677fe5393cSmrgAC_MSG_RESULT([$_am_result]) 92687fe5393cSmrgrm -f confinc confmf 92697fe5393cSmrg]) 927015fb4814Smrg 92717fe5393cSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 9272b534f209Smrg 92737fe5393cSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 92747fe5393cSmrg# Free Software Foundation, Inc. 9275b534f209Smrg# 92767fe5393cSmrg# This file is free software; the Free Software Foundation 92777fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 92787fe5393cSmrg# with or without modifications, as long as this notice is preserved. 927915fb4814Smrg 92807fe5393cSmrg# serial 6 92817fe5393cSmrg 92827fe5393cSmrg# AM_MISSING_PROG(NAME, PROGRAM) 92837fe5393cSmrg# ------------------------------ 92847fe5393cSmrgAC_DEFUN([AM_MISSING_PROG], 92857fe5393cSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 92867fe5393cSmrg$1=${$1-"${am_missing_run}$2"} 92877fe5393cSmrgAC_SUBST($1)]) 92887fe5393cSmrg 92897fe5393cSmrg 92907fe5393cSmrg# AM_MISSING_HAS_RUN 92917fe5393cSmrg# ------------------ 92927fe5393cSmrg# Define MISSING if not defined so far and test if it supports --run. 92937fe5393cSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 92947fe5393cSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 92957fe5393cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 92967fe5393cSmrgAC_REQUIRE_AUX_FILE([missing])dnl 92977fe5393cSmrgif test x"${MISSING+set}" != xset; then 92987fe5393cSmrg case $am_aux_dir in 92997fe5393cSmrg *\ * | *\ *) 93007fe5393cSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 93017fe5393cSmrg *) 93027fe5393cSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 93037fe5393cSmrg esac 93047fe5393cSmrgfi 93057fe5393cSmrg# Use eval to expand $SHELL 93067fe5393cSmrgif eval "$MISSING --run true"; then 93077fe5393cSmrg am_missing_run="$MISSING --run " 9308b534f209Smrgelse 93097fe5393cSmrg am_missing_run= 93107fe5393cSmrg AC_MSG_WARN([`missing' script is too old or missing]) 931115fb4814Smrgfi 93127fe5393cSmrg]) 931315fb4814Smrg 93147fe5393cSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 9315b410ddbeSmrg# 93167fe5393cSmrg# This file is free software; the Free Software Foundation 93177fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 93187fe5393cSmrg# with or without modifications, as long as this notice is preserved. 93197fe5393cSmrg 93207fe5393cSmrg# AM_PROG_MKDIR_P 93217fe5393cSmrg# --------------- 93227fe5393cSmrg# Check for `mkdir -p'. 93237fe5393cSmrgAC_DEFUN([AM_PROG_MKDIR_P], 93247fe5393cSmrg[AC_PREREQ([2.60])dnl 93257fe5393cSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 93267fe5393cSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 93277fe5393cSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 93287fe5393cSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 93297fe5393cSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 93307fe5393cSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 93317fe5393cSmrgdnl adjustment using top_builddir (which is defined more often than 93327fe5393cSmrgdnl MKDIR_P). 93337fe5393cSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 93347fe5393cSmrgcase $mkdir_p in 93357fe5393cSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 93367fe5393cSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 93377fe5393cSmrgesac 93387fe5393cSmrg]) 93397fe5393cSmrg 93407fe5393cSmrg# Helper functions for option handling. -*- Autoconf -*- 93417fe5393cSmrg 93427fe5393cSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 9343b4d38c65Smrg# 93447fe5393cSmrg# This file is free software; the Free Software Foundation 93457fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 93467fe5393cSmrg# with or without modifications, as long as this notice is preserved. 93477fe5393cSmrg 93487fe5393cSmrg# serial 4 93497fe5393cSmrg 93507fe5393cSmrg# _AM_MANGLE_OPTION(NAME) 93517fe5393cSmrg# ----------------------- 93527fe5393cSmrgAC_DEFUN([_AM_MANGLE_OPTION], 93537fe5393cSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 93547fe5393cSmrg 93557fe5393cSmrg# _AM_SET_OPTION(NAME) 93567fe5393cSmrg# ------------------------------ 93577fe5393cSmrg# Set option NAME. Presently that only means defining a flag for this option. 93587fe5393cSmrgAC_DEFUN([_AM_SET_OPTION], 93597fe5393cSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 93607fe5393cSmrg 93617fe5393cSmrg# _AM_SET_OPTIONS(OPTIONS) 93627fe5393cSmrg# ---------------------------------- 93637fe5393cSmrg# OPTIONS is a space-separated list of Automake options. 93647fe5393cSmrgAC_DEFUN([_AM_SET_OPTIONS], 93657fe5393cSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 93667fe5393cSmrg 93677fe5393cSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 93687fe5393cSmrg# ------------------------------------------- 93697fe5393cSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 93707fe5393cSmrgAC_DEFUN([_AM_IF_OPTION], 93717fe5393cSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 93727fe5393cSmrg 93737fe5393cSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 93747fe5393cSmrg 93757fe5393cSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 93767fe5393cSmrg# Free Software Foundation, Inc. 9377b4d38c65Smrg# 93787fe5393cSmrg# This file is free software; the Free Software Foundation 93797fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 93807fe5393cSmrg# with or without modifications, as long as this notice is preserved. 9381b410ddbeSmrg 93827fe5393cSmrg# serial 5 93837fe5393cSmrg 93847fe5393cSmrg# AM_SANITY_CHECK 93857fe5393cSmrg# --------------- 93867fe5393cSmrgAC_DEFUN([AM_SANITY_CHECK], 93877fe5393cSmrg[AC_MSG_CHECKING([whether build environment is sane]) 93887fe5393cSmrg# Just in case 93897fe5393cSmrgsleep 1 93907fe5393cSmrgecho timestamp > conftest.file 93917fe5393cSmrg# Reject unsafe characters in $srcdir or the absolute working directory 93927fe5393cSmrg# name. Accept space and tab only in the latter. 93937fe5393cSmrgam_lf=' 93947fe5393cSmrg' 93957fe5393cSmrgcase `pwd` in 93967fe5393cSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 93977fe5393cSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 93987fe5393cSmrgesac 93997fe5393cSmrgcase $srcdir in 94007fe5393cSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 94017fe5393cSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 94027fe5393cSmrgesac 94037fe5393cSmrg 94047fe5393cSmrg# Do `set' in a subshell so we don't clobber the current shell's 94057fe5393cSmrg# arguments. Must try -L first in case configure is actually a 94067fe5393cSmrg# symlink; some systems play weird games with the mod time of symlinks 94077fe5393cSmrg# (eg FreeBSD returns the mod time of the symlink's containing 94087fe5393cSmrg# directory). 94097fe5393cSmrgif ( 94107fe5393cSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 94117fe5393cSmrg if test "$[*]" = "X"; then 94127fe5393cSmrg # -L didn't work. 94137fe5393cSmrg set X `ls -t "$srcdir/configure" conftest.file` 9414b4d38c65Smrg fi 94157fe5393cSmrg rm -f conftest.file 94167fe5393cSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 94177fe5393cSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 94187fe5393cSmrg 94197fe5393cSmrg # If neither matched, then we have a broken ls. This can happen 94207fe5393cSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 94217fe5393cSmrg # broken ls alias from the environment. This has actually 94227fe5393cSmrg # happened. Such a system could not be considered "sane". 94237fe5393cSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 94247fe5393cSmrgalias in your environment]) 9425b4d38c65Smrg fi 94267fe5393cSmrg 94277fe5393cSmrg test "$[2]" = conftest.file 94287fe5393cSmrg ) 94297fe5393cSmrgthen 94307fe5393cSmrg # Ok. 94317fe5393cSmrg : 9432b4d38c65Smrgelse 94337fe5393cSmrg AC_MSG_ERROR([newly created file is older than distributed files! 94347fe5393cSmrgCheck your system clock]) 9435b4d38c65Smrgfi 94367fe5393cSmrgAC_MSG_RESULT(yes)]) 9437b410ddbeSmrg 94387fe5393cSmrg# Copyright (C) 2009 Free Software Foundation, Inc. 9439b4d38c65Smrg# 94407fe5393cSmrg# This file is free software; the Free Software Foundation 94417fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 94427fe5393cSmrg# with or without modifications, as long as this notice is preserved. 944315fb4814Smrg 94447fe5393cSmrg# serial 1 944515fb4814Smrg 94467fe5393cSmrg# AM_SILENT_RULES([DEFAULT]) 94477fe5393cSmrg# -------------------------- 94487fe5393cSmrg# Enable less verbose build rules; with the default set to DEFAULT 94497fe5393cSmrg# (`yes' being less verbose, `no' or empty being verbose). 94507fe5393cSmrgAC_DEFUN([AM_SILENT_RULES], 94517fe5393cSmrg[AC_ARG_ENABLE([silent-rules], 94527fe5393cSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 94537fe5393cSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 94547fe5393cSmrgcase $enable_silent_rules in 94557fe5393cSmrgyes) AM_DEFAULT_VERBOSITY=0;; 94567fe5393cSmrgno) AM_DEFAULT_VERBOSITY=1;; 94577fe5393cSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 94587fe5393cSmrgesac 94597fe5393cSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 94607fe5393cSmrgAM_BACKSLASH='\' 94617fe5393cSmrgAC_SUBST([AM_BACKSLASH])dnl 94627fe5393cSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 94637fe5393cSmrg]) 946415fb4814Smrg 94657fe5393cSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 94667fe5393cSmrg# 94677fe5393cSmrg# This file is free software; the Free Software Foundation 94687fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 94697fe5393cSmrg# with or without modifications, as long as this notice is preserved. 947015fb4814Smrg 94717fe5393cSmrg# AM_PROG_INSTALL_STRIP 94727fe5393cSmrg# --------------------- 94737fe5393cSmrg# One issue with vendor `install' (even GNU) is that you can't 94747fe5393cSmrg# specify the program used to strip binaries. This is especially 94757fe5393cSmrg# annoying in cross-compiling environments, where the build's strip 94767fe5393cSmrg# is unlikely to handle the host's binaries. 94777fe5393cSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 94787fe5393cSmrg# always use install-sh in `make install-strip', and initialize 94797fe5393cSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 94807fe5393cSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 94817fe5393cSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 94827fe5393cSmrg# Installed binaries are usually stripped using `strip' when the user 94837fe5393cSmrg# run `make install-strip'. However `strip' might not be the right 94847fe5393cSmrg# tool to use in cross-compilation environments, therefore Automake 94857fe5393cSmrg# will honor the `STRIP' environment variable to overrule this program. 94867fe5393cSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 94877fe5393cSmrgif test "$cross_compiling" != no; then 94887fe5393cSmrg AC_CHECK_TOOL([STRIP], [strip], :) 94897fe5393cSmrgfi 94907fe5393cSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 94917fe5393cSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 949215fb4814Smrg 94937fe5393cSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 9494b4d38c65Smrg# 94957fe5393cSmrg# This file is free software; the Free Software Foundation 94967fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 94977fe5393cSmrg# with or without modifications, as long as this notice is preserved. 949815fb4814Smrg 94997fe5393cSmrg# serial 2 9500b410ddbeSmrg 95017fe5393cSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 95027fe5393cSmrg# --------------------------- 95037fe5393cSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 95047fe5393cSmrg# This macro is traced by Automake. 95057fe5393cSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9506b410ddbeSmrg 95077fe5393cSmrg# AM_SUBST_NOTMAKE(VARIABLE) 95087fe5393cSmrg# --------------------------- 95097fe5393cSmrg# Public sister of _AM_SUBST_NOTMAKE. 95107fe5393cSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9511b410ddbeSmrg 95127fe5393cSmrg# Check how to create a tarball. -*- Autoconf -*- 9513b410ddbeSmrg 95147fe5393cSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 9515b4d38c65Smrg# 95167fe5393cSmrg# This file is free software; the Free Software Foundation 95177fe5393cSmrg# gives unlimited permission to copy and/or distribute it, 95187fe5393cSmrg# with or without modifications, as long as this notice is preserved. 9519b410ddbeSmrg 95207fe5393cSmrg# serial 2 95217fe5393cSmrg 95227fe5393cSmrg# _AM_PROG_TAR(FORMAT) 95237fe5393cSmrg# -------------------- 95247fe5393cSmrg# Check how to create a tarball in format FORMAT. 95257fe5393cSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 9526b4d38c65Smrg# 95277fe5393cSmrg# Substitute a variable $(am__tar) that is a command 95287fe5393cSmrg# writing to stdout a FORMAT-tarball containing the directory 95297fe5393cSmrg# $tardir. 95307fe5393cSmrg# tardir=directory && $(am__tar) > result.tar 9531b4d38c65Smrg# 95327fe5393cSmrg# Substitute a variable $(am__untar) that extract such 95337fe5393cSmrg# a tarball read from stdin. 95347fe5393cSmrg# $(am__untar) < result.tar 95357fe5393cSmrgAC_DEFUN([_AM_PROG_TAR], 95367fe5393cSmrg[# Always define AMTAR for backward compatibility. 95377fe5393cSmrgAM_MISSING_PROG([AMTAR], [tar]) 95387fe5393cSmrgm4_if([$1], [v7], 95397fe5393cSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 95407fe5393cSmrg [m4_case([$1], [ustar],, [pax],, 95417fe5393cSmrg [m4_fatal([Unknown tar format])]) 95427fe5393cSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 95437fe5393cSmrg# Loop over all known methods to create a tar archive until one works. 95447fe5393cSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 95457fe5393cSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 95467fe5393cSmrg# Do not fold the above two line into one, because Tru64 sh and 95477fe5393cSmrg# Solaris sh will not grok spaces in the rhs of `-'. 95487fe5393cSmrgfor _am_tool in $_am_tools 95497fe5393cSmrgdo 95507fe5393cSmrg case $_am_tool in 95517fe5393cSmrg gnutar) 95527fe5393cSmrg for _am_tar in tar gnutar gtar; 95537fe5393cSmrg do 95547fe5393cSmrg AM_RUN_LOG([$_am_tar --version]) && break 95557fe5393cSmrg done 95567fe5393cSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 95577fe5393cSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 95587fe5393cSmrg am__untar="$_am_tar -xf -" 95597fe5393cSmrg ;; 95607fe5393cSmrg plaintar) 95617fe5393cSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 95627fe5393cSmrg # ustar tarball either. 95637fe5393cSmrg (tar --version) >/dev/null 2>&1 && continue 95647fe5393cSmrg am__tar='tar chf - "$$tardir"' 95657fe5393cSmrg am__tar_='tar chf - "$tardir"' 95667fe5393cSmrg am__untar='tar xf -' 95677fe5393cSmrg ;; 95687fe5393cSmrg pax) 95697fe5393cSmrg am__tar='pax -L -x $1 -w "$$tardir"' 95707fe5393cSmrg am__tar_='pax -L -x $1 -w "$tardir"' 95717fe5393cSmrg am__untar='pax -r' 95727fe5393cSmrg ;; 95737fe5393cSmrg cpio) 95747fe5393cSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 95757fe5393cSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 95767fe5393cSmrg am__untar='cpio -i -H $1 -d' 95777fe5393cSmrg ;; 95787fe5393cSmrg none) 95797fe5393cSmrg am__tar=false 95807fe5393cSmrg am__tar_=false 95817fe5393cSmrg am__untar=false 95827fe5393cSmrg ;; 95837fe5393cSmrg esac 9584b410ddbeSmrg 95857fe5393cSmrg # If the value was cached, stop now. We just wanted to have am__tar 95867fe5393cSmrg # and am__untar set. 95877fe5393cSmrg test -n "${am_cv_prog_tar_$1}" && break 9588b410ddbeSmrg 95897fe5393cSmrg # tar/untar a dummy directory, and stop if the command works 95907fe5393cSmrg rm -rf conftest.dir 95917fe5393cSmrg mkdir conftest.dir 95927fe5393cSmrg echo GrepMe > conftest.dir/file 95937fe5393cSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 95947fe5393cSmrg rm -rf conftest.dir 95957fe5393cSmrg if test -s conftest.tar; then 95967fe5393cSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 95977fe5393cSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 95987fe5393cSmrg fi 95997fe5393cSmrgdone 96007fe5393cSmrgrm -rf conftest.dir 9601b410ddbeSmrg 96027fe5393cSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 96037fe5393cSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 96047fe5393cSmrgAC_SUBST([am__tar]) 96057fe5393cSmrgAC_SUBST([am__untar]) 96067fe5393cSmrg]) # _AM_PROG_TAR 96077fe5393cSmrg 96087fe5393cSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 96097fe5393cSmrgdnl 96107fe5393cSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 96117fe5393cSmrgdnl 96127fe5393cSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 96137fe5393cSmrgdnl copy of this software and associated documentation files (the "Software"), 96147fe5393cSmrgdnl to deal in the Software without restriction, including without limitation 96157fe5393cSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 96167fe5393cSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 96177fe5393cSmrgdnl Software is furnished to do so, subject to the following conditions: 96187fe5393cSmrgdnl 96197fe5393cSmrgdnl The above copyright notice and this permission notice (including the next 96207fe5393cSmrgdnl paragraph) shall be included in all copies or substantial portions of the 96217fe5393cSmrgdnl Software. 96227fe5393cSmrgdnl 96237fe5393cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 96247fe5393cSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 96257fe5393cSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 96267fe5393cSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 96277fe5393cSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 96287fe5393cSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 96297fe5393cSmrgdnl DEALINGS IN THE SOFTWARE. 96307fe5393cSmrg 96317fe5393cSmrg# XORG_MACROS_VERSION(required-version) 96327fe5393cSmrg# ------------------------------------- 96337fe5393cSmrg# Minimum version: 1.1.0 9634b410ddbeSmrg# 96357fe5393cSmrg# If you're using a macro added in Version 1.1 or newer, include this in 96367fe5393cSmrg# your configure.ac with the minimum required version, such as: 96377fe5393cSmrg# XORG_MACROS_VERSION(1.1) 9638b4d38c65Smrg# 96397fe5393cSmrg# To ensure that this macro is defined, also add: 96407fe5393cSmrg# m4_ifndef([XORG_MACROS_VERSION], 96417fe5393cSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9642b4d38c65Smrg# 9643b4d38c65Smrg# 96447fe5393cSmrg# See the "minimum version" comment for each macro you use to see what 96457fe5393cSmrg# version you require. 96467fe5393cSmrgm4_defun([XORG_MACROS_VERSION],[ 96477fe5393cSmrgm4_define([vers_have], [1.17]) 96487fe5393cSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 96497fe5393cSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 96507fe5393cSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 96517fe5393cSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 96527fe5393cSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 96537fe5393cSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 96547fe5393cSmrgm4_undefine([vers_have]) 96557fe5393cSmrgm4_undefine([maj_have]) 96567fe5393cSmrgm4_undefine([maj_needed]) 96577fe5393cSmrg]) # XORG_MACROS_VERSION 9658b410ddbeSmrg 96597fe5393cSmrg# XORG_PROG_RAWCPP() 96607fe5393cSmrg# ------------------ 96617fe5393cSmrg# Minimum version: 1.0.0 9662b4d38c65Smrg# 96637fe5393cSmrg# Find cpp program and necessary flags for use in pre-processing text files 96647fe5393cSmrg# such as man pages and config files 96657fe5393cSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 96667fe5393cSmrgAC_REQUIRE([AC_PROG_CPP]) 96677fe5393cSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 96687fe5393cSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9669b534f209Smrg 96707fe5393cSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 96717fe5393cSmrg# which is not the best choice for supporting other OS'es, but covers most 96727fe5393cSmrg# of the ones we need for now. 96737fe5393cSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 96747fe5393cSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 96757fe5393cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 96767fe5393cSmrg AC_MSG_RESULT([no]) 96777fe5393cSmrgelse 96787fe5393cSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 96797fe5393cSmrg RAWCPPFLAGS=-undef 96807fe5393cSmrg AC_MSG_RESULT([yes]) 96817fe5393cSmrg # under Cygwin unix is still defined even with -undef 96827fe5393cSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 96837fe5393cSmrg RAWCPPFLAGS="-undef -ansi" 96847fe5393cSmrg AC_MSG_RESULT([yes, with -ansi]) 96857fe5393cSmrg else 96867fe5393cSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 96877fe5393cSmrg fi 9688b410ddbeSmrgfi 96897fe5393cSmrgrm -f conftest.$ac_ext 9690b534f209Smrg 96917fe5393cSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 96927fe5393cSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 96937fe5393cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 96947fe5393cSmrg AC_MSG_RESULT([no]) 96957fe5393cSmrgelse 96967fe5393cSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 96977fe5393cSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 96987fe5393cSmrg AC_MSG_RESULT([yes]) 96997fe5393cSmrg else 97007fe5393cSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 97017fe5393cSmrg fi 9702b4d38c65Smrgfi 97037fe5393cSmrgrm -f conftest.$ac_ext 97047fe5393cSmrgAC_SUBST(RAWCPPFLAGS) 97057fe5393cSmrg]) # XORG_PROG_RAWCPP 9706b534f209Smrg 97077fe5393cSmrg# XORG_MANPAGE_SECTIONS() 97087fe5393cSmrg# ----------------------- 97097fe5393cSmrg# Minimum version: 1.0.0 97107fe5393cSmrg# 97117fe5393cSmrg# Determine which sections man pages go in for the different man page types 97127fe5393cSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 97137fe5393cSmrg# Not sure if there's any better way than just hardcoding by OS name. 97147fe5393cSmrg# Override default settings by setting environment variables 97157fe5393cSmrg# Added MAN_SUBSTS in version 1.8 97167fe5393cSmrg# Added AC_PROG_SED in version 1.8 97177fe5393cSmrg 97187fe5393cSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 97197fe5393cSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 97207fe5393cSmrgAC_REQUIRE([AC_PROG_SED]) 97217fe5393cSmrg 97227fe5393cSmrgif test x$APP_MAN_SUFFIX = x ; then 97237fe5393cSmrg APP_MAN_SUFFIX=1 97247fe5393cSmrgfi 97257fe5393cSmrgif test x$APP_MAN_DIR = x ; then 97267fe5393cSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9727b4d38c65Smrgfi 9728b534f209Smrg 97297fe5393cSmrgif test x$LIB_MAN_SUFFIX = x ; then 97307fe5393cSmrg LIB_MAN_SUFFIX=3 97317fe5393cSmrgfi 97327fe5393cSmrgif test x$LIB_MAN_DIR = x ; then 97337fe5393cSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9734b4d38c65Smrgfi 9735b534f209Smrg 97367fe5393cSmrgif test x$FILE_MAN_SUFFIX = x ; then 97377fe5393cSmrg case $host_os in 97387fe5393cSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 97397fe5393cSmrg *) FILE_MAN_SUFFIX=5 ;; 97407fe5393cSmrg esac 97417fe5393cSmrgfi 97427fe5393cSmrgif test x$FILE_MAN_DIR = x ; then 97437fe5393cSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 97447fe5393cSmrgfi 9745b534f209Smrg 97467fe5393cSmrgif test x$MISC_MAN_SUFFIX = x ; then 97477fe5393cSmrg case $host_os in 97487fe5393cSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 97497fe5393cSmrg *) MISC_MAN_SUFFIX=7 ;; 97507fe5393cSmrg esac 97517fe5393cSmrgfi 97527fe5393cSmrgif test x$MISC_MAN_DIR = x ; then 97537fe5393cSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9754b410ddbeSmrgfi 9755b534f209Smrg 97567fe5393cSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 97577fe5393cSmrg case $host_os in 97587fe5393cSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 97597fe5393cSmrg *) DRIVER_MAN_SUFFIX=4 ;; 97607fe5393cSmrg esac 97617fe5393cSmrgfi 97627fe5393cSmrgif test x$DRIVER_MAN_DIR = x ; then 97637fe5393cSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 976483cab373Smrgfi 976515fb4814Smrg 97667fe5393cSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 97677fe5393cSmrg case $host_os in 97687fe5393cSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 97697fe5393cSmrg *) ADMIN_MAN_SUFFIX=8 ;; 97707fe5393cSmrg esac 97717fe5393cSmrgfi 97727fe5393cSmrgif test x$ADMIN_MAN_DIR = x ; then 97737fe5393cSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 97747fe5393cSmrgfi 9775b534f209Smrg 9776b534f209Smrg 97777fe5393cSmrgAC_SUBST([APP_MAN_SUFFIX]) 97787fe5393cSmrgAC_SUBST([LIB_MAN_SUFFIX]) 97797fe5393cSmrgAC_SUBST([FILE_MAN_SUFFIX]) 97807fe5393cSmrgAC_SUBST([MISC_MAN_SUFFIX]) 97817fe5393cSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 97827fe5393cSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 97837fe5393cSmrgAC_SUBST([APP_MAN_DIR]) 97847fe5393cSmrgAC_SUBST([LIB_MAN_DIR]) 97857fe5393cSmrgAC_SUBST([FILE_MAN_DIR]) 97867fe5393cSmrgAC_SUBST([MISC_MAN_DIR]) 97877fe5393cSmrgAC_SUBST([DRIVER_MAN_DIR]) 97887fe5393cSmrgAC_SUBST([ADMIN_MAN_DIR]) 9789b534f209Smrg 97907fe5393cSmrgXORG_MAN_PAGE="X Version 11" 97917fe5393cSmrgAC_SUBST([XORG_MAN_PAGE]) 97927fe5393cSmrgMAN_SUBSTS="\ 97937fe5393cSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 97947fe5393cSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 97957fe5393cSmrg -e 's|__xservername__|Xorg|g' \ 97967fe5393cSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 97977fe5393cSmrg -e 's|__projectroot__|\$(prefix)|g' \ 97987fe5393cSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 97997fe5393cSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 98007fe5393cSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 98017fe5393cSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 98027fe5393cSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 98037fe5393cSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 98047fe5393cSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 98057fe5393cSmrgAC_SUBST([MAN_SUBSTS]) 9806b534f209Smrg 98077fe5393cSmrg]) # XORG_MANPAGE_SECTIONS 9808b534f209Smrg 98097fe5393cSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 98107fe5393cSmrg# ------------------------ 98117fe5393cSmrg# Minimum version: 1.7.0 9812b4d38c65Smrg# 98137fe5393cSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 98147fe5393cSmrg# provided by xorg-sgml-doctools, if installed. 98157fe5393cSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 98167fe5393cSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 98177fe5393cSmrgXORG_SGML_PATH= 98187fe5393cSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 98197fe5393cSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 98207fe5393cSmrg [m4_ifval([$1],[:], 98217fe5393cSmrg [if test x"$cross_compiling" != x"yes" ; then 98227fe5393cSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 98237fe5393cSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 98247fe5393cSmrg fi]) 98257fe5393cSmrg ]) 9826b534f209Smrg 98277fe5393cSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 98287fe5393cSmrg# the path and the name of the doc stylesheet 98297fe5393cSmrgif test "x$XORG_SGML_PATH" != "x" ; then 98307fe5393cSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 98317fe5393cSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 98327fe5393cSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9833b4d38c65Smrgelse 98347fe5393cSmrg AC_MSG_RESULT([no]) 9835b4d38c65Smrgfi 9836b410ddbeSmrg 98377fe5393cSmrgAC_SUBST(XORG_SGML_PATH) 98387fe5393cSmrgAC_SUBST(STYLESHEET_SRCDIR) 98397fe5393cSmrgAC_SUBST(XSL_STYLESHEET) 98407fe5393cSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 98417fe5393cSmrg]) # XORG_CHECK_SGML_DOCTOOLS 9842b534f209Smrg 98437fe5393cSmrg# XORG_CHECK_LINUXDOC 98447fe5393cSmrg# ------------------- 98457fe5393cSmrg# Minimum version: 1.0.0 9846b4d38c65Smrg# 98477fe5393cSmrg# Defines the variable MAKE_TEXT if the necessary tools and 98487fe5393cSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 98497fe5393cSmrg# Whether or not the necessary tools and files are found can be checked 98507fe5393cSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 98517fe5393cSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 98527fe5393cSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 98537fe5393cSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9854b534f209Smrg 98557fe5393cSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 985615fb4814Smrg 98577fe5393cSmrgAC_MSG_CHECKING([whether to build documentation]) 9858b4d38c65Smrg 98597fe5393cSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 98607fe5393cSmrg BUILDDOC=yes 9861b534f209Smrgelse 98627fe5393cSmrg BUILDDOC=no 986315fb4814Smrgfi 9864b410ddbeSmrg 98657fe5393cSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9866b4d38c65Smrg 98677fe5393cSmrgAC_MSG_RESULT([$BUILDDOC]) 9868b4d38c65Smrg 98697fe5393cSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9870b4d38c65Smrg 98717fe5393cSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 98727fe5393cSmrg BUILDPDFDOC=yes 98737fe5393cSmrgelse 98747fe5393cSmrg BUILDPDFDOC=no 98757fe5393cSmrgfi 9876b410ddbeSmrg 98777fe5393cSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9878b4d38c65Smrg 98797fe5393cSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9880de78e416Smrg 98817fe5393cSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 98827fe5393cSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 98837fe5393cSmrgMAKE_PDF="$PS2PDF" 98847fe5393cSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9885b4d38c65Smrg 98867fe5393cSmrgAC_SUBST(MAKE_TEXT) 98877fe5393cSmrgAC_SUBST(MAKE_PS) 98887fe5393cSmrgAC_SUBST(MAKE_PDF) 98897fe5393cSmrgAC_SUBST(MAKE_HTML) 98907fe5393cSmrg]) # XORG_CHECK_LINUXDOC 9891b4d38c65Smrg 98927fe5393cSmrg# XORG_CHECK_DOCBOOK 9893b4d38c65Smrg# ------------------- 98947fe5393cSmrg# Minimum version: 1.0.0 9895b4d38c65Smrg# 98967fe5393cSmrg# Checks for the ability to build output formats from SGML DocBook source. 98977fe5393cSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 98987fe5393cSmrg# indicates whether the necessary tools and files are found and, if set, 98997fe5393cSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 99007fe5393cSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 99017fe5393cSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9902b4d38c65Smrg 99037fe5393cSmrgBUILDTXTDOC=no 99047fe5393cSmrgBUILDPDFDOC=no 99057fe5393cSmrgBUILDPSDOC=no 99067fe5393cSmrgBUILDHTMLDOC=no 9907de78e416Smrg 99087fe5393cSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 99097fe5393cSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 99107fe5393cSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 99117fe5393cSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9912b4d38c65Smrg 99137fe5393cSmrgAC_MSG_CHECKING([whether to build text documentation]) 99147fe5393cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 99157fe5393cSmrg test x$BUILD_TXTDOC != xno; then 99167fe5393cSmrg BUILDTXTDOC=yes 9917b4d38c65Smrgfi 99187fe5393cSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 99197fe5393cSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9920de78e416Smrg 99217fe5393cSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 99227fe5393cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 99237fe5393cSmrg test x$BUILD_PDFDOC != xno; then 99247fe5393cSmrg BUILDPDFDOC=yes 9925b4d38c65Smrgfi 99267fe5393cSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 99277fe5393cSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9928b410ddbeSmrg 99297fe5393cSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 99307fe5393cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 99317fe5393cSmrg test x$BUILD_PSDOC != xno; then 99327fe5393cSmrg BUILDPSDOC=yes 99337fe5393cSmrgfi 99347fe5393cSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 99357fe5393cSmrgAC_MSG_RESULT([$BUILDPSDOC]) 9936b4d38c65Smrg 99377fe5393cSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 99387fe5393cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 99397fe5393cSmrg test x$BUILD_HTMLDOC != xno; then 99407fe5393cSmrg BUILDHTMLDOC=yes 99417fe5393cSmrgfi 99427fe5393cSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 99437fe5393cSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9944b4d38c65Smrg 99457fe5393cSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 99467fe5393cSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 99477fe5393cSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 99487fe5393cSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9949b4d38c65Smrg 99507fe5393cSmrgAC_SUBST(MAKE_TEXT) 99517fe5393cSmrgAC_SUBST(MAKE_PS) 99527fe5393cSmrgAC_SUBST(MAKE_PDF) 99537fe5393cSmrgAC_SUBST(MAKE_HTML) 99547fe5393cSmrg]) # XORG_CHECK_DOCBOOK 9955b410ddbeSmrg 99567fe5393cSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 99577fe5393cSmrg# ---------------- 99587fe5393cSmrg# Minimum version: 1.5.0 99597fe5393cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9960b534f209Smrg# 99617fe5393cSmrg# Documentation tools are not always available on all platforms and sometimes 99627fe5393cSmrg# not at the appropriate level. This macro enables a module to test for the 99637fe5393cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 99647fe5393cSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 99657fe5393cSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 99667fe5393cSmrg# --with-xmlto assumes 'auto'. 9967b534f209Smrg# 99687fe5393cSmrg# Interface to module: 99697fe5393cSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 99707fe5393cSmrg# XMLTO: returns the path of the xmlto program found 99717fe5393cSmrg# returns the path set by the user in the environment 99727fe5393cSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 99737fe5393cSmrg# 'no' user instructs the module not to use xmlto 9974b4d38c65Smrg# 99757fe5393cSmrg# Added in version 1.10.0 99767fe5393cSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 99777fe5393cSmrg# xmlto for text output requires either lynx, links, or w3m browsers 99787fe5393cSmrg# 99797fe5393cSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 99807fe5393cSmrg# 99817fe5393cSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 99827fe5393cSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 99837fe5393cSmrgm4_define([_defopt], m4_default([$2], [auto])) 99847fe5393cSmrgAC_ARG_WITH(xmlto, 99857fe5393cSmrg AS_HELP_STRING([--with-xmlto], 99867fe5393cSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 99877fe5393cSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 99887fe5393cSmrgm4_undefine([_defopt]) 9989b4d38c65Smrg 99907fe5393cSmrgif test "x$use_xmlto" = x"auto"; then 99917fe5393cSmrg AC_PATH_PROG([XMLTO], [xmlto]) 99927fe5393cSmrg if test "x$XMLTO" = "x"; then 99937fe5393cSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 99947fe5393cSmrg have_xmlto=no 99957fe5393cSmrg else 99967fe5393cSmrg have_xmlto=yes 99977fe5393cSmrg fi 99987fe5393cSmrgelif test "x$use_xmlto" = x"yes" ; then 99997fe5393cSmrg AC_PATH_PROG([XMLTO], [xmlto]) 100007fe5393cSmrg if test "x$XMLTO" = "x"; then 100017fe5393cSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 100027fe5393cSmrg fi 100037fe5393cSmrg have_xmlto=yes 100047fe5393cSmrgelif test "x$use_xmlto" = x"no" ; then 100057fe5393cSmrg if test "x$XMLTO" != "x"; then 100067fe5393cSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 100077fe5393cSmrg fi 100087fe5393cSmrg have_xmlto=no 10009b4d38c65Smrgelse 100107fe5393cSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10011b4d38c65Smrgfi 10012de78e416Smrg 100137fe5393cSmrg# Test for a minimum version of xmlto, if provided. 100147fe5393cSmrgm4_ifval([$1], 100157fe5393cSmrg[if test "$have_xmlto" = yes; then 100167fe5393cSmrg # scrape the xmlto version 100177fe5393cSmrg AC_MSG_CHECKING([the xmlto version]) 100187fe5393cSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 100197fe5393cSmrg AC_MSG_RESULT([$xmlto_version]) 100207fe5393cSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 100217fe5393cSmrg [if test "x$use_xmlto" = xauto; then 100227fe5393cSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 100237fe5393cSmrg have_xmlto=no 100247fe5393cSmrg else 100257fe5393cSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 100267fe5393cSmrg fi]) 100277fe5393cSmrgfi]) 10028de78e416Smrg 100297fe5393cSmrg# Test for the ability of xmlto to generate a text target 100307fe5393cSmrghave_xmlto_text=no 100317fe5393cSmrgcat > conftest.xml << "EOF" 100327fe5393cSmrgEOF 100337fe5393cSmrgAS_IF([test "$have_xmlto" = yes], 100347fe5393cSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 100357fe5393cSmrg [have_xmlto_text=yes], 100367fe5393cSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 100377fe5393cSmrgrm -f conftest.xml 100387fe5393cSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 100397fe5393cSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 100407fe5393cSmrg]) # XORG_WITH_XMLTO 10041b4d38c65Smrg 100427fe5393cSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 100437fe5393cSmrg# -------------------------------------------- 100447fe5393cSmrg# Minimum version: 1.12.0 100457fe5393cSmrg# Minimum version for optional DEFAULT argument: 1.12.0 100467fe5393cSmrg# 100477fe5393cSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 100487fe5393cSmrg# XML-based language used for the transformation of XML documents. 100497fe5393cSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 100507fe5393cSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 100517fe5393cSmrg# The XSLT processor is often used as a standalone tool for transformations. 100527fe5393cSmrg# It should not be assumed that this tool is used only to work with documnetation. 100537fe5393cSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 100547fe5393cSmrg# 100557fe5393cSmrg# Interface to module: 100567fe5393cSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 100577fe5393cSmrg# XSLTPROC: returns the path of the xsltproc program found 100587fe5393cSmrg# returns the path set by the user in the environment 100597fe5393cSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 100607fe5393cSmrg# 'no' user instructs the module not to use xsltproc 100617fe5393cSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 100627fe5393cSmrg# 100637fe5393cSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 100647fe5393cSmrg# 100657fe5393cSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 100667fe5393cSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 100677fe5393cSmrg# Preserves the interface, should it be implemented later 100687fe5393cSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 100697fe5393cSmrgm4_define([_defopt], m4_default([$2], [auto])) 100707fe5393cSmrgAC_ARG_WITH(xsltproc, 100717fe5393cSmrg AS_HELP_STRING([--with-xsltproc], 100727fe5393cSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 100737fe5393cSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 100747fe5393cSmrgm4_undefine([_defopt]) 10075b4d38c65Smrg 100767fe5393cSmrgif test "x$use_xsltproc" = x"auto"; then 100777fe5393cSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 100787fe5393cSmrg if test "x$XSLTPROC" = "x"; then 100797fe5393cSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 100807fe5393cSmrg have_xsltproc=no 100817fe5393cSmrg else 100827fe5393cSmrg have_xsltproc=yes 100837fe5393cSmrg fi 100847fe5393cSmrgelif test "x$use_xsltproc" = x"yes" ; then 100857fe5393cSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 100867fe5393cSmrg if test "x$XSLTPROC" = "x"; then 100877fe5393cSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 100887fe5393cSmrg fi 100897fe5393cSmrg have_xsltproc=yes 100907fe5393cSmrgelif test "x$use_xsltproc" = x"no" ; then 100917fe5393cSmrg if test "x$XSLTPROC" != "x"; then 100927fe5393cSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 100937fe5393cSmrg fi 100947fe5393cSmrg have_xsltproc=no 10095b4d38c65Smrgelse 100967fe5393cSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10097b4d38c65Smrgfi 10098de78e416Smrg 100997fe5393cSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 101007fe5393cSmrg]) # XORG_WITH_XSLTPROC 10101b534f209Smrg 101027fe5393cSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 101037fe5393cSmrg# ---------------------------------------- 101047fe5393cSmrg# Minimum version: 1.15.0 1010583cab373Smrg# 101067fe5393cSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 101077fe5393cSmrg# scanning arbitrary text files, extracting information from those text files, 101087fe5393cSmrg# and printing reports based on that information. 1010983cab373Smrg# 101107fe5393cSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 10111b410ddbeSmrg# 101127fe5393cSmrg# Interface to module: 101137fe5393cSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 101147fe5393cSmrg# PERL: returns the path of the perl program found 101157fe5393cSmrg# returns the path set by the user in the environment 101167fe5393cSmrg# --with-perl: 'yes' user instructs the module to use perl 101177fe5393cSmrg# 'no' user instructs the module not to use perl 101187fe5393cSmrg# have_perl: returns yes if perl found in PATH or no 1011983cab373Smrg# 101207fe5393cSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 10121b4d38c65Smrg# 101227fe5393cSmrgAC_DEFUN([XORG_WITH_PERL],[ 101237fe5393cSmrgAC_ARG_VAR([PERL], [Path to perl command]) 101247fe5393cSmrg# Preserves the interface, should it be implemented later 101257fe5393cSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 101267fe5393cSmrgm4_define([_defopt], m4_default([$2], [auto])) 101277fe5393cSmrgAC_ARG_WITH(perl, 101287fe5393cSmrg AS_HELP_STRING([--with-perl], 101297fe5393cSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 101307fe5393cSmrg [use_perl=$withval], [use_perl=]_defopt) 101317fe5393cSmrgm4_undefine([_defopt]) 10132de78e416Smrg 101337fe5393cSmrgif test "x$use_perl" = x"auto"; then 101347fe5393cSmrg AC_PATH_PROG([PERL], [perl]) 101357fe5393cSmrg if test "x$PERL" = "x"; then 101367fe5393cSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 101377fe5393cSmrg have_perl=no 101387fe5393cSmrg else 101397fe5393cSmrg have_perl=yes 101407fe5393cSmrg fi 101417fe5393cSmrgelif test "x$use_perl" = x"yes" ; then 101427fe5393cSmrg AC_PATH_PROG([PERL], [perl]) 101437fe5393cSmrg if test "x$PERL" = "x"; then 101447fe5393cSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 101457fe5393cSmrg fi 101467fe5393cSmrg have_perl=yes 101477fe5393cSmrgelif test "x$use_perl" = x"no" ; then 101487fe5393cSmrg if test "x$PERL" != "x"; then 101497fe5393cSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 101507fe5393cSmrg fi 101517fe5393cSmrg have_perl=no 101527fe5393cSmrgelse 101537fe5393cSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 10154b534f209Smrgfi 10155de78e416Smrg 101567fe5393cSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 101577fe5393cSmrg]) # XORG_WITH_PERL 10158de78e416Smrg 101597fe5393cSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10160b4d38c65Smrg# ---------------- 101617fe5393cSmrg# Minimum version: 1.5.0 101627fe5393cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1016383cab373Smrg# 101647fe5393cSmrg# Documentation tools are not always available on all platforms and sometimes 101657fe5393cSmrg# not at the appropriate level. This macro enables a module to test for the 101667fe5393cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 101677fe5393cSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 101687fe5393cSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 101697fe5393cSmrg# --with-asciidoc assumes 'auto'. 10170b4d38c65Smrg# 101717fe5393cSmrg# Interface to module: 101727fe5393cSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 101737fe5393cSmrg# ASCIIDOC: returns the path of the asciidoc program found 101747fe5393cSmrg# returns the path set by the user in the environment 101757fe5393cSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 101767fe5393cSmrg# 'no' user instructs the module not to use asciidoc 10177b4d38c65Smrg# 101787fe5393cSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10179b4d38c65Smrg# 101807fe5393cSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 101817fe5393cSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 101827fe5393cSmrgm4_define([_defopt], m4_default([$2], [auto])) 101837fe5393cSmrgAC_ARG_WITH(asciidoc, 101847fe5393cSmrg AS_HELP_STRING([--with-asciidoc], 101857fe5393cSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 101867fe5393cSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 101877fe5393cSmrgm4_undefine([_defopt]) 10188de78e416Smrg 101897fe5393cSmrgif test "x$use_asciidoc" = x"auto"; then 101907fe5393cSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 101917fe5393cSmrg if test "x$ASCIIDOC" = "x"; then 101927fe5393cSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 101937fe5393cSmrg have_asciidoc=no 101947fe5393cSmrg else 101957fe5393cSmrg have_asciidoc=yes 101967fe5393cSmrg fi 101977fe5393cSmrgelif test "x$use_asciidoc" = x"yes" ; then 101987fe5393cSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 101997fe5393cSmrg if test "x$ASCIIDOC" = "x"; then 102007fe5393cSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 102017fe5393cSmrg fi 102027fe5393cSmrg have_asciidoc=yes 102037fe5393cSmrgelif test "x$use_asciidoc" = x"no" ; then 102047fe5393cSmrg if test "x$ASCIIDOC" != "x"; then 102057fe5393cSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 102067fe5393cSmrg fi 102077fe5393cSmrg have_asciidoc=no 102087fe5393cSmrgelse 102097fe5393cSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 102107fe5393cSmrgfi 102117fe5393cSmrgm4_ifval([$1], 102127fe5393cSmrg[if test "$have_asciidoc" = yes; then 102137fe5393cSmrg # scrape the asciidoc version 102147fe5393cSmrg AC_MSG_CHECKING([the asciidoc version]) 102157fe5393cSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 102167fe5393cSmrg AC_MSG_RESULT([$asciidoc_version]) 102177fe5393cSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 102187fe5393cSmrg [if test "x$use_asciidoc" = xauto; then 102197fe5393cSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 102207fe5393cSmrg have_asciidoc=no 102217fe5393cSmrg else 102227fe5393cSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 102237fe5393cSmrg fi]) 102247fe5393cSmrgfi]) 102257fe5393cSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 102267fe5393cSmrg]) # XORG_WITH_ASCIIDOC 10227de78e416Smrg 102287fe5393cSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 102297fe5393cSmrg# -------------------------------- 102307fe5393cSmrg# Minimum version: 1.5.0 102317fe5393cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10232b4d38c65Smrg# 102337fe5393cSmrg# Documentation tools are not always available on all platforms and sometimes 102347fe5393cSmrg# not at the appropriate level. This macro enables a module to test for the 102357fe5393cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 102367fe5393cSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 102377fe5393cSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 102387fe5393cSmrg# --with-doxygen assumes 'auto'. 10239b4d38c65Smrg# 102407fe5393cSmrg# Interface to module: 102417fe5393cSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 102427fe5393cSmrg# DOXYGEN: returns the path of the doxygen program found 102437fe5393cSmrg# returns the path set by the user in the environment 102447fe5393cSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 102457fe5393cSmrg# 'no' user instructs the module not to use doxygen 102467fe5393cSmrg# 102477fe5393cSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 102487fe5393cSmrg# 102497fe5393cSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 102507fe5393cSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 102517fe5393cSmrgm4_define([_defopt], m4_default([$2], [auto])) 102527fe5393cSmrgAC_ARG_WITH(doxygen, 102537fe5393cSmrg AS_HELP_STRING([--with-doxygen], 102547fe5393cSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 102557fe5393cSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 102567fe5393cSmrgm4_undefine([_defopt]) 1025715fb4814Smrg 102587fe5393cSmrgif test "x$use_doxygen" = x"auto"; then 102597fe5393cSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 102607fe5393cSmrg if test "x$DOXYGEN" = "x"; then 102617fe5393cSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 102627fe5393cSmrg have_doxygen=no 102637fe5393cSmrg else 102647fe5393cSmrg have_doxygen=yes 102657fe5393cSmrg fi 102667fe5393cSmrgelif test "x$use_doxygen" = x"yes" ; then 102677fe5393cSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 102687fe5393cSmrg if test "x$DOXYGEN" = "x"; then 102697fe5393cSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 102707fe5393cSmrg fi 102717fe5393cSmrg have_doxygen=yes 102727fe5393cSmrgelif test "x$use_doxygen" = x"no" ; then 102737fe5393cSmrg if test "x$DOXYGEN" != "x"; then 102747fe5393cSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 102757fe5393cSmrg fi 102767fe5393cSmrg have_doxygen=no 102777fe5393cSmrgelse 102787fe5393cSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 102797fe5393cSmrgfi 102807fe5393cSmrgm4_ifval([$1], 102817fe5393cSmrg[if test "$have_doxygen" = yes; then 102827fe5393cSmrg # scrape the doxygen version 102837fe5393cSmrg AC_MSG_CHECKING([the doxygen version]) 102847fe5393cSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 102857fe5393cSmrg AC_MSG_RESULT([$doxygen_version]) 102867fe5393cSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 102877fe5393cSmrg [if test "x$use_doxygen" = xauto; then 102887fe5393cSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 102897fe5393cSmrg have_doxygen=no 102907fe5393cSmrg else 102917fe5393cSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 102927fe5393cSmrg fi]) 102937fe5393cSmrgfi]) 102947fe5393cSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 102957fe5393cSmrg]) # XORG_WITH_DOXYGEN 1029683cab373Smrg 102977fe5393cSmrg# XORG_WITH_GROFF([DEFAULT]) 102987fe5393cSmrg# ---------------- 102997fe5393cSmrg# Minimum version: 1.6.0 103007fe5393cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10301b4d38c65Smrg# 103027fe5393cSmrg# Documentation tools are not always available on all platforms and sometimes 103037fe5393cSmrg# not at the appropriate level. This macro enables a module to test for the 103047fe5393cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 103057fe5393cSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 103067fe5393cSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 103077fe5393cSmrg# --with-groff assumes 'auto'. 10308b4d38c65Smrg# 103097fe5393cSmrg# Interface to module: 103107fe5393cSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 103117fe5393cSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 103127fe5393cSmrg# HAVE_GROFF_MS: the -ms macros package 103137fe5393cSmrg# GROFF: returns the path of the groff program found 103147fe5393cSmrg# returns the path set by the user in the environment 103157fe5393cSmrg# --with-groff: 'yes' user instructs the module to use groff 103167fe5393cSmrg# 'no' user instructs the module not to use groff 10317b4d38c65Smrg# 103187fe5393cSmrg# Added in version 1.9.0: 103197fe5393cSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 103207fe5393cSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 103217fe5393cSmrg# psselect from the psutils package. 103227fe5393cSmrg# the ghostcript package. Refer to the grohtml man pages 10323b4d38c65Smrg# 103247fe5393cSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10325b4d38c65Smrg# 103267fe5393cSmrg# OS and distros often splits groff in a basic and full package, the former 103277fe5393cSmrg# having the groff program and the later having devices, fonts and macros 103287fe5393cSmrg# Checking for the groff executable is not enough. 10329b534f209Smrg# 103307fe5393cSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 103317fe5393cSmrg# unset HAVE_GROFF or GROFF env variables. 103327fe5393cSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10333b534f209Smrg# 103347fe5393cSmrgAC_DEFUN([XORG_WITH_GROFF],[ 103357fe5393cSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 103367fe5393cSmrgm4_define([_defopt], m4_default([$1], [auto])) 103377fe5393cSmrgAC_ARG_WITH(groff, 103387fe5393cSmrg AS_HELP_STRING([--with-groff], 103397fe5393cSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 103407fe5393cSmrg [use_groff=$withval], [use_groff=]_defopt) 103417fe5393cSmrgm4_undefine([_defopt]) 1034283cab373Smrg 103437fe5393cSmrgif test "x$use_groff" = x"auto"; then 103447fe5393cSmrg AC_PATH_PROG([GROFF], [groff]) 103457fe5393cSmrg if test "x$GROFF" = "x"; then 103467fe5393cSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 103477fe5393cSmrg have_groff=no 103487fe5393cSmrg else 103497fe5393cSmrg have_groff=yes 103507fe5393cSmrg fi 103517fe5393cSmrgelif test "x$use_groff" = x"yes" ; then 103527fe5393cSmrg AC_PATH_PROG([GROFF], [groff]) 103537fe5393cSmrg if test "x$GROFF" = "x"; then 103547fe5393cSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 103557fe5393cSmrg fi 103567fe5393cSmrg have_groff=yes 103577fe5393cSmrgelif test "x$use_groff" = x"no" ; then 103587fe5393cSmrg if test "x$GROFF" != "x"; then 103597fe5393cSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 103607fe5393cSmrg fi 103617fe5393cSmrg have_groff=no 103627fe5393cSmrgelse 103637fe5393cSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 103647fe5393cSmrgfi 1036583cab373Smrg 103667fe5393cSmrg# We have groff, test for the presence of the macro packages 103677fe5393cSmrgif test "x$have_groff" = x"yes"; then 103687fe5393cSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 103697fe5393cSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 103707fe5393cSmrg groff_ms_works=yes 103717fe5393cSmrg else 103727fe5393cSmrg groff_ms_works=no 103737fe5393cSmrg fi 103747fe5393cSmrg AC_MSG_RESULT([$groff_ms_works]) 103757fe5393cSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 103767fe5393cSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 103777fe5393cSmrg groff_mm_works=yes 103787fe5393cSmrg else 103797fe5393cSmrg groff_mm_works=no 103807fe5393cSmrg fi 103817fe5393cSmrg AC_MSG_RESULT([$groff_mm_works]) 103827fe5393cSmrgfi 10383b534f209Smrg 103847fe5393cSmrg# We have groff, test for HTML dependencies, one command per package 103857fe5393cSmrgif test "x$have_groff" = x"yes"; then 103867fe5393cSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 103877fe5393cSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 103887fe5393cSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 103897fe5393cSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 103907fe5393cSmrg have_groff_html=yes 103917fe5393cSmrg else 103927fe5393cSmrg have_groff_html=no 103937fe5393cSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 103947fe5393cSmrg fi 103957fe5393cSmrgfi 10396b4d38c65Smrg 103977fe5393cSmrg# Set Automake conditionals for Makefiles 103987fe5393cSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 103997fe5393cSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 104007fe5393cSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 104017fe5393cSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 104027fe5393cSmrg]) # XORG_WITH_GROFF 10403b4d38c65Smrg 104047fe5393cSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 104057fe5393cSmrg# --------------------------------------- 104067fe5393cSmrg# Minimum version: 1.6.0 104077fe5393cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 104087fe5393cSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 104097fe5393cSmrg# 104107fe5393cSmrg# Documentation tools are not always available on all platforms and sometimes 104117fe5393cSmrg# not at the appropriate level. This macro enables a module to test for the 104127fe5393cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 104137fe5393cSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 104147fe5393cSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 104157fe5393cSmrg# --with-fop assumes 'auto'. 104167fe5393cSmrg# 104177fe5393cSmrg# Interface to module: 104187fe5393cSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 104197fe5393cSmrg# FOP: returns the path of the fop program found 104207fe5393cSmrg# returns the path set by the user in the environment 104217fe5393cSmrg# --with-fop: 'yes' user instructs the module to use fop 104227fe5393cSmrg# 'no' user instructs the module not to use fop 104237fe5393cSmrg# 104247fe5393cSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 104257fe5393cSmrg# 104267fe5393cSmrgAC_DEFUN([XORG_WITH_FOP],[ 104277fe5393cSmrgAC_ARG_VAR([FOP], [Path to fop command]) 104287fe5393cSmrgm4_define([_defopt], m4_default([$2], [auto])) 104297fe5393cSmrgAC_ARG_WITH(fop, 104307fe5393cSmrg AS_HELP_STRING([--with-fop], 104317fe5393cSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 104327fe5393cSmrg [use_fop=$withval], [use_fop=]_defopt) 104337fe5393cSmrgm4_undefine([_defopt]) 10434b4d38c65Smrg 104357fe5393cSmrgif test "x$use_fop" = x"auto"; then 104367fe5393cSmrg AC_PATH_PROG([FOP], [fop]) 104377fe5393cSmrg if test "x$FOP" = "x"; then 104387fe5393cSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 104397fe5393cSmrg have_fop=no 104407fe5393cSmrg else 104417fe5393cSmrg have_fop=yes 104427fe5393cSmrg fi 104437fe5393cSmrgelif test "x$use_fop" = x"yes" ; then 104447fe5393cSmrg AC_PATH_PROG([FOP], [fop]) 104457fe5393cSmrg if test "x$FOP" = "x"; then 104467fe5393cSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 104477fe5393cSmrg fi 104487fe5393cSmrg have_fop=yes 104497fe5393cSmrgelif test "x$use_fop" = x"no" ; then 104507fe5393cSmrg if test "x$FOP" != "x"; then 104517fe5393cSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 104527fe5393cSmrg fi 104537fe5393cSmrg have_fop=no 10454b534f209Smrgelse 104557fe5393cSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1045683cab373Smrgfi 1045783cab373Smrg 104587fe5393cSmrg# Test for a minimum version of fop, if provided. 104597fe5393cSmrgm4_ifval([$1], 104607fe5393cSmrg[if test "$have_fop" = yes; then 104617fe5393cSmrg # scrape the fop version 104627fe5393cSmrg AC_MSG_CHECKING([for fop minimum version]) 104637fe5393cSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 104647fe5393cSmrg AC_MSG_RESULT([$fop_version]) 104657fe5393cSmrg AS_VERSION_COMPARE([$fop_version], [$1], 104667fe5393cSmrg [if test "x$use_fop" = xauto; then 104677fe5393cSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 104687fe5393cSmrg have_fop=no 104697fe5393cSmrg else 104707fe5393cSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 104717fe5393cSmrg fi]) 104727fe5393cSmrgfi]) 104737fe5393cSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 104747fe5393cSmrg]) # XORG_WITH_FOP 1047583cab373Smrg 104767fe5393cSmrg# XORG_WITH_PS2PDF([DEFAULT]) 104777fe5393cSmrg# ---------------- 104787fe5393cSmrg# Minimum version: 1.6.0 104797fe5393cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 104807fe5393cSmrg# 104817fe5393cSmrg# Documentation tools are not always available on all platforms and sometimes 104827fe5393cSmrg# not at the appropriate level. This macro enables a module to test for the 104837fe5393cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 104847fe5393cSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 104857fe5393cSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 104867fe5393cSmrg# --with-ps2pdf assumes 'auto'. 104877fe5393cSmrg# 104887fe5393cSmrg# Interface to module: 104897fe5393cSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 104907fe5393cSmrg# PS2PDF: returns the path of the ps2pdf program found 104917fe5393cSmrg# returns the path set by the user in the environment 104927fe5393cSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 104937fe5393cSmrg# 'no' user instructs the module not to use ps2pdf 104947fe5393cSmrg# 104957fe5393cSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 104967fe5393cSmrg# 104977fe5393cSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 104987fe5393cSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 104997fe5393cSmrgm4_define([_defopt], m4_default([$1], [auto])) 105007fe5393cSmrgAC_ARG_WITH(ps2pdf, 105017fe5393cSmrg AS_HELP_STRING([--with-ps2pdf], 105027fe5393cSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 105037fe5393cSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 105047fe5393cSmrgm4_undefine([_defopt]) 10505b4d38c65Smrg 105067fe5393cSmrgif test "x$use_ps2pdf" = x"auto"; then 105077fe5393cSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 105087fe5393cSmrg if test "x$PS2PDF" = "x"; then 105097fe5393cSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 105107fe5393cSmrg have_ps2pdf=no 105117fe5393cSmrg else 105127fe5393cSmrg have_ps2pdf=yes 105137fe5393cSmrg fi 105147fe5393cSmrgelif test "x$use_ps2pdf" = x"yes" ; then 105157fe5393cSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 105167fe5393cSmrg if test "x$PS2PDF" = "x"; then 105177fe5393cSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 105187fe5393cSmrg fi 105197fe5393cSmrg have_ps2pdf=yes 105207fe5393cSmrgelif test "x$use_ps2pdf" = x"no" ; then 105217fe5393cSmrg if test "x$PS2PDF" != "x"; then 105227fe5393cSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 105237fe5393cSmrg fi 105247fe5393cSmrg have_ps2pdf=no 105257fe5393cSmrgelse 105267fe5393cSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10527b534f209Smrgfi 105287fe5393cSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 105297fe5393cSmrg]) # XORG_WITH_PS2PDF 10530b4d38c65Smrg 105317fe5393cSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 105327fe5393cSmrg# ---------------- 105337fe5393cSmrg# Minimum version: 1.6.0 10534b534f209Smrg# 105357fe5393cSmrg# Documentation tools are not always available on all platforms and sometimes 105367fe5393cSmrg# not at the appropriate level. This macro enables a builder to skip all 105377fe5393cSmrg# documentation targets except traditional man pages. 105387fe5393cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 105397fe5393cSmrg# maximum flexibilty in controlling documentation building. 105407fe5393cSmrg# Refer to: 105417fe5393cSmrg# XORG_WITH_XMLTO --with-xmlto 105427fe5393cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 105437fe5393cSmrg# XORG_WITH_DOXYGEN --with-doxygen 105447fe5393cSmrg# XORG_WITH_FOP --with-fop 105457fe5393cSmrg# XORG_WITH_GROFF --with-groff 105467fe5393cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 105477fe5393cSmrg# 105487fe5393cSmrg# Interface to module: 105497fe5393cSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 105507fe5393cSmrg# --enable-docs: 'yes' user instructs the module to generate docs 105517fe5393cSmrg# 'no' user instructs the module not to generate docs 105527fe5393cSmrg# parm1: specify the default value, yes or no. 105537fe5393cSmrg# 105547fe5393cSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 105557fe5393cSmrgm4_define([docs_default], m4_default([$1], [yes])) 105567fe5393cSmrgAC_ARG_ENABLE(docs, 105577fe5393cSmrg AS_HELP_STRING([--enable-docs], 105587fe5393cSmrg [Enable building the documentation (default: ]docs_default[)]), 105597fe5393cSmrg [build_docs=$enableval], [build_docs=]docs_default) 105607fe5393cSmrgm4_undefine([docs_default]) 105617fe5393cSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 105627fe5393cSmrgAC_MSG_CHECKING([whether to build documentation]) 105637fe5393cSmrgAC_MSG_RESULT([$build_docs]) 105647fe5393cSmrg]) # XORG_ENABLE_DOCS 10565de78e416Smrg 105667fe5393cSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 105677fe5393cSmrg# ---------------- 105687fe5393cSmrg# Minimum version: 1.6.0 105697fe5393cSmrg# 105707fe5393cSmrg# This macro enables a builder to skip all developer documentation. 105717fe5393cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 105727fe5393cSmrg# maximum flexibilty in controlling documentation building. 105737fe5393cSmrg# Refer to: 105747fe5393cSmrg# XORG_WITH_XMLTO --with-xmlto 105757fe5393cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 105767fe5393cSmrg# XORG_WITH_DOXYGEN --with-doxygen 105777fe5393cSmrg# XORG_WITH_FOP --with-fop 105787fe5393cSmrg# XORG_WITH_GROFF --with-groff 105797fe5393cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 105807fe5393cSmrg# 105817fe5393cSmrg# Interface to module: 105827fe5393cSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 105837fe5393cSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 105847fe5393cSmrg# 'no' user instructs the module not to generate developer docs 105857fe5393cSmrg# parm1: specify the default value, yes or no. 105867fe5393cSmrg# 105877fe5393cSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 105887fe5393cSmrgm4_define([devel_default], m4_default([$1], [yes])) 105897fe5393cSmrgAC_ARG_ENABLE(devel-docs, 105907fe5393cSmrg AS_HELP_STRING([--enable-devel-docs], 105917fe5393cSmrg [Enable building the developer documentation (default: ]devel_default[)]), 105927fe5393cSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 105937fe5393cSmrgm4_undefine([devel_default]) 105947fe5393cSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 105957fe5393cSmrgAC_MSG_CHECKING([whether to build developer documentation]) 105967fe5393cSmrgAC_MSG_RESULT([$build_devel_docs]) 105977fe5393cSmrg]) # XORG_ENABLE_DEVEL_DOCS 10598de78e416Smrg 105997fe5393cSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 106007fe5393cSmrg# ---------------- 106017fe5393cSmrg# Minimum version: 1.6.0 106027fe5393cSmrg# 106037fe5393cSmrg# This macro enables a builder to skip all functional specification targets. 106047fe5393cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 106057fe5393cSmrg# maximum flexibilty in controlling documentation building. 106067fe5393cSmrg# Refer to: 106077fe5393cSmrg# XORG_WITH_XMLTO --with-xmlto 106087fe5393cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 106097fe5393cSmrg# XORG_WITH_DOXYGEN --with-doxygen 106107fe5393cSmrg# XORG_WITH_FOP --with-fop 106117fe5393cSmrg# XORG_WITH_GROFF --with-groff 106127fe5393cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 106137fe5393cSmrg# 106147fe5393cSmrg# Interface to module: 106157fe5393cSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 106167fe5393cSmrg# --enable-specs: 'yes' user instructs the module to generate specs 106177fe5393cSmrg# 'no' user instructs the module not to generate specs 106187fe5393cSmrg# parm1: specify the default value, yes or no. 106197fe5393cSmrg# 106207fe5393cSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 106217fe5393cSmrgm4_define([spec_default], m4_default([$1], [yes])) 106227fe5393cSmrgAC_ARG_ENABLE(specs, 106237fe5393cSmrg AS_HELP_STRING([--enable-specs], 106247fe5393cSmrg [Enable building the specs (default: ]spec_default[)]), 106257fe5393cSmrg [build_specs=$enableval], [build_specs=]spec_default) 106267fe5393cSmrgm4_undefine([spec_default]) 106277fe5393cSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 106287fe5393cSmrgAC_MSG_CHECKING([whether to build functional specifications]) 106297fe5393cSmrgAC_MSG_RESULT([$build_specs]) 106307fe5393cSmrg]) # XORG_ENABLE_SPECS 10631b4d38c65Smrg 106327fe5393cSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 106337fe5393cSmrg# ---------------------------------------------- 106347fe5393cSmrg# Minimum version: 1.13.0 106357fe5393cSmrg# 106367fe5393cSmrg# This macro enables a builder to enable/disable unit testing 106377fe5393cSmrg# It makes no assumption about the test cases implementation 106387fe5393cSmrg# Test cases may or may not use Automake "Support for test suites" 106397fe5393cSmrg# They may or may not use the software utility library GLib 106407fe5393cSmrg# 106417fe5393cSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 106427fe5393cSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 106437fe5393cSmrg# The variable enable_unit_tests is used by other macros in this file. 106447fe5393cSmrg# 106457fe5393cSmrg# Interface to module: 106467fe5393cSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 106477fe5393cSmrg# enable_unit_tests: used in configure.ac for additional configuration 106487fe5393cSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 106497fe5393cSmrg# 'no' user instructs the module not to build tests 106507fe5393cSmrg# parm1: specify the default value, yes or no. 106517fe5393cSmrg# 106527fe5393cSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 106537fe5393cSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 106547fe5393cSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 106557fe5393cSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 106567fe5393cSmrgm4_define([_defopt], m4_default([$1], [auto])) 106577fe5393cSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 106587fe5393cSmrg [Enable building unit test cases (default: ]_defopt[)]), 106597fe5393cSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 106607fe5393cSmrgm4_undefine([_defopt]) 106617fe5393cSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 106627fe5393cSmrgAC_MSG_CHECKING([whether to build unit test cases]) 106637fe5393cSmrgAC_MSG_RESULT([$enable_unit_tests]) 106647fe5393cSmrg]) # XORG_ENABLE_UNIT_TESTS 10665b4d38c65Smrg 106667fe5393cSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 106677fe5393cSmrg# ------------------------------------------------------ 106687fe5393cSmrg# Minimum version: 1.17.0 106697fe5393cSmrg# 106707fe5393cSmrg# This macro enables a builder to enable/disable integration testing 106717fe5393cSmrg# It makes no assumption about the test cases' implementation 106727fe5393cSmrg# Test cases may or may not use Automake "Support for test suites" 106737fe5393cSmrg# 106747fe5393cSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 106757fe5393cSmrg# usually requires less dependencies and may be built and run under less 106767fe5393cSmrg# stringent environments than integration tests. 106777fe5393cSmrg# 106787fe5393cSmrg# Interface to module: 106797fe5393cSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 106807fe5393cSmrg# enable_integration_tests: used in configure.ac for additional configuration 106817fe5393cSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 106827fe5393cSmrg# 'no' user instructs the module not to build tests 106837fe5393cSmrg# parm1: specify the default value, yes or no. 10684b534f209Smrg# 106857fe5393cSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 106867fe5393cSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 106877fe5393cSmrgm4_define([_defopt], m4_default([$1], [auto])) 106887fe5393cSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 106897fe5393cSmrg [Enable building integration test cases (default: ]_defopt[)]), 106907fe5393cSmrg [enable_integration_tests=$enableval], 106917fe5393cSmrg [enable_integration_tests=]_defopt) 106927fe5393cSmrgm4_undefine([_defopt]) 106937fe5393cSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 106947fe5393cSmrg [test "x$enable_integration_tests" != xno]) 106957fe5393cSmrgAC_MSG_CHECKING([whether to build unit test cases]) 106967fe5393cSmrgAC_MSG_RESULT([$enable_integration_tests]) 106977fe5393cSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 10698b4d38c65Smrg 106997fe5393cSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 107007fe5393cSmrg# ---------------------------------------- 107017fe5393cSmrg# Minimum version: 1.13.0 10702b534f209Smrg# 107037fe5393cSmrg# GLib is a library which provides advanced data structures and functions. 107047fe5393cSmrg# This macro enables a module to test for the presence of Glib. 107057fe5393cSmrg# 107067fe5393cSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 107077fe5393cSmrg# Otherwise the value of $enable_unit_tests is blank. 107087fe5393cSmrg# 107097fe5393cSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 107107fe5393cSmrg# test support usually requires less dependencies and may be built and run under 107117fe5393cSmrg# less stringent environments than integration tests. 107127fe5393cSmrg# 107137fe5393cSmrg# Interface to module: 107147fe5393cSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 107157fe5393cSmrg# with_glib: used in configure.ac to know if GLib has been found 107167fe5393cSmrg# --with-glib: 'yes' user instructs the module to use glib 107177fe5393cSmrg# 'no' user instructs the module not to use glib 107187fe5393cSmrg# 107197fe5393cSmrgAC_DEFUN([XORG_WITH_GLIB],[ 107207fe5393cSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 107217fe5393cSmrgm4_define([_defopt], m4_default([$2], [auto])) 107227fe5393cSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 107237fe5393cSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 107247fe5393cSmrg [with_glib=$withval], [with_glib=]_defopt) 107257fe5393cSmrgm4_undefine([_defopt]) 10726b4d38c65Smrg 107277fe5393cSmrghave_glib=no 107287fe5393cSmrg# Do not probe GLib if user explicitly disabled unit testing 107297fe5393cSmrgif test "x$enable_unit_tests" != x"no"; then 107307fe5393cSmrg # Do not probe GLib if user explicitly disabled it 107317fe5393cSmrg if test "x$with_glib" != x"no"; then 107327fe5393cSmrg m4_ifval( 107337fe5393cSmrg [$1], 107347fe5393cSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 107357fe5393cSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 107367fe5393cSmrg ) 10737b4d38c65Smrg fi 1073883cab373Smrgfi 1073983cab373Smrg 107407fe5393cSmrg# Not having GLib when unit testing has been explicitly requested is an error 107417fe5393cSmrgif test "x$enable_unit_tests" = x"yes"; then 107427fe5393cSmrg if test "x$have_glib" = x"no"; then 107437fe5393cSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10744b4d38c65Smrg fi 10745b534f209Smrgfi 1074615fb4814Smrg 107477fe5393cSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 107487fe5393cSmrgif test "x$enable_unit_tests" = x"no"; then 107497fe5393cSmrg if test "x$with_glib" = x"yes"; then 107507fe5393cSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 107517fe5393cSmrg fi 107527fe5393cSmrgfi 10753de78e416Smrg 107547fe5393cSmrg# Not having GLib when it has been explicitly requested is an error 107557fe5393cSmrgif test "x$with_glib" = x"yes"; then 107567fe5393cSmrg if test "x$have_glib" = x"no"; then 107577fe5393cSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 107587fe5393cSmrg fi 107597fe5393cSmrgfi 10760de78e416Smrg 107617fe5393cSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 107627fe5393cSmrg]) # XORG_WITH_GLIB 10763b534f209Smrg 107647fe5393cSmrg# XORG_LD_WRAP([required|optional]) 107657fe5393cSmrg# --------------------------------- 107667fe5393cSmrg# Minimum version: 1.13.0 107677fe5393cSmrg# 107687fe5393cSmrg# Check if linker supports -wrap, passed via compiler flags 107697fe5393cSmrg# 107707fe5393cSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 107717fe5393cSmrg# Otherwise the value of $enable_unit_tests is blank. 107727fe5393cSmrg# 107737fe5393cSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 107747fe5393cSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 107757fe5393cSmrg# available, an argument of "optional" allows use when some unit tests require 107767fe5393cSmrg# ld -wrap and others do not. 107777fe5393cSmrg# 107787fe5393cSmrgAC_DEFUN([XORG_LD_WRAP],[ 107797fe5393cSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 107807fe5393cSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 107817fe5393cSmrg void __wrap_exit(int status) { return; }], 107827fe5393cSmrg [exit(0);])]) 107837fe5393cSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 107847fe5393cSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 107857fe5393cSmrg if test "x$have_ld_wrap" = x"no"; then 107867fe5393cSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 107877fe5393cSmrg fi 107887fe5393cSmrgfi 107897fe5393cSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 107907fe5393cSmrg# 107917fe5393cSmrg]) # XORG_LD_WRAP 10792b534f209Smrg 107937fe5393cSmrg# XORG_CHECK_LINKER_FLAGS 107947fe5393cSmrg# ----------------------- 107957fe5393cSmrg# SYNOPSIS 107967fe5393cSmrg# 107977fe5393cSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 107987fe5393cSmrg# 107997fe5393cSmrg# DESCRIPTION 108007fe5393cSmrg# 108017fe5393cSmrg# Check whether the given linker FLAGS work with the current language's 108027fe5393cSmrg# linker, or whether they give an error. 108037fe5393cSmrg# 108047fe5393cSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 108057fe5393cSmrg# success/failure. 108067fe5393cSmrg# 108077fe5393cSmrg# PROGRAM-SOURCE is the program source to link with, if needed 108087fe5393cSmrg# 108097fe5393cSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 108107fe5393cSmrg# 108117fe5393cSmrg# LICENSE 108127fe5393cSmrg# 108137fe5393cSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 108147fe5393cSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 108157fe5393cSmrg# Copyright (c) 2009 Matteo Frigo 10816b4d38c65Smrg# 108177fe5393cSmrg# This program is free software: you can redistribute it and/or modify it 108187fe5393cSmrg# under the terms of the GNU General Public License as published by the 108197fe5393cSmrg# Free Software Foundation, either version 3 of the License, or (at your 108207fe5393cSmrg# option) any later version. 108217fe5393cSmrg# 108227fe5393cSmrg# This program is distributed in the hope that it will be useful, but 108237fe5393cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 108247fe5393cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 108257fe5393cSmrg# Public License for more details. 108267fe5393cSmrg# 108277fe5393cSmrg# You should have received a copy of the GNU General Public License along 108287fe5393cSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 108297fe5393cSmrg# 108307fe5393cSmrg# As a special exception, the respective Autoconf Macro's copyright owner 108317fe5393cSmrg# gives unlimited permission to copy, distribute and modify the configure 108327fe5393cSmrg# scripts that are the output of Autoconf when processing the Macro. You 108337fe5393cSmrg# need not follow the terms of the GNU General Public License when using 108347fe5393cSmrg# or distributing such scripts, even though portions of the text of the 108357fe5393cSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 108367fe5393cSmrg# all other use of the material that constitutes the Autoconf Macro. 108377fe5393cSmrg# 108387fe5393cSmrg# This special exception to the GPL applies to versions of the Autoconf 108397fe5393cSmrg# Macro released by the Autoconf Archive. When you make and distribute a 108407fe5393cSmrg# modified version of the Autoconf Macro, you may extend this special 108417fe5393cSmrg# exception to the GPL to apply to your modified version as well.# 108427fe5393cSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 108437fe5393cSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 108447fe5393cSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 108457fe5393cSmrgAS_LITERAL_IF([$1], 108467fe5393cSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 108477fe5393cSmrg ax_save_FLAGS=$LDFLAGS 108487fe5393cSmrg LDFLAGS="$1" 108497fe5393cSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 108507fe5393cSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 108517fe5393cSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 108527fe5393cSmrg LDFLAGS=$ax_save_FLAGS])], 108537fe5393cSmrg [ax_save_FLAGS=$LDFLAGS 108547fe5393cSmrg LDFLAGS="$1" 108557fe5393cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 108567fe5393cSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 108577fe5393cSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 108587fe5393cSmrg LDFLAGS=$ax_save_FLAGS]) 108597fe5393cSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 108607fe5393cSmrgAC_MSG_RESULT($xorg_check_linker_flags) 108617fe5393cSmrgif test "x$xorg_check_linker_flags" = xyes; then 108627fe5393cSmrg m4_default([$2], :) 108637fe5393cSmrgelse 108647fe5393cSmrg m4_default([$3], :) 10865b534f209Smrgfi 108667fe5393cSmrg]) # XORG_CHECK_LINKER_FLAGS 1086715fb4814Smrg 108687fe5393cSmrg# XORG_MEMORY_CHECK_FLAGS 108697fe5393cSmrg# ----------------------- 108707fe5393cSmrg# Minimum version: 1.16.0 10871b4d38c65Smrg# 108727fe5393cSmrg# This macro attempts to find appropriate memory checking functionality 108737fe5393cSmrg# for various platforms which unit testing code may use to catch various 108747fe5393cSmrg# forms of memory allocation and access errors in testing. 108757fe5393cSmrg# 108767fe5393cSmrg# Interface to module: 108777fe5393cSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 108787fe5393cSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 108797fe5393cSmrg# 108807fe5393cSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 108817fe5393cSmrg# 108827fe5393cSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10883b4d38c65Smrg 108847fe5393cSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 108857fe5393cSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 108867fe5393cSmrg [Environment variables to enable memory checking in tests]) 10887b4d38c65Smrg 108887fe5393cSmrg# Check for different types of support on different platforms 108897fe5393cSmrgcase $host_os in 108907fe5393cSmrg solaris*) 108917fe5393cSmrg AC_CHECK_LIB([umem], [umem_alloc], 108927fe5393cSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 108937fe5393cSmrg ;; 108947fe5393cSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 108957fe5393cSmrg # both directly and inverted, so should not be 0 or 255. 108967fe5393cSmrg malloc_debug_env='MALLOC_PERTURB_=15' 108977fe5393cSmrg ;; 108987fe5393cSmrg darwin*) 108997fe5393cSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 109007fe5393cSmrg ;; 109017fe5393cSmrg *bsd*) 109027fe5393cSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 109037fe5393cSmrg ;; 109047fe5393cSmrgesac 109057fe5393cSmrg 109067fe5393cSmrg# User supplied flags override default flags 109077fe5393cSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 109087fe5393cSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10909b534f209Smrgfi 1091015fb4814Smrg 109117fe5393cSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 109127fe5393cSmrg]) # XORG_WITH_LINT 1091315fb4814Smrg 109147fe5393cSmrg# XORG_CHECK_MALLOC_ZERO 109157fe5393cSmrg# ---------------------- 109167fe5393cSmrg# Minimum version: 1.0.0 10917b534f209Smrg# 109187fe5393cSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 109197fe5393cSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 109207fe5393cSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 109217fe5393cSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 109227fe5393cSmrgAC_ARG_ENABLE(malloc0returnsnull, 109237fe5393cSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 109247fe5393cSmrg [malloc(0) returns NULL (default: auto)]), 109257fe5393cSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 109267fe5393cSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10927b4d38c65Smrg 109287fe5393cSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 109297fe5393cSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 109307fe5393cSmrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 109317fe5393cSmrg#include <stdlib.h> 109327fe5393cSmrg],[ 109337fe5393cSmrg char *m0, *r0, *c0, *p; 109347fe5393cSmrg m0 = malloc(0); 109357fe5393cSmrg p = malloc(10); 109367fe5393cSmrg r0 = realloc(p,0); 109377fe5393cSmrg c0 = calloc(0,10); 109387fe5393cSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 109397fe5393cSmrg])], 109407fe5393cSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 109417fe5393cSmrg [MALLOC_ZERO_RETURNS_NULL=no], 109427fe5393cSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 109437fe5393cSmrgfi 109447fe5393cSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10945b4d38c65Smrg 109467fe5393cSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 109477fe5393cSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 109487fe5393cSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 109497fe5393cSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 109507fe5393cSmrgelse 109517fe5393cSmrg MALLOC_ZERO_CFLAGS="" 109527fe5393cSmrg XMALLOC_ZERO_CFLAGS="" 109537fe5393cSmrg XTMALLOC_ZERO_CFLAGS="" 109547fe5393cSmrgfi 10955b4d38c65Smrg 109567fe5393cSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 109577fe5393cSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 109587fe5393cSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 109597fe5393cSmrg]) # XORG_CHECK_MALLOC_ZERO 10960b4d38c65Smrg 109617fe5393cSmrg# XORG_WITH_LINT() 109627fe5393cSmrg# ---------------- 109637fe5393cSmrg# Minimum version: 1.1.0 10964b534f209Smrg# 109657fe5393cSmrg# This macro enables the use of a tool that flags some suspicious and 109667fe5393cSmrg# non-portable constructs (likely to be bugs) in C language source code. 109677fe5393cSmrg# It will attempt to locate the tool and use appropriate options. 109687fe5393cSmrg# There are various lint type tools on different platforms. 109697fe5393cSmrg# 109707fe5393cSmrg# Interface to module: 109717fe5393cSmrg# LINT: returns the path to the tool found on the platform 109727fe5393cSmrg# or the value set to LINT on the configure cmd line 109737fe5393cSmrg# also an Automake conditional 109747fe5393cSmrg# LINT_FLAGS: an Automake variable with appropriate flags 109757fe5393cSmrg# 109767fe5393cSmrg# --with-lint: 'yes' user instructs the module to use lint 109777fe5393cSmrg# 'no' user instructs the module not to use lint (default) 109787fe5393cSmrg# 109797fe5393cSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 109807fe5393cSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 109817fe5393cSmrg# 109827fe5393cSmrgAC_DEFUN([XORG_WITH_LINT],[ 10983b4d38c65Smrg 109847fe5393cSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 109857fe5393cSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 109867fe5393cSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 109877fe5393cSmrg [Use a lint-style source code checker (default: disabled)])], 109887fe5393cSmrg [use_lint=$withval], [use_lint=no]) 109897fe5393cSmrg 109907fe5393cSmrg# Obtain platform specific info like program name and options 109917fe5393cSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 109927fe5393cSmrgcase $host_os in 109937fe5393cSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 109947fe5393cSmrg lint_name=splint 109957fe5393cSmrg lint_options="-badflag" 109967fe5393cSmrg ;; 109977fe5393cSmrg *freebsd* | *netbsd*) 109987fe5393cSmrg lint_name=lint 109997fe5393cSmrg lint_options="-u -b" 110007fe5393cSmrg ;; 110017fe5393cSmrg *solaris*) 110027fe5393cSmrg lint_name=lint 110037fe5393cSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 110047fe5393cSmrg ;; 11005b4d38c65Smrgesac 110067fe5393cSmrg 110077fe5393cSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 110087fe5393cSmrgif test "x$use_lint" = x"yes" ; then 110097fe5393cSmrg AC_PATH_PROG([LINT], [$lint_name]) 110107fe5393cSmrg if test "x$LINT" = "x"; then 110117fe5393cSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 110127fe5393cSmrg fi 110137fe5393cSmrgelif test "x$use_lint" = x"no" ; then 110147fe5393cSmrg if test "x$LINT" != "x"; then 110157fe5393cSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 110167fe5393cSmrg fi 110177fe5393cSmrgelse 110187fe5393cSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11019b534f209Smrgfi 1102015fb4814Smrg 110217fe5393cSmrg# User supplied flags override default flags 110227fe5393cSmrgif test "x$LINT_FLAGS" != "x"; then 110237fe5393cSmrg lint_options=$LINT_FLAGS 110247fe5393cSmrgfi 11025b4d38c65Smrg 110267fe5393cSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 110277fe5393cSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11028b4d38c65Smrg 110297fe5393cSmrg]) # XORG_WITH_LINT 11030b4d38c65Smrg 110317fe5393cSmrg# XORG_LINT_LIBRARY(LIBNAME) 110327fe5393cSmrg# -------------------------- 110337fe5393cSmrg# Minimum version: 1.1.0 110347fe5393cSmrg# 110357fe5393cSmrg# Sets up flags for building lint libraries for checking programs that call 110367fe5393cSmrg# functions in the library. 110377fe5393cSmrg# 110387fe5393cSmrg# Interface to module: 110397fe5393cSmrg# LINTLIB - Automake variable with the name of lint library file to make 110407fe5393cSmrg# MAKE_LINT_LIB - Automake conditional 110417fe5393cSmrg# 110427fe5393cSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 110437fe5393cSmrg# - 'no' user instructs the module not to create a lint library (default) 11044b4d38c65Smrg 110457fe5393cSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 110467fe5393cSmrgAC_REQUIRE([XORG_WITH_LINT]) 110477fe5393cSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 110487fe5393cSmrg [Create lint library (default: disabled)])], 110497fe5393cSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 11050b4d38c65Smrg 110517fe5393cSmrgif test "x$make_lint_lib" = x"yes" ; then 110527fe5393cSmrg LINTLIB=llib-l$1.ln 110537fe5393cSmrg if test "x$LINT" = "x"; then 110547fe5393cSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 110557fe5393cSmrg fi 110567fe5393cSmrgelif test "x$make_lint_lib" != x"no" ; then 110577fe5393cSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11058b534f209Smrgfi 11059b4d38c65Smrg 110607fe5393cSmrgAC_SUBST(LINTLIB) 110617fe5393cSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11062b4d38c65Smrg 110637fe5393cSmrg]) # XORG_LINT_LIBRARY 11064b4d38c65Smrg 110657fe5393cSmrg# XORG_COMPILER_BRAND 110667fe5393cSmrg# ------------------- 110677fe5393cSmrg# Minimum version: 1.14.0 110687fe5393cSmrg# 110697fe5393cSmrg# Checks for various brands of compilers and sets flags as appropriate: 110707fe5393cSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 110717fe5393cSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 110727fe5393cSmrg# clang compiler - sets CLANGCC to "yes" 110737fe5393cSmrg# Intel compiler - sets INTELCC to "yes" 110747fe5393cSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 110757fe5393cSmrg# 110767fe5393cSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 110777fe5393cSmrgAC_LANG_CASE( 110787fe5393cSmrg [C], [ 110797fe5393cSmrg AC_REQUIRE([AC_PROG_CC_C99]) 110807fe5393cSmrg ], 110817fe5393cSmrg [C++], [ 110827fe5393cSmrg AC_REQUIRE([AC_PROG_CXX]) 110837fe5393cSmrg ] 110847fe5393cSmrg) 110857fe5393cSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 110867fe5393cSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 110877fe5393cSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 110887fe5393cSmrg]) # XORG_COMPILER_BRAND 110897fe5393cSmrg 110907fe5393cSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11091b4d38c65Smrg# --------------- 110927fe5393cSmrg# Minimum version: 1.16.0 110937fe5393cSmrg# 110947fe5393cSmrg# Test if the compiler works when passed the given flag as a command line argument. 110957fe5393cSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 110967fe5393cSmrg# next flag in the list until there are no more options. 110977fe5393cSmrg# 110987fe5393cSmrg# Note that this does not guarantee that the compiler supports the flag as some 110997fe5393cSmrg# compilers will simply ignore arguments that they do not understand, but we do 111007fe5393cSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 111017fe5393cSmrg# -Werror=unused-command-line-argument 111027fe5393cSmrg# 111037fe5393cSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 111047fe5393cSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 111057fe5393cSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11106b4d38c65Smrg 111077fe5393cSmrgAC_LANG_COMPILER_REQUIRE 1110815fb4814Smrg 111097fe5393cSmrgAC_LANG_CASE( 111107fe5393cSmrg [C], [ 111117fe5393cSmrg AC_REQUIRE([AC_PROG_CC_C99]) 111127fe5393cSmrg define([PREFIX], [C]) 111137fe5393cSmrg define([CACHE_PREFIX], [cc]) 111147fe5393cSmrg define([COMPILER], [$CC]) 111157fe5393cSmrg ], 111167fe5393cSmrg [C++], [ 111177fe5393cSmrg define([PREFIX], [CXX]) 111187fe5393cSmrg define([CACHE_PREFIX], [cxx]) 111197fe5393cSmrg define([COMPILER], [$CXX]) 111207fe5393cSmrg ] 111217fe5393cSmrg) 1112215fb4814Smrg 111237fe5393cSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 1112415fb4814Smrg 111257fe5393cSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 111267fe5393cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 111277fe5393cSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 111287fe5393cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 111297fe5393cSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 111307fe5393cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 111317fe5393cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 111327fe5393cSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 111337fe5393cSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 111347fe5393cSmrgfi 1113515fb4814Smrg 111367fe5393cSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 111377fe5393cSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 111387fe5393cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 111397fe5393cSmrg fi 111407fe5393cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 111417fe5393cSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 111427fe5393cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 111437fe5393cSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 111447fe5393cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 111457fe5393cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 111467fe5393cSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 111477fe5393cSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 111487fe5393cSmrgfi 1114915fb4814Smrg 111507fe5393cSmrgfound="no" 111517fe5393cSmrgm4_foreach([flag], m4_cdr($@), [ 111527fe5393cSmrg if test $found = "no" ; then 111537fe5393cSmrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 111547fe5393cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 111557fe5393cSmrg fi 11156b4d38c65Smrg 111577fe5393cSmrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 111587fe5393cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 111597fe5393cSmrg fi 11160b4d38c65Smrg 111617fe5393cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 111627fe5393cSmrg 111637fe5393cSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 111647fe5393cSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 111657fe5393cSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 111667fe5393cSmrg AC_CACHE_VAL($cacheid, 111677fe5393cSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 111687fe5393cSmrg [eval $cacheid=yes], 111697fe5393cSmrg [eval $cacheid=no])]) 11170b4d38c65Smrg 111717fe5393cSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11172de78e416Smrg 111737fe5393cSmrg eval supported=\$$cacheid 111747fe5393cSmrg AC_MSG_RESULT([$supported]) 111757fe5393cSmrg if test "$supported" = "yes" ; then 111767fe5393cSmrg $1="$$1 ]flag[" 111777fe5393cSmrg found="yes" 111787fe5393cSmrg fi 111797fe5393cSmrg fi 111807fe5393cSmrg]) 111817fe5393cSmrg]) # XORG_TESTSET_CFLAG 1118215fb4814Smrg 111837fe5393cSmrg# XORG_COMPILER_FLAGS 11184b4d38c65Smrg# --------------- 111857fe5393cSmrg# Minimum version: 1.16.0 111867fe5393cSmrg# 111877fe5393cSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 111887fe5393cSmrg# arguments supported by the selected compiler which do NOT alter the generated 111897fe5393cSmrg# code. These arguments will cause the compiler to print various warnings 111907fe5393cSmrg# during compilation AND turn a conservative set of warnings into errors. 111917fe5393cSmrg# 111927fe5393cSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 111937fe5393cSmrg# future versions of util-macros as options are added to new compilers. 111947fe5393cSmrg# 111957fe5393cSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 111967fe5393cSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11197b4d38c65Smrg 111987fe5393cSmrgAC_ARG_ENABLE(selective-werror, 111997fe5393cSmrg AS_HELP_STRING([--disable-selective-werror], 112007fe5393cSmrg [Turn off selective compiler errors. (default: enabled)]), 112017fe5393cSmrg [SELECTIVE_WERROR=$enableval], 112027fe5393cSmrg [SELECTIVE_WERROR=yes]) 1120383cab373Smrg 112047fe5393cSmrgAC_LANG_CASE( 112057fe5393cSmrg [C], [ 112067fe5393cSmrg define([PREFIX], [C]) 112077fe5393cSmrg ], 112087fe5393cSmrg [C++], [ 112097fe5393cSmrg define([PREFIX], [CXX]) 112107fe5393cSmrg ] 112117fe5393cSmrg) 112127fe5393cSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 112137fe5393cSmrgif test "x$SUNCC" = "xyes"; then 112147fe5393cSmrg [BASE_]PREFIX[FLAGS]="-v" 11215b4d38c65Smrgelse 112167fe5393cSmrg [BASE_]PREFIX[FLAGS]="" 11217b534f209Smrgfi 11218b410ddbeSmrg 112197fe5393cSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 112207fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 112217fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 112227fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 112237fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1122483cab373Smrg 112257fe5393cSmrgAC_LANG_CASE( 112267fe5393cSmrg [C], [ 112277fe5393cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 112287fe5393cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 112297fe5393cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 112307fe5393cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 112317fe5393cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 112327fe5393cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 112337fe5393cSmrg ] 112347fe5393cSmrg) 11235b534f209Smrg 112367fe5393cSmrg# This chunk adds additional warnings that could catch undesired effects. 112377fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 112387fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 112397fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 112407fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 112417fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 112427fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 112437fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1124415fb4814Smrg 112457fe5393cSmrg# These are currently disabled because they are noisy. They will be enabled 112467fe5393cSmrg# in the future once the codebase is sufficiently modernized to silence 112477fe5393cSmrg# them. For now, I don't want them to drown out the other warnings. 112487fe5393cSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 112497fe5393cSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 112507fe5393cSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11251b534f209Smrg 112527fe5393cSmrg# Turn some warnings into errors, so we don't accidently get successful builds 112537fe5393cSmrg# when there are problems that should be fixed. 11254b4d38c65Smrg 112557fe5393cSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 112567fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 112577fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 112587fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 112597fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 112607fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 112617fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 112627fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 112637fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 112647fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 112657fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 112667fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 112677fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 112687fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 112697fe5393cSmrgelse 112707fe5393cSmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 112717fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 112727fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 112737fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 112747fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 112757fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 112767fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 112777fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 112787fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 112797fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 112807fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 112817fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 112827fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 112837fe5393cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11284b534f209Smrgfi 11285b534f209Smrg 112867fe5393cSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 112877fe5393cSmrg]) # XORG_COMPILER_FLAGS 112887fe5393cSmrg 112897fe5393cSmrg# XORG_CWARNFLAGS 112907fe5393cSmrg# --------------- 112917fe5393cSmrg# Minimum version: 1.2.0 112927fe5393cSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11293b534f209Smrg# 112947fe5393cSmrg# Defines CWARNFLAGS to enable C compiler warnings. 112957fe5393cSmrg# 112967fe5393cSmrg# This function is deprecated because it defines -fno-strict-aliasing 112977fe5393cSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 112987fe5393cSmrg# is needed, then it should be added explicitly in the module when 112997fe5393cSmrg# it is updated to use BASE_CFLAGS. 113007fe5393cSmrg# 113017fe5393cSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 113027fe5393cSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 113037fe5393cSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 113047fe5393cSmrgAC_LANG_CASE( 113057fe5393cSmrg [C], [ 113067fe5393cSmrg CWARNFLAGS="$BASE_CFLAGS" 113077fe5393cSmrg if test "x$GCC" = xyes ; then 113087fe5393cSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 113097fe5393cSmrg fi 113107fe5393cSmrg AC_SUBST(CWARNFLAGS) 113117fe5393cSmrg ] 113127fe5393cSmrg) 113137fe5393cSmrg]) # XORG_CWARNFLAGS 113147fe5393cSmrg 113157fe5393cSmrg# XORG_STRICT_OPTION 113167fe5393cSmrg# ----------------------- 113177fe5393cSmrg# Minimum version: 1.3.0 113187fe5393cSmrg# 113197fe5393cSmrg# Add configure option to enable strict compilation flags, such as treating 113207fe5393cSmrg# warnings as fatal errors. 113217fe5393cSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 113227fe5393cSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 113237fe5393cSmrg# 113247fe5393cSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 113257fe5393cSmrg# when strict compilation is unconditionally desired. 113267fe5393cSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 113277fe5393cSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 113287fe5393cSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1132915fb4814Smrg 113307fe5393cSmrgAC_ARG_ENABLE(strict-compilation, 113317fe5393cSmrg AS_HELP_STRING([--enable-strict-compilation], 113327fe5393cSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 113337fe5393cSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1133415fb4814Smrg 113357fe5393cSmrgAC_LANG_CASE( 113367fe5393cSmrg [C], [ 113377fe5393cSmrg define([PREFIX], [C]) 113387fe5393cSmrg ], 113397fe5393cSmrg [C++], [ 113407fe5393cSmrg define([PREFIX], [CXX]) 113417fe5393cSmrg ] 113427fe5393cSmrg) 1134315fb4814Smrg 113447fe5393cSmrg[STRICT_]PREFIX[FLAGS]="" 113457fe5393cSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 113467fe5393cSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11347de78e416Smrg 113487fe5393cSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 113497fe5393cSmrg# activate it with -Werror, so we add it here explicitly. 113507fe5393cSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 113517fe5393cSmrg 113527fe5393cSmrgif test "x$STRICT_COMPILE" = "xyes"; then 113537fe5393cSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 113547fe5393cSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 113557fe5393cSmrgfi 113567fe5393cSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 113577fe5393cSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 113587fe5393cSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 113597fe5393cSmrg]) # XORG_STRICT_OPTION 11360b534f209Smrg 113617fe5393cSmrg# XORG_DEFAULT_OPTIONS 113627fe5393cSmrg# -------------------- 113637fe5393cSmrg# Minimum version: 1.3.0 1136415fb4814Smrg# 113657fe5393cSmrg# Defines default options for X.Org modules. 113667fe5393cSmrg# 113677fe5393cSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 113687fe5393cSmrgAC_REQUIRE([AC_PROG_INSTALL]) 113697fe5393cSmrgXORG_COMPILER_FLAGS 113707fe5393cSmrgXORG_CWARNFLAGS 113717fe5393cSmrgXORG_STRICT_OPTION 113727fe5393cSmrgXORG_RELEASE_VERSION 113737fe5393cSmrgXORG_CHANGELOG 113747fe5393cSmrgXORG_INSTALL 113757fe5393cSmrgXORG_MANPAGE_SECTIONS 113767fe5393cSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 113777fe5393cSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 113787fe5393cSmrg]) # XORG_DEFAULT_OPTIONS 11379b4d38c65Smrg 113807fe5393cSmrg# XORG_INSTALL() 113817fe5393cSmrg# ---------------- 113827fe5393cSmrg# Minimum version: 1.4.0 113837fe5393cSmrg# 113847fe5393cSmrg# Defines the variable INSTALL_CMD as the command to copy 113857fe5393cSmrg# INSTALL from $prefix/share/util-macros. 113867fe5393cSmrg# 113877fe5393cSmrgAC_DEFUN([XORG_INSTALL], [ 113887fe5393cSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 113897fe5393cSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 113907fe5393cSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 113917fe5393cSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 113927fe5393cSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 113937fe5393cSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 113947fe5393cSmrgAC_SUBST([INSTALL_CMD]) 113957fe5393cSmrg]) # XORG_INSTALL 113967fe5393cSmrgdnl Copyright 2005 Red Hat, Inc 113977fe5393cSmrgdnl 113987fe5393cSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 113997fe5393cSmrgdnl documentation for any purpose is hereby granted without fee, provided that 114007fe5393cSmrgdnl the above copyright notice appear in all copies and that both that 114017fe5393cSmrgdnl copyright notice and this permission notice appear in supporting 114027fe5393cSmrgdnl documentation. 114037fe5393cSmrgdnl 114047fe5393cSmrgdnl The above copyright notice and this permission notice shall be included 114057fe5393cSmrgdnl in all copies or substantial portions of the Software. 114067fe5393cSmrgdnl 114077fe5393cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 114087fe5393cSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 114097fe5393cSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 114107fe5393cSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 114117fe5393cSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 114127fe5393cSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 114137fe5393cSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 114147fe5393cSmrgdnl 114157fe5393cSmrgdnl Except as contained in this notice, the name of the copyright holders shall 114167fe5393cSmrgdnl not be used in advertising or otherwise to promote the sale, use or 114177fe5393cSmrgdnl other dealings in this Software without prior written authorization 114187fe5393cSmrgdnl from the copyright holders. 114197fe5393cSmrgdnl 11420b4d38c65Smrg 114217fe5393cSmrg# XORG_RELEASE_VERSION 11422b4d38c65Smrg# -------------------- 114237fe5393cSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 114247fe5393cSmrg 114257fe5393cSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 114267fe5393cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 114277fe5393cSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 114287fe5393cSmrg [Major version of this package]) 114297fe5393cSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 114307fe5393cSmrg if test "x$PVM" = "x"; then 114317fe5393cSmrg PVM="0" 114327fe5393cSmrg fi 114337fe5393cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 114347fe5393cSmrg [$PVM], 114357fe5393cSmrg [Minor version of this package]) 114367fe5393cSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 114377fe5393cSmrg if test "x$PVP" = "x"; then 114387fe5393cSmrg PVP="0" 114397fe5393cSmrg fi 114407fe5393cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 114417fe5393cSmrg [$PVP], 114427fe5393cSmrg [Patch version of this package]) 114437fe5393cSmrg]) 114447fe5393cSmrg 114457fe5393cSmrg# XORG_CHANGELOG() 114467fe5393cSmrg# ---------------- 114477fe5393cSmrg# Minimum version: 1.2.0 11448de78e416Smrg# 114497fe5393cSmrg# Defines the variable CHANGELOG_CMD as the command to generate 114507fe5393cSmrg# ChangeLog from git. 11451b534f209Smrg# 114527fe5393cSmrg# 114537fe5393cSmrgAC_DEFUN([XORG_CHANGELOG], [ 114547fe5393cSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 114557fe5393cSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 114567fe5393cSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 114577fe5393cSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 114587fe5393cSmrgAC_SUBST([CHANGELOG_CMD]) 114597fe5393cSmrg]) # XORG_CHANGELOG 1146083cab373Smrg 114617fe5393cSmrgdnl Copyright 2005 Red Hat, Inc 114627fe5393cSmrgdnl 114637fe5393cSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 114647fe5393cSmrgdnl documentation for any purpose is hereby granted without fee, provided that 114657fe5393cSmrgdnl the above copyright notice appear in all copies and that both that 114667fe5393cSmrgdnl copyright notice and this permission notice appear in supporting 114677fe5393cSmrgdnl documentation. 114687fe5393cSmrgdnl 114697fe5393cSmrgdnl The above copyright notice and this permission notice shall be included 114707fe5393cSmrgdnl in all copies or substantial portions of the Software. 114717fe5393cSmrgdnl 114727fe5393cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 114737fe5393cSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 114747fe5393cSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 114757fe5393cSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 114767fe5393cSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 114777fe5393cSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 114787fe5393cSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 114797fe5393cSmrgdnl 114807fe5393cSmrgdnl Except as contained in this notice, the name of the copyright holders shall 114817fe5393cSmrgdnl not be used in advertising or otherwise to promote the sale, use or 114827fe5393cSmrgdnl other dealings in this Software without prior written authorization 114837fe5393cSmrgdnl from the copyright holders. 114847fe5393cSmrgdnl 1148583cab373Smrg 114867fe5393cSmrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 114877fe5393cSmrg# -------------------------- 114887fe5393cSmrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 114897fe5393cSmrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 1149083cab373Smrg 114917fe5393cSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 114927fe5393cSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 114937fe5393cSmrg SAVE_CFLAGS="$CFLAGS" 114947fe5393cSmrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 114957fe5393cSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 114967fe5393cSmrg#include "xorg-server.h" 114977fe5393cSmrg#if !defined $1 114987fe5393cSmrg#error $1 not defined 114997fe5393cSmrg#endif 115007fe5393cSmrg ]])], 115017fe5393cSmrg [_EXT_CHECK=yes], 115027fe5393cSmrg [_EXT_CHECK=no]) 115037fe5393cSmrg CFLAGS="$SAVE_CFLAGS" 115047fe5393cSmrg AC_MSG_CHECKING([if $1 is defined]) 115057fe5393cSmrg AC_MSG_RESULT([$_EXT_CHECK]) 115067fe5393cSmrg if test "$_EXT_CHECK" != no; then 115077fe5393cSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 115087fe5393cSmrg fi 115097fe5393cSmrg]) 1151015fb4814Smrg 11511