aclocal.m4 revision bd304fc0
1bd304fc0Smrg# generated automatically by aclocal 1.11.3 -*- Autoconf -*- 2fc5a983dSmrg 3fc5a983dSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4bd304fc0Smrg# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 5bd304fc0Smrg# Inc. 6fc5a983dSmrg# This file is free software; the Free Software Foundation 7fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 8fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 9fc5a983dSmrg 10fc5a983dSmrg# This program is distributed in the hope that it will be useful, 11fc5a983dSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12fc5a983dSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13fc5a983dSmrg# PARTICULAR PURPOSE. 14fc5a983dSmrg 15fc5a983dSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16fc5a983dSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17bd304fc0Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 18bd304fc0Smrg[m4_warning([this file was generated for autoconf 2.68. 19fc5a983dSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20fc5a983dSmrgIf you have problems, you may need to regenerate the build system entirely. 21fc5a983dSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 22fc5a983dSmrg 23fc5a983dSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24f3561b8bSmrg# 25f3561b8bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 26bd304fc0Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 27bd304fc0Smrg# Foundation, Inc. 28f3561b8bSmrg# Written by Gordon Matzigkeit, 1996 29f3561b8bSmrg# 30f3561b8bSmrg# This file is free software; the Free Software Foundation gives 31f3561b8bSmrg# unlimited permission to copy and/or distribute it, with or without 32f3561b8bSmrg# modifications, as long as this notice is preserved. 33f3561b8bSmrg 34f3561b8bSmrgm4_define([_LT_COPYING], [dnl 35f3561b8bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 36bd304fc0Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 37bd304fc0Smrg# Foundation, Inc. 38f3561b8bSmrg# Written by Gordon Matzigkeit, 1996 39f3561b8bSmrg# 40f3561b8bSmrg# This file is part of GNU Libtool. 41f3561b8bSmrg# 42f3561b8bSmrg# GNU Libtool is free software; you can redistribute it and/or 43f3561b8bSmrg# modify it under the terms of the GNU General Public License as 44f3561b8bSmrg# published by the Free Software Foundation; either version 2 of 45f3561b8bSmrg# the License, or (at your option) any later version. 46f3561b8bSmrg# 47f3561b8bSmrg# As a special exception to the GNU General Public License, 48f3561b8bSmrg# if you distribute this file as part of a program or library that 49f3561b8bSmrg# is built using GNU Libtool, you may include this file under the 50f3561b8bSmrg# same distribution terms that you use for the rest of that program. 51f3561b8bSmrg# 52f3561b8bSmrg# GNU Libtool is distributed in the hope that it will be useful, 53f3561b8bSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 54f3561b8bSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 55f3561b8bSmrg# GNU General Public License for more details. 56f3561b8bSmrg# 57f3561b8bSmrg# You should have received a copy of the GNU General Public License 58f3561b8bSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 59f3561b8bSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 60f3561b8bSmrg# obtained by writing to the Free Software Foundation, Inc., 61f3561b8bSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 62f3561b8bSmrg]) 63fc5a983dSmrg 64bd304fc0Smrg# serial 57 LT_INIT 65fc5a983dSmrg 66fc5a983dSmrg 67f3561b8bSmrg# LT_PREREQ(VERSION) 68f3561b8bSmrg# ------------------ 69f3561b8bSmrg# Complain and exit if this libtool version is less that VERSION. 70f3561b8bSmrgm4_defun([LT_PREREQ], 71f3561b8bSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 72f3561b8bSmrg [m4_default([$3], 73f3561b8bSmrg [m4_fatal([Libtool version $1 or higher is required], 74f3561b8bSmrg 63)])], 75f3561b8bSmrg [$2])]) 76fc5a983dSmrg 77fc5a983dSmrg 78f3561b8bSmrg# _LT_CHECK_BUILDDIR 79f3561b8bSmrg# ------------------ 80f3561b8bSmrg# Complain if the absolute build directory name contains unusual characters 81f3561b8bSmrgm4_defun([_LT_CHECK_BUILDDIR], 82f3561b8bSmrg[case `pwd` in 83f3561b8bSmrg *\ * | *\ *) 84f3561b8bSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 85f3561b8bSmrgesac 86f3561b8bSmrg]) 87f3561b8bSmrg 88f3561b8bSmrg 89f3561b8bSmrg# LT_INIT([OPTIONS]) 90f3561b8bSmrg# ------------------ 91f3561b8bSmrgAC_DEFUN([LT_INIT], 92f3561b8bSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 93bd304fc0SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 94f3561b8bSmrgAC_BEFORE([$0], [LT_LANG])dnl 95f3561b8bSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 96f3561b8bSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 97f3561b8bSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 98f3561b8bSmrg 99f3561b8bSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 100f3561b8bSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 101f3561b8bSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 102f3561b8bSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 103f3561b8bSmrgdnl unless we require an AC_DEFUNed macro: 104f3561b8bSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 105f3561b8bSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 106f3561b8bSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 107f3561b8bSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 108f3561b8bSmrgm4_require([_LT_PROG_LTMAIN])dnl 109f3561b8bSmrg 110bd304fc0Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 111bd304fc0Smrg 112f3561b8bSmrgdnl Parse OPTIONS 113f3561b8bSmrg_LT_SET_OPTIONS([$0], [$1]) 114fc5a983dSmrg 115fc5a983dSmrg# This can be used to rebuild libtool when needed 116f3561b8bSmrgLIBTOOL_DEPS="$ltmain" 117fc5a983dSmrg 118fc5a983dSmrg# Always use our own libtool. 119fc5a983dSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 120fc5a983dSmrgAC_SUBST(LIBTOOL)dnl 121fc5a983dSmrg 122f3561b8bSmrg_LT_SETUP 123fc5a983dSmrg 124f3561b8bSmrg# Only expand once: 125f3561b8bSmrgm4_define([LT_INIT]) 126f3561b8bSmrg])# LT_INIT 127fc5a983dSmrg 128f3561b8bSmrg# Old names: 129f3561b8bSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 130f3561b8bSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 131f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 132f3561b8bSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 133f3561b8bSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 134f3561b8bSmrg 135f3561b8bSmrg 136f3561b8bSmrg# _LT_CC_BASENAME(CC) 137f3561b8bSmrg# ------------------- 138f3561b8bSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 139f3561b8bSmrgm4_defun([_LT_CC_BASENAME], 140f3561b8bSmrg[for cc_temp in $1""; do 141f3561b8bSmrg case $cc_temp in 142f3561b8bSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 143f3561b8bSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 144f3561b8bSmrg \-*) ;; 145f3561b8bSmrg *) break;; 146f3561b8bSmrg esac 147f3561b8bSmrgdone 148bd304fc0Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 149f3561b8bSmrg]) 150f3561b8bSmrg 151f3561b8bSmrg 152f3561b8bSmrg# _LT_FILEUTILS_DEFAULTS 153f3561b8bSmrg# ---------------------- 154f3561b8bSmrg# It is okay to use these file commands and assume they have been set 155f3561b8bSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 156f3561b8bSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 157f3561b8bSmrg[: ${CP="cp -f"} 158f3561b8bSmrg: ${MV="mv -f"} 159f3561b8bSmrg: ${RM="rm -f"} 160f3561b8bSmrg])# _LT_FILEUTILS_DEFAULTS 161f3561b8bSmrg 162f3561b8bSmrg 163f3561b8bSmrg# _LT_SETUP 164f3561b8bSmrg# --------- 165f3561b8bSmrgm4_defun([_LT_SETUP], 166f3561b8bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 167fc5a983dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 168bd304fc0SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 169bd304fc0SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 170bd304fc0Smrg 171bd304fc0Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 172bd304fc0Smrgdnl 173f3561b8bSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 174f3561b8bSmrg_LT_DECL([], [host], [0])dnl 175f3561b8bSmrg_LT_DECL([], [host_os], [0])dnl 176f3561b8bSmrgdnl 177f3561b8bSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 178f3561b8bSmrg_LT_DECL([], [build], [0])dnl 179f3561b8bSmrg_LT_DECL([], [build_os], [0])dnl 180f3561b8bSmrgdnl 181fc5a983dSmrgAC_REQUIRE([AC_PROG_CC])dnl 182f3561b8bSmrgAC_REQUIRE([LT_PATH_LD])dnl 183f3561b8bSmrgAC_REQUIRE([LT_PATH_NM])dnl 184f3561b8bSmrgdnl 185fc5a983dSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 186f3561b8bSmrgtest -z "$LN_S" && LN_S="ln -s" 187f3561b8bSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 188f3561b8bSmrgdnl 189f3561b8bSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 190f3561b8bSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 191f3561b8bSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 192fc5a983dSmrgdnl 193f3561b8bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 194f3561b8bSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 195bd304fc0Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 196f3561b8bSmrgm4_require([_LT_CMD_RELOAD])dnl 197f3561b8bSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 198bd304fc0Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 199f3561b8bSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 200f3561b8bSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 201bd304fc0Smrgm4_require([_LT_WITH_SYSROOT])dnl 202f3561b8bSmrg 203f3561b8bSmrg_LT_CONFIG_LIBTOOL_INIT([ 204f3561b8bSmrg# See if we are running on zsh, and set the options which allow our 205f3561b8bSmrg# commands through without removal of \ escapes INIT. 206f3561b8bSmrgif test -n "\${ZSH_VERSION+set}" ; then 207f3561b8bSmrg setopt NO_GLOB_SUBST 208f3561b8bSmrgfi 209f3561b8bSmrg]) 210f3561b8bSmrgif test -n "${ZSH_VERSION+set}" ; then 211f3561b8bSmrg setopt NO_GLOB_SUBST 212f3561b8bSmrgfi 213f3561b8bSmrg 214f3561b8bSmrg_LT_CHECK_OBJDIR 215fc5a983dSmrg 216f3561b8bSmrgm4_require([_LT_TAG_COMPILER])dnl 217fc5a983dSmrg 218fc5a983dSmrgcase $host_os in 219fc5a983dSmrgaix3*) 220fc5a983dSmrg # AIX sometimes has problems with the GCC collect2 program. For some 221fc5a983dSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 222fc5a983dSmrg # vanish in a puff of smoke. 223fc5a983dSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 224fc5a983dSmrg COLLECT_NAMES= 225fc5a983dSmrg export COLLECT_NAMES 226fc5a983dSmrg fi 227fc5a983dSmrg ;; 228fc5a983dSmrgesac 229fc5a983dSmrg 230fc5a983dSmrg# Global variables: 231f3561b8bSmrgofile=libtool 232fc5a983dSmrgcan_build_shared=yes 233fc5a983dSmrg 234fc5a983dSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 235fc5a983dSmrg# which needs '.lib'). 236fc5a983dSmrglibext=a 237fc5a983dSmrg 238f3561b8bSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 239fc5a983dSmrg 240fc5a983dSmrgold_CC="$CC" 241fc5a983dSmrgold_CFLAGS="$CFLAGS" 242fc5a983dSmrg 243fc5a983dSmrg# Set sane defaults for various variables 244fc5a983dSmrgtest -z "$CC" && CC=cc 245fc5a983dSmrgtest -z "$LTCC" && LTCC=$CC 246fc5a983dSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 247fc5a983dSmrgtest -z "$LD" && LD=ld 248fc5a983dSmrgtest -z "$ac_objext" && ac_objext=o 249fc5a983dSmrg 250fc5a983dSmrg_LT_CC_BASENAME([$compiler]) 251fc5a983dSmrg 252fc5a983dSmrg# Only perform the check for file, if the check method requires it 253f3561b8bSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 254fc5a983dSmrgcase $deplibs_check_method in 255fc5a983dSmrgfile_magic*) 256fc5a983dSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 257f3561b8bSmrg _LT_PATH_MAGIC 258fc5a983dSmrg fi 259fc5a983dSmrg ;; 260fc5a983dSmrgesac 261fc5a983dSmrg 262f3561b8bSmrg# Use C for the default configuration in the libtool script 263f3561b8bSmrgLT_SUPPORTED_TAG([CC]) 264f3561b8bSmrg_LT_LANG_C_CONFIG 265f3561b8bSmrg_LT_LANG_DEFAULT_CONFIG 266f3561b8bSmrg_LT_CONFIG_COMMANDS 267f3561b8bSmrg])# _LT_SETUP 268fc5a983dSmrg 269fc5a983dSmrg 270bd304fc0Smrg# _LT_PREPARE_SED_QUOTE_VARS 271bd304fc0Smrg# -------------------------- 272bd304fc0Smrg# Define a few sed substitution that help us do robust quoting. 273bd304fc0Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 274bd304fc0Smrg[# Backslashify metacharacters that are still active within 275bd304fc0Smrg# double-quoted strings. 276bd304fc0Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 277bd304fc0Smrg 278bd304fc0Smrg# Same as above, but do not quote variable references. 279bd304fc0Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 280bd304fc0Smrg 281bd304fc0Smrg# Sed substitution to delay expansion of an escaped shell variable in a 282bd304fc0Smrg# double_quote_subst'ed string. 283bd304fc0Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 284bd304fc0Smrg 285bd304fc0Smrg# Sed substitution to delay expansion of an escaped single quote. 286bd304fc0Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 287bd304fc0Smrg 288bd304fc0Smrg# Sed substitution to avoid accidental globbing in evaled expressions 289bd304fc0Smrgno_glob_subst='s/\*/\\\*/g' 290bd304fc0Smrg]) 291bd304fc0Smrg 292f3561b8bSmrg# _LT_PROG_LTMAIN 293f3561b8bSmrg# --------------- 294f3561b8bSmrg# Note that this code is called both from `configure', and `config.status' 295f3561b8bSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 296f3561b8bSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 297f3561b8bSmrg# so we pass a copy along to make sure it has a sensible value anyway. 298f3561b8bSmrgm4_defun([_LT_PROG_LTMAIN], 299f3561b8bSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 300f3561b8bSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 301f3561b8bSmrgltmain="$ac_aux_dir/ltmain.sh" 302f3561b8bSmrg])# _LT_PROG_LTMAIN 303fc5a983dSmrg 304fc5a983dSmrg 305f3561b8bSmrg 306f3561b8bSmrg# So that we can recreate a full libtool script including additional 307f3561b8bSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 308f3561b8bSmrg# in macros and then make a single call at the end using the `libtool' 309f3561b8bSmrg# label. 310f3561b8bSmrg 311f3561b8bSmrg 312f3561b8bSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 313f3561b8bSmrg# ---------------------------------------- 314f3561b8bSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 315f3561b8bSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 316f3561b8bSmrg[m4_ifval([$1], 317f3561b8bSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 318f3561b8bSmrg [$1 319f3561b8bSmrg])])]) 320f3561b8bSmrg 321f3561b8bSmrg# Initialize. 322f3561b8bSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 323f3561b8bSmrg 324f3561b8bSmrg 325f3561b8bSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 326f3561b8bSmrg# ------------------------------ 327f3561b8bSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 328f3561b8bSmrgm4_define([_LT_CONFIG_LIBTOOL], 329f3561b8bSmrg[m4_ifval([$1], 330f3561b8bSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 331f3561b8bSmrg [$1 332f3561b8bSmrg])])]) 333f3561b8bSmrg 334f3561b8bSmrg# Initialize. 335f3561b8bSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 336f3561b8bSmrg 337f3561b8bSmrg 338f3561b8bSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 339f3561b8bSmrg# ----------------------------------------------------- 340f3561b8bSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 341f3561b8bSmrg[_LT_CONFIG_LIBTOOL([$1]) 342f3561b8bSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 343f3561b8bSmrg]) 344f3561b8bSmrg 345f3561b8bSmrg 346f3561b8bSmrg# _LT_FORMAT_COMMENT([COMMENT]) 347f3561b8bSmrg# ----------------------------- 348f3561b8bSmrg# Add leading comment marks to the start of each line, and a trailing 349f3561b8bSmrg# full-stop to the whole comment if one is not present already. 350f3561b8bSmrgm4_define([_LT_FORMAT_COMMENT], 351f3561b8bSmrg[m4_ifval([$1], [ 352f3561b8bSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 353f3561b8bSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 354f3561b8bSmrg)]) 355f3561b8bSmrg 356f3561b8bSmrg 357f3561b8bSmrg 358f3561b8bSmrg 359f3561b8bSmrg 360f3561b8bSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 361f3561b8bSmrg# ------------------------------------------------------------------- 362f3561b8bSmrg# CONFIGNAME is the name given to the value in the libtool script. 363f3561b8bSmrg# VARNAME is the (base) name used in the configure script. 364f3561b8bSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 365f3561b8bSmrg# VARNAME. Any other value will be used directly. 366f3561b8bSmrgm4_define([_LT_DECL], 367f3561b8bSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 368f3561b8bSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 369f3561b8bSmrg [m4_ifval([$1], [$1], [$2])]) 370f3561b8bSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 371f3561b8bSmrg m4_ifval([$4], 372f3561b8bSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 373f3561b8bSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 374f3561b8bSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 375f3561b8bSmrg]) 376f3561b8bSmrg 377f3561b8bSmrg 378f3561b8bSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 379f3561b8bSmrg# -------------------------------------------------------- 380f3561b8bSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 381f3561b8bSmrg 382f3561b8bSmrg 383f3561b8bSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 384f3561b8bSmrg# ------------------------------------------------ 385f3561b8bSmrgm4_define([lt_decl_tag_varnames], 386f3561b8bSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 387f3561b8bSmrg 388f3561b8bSmrg 389f3561b8bSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 390f3561b8bSmrg# --------------------------------------------------------- 391f3561b8bSmrgm4_define([_lt_decl_filter], 392f3561b8bSmrg[m4_case([$#], 393f3561b8bSmrg [0], [m4_fatal([$0: too few arguments: $#])], 394f3561b8bSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 395f3561b8bSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 396f3561b8bSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 397f3561b8bSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 398f3561b8bSmrg]) 399f3561b8bSmrg 400f3561b8bSmrg 401f3561b8bSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 402f3561b8bSmrg# -------------------------------------------------- 403f3561b8bSmrgm4_define([lt_decl_quote_varnames], 404f3561b8bSmrg[_lt_decl_filter([value], [1], $@)]) 405f3561b8bSmrg 406f3561b8bSmrg 407f3561b8bSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 408f3561b8bSmrg# --------------------------------------------------- 409f3561b8bSmrgm4_define([lt_decl_dquote_varnames], 410f3561b8bSmrg[_lt_decl_filter([value], [2], $@)]) 411f3561b8bSmrg 412f3561b8bSmrg 413f3561b8bSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 414f3561b8bSmrg# --------------------------------------------------- 415f3561b8bSmrgm4_define([lt_decl_varnames_tagged], 416f3561b8bSmrg[m4_assert([$# <= 2])dnl 417f3561b8bSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 418f3561b8bSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 419f3561b8bSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 420f3561b8bSmrgm4_define([_lt_decl_varnames_tagged], 421f3561b8bSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 422f3561b8bSmrg 423f3561b8bSmrg 424f3561b8bSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 425f3561b8bSmrg# ------------------------------------------------ 426f3561b8bSmrgm4_define([lt_decl_all_varnames], 427f3561b8bSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 428f3561b8bSmrg m4_if([$2], [], 429f3561b8bSmrg m4_quote(lt_decl_varnames), 430f3561b8bSmrg m4_quote(m4_shift($@))))[]dnl 431f3561b8bSmrg]) 432f3561b8bSmrgm4_define([_lt_decl_all_varnames], 433f3561b8bSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 434f3561b8bSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 435f3561b8bSmrg]) 436f3561b8bSmrg 437f3561b8bSmrg 438f3561b8bSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 439f3561b8bSmrg# ------------------------------------ 440f3561b8bSmrg# Quote a variable value, and forward it to `config.status' so that its 441f3561b8bSmrg# declaration there will have the same value as in `configure'. VARNAME 442f3561b8bSmrg# must have a single quote delimited value for this to work. 443f3561b8bSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 444bd304fc0Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 445f3561b8bSmrg 446f3561b8bSmrg 447f3561b8bSmrg# _LT_CONFIG_STATUS_DECLARATIONS 448f3561b8bSmrg# ------------------------------ 449f3561b8bSmrg# We delimit libtool config variables with single quotes, so when 450f3561b8bSmrg# we write them to config.status, we have to be sure to quote all 451f3561b8bSmrg# embedded single quotes properly. In configure, this macro expands 452f3561b8bSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 453fc5a983dSmrg# 454bd304fc0Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 455f3561b8bSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 456f3561b8bSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 457f3561b8bSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 458f3561b8bSmrg 459f3561b8bSmrg 460f3561b8bSmrg# _LT_LIBTOOL_TAGS 461f3561b8bSmrg# ---------------- 462f3561b8bSmrg# Output comment and list of tags supported by the script 463f3561b8bSmrgm4_defun([_LT_LIBTOOL_TAGS], 464f3561b8bSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 465f3561b8bSmrgavailable_tags="_LT_TAGS"dnl 466f3561b8bSmrg]) 467f3561b8bSmrg 468f3561b8bSmrg 469f3561b8bSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 470f3561b8bSmrg# ----------------------------------- 471f3561b8bSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 472f3561b8bSmrg# expand to a commented shell variable setting: 473fc5a983dSmrg# 474f3561b8bSmrg# # Some comment about what VAR is for. 475f3561b8bSmrg# visible_name=$lt_internal_name 476f3561b8bSmrgm4_define([_LT_LIBTOOL_DECLARE], 477f3561b8bSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 478f3561b8bSmrg [description])))[]dnl 479f3561b8bSmrgm4_pushdef([_libtool_name], 480f3561b8bSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 481f3561b8bSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 482f3561b8bSmrg [0], [_libtool_name=[$]$1], 483f3561b8bSmrg [1], [_libtool_name=$lt_[]$1], 484f3561b8bSmrg [2], [_libtool_name=$lt_[]$1], 485f3561b8bSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 486f3561b8bSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 487f3561b8bSmrg]) 488fc5a983dSmrg 489f3561b8bSmrg 490f3561b8bSmrg# _LT_LIBTOOL_CONFIG_VARS 491f3561b8bSmrg# ----------------------- 492f3561b8bSmrg# Produce commented declarations of non-tagged libtool config variables 493f3561b8bSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 494f3561b8bSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 495f3561b8bSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 496f3561b8bSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 497f3561b8bSmrg[m4_foreach([_lt_var], 498f3561b8bSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 499f3561b8bSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 500fc5a983dSmrg 501fc5a983dSmrg 502f3561b8bSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 503f3561b8bSmrg# ------------------------- 504f3561b8bSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 505f3561b8bSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 506f3561b8bSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 507f3561b8bSmrg 508f3561b8bSmrg 509f3561b8bSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 510f3561b8bSmrg# ------------------------------ 511f3561b8bSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 512f3561b8bSmrg 513f3561b8bSmrg 514f3561b8bSmrg# _LT_CONFIG_COMMANDS 515f3561b8bSmrg# ------------------- 516f3561b8bSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 517f3561b8bSmrg# variables for single and double quote escaping we saved from calls 518f3561b8bSmrg# to _LT_DECL, we can put quote escaped variables declarations 519f3561b8bSmrg# into `config.status', and then the shell code to quote escape them in 520f3561b8bSmrg# for loops in `config.status'. Finally, any additional code accumulated 521f3561b8bSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 522f3561b8bSmrgm4_defun([_LT_CONFIG_COMMANDS], 523f3561b8bSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 524f3561b8bSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 525f3561b8bSmrg dnl instead of duplicating it all over again into config.status, 526f3561b8bSmrg dnl then we will have config.status run $CONFIG_LT later, so it 527f3561b8bSmrg dnl needs to know what name is stored there: 528f3561b8bSmrg [AC_CONFIG_COMMANDS([libtool], 529f3561b8bSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 530f3561b8bSmrg dnl If the libtool generation code is destined for config.status, 531f3561b8bSmrg dnl expand the accumulated commands and init code now: 532f3561b8bSmrg [AC_CONFIG_COMMANDS([libtool], 533f3561b8bSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 534f3561b8bSmrg])#_LT_CONFIG_COMMANDS 535f3561b8bSmrg 536f3561b8bSmrg 537f3561b8bSmrg# Initialize. 538f3561b8bSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 539f3561b8bSmrg[ 540f3561b8bSmrg 541f3561b8bSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 542f3561b8bSmrg# if CDPATH is set. 543f3561b8bSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 544f3561b8bSmrg 545f3561b8bSmrgsed_quote_subst='$sed_quote_subst' 546f3561b8bSmrgdouble_quote_subst='$double_quote_subst' 547f3561b8bSmrgdelay_variable_subst='$delay_variable_subst' 548f3561b8bSmrg_LT_CONFIG_STATUS_DECLARATIONS 549f3561b8bSmrgLTCC='$LTCC' 550f3561b8bSmrgLTCFLAGS='$LTCFLAGS' 551f3561b8bSmrgcompiler='$compiler_DEFAULT' 552f3561b8bSmrg 553bd304fc0Smrg# A function that is used when there is no print builtin or printf. 554bd304fc0Smrgfunc_fallback_echo () 555bd304fc0Smrg{ 556bd304fc0Smrg eval 'cat <<_LTECHO_EOF 557bd304fc0Smrg\$[]1 558bd304fc0Smrg_LTECHO_EOF' 559bd304fc0Smrg} 560bd304fc0Smrg 561f3561b8bSmrg# Quote evaled strings. 562f3561b8bSmrgfor var in lt_decl_all_varnames([[ \ 563f3561b8bSmrg]], lt_decl_quote_varnames); do 564bd304fc0Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 565f3561b8bSmrg *[[\\\\\\\`\\"\\\$]]*) 566bd304fc0Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 567f3561b8bSmrg ;; 568f3561b8bSmrg *) 569f3561b8bSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 570f3561b8bSmrg ;; 571f3561b8bSmrg esac 572f3561b8bSmrgdone 573f3561b8bSmrg 574f3561b8bSmrg# Double-quote double-evaled strings. 575f3561b8bSmrgfor var in lt_decl_all_varnames([[ \ 576f3561b8bSmrg]], lt_decl_dquote_varnames); do 577bd304fc0Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 578f3561b8bSmrg *[[\\\\\\\`\\"\\\$]]*) 579bd304fc0Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 580f3561b8bSmrg ;; 581f3561b8bSmrg *) 582f3561b8bSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 583f3561b8bSmrg ;; 584f3561b8bSmrg esac 585f3561b8bSmrgdone 586f3561b8bSmrg 587f3561b8bSmrg_LT_OUTPUT_LIBTOOL_INIT 588fc5a983dSmrg]) 589f3561b8bSmrg 590bd304fc0Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 591bd304fc0Smrg# ------------------------------------ 592bd304fc0Smrg# Generate a child script FILE with all initialization necessary to 593bd304fc0Smrg# reuse the environment learned by the parent script, and make the 594bd304fc0Smrg# file executable. If COMMENT is supplied, it is inserted after the 595bd304fc0Smrg# `#!' sequence but before initialization text begins. After this 596bd304fc0Smrg# macro, additional text can be appended to FILE to form the body of 597bd304fc0Smrg# the child script. The macro ends with non-zero status if the 598bd304fc0Smrg# file could not be fully written (such as if the disk is full). 599bd304fc0Smrgm4_ifdef([AS_INIT_GENERATED], 600bd304fc0Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 601bd304fc0Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 602bd304fc0Smrg[m4_require([AS_PREPARE])]dnl 603bd304fc0Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 604bd304fc0Smrg[lt_write_fail=0 605bd304fc0Smrgcat >$1 <<_ASEOF || lt_write_fail=1 606bd304fc0Smrg#! $SHELL 607bd304fc0Smrg# Generated by $as_me. 608bd304fc0Smrg$2 609bd304fc0SmrgSHELL=\${CONFIG_SHELL-$SHELL} 610bd304fc0Smrgexport SHELL 611bd304fc0Smrg_ASEOF 612bd304fc0Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 613bd304fc0SmrgAS_SHELL_SANITIZE 614bd304fc0Smrg_AS_PREPARE 615bd304fc0Smrgexec AS_MESSAGE_FD>&1 616bd304fc0Smrg_ASEOF 617bd304fc0Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 618bd304fc0Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 619f3561b8bSmrg 620f3561b8bSmrg# LT_OUTPUT 621f3561b8bSmrg# --------- 622f3561b8bSmrg# This macro allows early generation of the libtool script (before 623f3561b8bSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 624f3561b8bSmrg# tests. 625f3561b8bSmrgAC_DEFUN([LT_OUTPUT], 626f3561b8bSmrg[: ${CONFIG_LT=./config.lt} 627f3561b8bSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 628bd304fc0Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 629bd304fc0Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 630f3561b8bSmrg 631f3561b8bSmrgcat >>"$CONFIG_LT" <<\_LTEOF 632bd304fc0Smrglt_cl_silent=false 633f3561b8bSmrgexec AS_MESSAGE_LOG_FD>>config.log 634f3561b8bSmrg{ 635f3561b8bSmrg echo 636f3561b8bSmrg AS_BOX([Running $as_me.]) 637f3561b8bSmrg} >&AS_MESSAGE_LOG_FD 638f3561b8bSmrg 639f3561b8bSmrglt_cl_help="\ 640f3561b8bSmrg\`$as_me' creates a local libtool stub from the current configuration, 641f3561b8bSmrgfor use in further configure time tests before the real libtool is 642f3561b8bSmrggenerated. 643f3561b8bSmrg 644f3561b8bSmrgUsage: $[0] [[OPTIONS]] 645f3561b8bSmrg 646f3561b8bSmrg -h, --help print this help, then exit 647f3561b8bSmrg -V, --version print version number, then exit 648f3561b8bSmrg -q, --quiet do not print progress messages 649f3561b8bSmrg -d, --debug don't remove temporary files 650f3561b8bSmrg 651f3561b8bSmrgReport bugs to <bug-libtool@gnu.org>." 652f3561b8bSmrg 653f3561b8bSmrglt_cl_version="\ 654f3561b8bSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 655f3561b8bSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 656f3561b8bSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 657f3561b8bSmrg 658bd304fc0SmrgCopyright (C) 2011 Free Software Foundation, Inc. 659f3561b8bSmrgThis config.lt script is free software; the Free Software Foundation 660f3561b8bSmrggives unlimited permision to copy, distribute and modify it." 661f3561b8bSmrg 662f3561b8bSmrgwhile test $[#] != 0 663f3561b8bSmrgdo 664f3561b8bSmrg case $[1] in 665f3561b8bSmrg --version | --v* | -V ) 666f3561b8bSmrg echo "$lt_cl_version"; exit 0 ;; 667f3561b8bSmrg --help | --h* | -h ) 668f3561b8bSmrg echo "$lt_cl_help"; exit 0 ;; 669f3561b8bSmrg --debug | --d* | -d ) 670f3561b8bSmrg debug=: ;; 671f3561b8bSmrg --quiet | --q* | --silent | --s* | -q ) 672f3561b8bSmrg lt_cl_silent=: ;; 673f3561b8bSmrg 674f3561b8bSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 675f3561b8bSmrgTry \`$[0] --help' for more information.]) ;; 676f3561b8bSmrg 677f3561b8bSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 678f3561b8bSmrgTry \`$[0] --help' for more information.]) ;; 679f3561b8bSmrg esac 680f3561b8bSmrg shift 681f3561b8bSmrgdone 682f3561b8bSmrg 683f3561b8bSmrgif $lt_cl_silent; then 684f3561b8bSmrg exec AS_MESSAGE_FD>/dev/null 685fc5a983dSmrgfi 686f3561b8bSmrg_LTEOF 687f3561b8bSmrg 688f3561b8bSmrgcat >>"$CONFIG_LT" <<_LTEOF 689f3561b8bSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 690f3561b8bSmrg_LTEOF 691f3561b8bSmrg 692f3561b8bSmrgcat >>"$CONFIG_LT" <<\_LTEOF 693f3561b8bSmrgAC_MSG_NOTICE([creating $ofile]) 694f3561b8bSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 695f3561b8bSmrgAS_EXIT(0) 696f3561b8bSmrg_LTEOF 697f3561b8bSmrgchmod +x "$CONFIG_LT" 698f3561b8bSmrg 699f3561b8bSmrg# configure is writing to config.log, but config.lt does its own redirection, 700f3561b8bSmrg# appending to config.log, which fails on DOS, as config.log is still kept 701f3561b8bSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 702f3561b8bSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 703bd304fc0Smrglt_cl_success=: 704bd304fc0Smrgtest "$silent" = yes && 705bd304fc0Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 706bd304fc0Smrgexec AS_MESSAGE_LOG_FD>/dev/null 707bd304fc0Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 708bd304fc0Smrgexec AS_MESSAGE_LOG_FD>>config.log 709bd304fc0Smrg$lt_cl_success || AS_EXIT(1) 710f3561b8bSmrg])# LT_OUTPUT 711f3561b8bSmrg 712fc5a983dSmrg 713f3561b8bSmrg# _LT_CONFIG(TAG) 714f3561b8bSmrg# --------------- 715f3561b8bSmrg# If TAG is the built-in tag, create an initial libtool script with a 716f3561b8bSmrg# default configuration from the untagged config vars. Otherwise add code 717f3561b8bSmrg# to config.status for appending the configuration named by TAG from the 718f3561b8bSmrg# matching tagged config vars. 719f3561b8bSmrgm4_defun([_LT_CONFIG], 720f3561b8bSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 721f3561b8bSmrg_LT_CONFIG_SAVE_COMMANDS([ 722f3561b8bSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 723f3561b8bSmrg m4_if(_LT_TAG, [C], [ 724f3561b8bSmrg # See if we are running on zsh, and set the options which allow our 725f3561b8bSmrg # commands through without removal of \ escapes. 726f3561b8bSmrg if test -n "${ZSH_VERSION+set}" ; then 727f3561b8bSmrg setopt NO_GLOB_SUBST 728f3561b8bSmrg fi 729fc5a983dSmrg 730f3561b8bSmrg cfgfile="${ofile}T" 731f3561b8bSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 732f3561b8bSmrg $RM "$cfgfile" 733fc5a983dSmrg 734f3561b8bSmrg cat <<_LT_EOF >> "$cfgfile" 735f3561b8bSmrg#! $SHELL 736fc5a983dSmrg 737f3561b8bSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 738f3561b8bSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 739f3561b8bSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 740f3561b8bSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 741f3561b8bSmrg# 742f3561b8bSmrg_LT_COPYING 743f3561b8bSmrg_LT_LIBTOOL_TAGS 744f3561b8bSmrg 745f3561b8bSmrg# ### BEGIN LIBTOOL CONFIG 746f3561b8bSmrg_LT_LIBTOOL_CONFIG_VARS 747f3561b8bSmrg_LT_LIBTOOL_TAG_VARS 748f3561b8bSmrg# ### END LIBTOOL CONFIG 749f3561b8bSmrg 750f3561b8bSmrg_LT_EOF 751f3561b8bSmrg 752f3561b8bSmrg case $host_os in 753f3561b8bSmrg aix3*) 754f3561b8bSmrg cat <<\_LT_EOF >> "$cfgfile" 755f3561b8bSmrg# AIX sometimes has problems with the GCC collect2 program. For some 756f3561b8bSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 757f3561b8bSmrg# vanish in a puff of smoke. 758f3561b8bSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 759f3561b8bSmrg COLLECT_NAMES= 760f3561b8bSmrg export COLLECT_NAMES 761fc5a983dSmrgfi 762f3561b8bSmrg_LT_EOF 763f3561b8bSmrg ;; 764f3561b8bSmrg esac 765fc5a983dSmrg 766f3561b8bSmrg _LT_PROG_LTMAIN 767fc5a983dSmrg 768f3561b8bSmrg # We use sed instead of cat because bash on DJGPP gets confused if 769f3561b8bSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 770f3561b8bSmrg # text mode, it properly converts lines to CR/LF. This bash problem 771f3561b8bSmrg # is reportedly fixed, but why not run on old versions too? 772bd304fc0Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 773bd304fc0Smrg || (rm -f "$cfgfile"; exit 1) 774f3561b8bSmrg 775bd304fc0Smrg _LT_PROG_REPLACE_SHELLFNS 776f3561b8bSmrg 777bd304fc0Smrg mv -f "$cfgfile" "$ofile" || 778f3561b8bSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 779f3561b8bSmrg chmod +x "$ofile" 780f3561b8bSmrg], 781f3561b8bSmrg[cat <<_LT_EOF >> "$ofile" 782f3561b8bSmrg 783f3561b8bSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 784f3561b8bSmrgdnl in a comment (ie after a #). 785f3561b8bSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 786f3561b8bSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 787f3561b8bSmrg# ### END LIBTOOL TAG CONFIG: $1 788f3561b8bSmrg_LT_EOF 789f3561b8bSmrg])dnl /m4_if 790f3561b8bSmrg], 791f3561b8bSmrg[m4_if([$1], [], [ 792f3561b8bSmrg PACKAGE='$PACKAGE' 793f3561b8bSmrg VERSION='$VERSION' 794f3561b8bSmrg TIMESTAMP='$TIMESTAMP' 795f3561b8bSmrg RM='$RM' 796f3561b8bSmrg ofile='$ofile'], []) 797f3561b8bSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 798f3561b8bSmrg])# _LT_CONFIG 799f3561b8bSmrg 800f3561b8bSmrg 801f3561b8bSmrg# LT_SUPPORTED_TAG(TAG) 802f3561b8bSmrg# --------------------- 803f3561b8bSmrg# Trace this macro to discover what tags are supported by the libtool 804f3561b8bSmrg# --tag option, using: 805f3561b8bSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 806f3561b8bSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 807f3561b8bSmrg 808f3561b8bSmrg 809f3561b8bSmrg# C support is built-in for now 810f3561b8bSmrgm4_define([_LT_LANG_C_enabled], []) 811f3561b8bSmrgm4_define([_LT_TAGS], []) 812f3561b8bSmrg 813f3561b8bSmrg 814f3561b8bSmrg# LT_LANG(LANG) 815f3561b8bSmrg# ------------- 816f3561b8bSmrg# Enable libtool support for the given language if not already enabled. 817f3561b8bSmrgAC_DEFUN([LT_LANG], 818f3561b8bSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 819f3561b8bSmrgm4_case([$1], 820f3561b8bSmrg [C], [_LT_LANG(C)], 821f3561b8bSmrg [C++], [_LT_LANG(CXX)], 822bd304fc0Smrg [Go], [_LT_LANG(GO)], 823f3561b8bSmrg [Java], [_LT_LANG(GCJ)], 824f3561b8bSmrg [Fortran 77], [_LT_LANG(F77)], 825f3561b8bSmrg [Fortran], [_LT_LANG(FC)], 826f3561b8bSmrg [Windows Resource], [_LT_LANG(RC)], 827f3561b8bSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 828f3561b8bSmrg [_LT_LANG($1)], 829f3561b8bSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 830f3561b8bSmrg])# LT_LANG 831f3561b8bSmrg 832f3561b8bSmrg 833f3561b8bSmrg# _LT_LANG(LANGNAME) 834f3561b8bSmrg# ------------------ 835f3561b8bSmrgm4_defun([_LT_LANG], 836f3561b8bSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 837f3561b8bSmrg [LT_SUPPORTED_TAG([$1])dnl 838f3561b8bSmrg m4_append([_LT_TAGS], [$1 ])dnl 839f3561b8bSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 840f3561b8bSmrg _LT_LANG_$1_CONFIG($1)])dnl 841f3561b8bSmrg])# _LT_LANG 842f3561b8bSmrg 843f3561b8bSmrg 844bd304fc0Smrgm4_ifndef([AC_PROG_GO], [ 845bd304fc0Smrg# NOTE: This macro has been submitted for inclusion into # 846bd304fc0Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 847bd304fc0Smrg# a released version of Autoconf we should remove this # 848bd304fc0Smrg# macro and use it instead. # 849bd304fc0Smrgm4_defun([AC_PROG_GO], 850bd304fc0Smrg[AC_LANG_PUSH(Go)dnl 851bd304fc0SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 852bd304fc0SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 853bd304fc0Smrg_AC_ARG_VAR_LDFLAGS()dnl 854bd304fc0SmrgAC_CHECK_TOOL(GOC, gccgo) 855bd304fc0Smrgif test -z "$GOC"; then 856bd304fc0Smrg if test -n "$ac_tool_prefix"; then 857bd304fc0Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 858bd304fc0Smrg fi 859bd304fc0Smrgfi 860bd304fc0Smrgif test -z "$GOC"; then 861bd304fc0Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 862bd304fc0Smrgfi 863bd304fc0Smrg])#m4_defun 864bd304fc0Smrg])#m4_ifndef 865bd304fc0Smrg 866bd304fc0Smrg 867f3561b8bSmrg# _LT_LANG_DEFAULT_CONFIG 868f3561b8bSmrg# ----------------------- 869f3561b8bSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 870f3561b8bSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 871f3561b8bSmrg [LT_LANG(CXX)], 872f3561b8bSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 873f3561b8bSmrg 874f3561b8bSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 875f3561b8bSmrg [LT_LANG(F77)], 876f3561b8bSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 877f3561b8bSmrg 878f3561b8bSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 879f3561b8bSmrg [LT_LANG(FC)], 880f3561b8bSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 881f3561b8bSmrg 882f3561b8bSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 883f3561b8bSmrgdnl pulling things in needlessly. 884f3561b8bSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 885f3561b8bSmrg [LT_LANG(GCJ)], 886f3561b8bSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 887f3561b8bSmrg [LT_LANG(GCJ)], 888f3561b8bSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 889f3561b8bSmrg [LT_LANG(GCJ)], 890f3561b8bSmrg [m4_ifdef([AC_PROG_GCJ], 891f3561b8bSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 892f3561b8bSmrg m4_ifdef([A][M_PROG_GCJ], 893f3561b8bSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 894f3561b8bSmrg m4_ifdef([LT_PROG_GCJ], 895f3561b8bSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 896f3561b8bSmrg 897bd304fc0SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 898bd304fc0Smrg [LT_LANG(GO)], 899bd304fc0Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 900bd304fc0Smrg 901f3561b8bSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 902f3561b8bSmrg [LT_LANG(RC)], 903f3561b8bSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 904f3561b8bSmrg])# _LT_LANG_DEFAULT_CONFIG 905f3561b8bSmrg 906f3561b8bSmrg# Obsolete macros: 907f3561b8bSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 908f3561b8bSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 909f3561b8bSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 910f3561b8bSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 911bd304fc0SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 912f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 913f3561b8bSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 914f3561b8bSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 915f3561b8bSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 916f3561b8bSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 917bd304fc0Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 918f3561b8bSmrg 919f3561b8bSmrg 920f3561b8bSmrg# _LT_TAG_COMPILER 921f3561b8bSmrg# ---------------- 922f3561b8bSmrgm4_defun([_LT_TAG_COMPILER], 923fc5a983dSmrg[AC_REQUIRE([AC_PROG_CC])dnl 924fc5a983dSmrg 925f3561b8bSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 926f3561b8bSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 927f3561b8bSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 928f3561b8bSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 929f3561b8bSmrg 930fc5a983dSmrg# If no C compiler was specified, use CC. 931fc5a983dSmrgLTCC=${LTCC-"$CC"} 932fc5a983dSmrg 933fc5a983dSmrg# If no C compiler flags were specified, use CFLAGS. 934fc5a983dSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 935fc5a983dSmrg 936fc5a983dSmrg# Allow CC to be a program name with arguments. 937fc5a983dSmrgcompiler=$CC 938f3561b8bSmrg])# _LT_TAG_COMPILER 939fc5a983dSmrg 940fc5a983dSmrg 941fc5a983dSmrg# _LT_COMPILER_BOILERPLATE 942fc5a983dSmrg# ------------------------ 943fc5a983dSmrg# Check for compiler boilerplate output or warnings with 944fc5a983dSmrg# the simple compiler test code. 945f3561b8bSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 946f3561b8bSmrg[m4_require([_LT_DECL_SED])dnl 947fc5a983dSmrgac_outfile=conftest.$ac_objext 948fc5a983dSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 949fc5a983dSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 950fc5a983dSmrg_lt_compiler_boilerplate=`cat conftest.err` 951f3561b8bSmrg$RM conftest* 952fc5a983dSmrg])# _LT_COMPILER_BOILERPLATE 953fc5a983dSmrg 954fc5a983dSmrg 955fc5a983dSmrg# _LT_LINKER_BOILERPLATE 956fc5a983dSmrg# ---------------------- 957fc5a983dSmrg# Check for linker boilerplate output or warnings with 958fc5a983dSmrg# the simple link test code. 959f3561b8bSmrgm4_defun([_LT_LINKER_BOILERPLATE], 960f3561b8bSmrg[m4_require([_LT_DECL_SED])dnl 961fc5a983dSmrgac_outfile=conftest.$ac_objext 962fc5a983dSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 963fc5a983dSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 964fc5a983dSmrg_lt_linker_boilerplate=`cat conftest.err` 965f3561b8bSmrg$RM -r conftest* 966fc5a983dSmrg])# _LT_LINKER_BOILERPLATE 967fc5a983dSmrg 968fc5a983dSmrg# _LT_REQUIRED_DARWIN_CHECKS 969f3561b8bSmrg# ------------------------- 970f3561b8bSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 971fc5a983dSmrg case $host_os in 972fc5a983dSmrg rhapsody* | darwin*) 973fc5a983dSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 974fc5a983dSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 975f3561b8bSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 976f3561b8bSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 977f3561b8bSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 978f3561b8bSmrg _LT_DECL([], [DSYMUTIL], [1], 979f3561b8bSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 980f3561b8bSmrg _LT_DECL([], [NMEDIT], [1], 981f3561b8bSmrg [Tool to change global to local symbols on Mac OS X]) 982f3561b8bSmrg _LT_DECL([], [LIPO], [1], 983f3561b8bSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 984f3561b8bSmrg _LT_DECL([], [OTOOL], [1], 985f3561b8bSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 986f3561b8bSmrg _LT_DECL([], [OTOOL64], [1], 987f3561b8bSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 988fc5a983dSmrg 989fc5a983dSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 990fc5a983dSmrg [lt_cv_apple_cc_single_mod=no 991fc5a983dSmrg if test -z "${LT_MULTI_MODULE}"; then 992f3561b8bSmrg # By default we will add the -single_module flag. You can override 993f3561b8bSmrg # by either setting the environment variable LT_MULTI_MODULE 994f3561b8bSmrg # non-empty at configure time, or by adding -multi_module to the 995f3561b8bSmrg # link flags. 996f3561b8bSmrg rm -rf libconftest.dylib* 997f3561b8bSmrg echo "int foo(void){return 1;}" > conftest.c 998f3561b8bSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 999f3561b8bSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1000f3561b8bSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1001f3561b8bSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1002f3561b8bSmrg _lt_result=$? 1003bd304fc0Smrg # If there is a non-empty error log, and "single_module" 1004bd304fc0Smrg # appears in it, assume the flag caused a linker warning 1005bd304fc0Smrg if test -s conftest.err && $GREP single_module conftest.err; then 1006bd304fc0Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1007bd304fc0Smrg # Otherwise, if the output was created with a 0 exit code from 1008bd304fc0Smrg # the compiler, it worked. 1009bd304fc0Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 1010f3561b8bSmrg lt_cv_apple_cc_single_mod=yes 1011f3561b8bSmrg else 1012f3561b8bSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1013f3561b8bSmrg fi 1014f3561b8bSmrg rm -rf libconftest.dylib* 1015f3561b8bSmrg rm -f conftest.* 1016fc5a983dSmrg fi]) 1017bd304fc0Smrg 1018fc5a983dSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1019fc5a983dSmrg [lt_cv_ld_exported_symbols_list], 1020fc5a983dSmrg [lt_cv_ld_exported_symbols_list=no 1021fc5a983dSmrg save_LDFLAGS=$LDFLAGS 1022fc5a983dSmrg echo "_main" > conftest.sym 1023fc5a983dSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1024fc5a983dSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1025f3561b8bSmrg [lt_cv_ld_exported_symbols_list=yes], 1026f3561b8bSmrg [lt_cv_ld_exported_symbols_list=no]) 1027f3561b8bSmrg LDFLAGS="$save_LDFLAGS" 1028fc5a983dSmrg ]) 1029bd304fc0Smrg 1030bd304fc0Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1031bd304fc0Smrg [lt_cv_ld_force_load=no 1032bd304fc0Smrg cat > conftest.c << _LT_EOF 1033bd304fc0Smrgint forced_loaded() { return 2;} 1034bd304fc0Smrg_LT_EOF 1035bd304fc0Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1036bd304fc0Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1037bd304fc0Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1038bd304fc0Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1039bd304fc0Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1040bd304fc0Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1041bd304fc0Smrg cat > conftest.c << _LT_EOF 1042bd304fc0Smrgint main() { return 0;} 1043bd304fc0Smrg_LT_EOF 1044bd304fc0Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1045bd304fc0Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1046bd304fc0Smrg _lt_result=$? 1047bd304fc0Smrg if test -s conftest.err && $GREP force_load conftest.err; then 1048bd304fc0Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1049bd304fc0Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 1050bd304fc0Smrg lt_cv_ld_force_load=yes 1051bd304fc0Smrg else 1052bd304fc0Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1053bd304fc0Smrg fi 1054bd304fc0Smrg rm -f conftest.err libconftest.a conftest conftest.c 1055bd304fc0Smrg rm -rf conftest.dSYM 1056bd304fc0Smrg ]) 1057fc5a983dSmrg case $host_os in 1058f3561b8bSmrg rhapsody* | darwin1.[[012]]) 1059fc5a983dSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 1060fc5a983dSmrg darwin1.*) 1061f3561b8bSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1062f3561b8bSmrg darwin*) # darwin 5.x on 1063fc5a983dSmrg # if running on 10.5 or later, the deployment target defaults 1064fc5a983dSmrg # to the OS version, if on x86, and 10.4, the deployment 1065fc5a983dSmrg # target defaults to 10.4. Don't you love it? 1066fc5a983dSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1067f3561b8bSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1068f3561b8bSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1069f3561b8bSmrg 10.[[012]]*) 1070f3561b8bSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1071f3561b8bSmrg 10.*) 1072f3561b8bSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1073fc5a983dSmrg esac 1074fc5a983dSmrg ;; 1075fc5a983dSmrg esac 1076fc5a983dSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 1077fc5a983dSmrg _lt_dar_single_mod='$single_module' 1078fc5a983dSmrg fi 1079fc5a983dSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 1080fc5a983dSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 1081fc5a983dSmrg else 1082f3561b8bSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 1083fc5a983dSmrg fi 1084bd304fc0Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1085f3561b8bSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1086fc5a983dSmrg else 1087fc5a983dSmrg _lt_dsymutil= 1088fc5a983dSmrg fi 1089fc5a983dSmrg ;; 1090fc5a983dSmrg esac 1091fc5a983dSmrg]) 1092fc5a983dSmrg 1093f3561b8bSmrg 1094bd304fc0Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1095bd304fc0Smrg# --------------------------------- 1096f3561b8bSmrg# Checks for linker and compiler features on darwin 1097f3561b8bSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1098f3561b8bSmrg[ 1099f3561b8bSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1100f3561b8bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1101f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=no 1102f3561b8bSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1103f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1104bd304fc0Smrg if test "$lt_cv_ld_force_load" = "yes"; then 1105bd304fc0Smrg _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\"`' 1106bd304fc0Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1107bd304fc0Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1108bd304fc0Smrg else 1109bd304fc0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1110bd304fc0Smrg fi 1111f3561b8bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1112f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1113f3561b8bSmrg case $cc_basename in 1114f3561b8bSmrg ifort*) _lt_dar_can_shared=yes ;; 1115f3561b8bSmrg *) _lt_dar_can_shared=$GCC ;; 1116f3561b8bSmrg esac 1117f3561b8bSmrg if test "$_lt_dar_can_shared" = "yes"; then 1118bd304fc0Smrg output_verbose_link_cmd=func_echo_all 1119f3561b8bSmrg _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}" 1120f3561b8bSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1121f3561b8bSmrg _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}" 1122f3561b8bSmrg _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}" 1123f3561b8bSmrg m4_if([$1], [CXX], 1124f3561b8bSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1125f3561b8bSmrg _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}" 1126f3561b8bSmrg _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}" 1127f3561b8bSmrg fi 1128f3561b8bSmrg],[]) 1129f3561b8bSmrg else 1130f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 1131f3561b8bSmrg fi 1132f3561b8bSmrg]) 1133f3561b8bSmrg 1134bd304fc0Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1135bd304fc0Smrg# ---------------------------------- 1136f3561b8bSmrg# Links a minimal program and checks the executable 1137f3561b8bSmrg# for the system default hardcoded library path. In most cases, 1138fc5a983dSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1139fc5a983dSmrg# the location of the communication and MPI libs are included too. 1140fc5a983dSmrg# If we don't find anything, use the default library path according 1141fc5a983dSmrg# to the aix ld manual. 1142bd304fc0Smrg# Store the results from the different compilers for each TAGNAME. 1143bd304fc0Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 1144f3561b8bSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1145f3561b8bSmrg[m4_require([_LT_DECL_SED])dnl 1146bd304fc0Smrgif test "${lt_cv_aix_libpath+set}" = set; then 1147bd304fc0Smrg aix_libpath=$lt_cv_aix_libpath 1148bd304fc0Smrgelse 1149bd304fc0Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1150bd304fc0Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1151bd304fc0Smrg lt_aix_libpath_sed='[ 1152bd304fc0Smrg /Import File Strings/,/^$/ { 1153bd304fc0Smrg /^0/ { 1154bd304fc0Smrg s/^0 *\([^ ]*\) *$/\1/ 1155bd304fc0Smrg p 1156bd304fc0Smrg } 1157bd304fc0Smrg }]' 1158bd304fc0Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1159bd304fc0Smrg # Check for a 64-bit object if we didn't find anything. 1160bd304fc0Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1161bd304fc0Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1162bd304fc0Smrg fi],[]) 1163bd304fc0Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1164bd304fc0Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1165bd304fc0Smrg fi 1166bd304fc0Smrg ]) 1167bd304fc0Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1168bd304fc0Smrgfi 1169f3561b8bSmrg])# _LT_SYS_MODULE_PATH_AIX 1170fc5a983dSmrg 1171fc5a983dSmrg 1172f3561b8bSmrg# _LT_SHELL_INIT(ARG) 1173f3561b8bSmrg# ------------------- 1174f3561b8bSmrgm4_define([_LT_SHELL_INIT], 1175bd304fc0Smrg[m4_divert_text([M4SH-INIT], [$1 1176bd304fc0Smrg])])# _LT_SHELL_INIT 1177bd304fc0Smrg 1178fc5a983dSmrg 1179fc5a983dSmrg 1180f3561b8bSmrg# _LT_PROG_ECHO_BACKSLASH 1181f3561b8bSmrg# ----------------------- 1182bd304fc0Smrg# Find how we can fake an echo command that does not interpret backslash. 1183bd304fc0Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 1184bd304fc0Smrg# of the generated configure script which will find a shell with a builtin 1185bd304fc0Smrg# printf (which we can use as an echo command). 1186f3561b8bSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1187bd304fc0Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1188bd304fc0SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1189bd304fc0SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1190bd304fc0Smrg 1191bd304fc0SmrgAC_MSG_CHECKING([how to print strings]) 1192bd304fc0Smrg# Test print first, because it will be a builtin if present. 1193bd304fc0Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1194bd304fc0Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1195bd304fc0Smrg ECHO='print -r --' 1196bd304fc0Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1197bd304fc0Smrg ECHO='printf %s\n' 1198fc5a983dSmrgelse 1199bd304fc0Smrg # Use this function as a fallback that always works. 1200bd304fc0Smrg func_fallback_echo () 1201bd304fc0Smrg { 1202bd304fc0Smrg eval 'cat <<_LTECHO_EOF 1203bd304fc0Smrg$[]1 1204bd304fc0Smrg_LTECHO_EOF' 1205bd304fc0Smrg } 1206bd304fc0Smrg ECHO='func_fallback_echo' 1207fc5a983dSmrgfi 1208fc5a983dSmrg 1209bd304fc0Smrg# func_echo_all arg... 1210bd304fc0Smrg# Invoke $ECHO with all args, space-separated. 1211bd304fc0Smrgfunc_echo_all () 1212bd304fc0Smrg{ 1213bd304fc0Smrg $ECHO "$*" 1214bd304fc0Smrg} 1215fc5a983dSmrg 1216bd304fc0Smrgcase "$ECHO" in 1217bd304fc0Smrg printf*) AC_MSG_RESULT([printf]) ;; 1218bd304fc0Smrg print*) AC_MSG_RESULT([print -r]) ;; 1219bd304fc0Smrg *) AC_MSG_RESULT([cat]) ;; 1220bd304fc0Smrgesac 1221fc5a983dSmrg 1222bd304fc0Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 1223bd304fc0Smrg[_AS_DETECT_SUGGESTED([ 1224bd304fc0Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1225bd304fc0Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1226bd304fc0Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1227bd304fc0Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1228bd304fc0Smrg PATH=/empty FPATH=/empty; export PATH FPATH 1229bd304fc0Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1230bd304fc0Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1231fc5a983dSmrg 1232f3561b8bSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1233bd304fc0Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1234f3561b8bSmrg])# _LT_PROG_ECHO_BACKSLASH 1235fc5a983dSmrg 1236fc5a983dSmrg 1237bd304fc0Smrg# _LT_WITH_SYSROOT 1238bd304fc0Smrg# ---------------- 1239bd304fc0SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1240bd304fc0Smrg[AC_MSG_CHECKING([for sysroot]) 1241bd304fc0SmrgAC_ARG_WITH([sysroot], 1242bd304fc0Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1243bd304fc0Smrg (or the compiler's sysroot if not specified).], 1244bd304fc0Smrg[], [with_sysroot=no]) 1245bd304fc0Smrg 1246bd304fc0Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 1247bd304fc0Smrgdnl in case the user passed a directory name. 1248bd304fc0Smrglt_sysroot= 1249bd304fc0Smrgcase ${with_sysroot} in #( 1250bd304fc0Smrg yes) 1251bd304fc0Smrg if test "$GCC" = yes; then 1252bd304fc0Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1253bd304fc0Smrg fi 1254bd304fc0Smrg ;; #( 1255bd304fc0Smrg /*) 1256bd304fc0Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1257bd304fc0Smrg ;; #( 1258bd304fc0Smrg no|'') 1259bd304fc0Smrg ;; #( 1260bd304fc0Smrg *) 1261bd304fc0Smrg AC_MSG_RESULT([${with_sysroot}]) 1262bd304fc0Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1263bd304fc0Smrg ;; 1264bd304fc0Smrgesac 1265bd304fc0Smrg 1266bd304fc0Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1267bd304fc0Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1268bd304fc0Smrg[dependent libraries, and in which our libraries should be installed.])]) 1269bd304fc0Smrg 1270f3561b8bSmrg# _LT_ENABLE_LOCK 1271f3561b8bSmrg# --------------- 1272f3561b8bSmrgm4_defun([_LT_ENABLE_LOCK], 1273fc5a983dSmrg[AC_ARG_ENABLE([libtool-lock], 1274f3561b8bSmrg [AS_HELP_STRING([--disable-libtool-lock], 1275f3561b8bSmrg [avoid locking (might break parallel builds)])]) 1276fc5a983dSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1277fc5a983dSmrg 1278fc5a983dSmrg# Some flags need to be propagated to the compiler or linker for good 1279fc5a983dSmrg# libtool support. 1280fc5a983dSmrgcase $host in 1281fc5a983dSmrgia64-*-hpux*) 1282fc5a983dSmrg # Find out which ABI we are using. 1283fc5a983dSmrg echo 'int i;' > conftest.$ac_ext 1284fc5a983dSmrg if AC_TRY_EVAL(ac_compile); then 1285fc5a983dSmrg case `/usr/bin/file conftest.$ac_objext` in 1286f3561b8bSmrg *ELF-32*) 1287f3561b8bSmrg HPUX_IA64_MODE="32" 1288f3561b8bSmrg ;; 1289f3561b8bSmrg *ELF-64*) 1290f3561b8bSmrg HPUX_IA64_MODE="64" 1291f3561b8bSmrg ;; 1292fc5a983dSmrg esac 1293fc5a983dSmrg fi 1294fc5a983dSmrg rm -rf conftest* 1295fc5a983dSmrg ;; 1296fc5a983dSmrg*-*-irix6*) 1297fc5a983dSmrg # Find out which ABI we are using. 1298bd304fc0Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1299fc5a983dSmrg if AC_TRY_EVAL(ac_compile); then 1300f3561b8bSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 1301f3561b8bSmrg case `/usr/bin/file conftest.$ac_objext` in 1302f3561b8bSmrg *32-bit*) 1303f3561b8bSmrg LD="${LD-ld} -melf32bsmip" 1304f3561b8bSmrg ;; 1305f3561b8bSmrg *N32*) 1306f3561b8bSmrg LD="${LD-ld} -melf32bmipn32" 1307f3561b8bSmrg ;; 1308f3561b8bSmrg *64-bit*) 1309f3561b8bSmrg LD="${LD-ld} -melf64bmip" 1310f3561b8bSmrg ;; 1311f3561b8bSmrg esac 1312f3561b8bSmrg else 1313f3561b8bSmrg case `/usr/bin/file conftest.$ac_objext` in 1314f3561b8bSmrg *32-bit*) 1315f3561b8bSmrg LD="${LD-ld} -32" 1316f3561b8bSmrg ;; 1317f3561b8bSmrg *N32*) 1318f3561b8bSmrg LD="${LD-ld} -n32" 1319f3561b8bSmrg ;; 1320f3561b8bSmrg *64-bit*) 1321f3561b8bSmrg LD="${LD-ld} -64" 1322f3561b8bSmrg ;; 1323f3561b8bSmrg esac 1324f3561b8bSmrg fi 1325fc5a983dSmrg fi 1326fc5a983dSmrg rm -rf conftest* 1327fc5a983dSmrg ;; 1328fc5a983dSmrg 1329fc5a983dSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1330f3561b8bSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1331fc5a983dSmrg # Find out which ABI we are using. 1332fc5a983dSmrg echo 'int i;' > conftest.$ac_ext 1333fc5a983dSmrg if AC_TRY_EVAL(ac_compile); then 1334fc5a983dSmrg case `/usr/bin/file conftest.o` in 1335f3561b8bSmrg *32-bit*) 1336f3561b8bSmrg case $host in 1337f3561b8bSmrg x86_64-*kfreebsd*-gnu) 1338f3561b8bSmrg LD="${LD-ld} -m elf_i386_fbsd" 1339f3561b8bSmrg ;; 1340f3561b8bSmrg x86_64-*linux*) 1341f3561b8bSmrg LD="${LD-ld} -m elf_i386" 1342f3561b8bSmrg ;; 1343f3561b8bSmrg ppc64-*linux*|powerpc64-*linux*) 1344f3561b8bSmrg LD="${LD-ld} -m elf32ppclinux" 1345f3561b8bSmrg ;; 1346f3561b8bSmrg s390x-*linux*) 1347f3561b8bSmrg LD="${LD-ld} -m elf_s390" 1348f3561b8bSmrg ;; 1349f3561b8bSmrg sparc64-*linux*) 1350f3561b8bSmrg LD="${LD-ld} -m elf32_sparc" 1351f3561b8bSmrg ;; 1352f3561b8bSmrg esac 1353f3561b8bSmrg ;; 1354f3561b8bSmrg *64-bit*) 1355f3561b8bSmrg case $host in 1356f3561b8bSmrg x86_64-*kfreebsd*-gnu) 1357f3561b8bSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 1358f3561b8bSmrg ;; 1359f3561b8bSmrg x86_64-*linux*) 1360f3561b8bSmrg LD="${LD-ld} -m elf_x86_64" 1361f3561b8bSmrg ;; 1362f3561b8bSmrg ppc*-*linux*|powerpc*-*linux*) 1363f3561b8bSmrg LD="${LD-ld} -m elf64ppc" 1364f3561b8bSmrg ;; 1365f3561b8bSmrg s390*-*linux*|s390*-*tpf*) 1366f3561b8bSmrg LD="${LD-ld} -m elf64_s390" 1367f3561b8bSmrg ;; 1368f3561b8bSmrg sparc*-*linux*) 1369f3561b8bSmrg LD="${LD-ld} -m elf64_sparc" 1370f3561b8bSmrg ;; 1371f3561b8bSmrg esac 1372f3561b8bSmrg ;; 1373fc5a983dSmrg esac 1374fc5a983dSmrg fi 1375fc5a983dSmrg rm -rf conftest* 1376fc5a983dSmrg ;; 1377fc5a983dSmrg 1378fc5a983dSmrg*-*-sco3.2v5*) 1379fc5a983dSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1380fc5a983dSmrg SAVE_CFLAGS="$CFLAGS" 1381fc5a983dSmrg CFLAGS="$CFLAGS -belf" 1382fc5a983dSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1383fc5a983dSmrg [AC_LANG_PUSH(C) 1384f3561b8bSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1385fc5a983dSmrg AC_LANG_POP]) 1386fc5a983dSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1387fc5a983dSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1388fc5a983dSmrg CFLAGS="$SAVE_CFLAGS" 1389fc5a983dSmrg fi 1390fc5a983dSmrg ;; 1391bd304fc0Smrg*-*solaris*) 1392fc5a983dSmrg # Find out which ABI we are using. 1393fc5a983dSmrg echo 'int i;' > conftest.$ac_ext 1394fc5a983dSmrg if AC_TRY_EVAL(ac_compile); then 1395fc5a983dSmrg case `/usr/bin/file conftest.o` in 1396fc5a983dSmrg *64-bit*) 1397fc5a983dSmrg case $lt_cv_prog_gnu_ld in 1398bd304fc0Smrg yes*) 1399bd304fc0Smrg case $host in 1400bd304fc0Smrg i?86-*-solaris*) 1401bd304fc0Smrg LD="${LD-ld} -m elf_x86_64" 1402bd304fc0Smrg ;; 1403bd304fc0Smrg sparc*-*-solaris*) 1404bd304fc0Smrg LD="${LD-ld} -m elf64_sparc" 1405bd304fc0Smrg ;; 1406bd304fc0Smrg esac 1407bd304fc0Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1408bd304fc0Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1409bd304fc0Smrg LD="${LD-ld}_sol2" 1410bd304fc0Smrg fi 1411bd304fc0Smrg ;; 1412fc5a983dSmrg *) 1413f3561b8bSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1414fc5a983dSmrg LD="${LD-ld} -64" 1415fc5a983dSmrg fi 1416fc5a983dSmrg ;; 1417fc5a983dSmrg esac 1418fc5a983dSmrg ;; 1419fc5a983dSmrg esac 1420fc5a983dSmrg fi 1421fc5a983dSmrg rm -rf conftest* 1422fc5a983dSmrg ;; 1423fc5a983dSmrgesac 1424fc5a983dSmrg 1425fc5a983dSmrgneed_locks="$enable_libtool_lock" 1426f3561b8bSmrg])# _LT_ENABLE_LOCK 1427f3561b8bSmrg 1428f3561b8bSmrg 1429bd304fc0Smrg# _LT_PROG_AR 1430bd304fc0Smrg# ----------- 1431bd304fc0Smrgm4_defun([_LT_PROG_AR], 1432bd304fc0Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1433bd304fc0Smrg: ${AR=ar} 1434bd304fc0Smrg: ${AR_FLAGS=cru} 1435bd304fc0Smrg_LT_DECL([], [AR], [1], [The archiver]) 1436bd304fc0Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1437bd304fc0Smrg 1438bd304fc0SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1439bd304fc0Smrg [lt_cv_ar_at_file=no 1440bd304fc0Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1441bd304fc0Smrg [echo conftest.$ac_objext > conftest.lst 1442bd304fc0Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1443bd304fc0Smrg AC_TRY_EVAL([lt_ar_try]) 1444bd304fc0Smrg if test "$ac_status" -eq 0; then 1445bd304fc0Smrg # Ensure the archiver fails upon bogus file names. 1446bd304fc0Smrg rm -f conftest.$ac_objext libconftest.a 1447bd304fc0Smrg AC_TRY_EVAL([lt_ar_try]) 1448bd304fc0Smrg if test "$ac_status" -ne 0; then 1449bd304fc0Smrg lt_cv_ar_at_file=@ 1450bd304fc0Smrg fi 1451bd304fc0Smrg fi 1452bd304fc0Smrg rm -f conftest.* libconftest.a 1453bd304fc0Smrg ]) 1454bd304fc0Smrg ]) 1455bd304fc0Smrg 1456bd304fc0Smrgif test "x$lt_cv_ar_at_file" = xno; then 1457bd304fc0Smrg archiver_list_spec= 1458bd304fc0Smrgelse 1459bd304fc0Smrg archiver_list_spec=$lt_cv_ar_at_file 1460bd304fc0Smrgfi 1461bd304fc0Smrg_LT_DECL([], [archiver_list_spec], [1], 1462bd304fc0Smrg [How to feed a file listing to the archiver]) 1463bd304fc0Smrg])# _LT_PROG_AR 1464bd304fc0Smrg 1465bd304fc0Smrg 1466f3561b8bSmrg# _LT_CMD_OLD_ARCHIVE 1467f3561b8bSmrg# ------------------- 1468f3561b8bSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1469bd304fc0Smrg[_LT_PROG_AR 1470f3561b8bSmrg 1471f3561b8bSmrgAC_CHECK_TOOL(STRIP, strip, :) 1472f3561b8bSmrgtest -z "$STRIP" && STRIP=: 1473f3561b8bSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1474f3561b8bSmrg 1475f3561b8bSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1476f3561b8bSmrgtest -z "$RANLIB" && RANLIB=: 1477f3561b8bSmrg_LT_DECL([], [RANLIB], [1], 1478f3561b8bSmrg [Commands used to install an old-style archive]) 1479f3561b8bSmrg 1480f3561b8bSmrg# Determine commands to create old-style static archives. 1481f3561b8bSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1482f3561b8bSmrgold_postinstall_cmds='chmod 644 $oldlib' 1483f3561b8bSmrgold_postuninstall_cmds= 1484fc5a983dSmrg 1485f3561b8bSmrgif test -n "$RANLIB"; then 1486f3561b8bSmrg case $host_os in 1487f3561b8bSmrg openbsd*) 1488bd304fc0Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1489f3561b8bSmrg ;; 1490f3561b8bSmrg *) 1491bd304fc0Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1492f3561b8bSmrg ;; 1493f3561b8bSmrg esac 1494bd304fc0Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1495f3561b8bSmrgfi 1496bd304fc0Smrg 1497bd304fc0Smrgcase $host_os in 1498bd304fc0Smrg darwin*) 1499bd304fc0Smrg lock_old_archive_extraction=yes ;; 1500bd304fc0Smrg *) 1501bd304fc0Smrg lock_old_archive_extraction=no ;; 1502bd304fc0Smrgesac 1503f3561b8bSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 1504f3561b8bSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1505f3561b8bSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 1506f3561b8bSmrg [Commands used to build an old-style archive]) 1507bd304fc0Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 1508bd304fc0Smrg [Whether to use a lock for old archive extraction]) 1509f3561b8bSmrg])# _LT_CMD_OLD_ARCHIVE 1510fc5a983dSmrg 1511fc5a983dSmrg 1512f3561b8bSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1513fc5a983dSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1514fc5a983dSmrg# ---------------------------------------------------------------- 1515fc5a983dSmrg# Check whether the given compiler option works 1516f3561b8bSmrgAC_DEFUN([_LT_COMPILER_OPTION], 1517f3561b8bSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1518f3561b8bSmrgm4_require([_LT_DECL_SED])dnl 1519fc5a983dSmrgAC_CACHE_CHECK([$1], [$2], 1520fc5a983dSmrg [$2=no 1521f3561b8bSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1522fc5a983dSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1523fc5a983dSmrg lt_compiler_flag="$3" 1524fc5a983dSmrg # Insert the option either (1) after the last *FLAGS variable, or 1525fc5a983dSmrg # (2) before a word containing "conftest.", or (3) at the end. 1526fc5a983dSmrg # Note that $ac_compile itself does not contain backslashes and begins 1527fc5a983dSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1528fc5a983dSmrg # The option is referenced via a variable to avoid confusing sed. 1529fc5a983dSmrg lt_compile=`echo "$ac_compile" | $SED \ 1530fc5a983dSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1531fc5a983dSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1532fc5a983dSmrg -e 's:$: $lt_compiler_flag:'` 1533bd304fc0Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1534fc5a983dSmrg (eval "$lt_compile" 2>conftest.err) 1535fc5a983dSmrg ac_status=$? 1536fc5a983dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1537bd304fc0Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1538fc5a983dSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 1539fc5a983dSmrg # The compiler can only warn and ignore the option if not recognized 1540fc5a983dSmrg # So say no if there are warnings other than the usual output. 1541bd304fc0Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1542fc5a983dSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1543fc5a983dSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1544fc5a983dSmrg $2=yes 1545fc5a983dSmrg fi 1546fc5a983dSmrg fi 1547f3561b8bSmrg $RM conftest* 1548fc5a983dSmrg]) 1549fc5a983dSmrg 1550fc5a983dSmrgif test x"[$]$2" = xyes; then 1551f3561b8bSmrg m4_if([$5], , :, [$5]) 1552fc5a983dSmrgelse 1553f3561b8bSmrg m4_if([$6], , :, [$6]) 1554fc5a983dSmrgfi 1555f3561b8bSmrg])# _LT_COMPILER_OPTION 1556fc5a983dSmrg 1557f3561b8bSmrg# Old name: 1558f3561b8bSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1559f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 1560f3561b8bSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1561fc5a983dSmrg 1562f3561b8bSmrg 1563f3561b8bSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1564f3561b8bSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1565f3561b8bSmrg# ---------------------------------------------------- 1566f3561b8bSmrg# Check whether the given linker option works 1567f3561b8bSmrgAC_DEFUN([_LT_LINKER_OPTION], 1568f3561b8bSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1569f3561b8bSmrgm4_require([_LT_DECL_SED])dnl 1570fc5a983dSmrgAC_CACHE_CHECK([$1], [$2], 1571fc5a983dSmrg [$2=no 1572fc5a983dSmrg save_LDFLAGS="$LDFLAGS" 1573fc5a983dSmrg LDFLAGS="$LDFLAGS $3" 1574fc5a983dSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1575fc5a983dSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1576fc5a983dSmrg # The linker can only warn and ignore the option if not recognized 1577fc5a983dSmrg # So say no if there are warnings 1578fc5a983dSmrg if test -s conftest.err; then 1579fc5a983dSmrg # Append any errors to the config.log. 1580fc5a983dSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1581bd304fc0Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1582fc5a983dSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1583fc5a983dSmrg if diff conftest.exp conftest.er2 >/dev/null; then 1584fc5a983dSmrg $2=yes 1585fc5a983dSmrg fi 1586fc5a983dSmrg else 1587fc5a983dSmrg $2=yes 1588fc5a983dSmrg fi 1589fc5a983dSmrg fi 1590f3561b8bSmrg $RM -r conftest* 1591fc5a983dSmrg LDFLAGS="$save_LDFLAGS" 1592fc5a983dSmrg]) 1593fc5a983dSmrg 1594fc5a983dSmrgif test x"[$]$2" = xyes; then 1595f3561b8bSmrg m4_if([$4], , :, [$4]) 1596fc5a983dSmrgelse 1597f3561b8bSmrg m4_if([$5], , :, [$5]) 1598fc5a983dSmrgfi 1599f3561b8bSmrg])# _LT_LINKER_OPTION 1600fc5a983dSmrg 1601f3561b8bSmrg# Old name: 1602f3561b8bSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1603f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 1604f3561b8bSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1605fc5a983dSmrg 1606f3561b8bSmrg 1607f3561b8bSmrg# LT_CMD_MAX_LEN 1608f3561b8bSmrg#--------------- 1609f3561b8bSmrgAC_DEFUN([LT_CMD_MAX_LEN], 1610f3561b8bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1611f3561b8bSmrg# find the maximum length of command line arguments 1612fc5a983dSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1613fc5a983dSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1614fc5a983dSmrg i=0 1615fc5a983dSmrg teststring="ABCD" 1616fc5a983dSmrg 1617fc5a983dSmrg case $build_os in 1618fc5a983dSmrg msdosdjgpp*) 1619fc5a983dSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1620fc5a983dSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1621fc5a983dSmrg # during glob expansion). Even if it were fixed, the result of this 1622fc5a983dSmrg # check would be larger than it should be. 1623fc5a983dSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1624fc5a983dSmrg ;; 1625fc5a983dSmrg 1626fc5a983dSmrg gnu*) 1627fc5a983dSmrg # Under GNU Hurd, this test is not required because there is 1628fc5a983dSmrg # no limit to the length of command line arguments. 1629fc5a983dSmrg # Libtool will interpret -1 as no limit whatsoever 1630fc5a983dSmrg lt_cv_sys_max_cmd_len=-1; 1631fc5a983dSmrg ;; 1632fc5a983dSmrg 1633f3561b8bSmrg cygwin* | mingw* | cegcc*) 1634fc5a983dSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1635fc5a983dSmrg # about 5 minutes as the teststring grows exponentially. 1636fc5a983dSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 1637fc5a983dSmrg # you end up with a "frozen" computer, even though with patience 1638fc5a983dSmrg # the test eventually succeeds (with a max line length of 256k). 1639fc5a983dSmrg # Instead, let's just punt: use the minimum linelength reported by 1640fc5a983dSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 1641fc5a983dSmrg lt_cv_sys_max_cmd_len=8192; 1642fc5a983dSmrg ;; 1643fc5a983dSmrg 1644bd304fc0Smrg mint*) 1645bd304fc0Smrg # On MiNT this can take a long time and run out of memory. 1646bd304fc0Smrg lt_cv_sys_max_cmd_len=8192; 1647bd304fc0Smrg ;; 1648bd304fc0Smrg 1649fc5a983dSmrg amigaos*) 1650fc5a983dSmrg # On AmigaOS with pdksh, this test takes hours, literally. 1651fc5a983dSmrg # So we just punt and use a minimum line length of 8192. 1652fc5a983dSmrg lt_cv_sys_max_cmd_len=8192; 1653fc5a983dSmrg ;; 1654fc5a983dSmrg 1655fc5a983dSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1656fc5a983dSmrg # This has been around since 386BSD, at least. Likely further. 1657fc5a983dSmrg if test -x /sbin/sysctl; then 1658fc5a983dSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1659fc5a983dSmrg elif test -x /usr/sbin/sysctl; then 1660fc5a983dSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1661fc5a983dSmrg else 1662fc5a983dSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1663fc5a983dSmrg fi 1664fc5a983dSmrg # And add a safety zone 1665fc5a983dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1666fc5a983dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1667fc5a983dSmrg ;; 1668fc5a983dSmrg 1669fc5a983dSmrg interix*) 1670fc5a983dSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1671fc5a983dSmrg lt_cv_sys_max_cmd_len=196608 1672fc5a983dSmrg ;; 1673fc5a983dSmrg 1674bd304fc0Smrg os2*) 1675bd304fc0Smrg # The test takes a long time on OS/2. 1676bd304fc0Smrg lt_cv_sys_max_cmd_len=8192 1677bd304fc0Smrg ;; 1678bd304fc0Smrg 1679fc5a983dSmrg osf*) 1680fc5a983dSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1681fc5a983dSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1682fc5a983dSmrg # nice to cause kernel panics so lets avoid the loop below. 1683fc5a983dSmrg # First set a reasonable default. 1684fc5a983dSmrg lt_cv_sys_max_cmd_len=16384 1685fc5a983dSmrg # 1686fc5a983dSmrg if test -x /sbin/sysconfig; then 1687fc5a983dSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1688fc5a983dSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1689fc5a983dSmrg esac 1690fc5a983dSmrg fi 1691fc5a983dSmrg ;; 1692fc5a983dSmrg sco3.2v5*) 1693fc5a983dSmrg lt_cv_sys_max_cmd_len=102400 1694fc5a983dSmrg ;; 1695fc5a983dSmrg sysv5* | sco5v6* | sysv4.2uw2*) 1696fc5a983dSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1697fc5a983dSmrg if test -n "$kargmax"; then 1698f3561b8bSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1699fc5a983dSmrg else 1700fc5a983dSmrg lt_cv_sys_max_cmd_len=32768 1701fc5a983dSmrg fi 1702fc5a983dSmrg ;; 1703fc5a983dSmrg *) 1704fc5a983dSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1705fc5a983dSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 1706fc5a983dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1707fc5a983dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1708fc5a983dSmrg else 1709f3561b8bSmrg # Make teststring a little bigger before we do anything with it. 1710f3561b8bSmrg # a 1K string should be a reasonable start. 1711f3561b8bSmrg for i in 1 2 3 4 5 6 7 8 ; do 1712f3561b8bSmrg teststring=$teststring$teststring 1713f3561b8bSmrg done 1714fc5a983dSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1715f3561b8bSmrg # If test is not a shell built-in, we'll probably end up computing a 1716f3561b8bSmrg # maximum length that is only half of the actual maximum length, but 1717f3561b8bSmrg # we can't tell. 1718bd304fc0Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 1719bd304fc0Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1720fc5a983dSmrg test $i != 17 # 1/2 MB should be enough 1721fc5a983dSmrg do 1722fc5a983dSmrg i=`expr $i + 1` 1723fc5a983dSmrg teststring=$teststring$teststring 1724fc5a983dSmrg done 1725f3561b8bSmrg # Only check the string length outside the loop. 1726f3561b8bSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1727fc5a983dSmrg teststring= 1728f3561b8bSmrg # Add a significant safety factor because C++ compilers can tack on 1729f3561b8bSmrg # massive amounts of additional arguments before passing them to the 1730f3561b8bSmrg # linker. It appears as though 1/2 is a usable value. 1731fc5a983dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1732fc5a983dSmrg fi 1733fc5a983dSmrg ;; 1734fc5a983dSmrg esac 1735fc5a983dSmrg]) 1736fc5a983dSmrgif test -n $lt_cv_sys_max_cmd_len ; then 1737fc5a983dSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1738fc5a983dSmrgelse 1739fc5a983dSmrg AC_MSG_RESULT(none) 1740fc5a983dSmrgfi 1741f3561b8bSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1742f3561b8bSmrg_LT_DECL([], [max_cmd_len], [0], 1743f3561b8bSmrg [What is the maximum length of a command?]) 1744f3561b8bSmrg])# LT_CMD_MAX_LEN 1745fc5a983dSmrg 1746f3561b8bSmrg# Old name: 1747f3561b8bSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1748f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 1749f3561b8bSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1750fc5a983dSmrg 1751f3561b8bSmrg 1752f3561b8bSmrg# _LT_HEADER_DLFCN 1753f3561b8bSmrg# ---------------- 1754f3561b8bSmrgm4_defun([_LT_HEADER_DLFCN], 1755f3561b8bSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1756f3561b8bSmrg])# _LT_HEADER_DLFCN 1757fc5a983dSmrg 1758fc5a983dSmrg 1759f3561b8bSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1760f3561b8bSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1761f3561b8bSmrg# ---------------------------------------------------------------- 1762f3561b8bSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 1763f3561b8bSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1764fc5a983dSmrgif test "$cross_compiling" = yes; then : 1765fc5a983dSmrg [$4] 1766fc5a983dSmrgelse 1767fc5a983dSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1768fc5a983dSmrg lt_status=$lt_dlunknown 1769f3561b8bSmrg cat > conftest.$ac_ext <<_LT_EOF 1770bd304fc0Smrg[#line $LINENO "configure" 1771fc5a983dSmrg#include "confdefs.h" 1772fc5a983dSmrg 1773fc5a983dSmrg#if HAVE_DLFCN_H 1774fc5a983dSmrg#include <dlfcn.h> 1775fc5a983dSmrg#endif 1776fc5a983dSmrg 1777fc5a983dSmrg#include <stdio.h> 1778fc5a983dSmrg 1779fc5a983dSmrg#ifdef RTLD_GLOBAL 1780fc5a983dSmrg# define LT_DLGLOBAL RTLD_GLOBAL 1781fc5a983dSmrg#else 1782fc5a983dSmrg# ifdef DL_GLOBAL 1783fc5a983dSmrg# define LT_DLGLOBAL DL_GLOBAL 1784fc5a983dSmrg# else 1785fc5a983dSmrg# define LT_DLGLOBAL 0 1786fc5a983dSmrg# endif 1787fc5a983dSmrg#endif 1788fc5a983dSmrg 1789fc5a983dSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1790fc5a983dSmrg find out it does not work in some platform. */ 1791fc5a983dSmrg#ifndef LT_DLLAZY_OR_NOW 1792fc5a983dSmrg# ifdef RTLD_LAZY 1793fc5a983dSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1794fc5a983dSmrg# else 1795fc5a983dSmrg# ifdef DL_LAZY 1796fc5a983dSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 1797fc5a983dSmrg# else 1798fc5a983dSmrg# ifdef RTLD_NOW 1799fc5a983dSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1800fc5a983dSmrg# else 1801fc5a983dSmrg# ifdef DL_NOW 1802fc5a983dSmrg# define LT_DLLAZY_OR_NOW DL_NOW 1803fc5a983dSmrg# else 1804fc5a983dSmrg# define LT_DLLAZY_OR_NOW 0 1805fc5a983dSmrg# endif 1806fc5a983dSmrg# endif 1807fc5a983dSmrg# endif 1808fc5a983dSmrg# endif 1809fc5a983dSmrg#endif 1810fc5a983dSmrg 1811bd304fc0Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 1812bd304fc0Smrg correspondingly for the symbols needed. */ 1813bd304fc0Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1814bd304fc0Smrgint fnord () __attribute__((visibility("default"))); 1815bd304fc0Smrg#endif 1816bd304fc0Smrg 1817bd304fc0Smrgint fnord () { return 42; } 1818fc5a983dSmrgint main () 1819fc5a983dSmrg{ 1820fc5a983dSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1821fc5a983dSmrg int status = $lt_dlunknown; 1822fc5a983dSmrg 1823fc5a983dSmrg if (self) 1824fc5a983dSmrg { 1825fc5a983dSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1826bd304fc0Smrg else 1827bd304fc0Smrg { 1828bd304fc0Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1829bd304fc0Smrg else puts (dlerror ()); 1830bd304fc0Smrg } 1831fc5a983dSmrg /* dlclose (self); */ 1832fc5a983dSmrg } 1833fc5a983dSmrg else 1834fc5a983dSmrg puts (dlerror ()); 1835fc5a983dSmrg 1836f3561b8bSmrg return status; 1837fc5a983dSmrg}] 1838f3561b8bSmrg_LT_EOF 1839fc5a983dSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1840fc5a983dSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1841fc5a983dSmrg lt_status=$? 1842fc5a983dSmrg case x$lt_status in 1843fc5a983dSmrg x$lt_dlno_uscore) $1 ;; 1844fc5a983dSmrg x$lt_dlneed_uscore) $2 ;; 1845fc5a983dSmrg x$lt_dlunknown|x*) $3 ;; 1846fc5a983dSmrg esac 1847fc5a983dSmrg else : 1848fc5a983dSmrg # compilation failed 1849fc5a983dSmrg $3 1850fc5a983dSmrg fi 1851fc5a983dSmrgfi 1852fc5a983dSmrgrm -fr conftest* 1853f3561b8bSmrg])# _LT_TRY_DLOPEN_SELF 1854fc5a983dSmrg 1855fc5a983dSmrg 1856f3561b8bSmrg# LT_SYS_DLOPEN_SELF 1857f3561b8bSmrg# ------------------ 1858f3561b8bSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1859f3561b8bSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1860fc5a983dSmrgif test "x$enable_dlopen" != xyes; then 1861fc5a983dSmrg enable_dlopen=unknown 1862fc5a983dSmrg enable_dlopen_self=unknown 1863fc5a983dSmrg enable_dlopen_self_static=unknown 1864fc5a983dSmrgelse 1865fc5a983dSmrg lt_cv_dlopen=no 1866fc5a983dSmrg lt_cv_dlopen_libs= 1867fc5a983dSmrg 1868fc5a983dSmrg case $host_os in 1869fc5a983dSmrg beos*) 1870fc5a983dSmrg lt_cv_dlopen="load_add_on" 1871fc5a983dSmrg lt_cv_dlopen_libs= 1872fc5a983dSmrg lt_cv_dlopen_self=yes 1873fc5a983dSmrg ;; 1874fc5a983dSmrg 1875f3561b8bSmrg mingw* | pw32* | cegcc*) 1876fc5a983dSmrg lt_cv_dlopen="LoadLibrary" 1877fc5a983dSmrg lt_cv_dlopen_libs= 1878f3561b8bSmrg ;; 1879fc5a983dSmrg 1880fc5a983dSmrg cygwin*) 1881fc5a983dSmrg lt_cv_dlopen="dlopen" 1882fc5a983dSmrg lt_cv_dlopen_libs= 1883f3561b8bSmrg ;; 1884fc5a983dSmrg 1885fc5a983dSmrg darwin*) 1886fc5a983dSmrg # if libdl is installed we need to link against it 1887fc5a983dSmrg AC_CHECK_LIB([dl], [dlopen], 1888fc5a983dSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1889fc5a983dSmrg lt_cv_dlopen="dyld" 1890fc5a983dSmrg lt_cv_dlopen_libs= 1891fc5a983dSmrg lt_cv_dlopen_self=yes 1892fc5a983dSmrg ]) 1893f3561b8bSmrg ;; 1894fc5a983dSmrg 1895fc5a983dSmrg *) 1896fc5a983dSmrg AC_CHECK_FUNC([shl_load], 1897fc5a983dSmrg [lt_cv_dlopen="shl_load"], 1898fc5a983dSmrg [AC_CHECK_LIB([dld], [shl_load], 1899fc5a983dSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1900fc5a983dSmrg [AC_CHECK_FUNC([dlopen], 1901fc5a983dSmrg [lt_cv_dlopen="dlopen"], 1902fc5a983dSmrg [AC_CHECK_LIB([dl], [dlopen], 1903fc5a983dSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1904fc5a983dSmrg [AC_CHECK_LIB([svld], [dlopen], 1905fc5a983dSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1906fc5a983dSmrg [AC_CHECK_LIB([dld], [dld_link], 1907fc5a983dSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1908fc5a983dSmrg ]) 1909fc5a983dSmrg ]) 1910fc5a983dSmrg ]) 1911fc5a983dSmrg ]) 1912fc5a983dSmrg ]) 1913fc5a983dSmrg ;; 1914fc5a983dSmrg esac 1915fc5a983dSmrg 1916fc5a983dSmrg if test "x$lt_cv_dlopen" != xno; then 1917fc5a983dSmrg enable_dlopen=yes 1918fc5a983dSmrg else 1919fc5a983dSmrg enable_dlopen=no 1920fc5a983dSmrg fi 1921fc5a983dSmrg 1922fc5a983dSmrg case $lt_cv_dlopen in 1923fc5a983dSmrg dlopen) 1924fc5a983dSmrg save_CPPFLAGS="$CPPFLAGS" 1925fc5a983dSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1926fc5a983dSmrg 1927fc5a983dSmrg save_LDFLAGS="$LDFLAGS" 1928fc5a983dSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1929fc5a983dSmrg 1930fc5a983dSmrg save_LIBS="$LIBS" 1931fc5a983dSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 1932fc5a983dSmrg 1933fc5a983dSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 1934fc5a983dSmrg lt_cv_dlopen_self, [dnl 1935f3561b8bSmrg _LT_TRY_DLOPEN_SELF( 1936fc5a983dSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1937fc5a983dSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1938fc5a983dSmrg ]) 1939fc5a983dSmrg 1940fc5a983dSmrg if test "x$lt_cv_dlopen_self" = xyes; then 1941fc5a983dSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1942fc5a983dSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1943f3561b8bSmrg lt_cv_dlopen_self_static, [dnl 1944f3561b8bSmrg _LT_TRY_DLOPEN_SELF( 1945fc5a983dSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1946fc5a983dSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1947fc5a983dSmrg ]) 1948fc5a983dSmrg fi 1949fc5a983dSmrg 1950fc5a983dSmrg CPPFLAGS="$save_CPPFLAGS" 1951fc5a983dSmrg LDFLAGS="$save_LDFLAGS" 1952fc5a983dSmrg LIBS="$save_LIBS" 1953fc5a983dSmrg ;; 1954fc5a983dSmrg esac 1955fc5a983dSmrg 1956fc5a983dSmrg case $lt_cv_dlopen_self in 1957fc5a983dSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1958fc5a983dSmrg *) enable_dlopen_self=unknown ;; 1959fc5a983dSmrg esac 1960fc5a983dSmrg 1961fc5a983dSmrg case $lt_cv_dlopen_self_static in 1962fc5a983dSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1963fc5a983dSmrg *) enable_dlopen_self_static=unknown ;; 1964fc5a983dSmrg esac 1965fc5a983dSmrgfi 1966f3561b8bSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1967f3561b8bSmrg [Whether dlopen is supported]) 1968f3561b8bSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1969f3561b8bSmrg [Whether dlopen of programs is supported]) 1970f3561b8bSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1971f3561b8bSmrg [Whether dlopen of statically linked programs is supported]) 1972f3561b8bSmrg])# LT_SYS_DLOPEN_SELF 1973fc5a983dSmrg 1974f3561b8bSmrg# Old name: 1975f3561b8bSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1976f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 1977f3561b8bSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1978fc5a983dSmrg 1979f3561b8bSmrg 1980f3561b8bSmrg# _LT_COMPILER_C_O([TAGNAME]) 1981f3561b8bSmrg# --------------------------- 1982f3561b8bSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 1983f3561b8bSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1984f3561b8bSmrgm4_defun([_LT_COMPILER_C_O], 1985f3561b8bSmrg[m4_require([_LT_DECL_SED])dnl 1986f3561b8bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1987f3561b8bSmrgm4_require([_LT_TAG_COMPILER])dnl 1988fc5a983dSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1989f3561b8bSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1990f3561b8bSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1991f3561b8bSmrg $RM -r conftest 2>/dev/null 1992fc5a983dSmrg mkdir conftest 1993fc5a983dSmrg cd conftest 1994fc5a983dSmrg mkdir out 1995fc5a983dSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1996fc5a983dSmrg 1997fc5a983dSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1998fc5a983dSmrg # Insert the option either (1) after the last *FLAGS variable, or 1999fc5a983dSmrg # (2) before a word containing "conftest.", or (3) at the end. 2000fc5a983dSmrg # Note that $ac_compile itself does not contain backslashes and begins 2001fc5a983dSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2002fc5a983dSmrg lt_compile=`echo "$ac_compile" | $SED \ 2003fc5a983dSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2004fc5a983dSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2005fc5a983dSmrg -e 's:$: $lt_compiler_flag:'` 2006bd304fc0Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2007fc5a983dSmrg (eval "$lt_compile" 2>out/conftest.err) 2008fc5a983dSmrg ac_status=$? 2009fc5a983dSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2010bd304fc0Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2011fc5a983dSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2012fc5a983dSmrg then 2013fc5a983dSmrg # The compiler can only warn and ignore the option if not recognized 2014fc5a983dSmrg # So say no if there are warnings 2015bd304fc0Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2016fc5a983dSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2017fc5a983dSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2018f3561b8bSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2019fc5a983dSmrg fi 2020fc5a983dSmrg fi 2021fc5a983dSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2022f3561b8bSmrg $RM conftest* 2023fc5a983dSmrg # SGI C++ compiler will create directory out/ii_files/ for 2024fc5a983dSmrg # template instantiation 2025f3561b8bSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2026f3561b8bSmrg $RM out/* && rmdir out 2027fc5a983dSmrg cd .. 2028f3561b8bSmrg $RM -r conftest 2029f3561b8bSmrg $RM conftest* 2030fc5a983dSmrg]) 2031f3561b8bSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2032f3561b8bSmrg [Does compiler simultaneously support -c and -o options?]) 2033f3561b8bSmrg])# _LT_COMPILER_C_O 2034fc5a983dSmrg 2035fc5a983dSmrg 2036f3561b8bSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2037f3561b8bSmrg# ---------------------------------- 2038fc5a983dSmrg# Check to see if we can do hard links to lock some files if needed 2039f3561b8bSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2040f3561b8bSmrg[m4_require([_LT_ENABLE_LOCK])dnl 2041f3561b8bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2042f3561b8bSmrg_LT_COMPILER_C_O([$1]) 2043fc5a983dSmrg 2044fc5a983dSmrghard_links="nottested" 2045f3561b8bSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 2046fc5a983dSmrg # do not overwrite the value of need_locks provided by the user 2047fc5a983dSmrg AC_MSG_CHECKING([if we can lock with hard links]) 2048fc5a983dSmrg hard_links=yes 2049f3561b8bSmrg $RM conftest* 2050fc5a983dSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2051fc5a983dSmrg touch conftest.a 2052fc5a983dSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 2053fc5a983dSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2054fc5a983dSmrg AC_MSG_RESULT([$hard_links]) 2055fc5a983dSmrg if test "$hard_links" = no; then 2056fc5a983dSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 2057fc5a983dSmrg need_locks=warn 2058fc5a983dSmrg fi 2059fc5a983dSmrgelse 2060fc5a983dSmrg need_locks=no 2061fc5a983dSmrgfi 2062f3561b8bSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2063f3561b8bSmrg])# _LT_COMPILER_FILE_LOCKS 2064fc5a983dSmrg 2065fc5a983dSmrg 2066f3561b8bSmrg# _LT_CHECK_OBJDIR 2067f3561b8bSmrg# ---------------- 2068f3561b8bSmrgm4_defun([_LT_CHECK_OBJDIR], 2069fc5a983dSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2070fc5a983dSmrg[rm -f .libs 2>/dev/null 2071fc5a983dSmrgmkdir .libs 2>/dev/null 2072fc5a983dSmrgif test -d .libs; then 2073fc5a983dSmrg lt_cv_objdir=.libs 2074fc5a983dSmrgelse 2075fc5a983dSmrg # MS-DOS does not allow filenames that begin with a dot. 2076fc5a983dSmrg lt_cv_objdir=_libs 2077fc5a983dSmrgfi 2078fc5a983dSmrgrmdir .libs 2>/dev/null]) 2079fc5a983dSmrgobjdir=$lt_cv_objdir 2080f3561b8bSmrg_LT_DECL([], [objdir], [0], 2081f3561b8bSmrg [The name of the directory that contains temporary libtool files])dnl 2082f3561b8bSmrgm4_pattern_allow([LT_OBJDIR])dnl 2083f3561b8bSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2084f3561b8bSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2085f3561b8bSmrg])# _LT_CHECK_OBJDIR 2086fc5a983dSmrg 2087fc5a983dSmrg 2088f3561b8bSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2089f3561b8bSmrg# -------------------------------------- 2090fc5a983dSmrg# Check hardcoding attributes. 2091f3561b8bSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2092fc5a983dSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2093f3561b8bSmrg_LT_TAGVAR(hardcode_action, $1)= 2094f3561b8bSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2095f3561b8bSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2096f3561b8bSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2097fc5a983dSmrg 2098f3561b8bSmrg # We can hardcode non-existent directories. 2099f3561b8bSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 2100fc5a983dSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2101fc5a983dSmrg # have to relink, otherwise we might link with an installed library 2102fc5a983dSmrg # when we should be linking with a yet-to-be-installed one 2103f3561b8bSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2104f3561b8bSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 2105fc5a983dSmrg # Linking always hardcodes the temporary library directory. 2106f3561b8bSmrg _LT_TAGVAR(hardcode_action, $1)=relink 2107fc5a983dSmrg else 2108fc5a983dSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2109f3561b8bSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 2110fc5a983dSmrg fi 2111fc5a983dSmrgelse 2112fc5a983dSmrg # We cannot hardcode anything, or else we can only hardcode existing 2113fc5a983dSmrg # directories. 2114f3561b8bSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2115fc5a983dSmrgfi 2116f3561b8bSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2117fc5a983dSmrg 2118f3561b8bSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2119f3561b8bSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2120fc5a983dSmrg # Fast installation is not supported 2121fc5a983dSmrg enable_fast_install=no 2122fc5a983dSmrgelif test "$shlibpath_overrides_runpath" = yes || 2123fc5a983dSmrg test "$enable_shared" = no; then 2124fc5a983dSmrg # Fast installation is not necessary 2125fc5a983dSmrg enable_fast_install=needless 2126fc5a983dSmrgfi 2127f3561b8bSmrg_LT_TAGDECL([], [hardcode_action], [0], 2128f3561b8bSmrg [How to hardcode a shared library path into an executable]) 2129f3561b8bSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2130fc5a983dSmrg 2131fc5a983dSmrg 2132f3561b8bSmrg# _LT_CMD_STRIPLIB 2133f3561b8bSmrg# ---------------- 2134f3561b8bSmrgm4_defun([_LT_CMD_STRIPLIB], 2135f3561b8bSmrg[m4_require([_LT_DECL_EGREP]) 2136f3561b8bSmrgstriplib= 2137fc5a983dSmrgold_striplib= 2138fc5a983dSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2139f3561b8bSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2140fc5a983dSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2141fc5a983dSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2142fc5a983dSmrg AC_MSG_RESULT([yes]) 2143fc5a983dSmrgelse 2144fc5a983dSmrg# FIXME - insert some real tests, host_os isn't really good enough 2145fc5a983dSmrg case $host_os in 2146f3561b8bSmrg darwin*) 2147f3561b8bSmrg if test -n "$STRIP" ; then 2148f3561b8bSmrg striplib="$STRIP -x" 2149f3561b8bSmrg old_striplib="$STRIP -S" 2150f3561b8bSmrg AC_MSG_RESULT([yes]) 2151f3561b8bSmrg else 2152f3561b8bSmrg AC_MSG_RESULT([no]) 2153f3561b8bSmrg fi 2154f3561b8bSmrg ;; 2155f3561b8bSmrg *) 2156f3561b8bSmrg AC_MSG_RESULT([no]) 2157fc5a983dSmrg ;; 2158fc5a983dSmrg esac 2159fc5a983dSmrgfi 2160f3561b8bSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2161f3561b8bSmrg_LT_DECL([], [striplib], [1]) 2162f3561b8bSmrg])# _LT_CMD_STRIPLIB 2163fc5a983dSmrg 2164fc5a983dSmrg 2165f3561b8bSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2166fc5a983dSmrg# ----------------------------- 2167fc5a983dSmrg# PORTME Fill in your ld.so characteristics 2168f3561b8bSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2169f3561b8bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2170f3561b8bSmrgm4_require([_LT_DECL_EGREP])dnl 2171f3561b8bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2172f3561b8bSmrgm4_require([_LT_DECL_OBJDUMP])dnl 2173f3561b8bSmrgm4_require([_LT_DECL_SED])dnl 2174bd304fc0Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2175fc5a983dSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2176f3561b8bSmrgm4_if([$1], 2177f3561b8bSmrg [], [ 2178fc5a983dSmrgif test "$GCC" = yes; then 2179fc5a983dSmrg case $host_os in 2180fc5a983dSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2181fc5a983dSmrg *) lt_awk_arg="/^libraries:/" ;; 2182fc5a983dSmrg esac 2183bd304fc0Smrg case $host_os in 2184bd304fc0Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2185bd304fc0Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 2186bd304fc0Smrg esac 2187bd304fc0Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2188bd304fc0Smrg case $lt_search_path_spec in 2189bd304fc0Smrg *\;*) 2190fc5a983dSmrg # if the path contains ";" then we assume it to be the separator 2191fc5a983dSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2192fc5a983dSmrg # assumed that no part of a normal pathname contains ";" but that should 2193fc5a983dSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2194bd304fc0Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2195bd304fc0Smrg ;; 2196bd304fc0Smrg *) 2197bd304fc0Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2198bd304fc0Smrg ;; 2199bd304fc0Smrg esac 2200fc5a983dSmrg # Ok, now we have the path, separated by spaces, we can step through it 2201fc5a983dSmrg # and add multilib dir if necessary. 2202fc5a983dSmrg lt_tmp_lt_search_path_spec= 2203fc5a983dSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2204fc5a983dSmrg for lt_sys_path in $lt_search_path_spec; do 2205fc5a983dSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2206fc5a983dSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2207fc5a983dSmrg else 2208fc5a983dSmrg test -d "$lt_sys_path" && \ 2209fc5a983dSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2210fc5a983dSmrg fi 2211fc5a983dSmrg done 2212bd304fc0Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2213fc5a983dSmrgBEGIN {RS=" "; FS="/|\n";} { 2214fc5a983dSmrg lt_foo=""; 2215fc5a983dSmrg lt_count=0; 2216fc5a983dSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 2217fc5a983dSmrg if ($lt_i != "" && $lt_i != ".") { 2218fc5a983dSmrg if ($lt_i == "..") { 2219fc5a983dSmrg lt_count++; 2220fc5a983dSmrg } else { 2221fc5a983dSmrg if (lt_count == 0) { 2222fc5a983dSmrg lt_foo="/" $lt_i lt_foo; 2223fc5a983dSmrg } else { 2224fc5a983dSmrg lt_count--; 2225fc5a983dSmrg } 2226fc5a983dSmrg } 2227fc5a983dSmrg } 2228fc5a983dSmrg } 2229fc5a983dSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2230fc5a983dSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2231fc5a983dSmrg}'` 2232bd304fc0Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 2233bd304fc0Smrg # for these hosts. 2234bd304fc0Smrg case $host_os in 2235bd304fc0Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2236bd304fc0Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2237bd304fc0Smrg esac 2238bd304fc0Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2239fc5a983dSmrgelse 2240fc5a983dSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2241fc5a983dSmrgfi]) 2242f3561b8bSmrglibrary_names_spec= 2243f3561b8bSmrglibname_spec='lib$name' 2244f3561b8bSmrgsoname_spec= 2245f3561b8bSmrgshrext_cmds=".so" 2246f3561b8bSmrgpostinstall_cmds= 2247f3561b8bSmrgpostuninstall_cmds= 2248f3561b8bSmrgfinish_cmds= 2249f3561b8bSmrgfinish_eval= 2250f3561b8bSmrgshlibpath_var= 2251f3561b8bSmrgshlibpath_overrides_runpath=unknown 2252f3561b8bSmrgversion_type=none 2253f3561b8bSmrgdynamic_linker="$host_os ld.so" 2254f3561b8bSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2255fc5a983dSmrgneed_lib_prefix=unknown 2256fc5a983dSmrghardcode_into_libs=no 2257fc5a983dSmrg 2258fc5a983dSmrg# when you set need_version to no, make sure it does not cause -set_version 2259fc5a983dSmrg# flags to be left without arguments 2260fc5a983dSmrgneed_version=unknown 2261fc5a983dSmrg 2262fc5a983dSmrgcase $host_os in 2263fc5a983dSmrgaix3*) 2264bd304fc0Smrg version_type=linux # correct to gnu/linux during the next big refactor 2265fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2266fc5a983dSmrg shlibpath_var=LIBPATH 2267fc5a983dSmrg 2268fc5a983dSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2269fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2270fc5a983dSmrg ;; 2271fc5a983dSmrg 2272fc5a983dSmrgaix[[4-9]]*) 2273bd304fc0Smrg version_type=linux # correct to gnu/linux during the next big refactor 2274fc5a983dSmrg need_lib_prefix=no 2275fc5a983dSmrg need_version=no 2276fc5a983dSmrg hardcode_into_libs=yes 2277fc5a983dSmrg if test "$host_cpu" = ia64; then 2278fc5a983dSmrg # AIX 5 supports IA64 2279fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2280fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2281fc5a983dSmrg else 2282fc5a983dSmrg # With GCC up to 2.95.x, collect2 would create an import file 2283fc5a983dSmrg # for dependence libraries. The import file would start with 2284fc5a983dSmrg # the line `#! .'. This would cause the generated library to 2285fc5a983dSmrg # depend on `.', always an invalid library. This was fixed in 2286fc5a983dSmrg # development snapshots of GCC prior to 3.0. 2287fc5a983dSmrg case $host_os in 2288fc5a983dSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2289fc5a983dSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2290fc5a983dSmrg echo ' yes ' 2291f3561b8bSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2292fc5a983dSmrg : 2293fc5a983dSmrg else 2294fc5a983dSmrg can_build_shared=no 2295fc5a983dSmrg fi 2296fc5a983dSmrg ;; 2297fc5a983dSmrg esac 2298fc5a983dSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2299fc5a983dSmrg # soname into executable. Probably we can add versioning support to 2300fc5a983dSmrg # collect2, so additional links can be useful in future. 2301fc5a983dSmrg if test "$aix_use_runtimelinking" = yes; then 2302fc5a983dSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2303fc5a983dSmrg # instead of lib<name>.a to let people know that these are not 2304fc5a983dSmrg # typical AIX shared libraries. 2305fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2306fc5a983dSmrg else 2307fc5a983dSmrg # We preserve .a as extension for shared libraries through AIX4.2 2308fc5a983dSmrg # and later when we are not doing run time linking. 2309fc5a983dSmrg library_names_spec='${libname}${release}.a $libname.a' 2310fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2311fc5a983dSmrg fi 2312fc5a983dSmrg shlibpath_var=LIBPATH 2313fc5a983dSmrg fi 2314fc5a983dSmrg ;; 2315fc5a983dSmrg 2316fc5a983dSmrgamigaos*) 2317f3561b8bSmrg case $host_cpu in 2318f3561b8bSmrg powerpc) 2319f3561b8bSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2320f3561b8bSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2321f3561b8bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2322f3561b8bSmrg ;; 2323f3561b8bSmrg m68k) 2324f3561b8bSmrg library_names_spec='$libname.ixlibrary $libname.a' 2325f3561b8bSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2326bd304fc0Smrg 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' 2327f3561b8bSmrg ;; 2328f3561b8bSmrg esac 2329fc5a983dSmrg ;; 2330fc5a983dSmrg 2331fc5a983dSmrgbeos*) 2332fc5a983dSmrg library_names_spec='${libname}${shared_ext}' 2333fc5a983dSmrg dynamic_linker="$host_os ld.so" 2334fc5a983dSmrg shlibpath_var=LIBRARY_PATH 2335fc5a983dSmrg ;; 2336fc5a983dSmrg 2337fc5a983dSmrgbsdi[[45]]*) 2338bd304fc0Smrg version_type=linux # correct to gnu/linux during the next big refactor 2339fc5a983dSmrg need_version=no 2340fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2341fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2342fc5a983dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2343fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2344fc5a983dSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2345fc5a983dSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2346fc5a983dSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2347fc5a983dSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2348fc5a983dSmrg # libtool to hard-code these into programs 2349fc5a983dSmrg ;; 2350fc5a983dSmrg 2351f3561b8bSmrgcygwin* | mingw* | pw32* | cegcc*) 2352fc5a983dSmrg version_type=windows 2353fc5a983dSmrg shrext_cmds=".dll" 2354fc5a983dSmrg need_version=no 2355fc5a983dSmrg need_lib_prefix=no 2356fc5a983dSmrg 2357bd304fc0Smrg case $GCC,$cc_basename in 2358bd304fc0Smrg yes,*) 2359bd304fc0Smrg # gcc 2360fc5a983dSmrg library_names_spec='$libname.dll.a' 2361fc5a983dSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2362fc5a983dSmrg postinstall_cmds='base_file=`basename \${file}`~ 2363f3561b8bSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2364fc5a983dSmrg dldir=$destdir/`dirname \$dlpath`~ 2365fc5a983dSmrg test -d \$dldir || mkdir -p \$dldir~ 2366fc5a983dSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2367f3561b8bSmrg chmod a+x \$dldir/$dlname~ 2368f3561b8bSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2369f3561b8bSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2370f3561b8bSmrg fi' 2371fc5a983dSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2372fc5a983dSmrg dlpath=$dir/\$dldll~ 2373f3561b8bSmrg $RM \$dlpath' 2374fc5a983dSmrg shlibpath_overrides_runpath=yes 2375fc5a983dSmrg 2376fc5a983dSmrg case $host_os in 2377fc5a983dSmrg cygwin*) 2378fc5a983dSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2379fc5a983dSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2380bd304fc0Smrgm4_if([$1], [],[ 2381bd304fc0Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2382fc5a983dSmrg ;; 2383f3561b8bSmrg mingw* | cegcc*) 2384fc5a983dSmrg # MinGW DLLs use traditional 'lib' prefix 2385fc5a983dSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2386fc5a983dSmrg ;; 2387fc5a983dSmrg pw32*) 2388fc5a983dSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2389fc5a983dSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2390fc5a983dSmrg ;; 2391fc5a983dSmrg esac 2392bd304fc0Smrg dynamic_linker='Win32 ld.exe' 2393bd304fc0Smrg ;; 2394bd304fc0Smrg 2395bd304fc0Smrg *,cl*) 2396bd304fc0Smrg # Native MSVC 2397bd304fc0Smrg libname_spec='$name' 2398bd304fc0Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2399bd304fc0Smrg library_names_spec='${libname}.dll.lib' 2400bd304fc0Smrg 2401bd304fc0Smrg case $build_os in 2402bd304fc0Smrg mingw*) 2403bd304fc0Smrg sys_lib_search_path_spec= 2404bd304fc0Smrg lt_save_ifs=$IFS 2405bd304fc0Smrg IFS=';' 2406bd304fc0Smrg for lt_path in $LIB 2407bd304fc0Smrg do 2408bd304fc0Smrg IFS=$lt_save_ifs 2409bd304fc0Smrg # Let DOS variable expansion print the short 8.3 style file name. 2410bd304fc0Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2411bd304fc0Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2412bd304fc0Smrg done 2413bd304fc0Smrg IFS=$lt_save_ifs 2414bd304fc0Smrg # Convert to MSYS style. 2415bd304fc0Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2416bd304fc0Smrg ;; 2417bd304fc0Smrg cygwin*) 2418bd304fc0Smrg # Convert to unix form, then to dos form, then back to unix form 2419bd304fc0Smrg # but this time dos style (no spaces!) so that the unix form looks 2420bd304fc0Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2421bd304fc0Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2422bd304fc0Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2423bd304fc0Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2424bd304fc0Smrg ;; 2425bd304fc0Smrg *) 2426bd304fc0Smrg sys_lib_search_path_spec="$LIB" 2427bd304fc0Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2428bd304fc0Smrg # It is most probably a Windows format PATH. 2429bd304fc0Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2430bd304fc0Smrg else 2431bd304fc0Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2432bd304fc0Smrg fi 2433bd304fc0Smrg # FIXME: find the short name or the path components, as spaces are 2434bd304fc0Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2435bd304fc0Smrg ;; 2436bd304fc0Smrg esac 2437bd304fc0Smrg 2438bd304fc0Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2439bd304fc0Smrg postinstall_cmds='base_file=`basename \${file}`~ 2440bd304fc0Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2441bd304fc0Smrg dldir=$destdir/`dirname \$dlpath`~ 2442bd304fc0Smrg test -d \$dldir || mkdir -p \$dldir~ 2443bd304fc0Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2444bd304fc0Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2445bd304fc0Smrg dlpath=$dir/\$dldll~ 2446bd304fc0Smrg $RM \$dlpath' 2447bd304fc0Smrg shlibpath_overrides_runpath=yes 2448bd304fc0Smrg dynamic_linker='Win32 link.exe' 2449fc5a983dSmrg ;; 2450fc5a983dSmrg 2451fc5a983dSmrg *) 2452bd304fc0Smrg # Assume MSVC wrapper 2453fc5a983dSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2454bd304fc0Smrg dynamic_linker='Win32 ld.exe' 2455fc5a983dSmrg ;; 2456fc5a983dSmrg esac 2457fc5a983dSmrg # FIXME: first we should search . and the directory the executable is in 2458fc5a983dSmrg shlibpath_var=PATH 2459fc5a983dSmrg ;; 2460fc5a983dSmrg 2461fc5a983dSmrgdarwin* | rhapsody*) 2462fc5a983dSmrg dynamic_linker="$host_os dyld" 2463fc5a983dSmrg version_type=darwin 2464fc5a983dSmrg need_lib_prefix=no 2465fc5a983dSmrg need_version=no 2466f3561b8bSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2467fc5a983dSmrg soname_spec='${libname}${release}${major}$shared_ext' 2468fc5a983dSmrg shlibpath_overrides_runpath=yes 2469fc5a983dSmrg shlibpath_var=DYLD_LIBRARY_PATH 2470fc5a983dSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2471f3561b8bSmrgm4_if([$1], [],[ 2472f3561b8bSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2473fc5a983dSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2474fc5a983dSmrg ;; 2475fc5a983dSmrg 2476fc5a983dSmrgdgux*) 2477bd304fc0Smrg version_type=linux # correct to gnu/linux during the next big refactor 2478fc5a983dSmrg need_lib_prefix=no 2479fc5a983dSmrg need_version=no 2480fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2481fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2482fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2483fc5a983dSmrg ;; 2484fc5a983dSmrg 2485fc5a983dSmrgfreebsd* | dragonfly*) 2486fc5a983dSmrg # DragonFly does not have aout. When/if they implement a new 2487fc5a983dSmrg # versioning mechanism, adjust this. 2488fc5a983dSmrg if test -x /usr/bin/objformat; then 2489fc5a983dSmrg objformat=`/usr/bin/objformat` 2490fc5a983dSmrg else 2491fc5a983dSmrg case $host_os in 2492bd304fc0Smrg freebsd[[23]].*) objformat=aout ;; 2493fc5a983dSmrg *) objformat=elf ;; 2494fc5a983dSmrg esac 2495fc5a983dSmrg fi 2496f3561b8bSmrg version_type=freebsd-$objformat 2497fc5a983dSmrg case $version_type in 2498fc5a983dSmrg freebsd-elf*) 2499fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2500fc5a983dSmrg need_version=no 2501fc5a983dSmrg need_lib_prefix=no 2502fc5a983dSmrg ;; 2503fc5a983dSmrg freebsd-*) 2504fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2505fc5a983dSmrg need_version=yes 2506fc5a983dSmrg ;; 2507fc5a983dSmrg esac 2508fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2509fc5a983dSmrg case $host_os in 2510bd304fc0Smrg freebsd2.*) 2511fc5a983dSmrg shlibpath_overrides_runpath=yes 2512fc5a983dSmrg ;; 2513fc5a983dSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2514fc5a983dSmrg shlibpath_overrides_runpath=yes 2515fc5a983dSmrg hardcode_into_libs=yes 2516fc5a983dSmrg ;; 2517fc5a983dSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2518fc5a983dSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2519fc5a983dSmrg shlibpath_overrides_runpath=no 2520fc5a983dSmrg hardcode_into_libs=yes 2521fc5a983dSmrg ;; 2522fc5a983dSmrg *) # from 4.6 on, and DragonFly 2523fc5a983dSmrg shlibpath_overrides_runpath=yes 2524fc5a983dSmrg hardcode_into_libs=yes 2525fc5a983dSmrg ;; 2526fc5a983dSmrg esac 2527fc5a983dSmrg ;; 2528fc5a983dSmrg 2529fc5a983dSmrggnu*) 2530bd304fc0Smrg version_type=linux # correct to gnu/linux during the next big refactor 2531fc5a983dSmrg need_lib_prefix=no 2532fc5a983dSmrg need_version=no 2533fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2534fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2535fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2536bd304fc0Smrg shlibpath_overrides_runpath=no 2537bd304fc0Smrg hardcode_into_libs=yes 2538bd304fc0Smrg ;; 2539bd304fc0Smrg 2540bd304fc0Smrghaiku*) 2541bd304fc0Smrg version_type=linux # correct to gnu/linux during the next big refactor 2542bd304fc0Smrg need_lib_prefix=no 2543bd304fc0Smrg need_version=no 2544bd304fc0Smrg dynamic_linker="$host_os runtime_loader" 2545bd304fc0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2546bd304fc0Smrg soname_spec='${libname}${release}${shared_ext}$major' 2547bd304fc0Smrg shlibpath_var=LIBRARY_PATH 2548bd304fc0Smrg shlibpath_overrides_runpath=yes 2549bd304fc0Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2550fc5a983dSmrg hardcode_into_libs=yes 2551fc5a983dSmrg ;; 2552fc5a983dSmrg 2553fc5a983dSmrghpux9* | hpux10* | hpux11*) 2554fc5a983dSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2555fc5a983dSmrg # link against other versions. 2556fc5a983dSmrg version_type=sunos 2557fc5a983dSmrg need_lib_prefix=no 2558fc5a983dSmrg need_version=no 2559fc5a983dSmrg case $host_cpu in 2560fc5a983dSmrg ia64*) 2561fc5a983dSmrg shrext_cmds='.so' 2562fc5a983dSmrg hardcode_into_libs=yes 2563fc5a983dSmrg dynamic_linker="$host_os dld.so" 2564fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2565fc5a983dSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2566fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2567fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2568fc5a983dSmrg if test "X$HPUX_IA64_MODE" = X32; then 2569fc5a983dSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2570fc5a983dSmrg else 2571fc5a983dSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2572fc5a983dSmrg fi 2573fc5a983dSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2574fc5a983dSmrg ;; 2575f3561b8bSmrg hppa*64*) 2576f3561b8bSmrg shrext_cmds='.sl' 2577f3561b8bSmrg hardcode_into_libs=yes 2578f3561b8bSmrg dynamic_linker="$host_os dld.sl" 2579f3561b8bSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2580f3561b8bSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2581f3561b8bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2582f3561b8bSmrg soname_spec='${libname}${release}${shared_ext}$major' 2583f3561b8bSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2584f3561b8bSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2585f3561b8bSmrg ;; 2586f3561b8bSmrg *) 2587fc5a983dSmrg shrext_cmds='.sl' 2588fc5a983dSmrg dynamic_linker="$host_os dld.sl" 2589fc5a983dSmrg shlibpath_var=SHLIB_PATH 2590fc5a983dSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2591fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2592fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2593fc5a983dSmrg ;; 2594fc5a983dSmrg esac 2595bd304fc0Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2596fc5a983dSmrg postinstall_cmds='chmod 555 $lib' 2597bd304fc0Smrg # or fails outright, so override atomically: 2598bd304fc0Smrg install_override_mode=555 2599fc5a983dSmrg ;; 2600fc5a983dSmrg 2601fc5a983dSmrginterix[[3-9]]*) 2602bd304fc0Smrg version_type=linux # correct to gnu/linux during the next big refactor 2603fc5a983dSmrg need_lib_prefix=no 2604fc5a983dSmrg need_version=no 2605fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2606fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2607fc5a983dSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2608fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2609fc5a983dSmrg shlibpath_overrides_runpath=no 2610fc5a983dSmrg hardcode_into_libs=yes 2611fc5a983dSmrg ;; 2612fc5a983dSmrg 2613fc5a983dSmrgirix5* | irix6* | nonstopux*) 2614fc5a983dSmrg case $host_os in 2615fc5a983dSmrg nonstopux*) version_type=nonstopux ;; 2616fc5a983dSmrg *) 2617fc5a983dSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 2618bd304fc0Smrg version_type=linux # correct to gnu/linux during the next big refactor 2619fc5a983dSmrg else 2620fc5a983dSmrg version_type=irix 2621fc5a983dSmrg fi ;; 2622fc5a983dSmrg esac 2623fc5a983dSmrg need_lib_prefix=no 2624fc5a983dSmrg need_version=no 2625fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2626fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2627fc5a983dSmrg case $host_os in 2628fc5a983dSmrg irix5* | nonstopux*) 2629fc5a983dSmrg libsuff= shlibsuff= 2630fc5a983dSmrg ;; 2631fc5a983dSmrg *) 2632fc5a983dSmrg case $LD in # libtool.m4 will add one of these switches to LD 2633fc5a983dSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2634fc5a983dSmrg libsuff= shlibsuff= libmagic=32-bit;; 2635fc5a983dSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2636fc5a983dSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2637fc5a983dSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2638fc5a983dSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2639fc5a983dSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2640fc5a983dSmrg esac 2641fc5a983dSmrg ;; 2642fc5a983dSmrg esac 2643fc5a983dSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2644fc5a983dSmrg shlibpath_overrides_runpath=no 2645fc5a983dSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2646fc5a983dSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2647fc5a983dSmrg hardcode_into_libs=yes 2648fc5a983dSmrg ;; 2649fc5a983dSmrg 2650fc5a983dSmrg# No shared lib support for Linux oldld, aout, or coff. 2651fc5a983dSmrglinux*oldld* | linux*aout* | linux*coff*) 2652fc5a983dSmrg dynamic_linker=no 2653fc5a983dSmrg ;; 2654fc5a983dSmrg 2655bd304fc0Smrg# This must be glibc/ELF. 26566086d97eSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 2657bd304fc0Smrg version_type=linux # correct to gnu/linux during the next big refactor 2658fc5a983dSmrg need_lib_prefix=no 2659fc5a983dSmrg need_version=no 2660fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2661fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2662fc5a983dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2663fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2664fc5a983dSmrg shlibpath_overrides_runpath=no 2665bd304fc0Smrg 2666f3561b8bSmrg # Some binutils ld are patched to set DT_RUNPATH 2667bd304fc0Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2668bd304fc0Smrg [lt_cv_shlibpath_overrides_runpath=no 2669bd304fc0Smrg save_LDFLAGS=$LDFLAGS 2670bd304fc0Smrg save_libdir=$libdir 2671bd304fc0Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2672bd304fc0Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2673bd304fc0Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2674bd304fc0Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2675bd304fc0Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2676bd304fc0Smrg LDFLAGS=$save_LDFLAGS 2677bd304fc0Smrg libdir=$save_libdir 2678bd304fc0Smrg ]) 2679bd304fc0Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2680f3561b8bSmrg 2681fc5a983dSmrg # This implies no fast_install, which is unacceptable. 2682fc5a983dSmrg # Some rework will be needed to allow for fast_install 2683fc5a983dSmrg # before this can be enabled. 2684fc5a983dSmrg hardcode_into_libs=yes 2685fc5a983dSmrg 2686bd304fc0Smrg # Add ABI-specific directories to the system library path. 2687bd304fc0Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2688bd304fc0Smrg 2689fc5a983dSmrg # Append ld.so.conf contents to the search path 2690fc5a983dSmrg if test -f /etc/ld.so.conf; then 2691bd304fc0Smrg 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' ' '` 2692bd304fc0Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2693bd304fc0Smrg 2694fc5a983dSmrg fi 2695fc5a983dSmrg 2696fc5a983dSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2697fc5a983dSmrg # powerpc, because MkLinux only supported shared libraries with the 2698fc5a983dSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2699fc5a983dSmrg # most powerpc-linux boxes support dynamic linking these days and 2700fc5a983dSmrg # people can always --disable-shared, the test was removed, and we 2701fc5a983dSmrg # assume the GNU/Linux dynamic linker is in use. 2702fc5a983dSmrg dynamic_linker='GNU/Linux ld.so' 2703fc5a983dSmrg ;; 2704fc5a983dSmrg 2705fc5a983dSmrgnetbsd*) 2706fc5a983dSmrg version_type=sunos 2707fc5a983dSmrg need_lib_prefix=no 2708fc5a983dSmrg need_version=no 2709f3561b8bSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2710fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2711fc5a983dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2712fc5a983dSmrg dynamic_linker='NetBSD (a.out) ld.so' 2713fc5a983dSmrg else 2714fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2715fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2716fc5a983dSmrg dynamic_linker='NetBSD ld.elf_so' 2717fc5a983dSmrg fi 2718fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2719fc5a983dSmrg shlibpath_overrides_runpath=yes 2720fc5a983dSmrg hardcode_into_libs=yes 2721fc5a983dSmrg ;; 2722fc5a983dSmrg 2723fc5a983dSmrgnewsos6) 2724bd304fc0Smrg version_type=linux # correct to gnu/linux during the next big refactor 2725fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2726fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2727fc5a983dSmrg shlibpath_overrides_runpath=yes 2728fc5a983dSmrg ;; 2729fc5a983dSmrg 2730f3561b8bSmrg*nto* | *qnx*) 2731f3561b8bSmrg version_type=qnx 2732fc5a983dSmrg need_lib_prefix=no 2733fc5a983dSmrg need_version=no 2734fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2735fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2736fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2737f3561b8bSmrg shlibpath_overrides_runpath=no 2738f3561b8bSmrg hardcode_into_libs=yes 2739f3561b8bSmrg dynamic_linker='ldqnx.so' 2740fc5a983dSmrg ;; 2741fc5a983dSmrg 2742fc5a983dSmrgopenbsd*) 2743fc5a983dSmrg version_type=sunos 2744fc5a983dSmrg sys_lib_dlsearch_path_spec="/usr/lib" 2745fc5a983dSmrg need_lib_prefix=no 2746fc5a983dSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2747fc5a983dSmrg case $host_os in 2748f3561b8bSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2749f3561b8bSmrg *) need_version=no ;; 2750fc5a983dSmrg esac 2751fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2752fc5a983dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2753fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2754f3561b8bSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2755fc5a983dSmrg case $host_os in 2756fc5a983dSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 2757fc5a983dSmrg shlibpath_overrides_runpath=no 2758fc5a983dSmrg ;; 2759fc5a983dSmrg *) 2760fc5a983dSmrg shlibpath_overrides_runpath=yes 2761fc5a983dSmrg ;; 2762fc5a983dSmrg esac 2763fc5a983dSmrg else 2764fc5a983dSmrg shlibpath_overrides_runpath=yes 2765fc5a983dSmrg fi 2766fc5a983dSmrg ;; 2767fc5a983dSmrg 2768fc5a983dSmrgos2*) 2769fc5a983dSmrg libname_spec='$name' 2770fc5a983dSmrg shrext_cmds=".dll" 2771fc5a983dSmrg need_lib_prefix=no 2772fc5a983dSmrg library_names_spec='$libname${shared_ext} $libname.a' 2773fc5a983dSmrg dynamic_linker='OS/2 ld.exe' 2774fc5a983dSmrg shlibpath_var=LIBPATH 2775fc5a983dSmrg ;; 2776fc5a983dSmrg 2777fc5a983dSmrgosf3* | osf4* | osf5*) 2778fc5a983dSmrg version_type=osf 2779fc5a983dSmrg need_lib_prefix=no 2780fc5a983dSmrg need_version=no 2781fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2782fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2783fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2784fc5a983dSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2785fc5a983dSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2786fc5a983dSmrg ;; 2787fc5a983dSmrg 2788fc5a983dSmrgrdos*) 2789fc5a983dSmrg dynamic_linker=no 2790fc5a983dSmrg ;; 2791fc5a983dSmrg 2792fc5a983dSmrgsolaris*) 2793bd304fc0Smrg version_type=linux # correct to gnu/linux during the next big refactor 2794fc5a983dSmrg need_lib_prefix=no 2795fc5a983dSmrg need_version=no 2796fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2797fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2798fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2799fc5a983dSmrg shlibpath_overrides_runpath=yes 2800fc5a983dSmrg hardcode_into_libs=yes 2801fc5a983dSmrg # ldd complains unless libraries are executable 2802fc5a983dSmrg postinstall_cmds='chmod +x $lib' 2803fc5a983dSmrg ;; 2804fc5a983dSmrg 2805fc5a983dSmrgsunos4*) 2806fc5a983dSmrg version_type=sunos 2807fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2808fc5a983dSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2809fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2810fc5a983dSmrg shlibpath_overrides_runpath=yes 2811fc5a983dSmrg if test "$with_gnu_ld" = yes; then 2812fc5a983dSmrg need_lib_prefix=no 2813fc5a983dSmrg fi 2814fc5a983dSmrg need_version=yes 2815fc5a983dSmrg ;; 2816fc5a983dSmrg 2817fc5a983dSmrgsysv4 | sysv4.3*) 2818bd304fc0Smrg version_type=linux # correct to gnu/linux during the next big refactor 2819fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2820fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2821fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2822fc5a983dSmrg case $host_vendor in 2823fc5a983dSmrg sni) 2824fc5a983dSmrg shlibpath_overrides_runpath=no 2825fc5a983dSmrg need_lib_prefix=no 2826fc5a983dSmrg runpath_var=LD_RUN_PATH 2827fc5a983dSmrg ;; 2828fc5a983dSmrg siemens) 2829fc5a983dSmrg need_lib_prefix=no 2830fc5a983dSmrg ;; 2831fc5a983dSmrg motorola) 2832fc5a983dSmrg need_lib_prefix=no 2833fc5a983dSmrg need_version=no 2834fc5a983dSmrg shlibpath_overrides_runpath=no 2835fc5a983dSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2836fc5a983dSmrg ;; 2837fc5a983dSmrg esac 2838fc5a983dSmrg ;; 2839fc5a983dSmrg 2840fc5a983dSmrgsysv4*MP*) 2841fc5a983dSmrg if test -d /usr/nec ;then 2842bd304fc0Smrg version_type=linux # correct to gnu/linux during the next big refactor 2843fc5a983dSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2844fc5a983dSmrg soname_spec='$libname${shared_ext}.$major' 2845fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2846fc5a983dSmrg fi 2847fc5a983dSmrg ;; 2848fc5a983dSmrg 2849fc5a983dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2850fc5a983dSmrg version_type=freebsd-elf 2851fc5a983dSmrg need_lib_prefix=no 2852fc5a983dSmrg need_version=no 2853fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2854fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2855fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2856f3561b8bSmrg shlibpath_overrides_runpath=yes 2857fc5a983dSmrg hardcode_into_libs=yes 2858fc5a983dSmrg if test "$with_gnu_ld" = yes; then 2859fc5a983dSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2860fc5a983dSmrg else 2861fc5a983dSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2862fc5a983dSmrg case $host_os in 2863fc5a983dSmrg sco3.2v5*) 2864fc5a983dSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2865fc5a983dSmrg ;; 2866fc5a983dSmrg esac 2867fc5a983dSmrg fi 2868fc5a983dSmrg sys_lib_dlsearch_path_spec='/usr/lib' 2869fc5a983dSmrg ;; 2870fc5a983dSmrg 2871f3561b8bSmrgtpf*) 2872f3561b8bSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2873bd304fc0Smrg version_type=linux # correct to gnu/linux during the next big refactor 2874f3561b8bSmrg need_lib_prefix=no 2875f3561b8bSmrg need_version=no 2876f3561b8bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2877f3561b8bSmrg shlibpath_var=LD_LIBRARY_PATH 2878f3561b8bSmrg shlibpath_overrides_runpath=no 2879f3561b8bSmrg hardcode_into_libs=yes 2880f3561b8bSmrg ;; 2881f3561b8bSmrg 2882fc5a983dSmrguts4*) 2883bd304fc0Smrg version_type=linux # correct to gnu/linux during the next big refactor 2884fc5a983dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2885fc5a983dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2886fc5a983dSmrg shlibpath_var=LD_LIBRARY_PATH 2887fc5a983dSmrg ;; 2888fc5a983dSmrg 2889fc5a983dSmrg*) 2890fc5a983dSmrg dynamic_linker=no 2891fc5a983dSmrg ;; 2892fc5a983dSmrgesac 2893fc5a983dSmrgAC_MSG_RESULT([$dynamic_linker]) 2894fc5a983dSmrgtest "$dynamic_linker" = no && can_build_shared=no 2895fc5a983dSmrg 2896fc5a983dSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2897fc5a983dSmrgif test "$GCC" = yes; then 2898fc5a983dSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2899fc5a983dSmrgfi 2900fc5a983dSmrg 2901f3561b8bSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2902f3561b8bSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2903f3561b8bSmrgfi 2904f3561b8bSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2905f3561b8bSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2906f3561b8bSmrgfi 2907fc5a983dSmrg 2908f3561b8bSmrg_LT_DECL([], [variables_saved_for_relink], [1], 2909f3561b8bSmrg [Variables whose values should be saved in libtool wrapper scripts and 2910f3561b8bSmrg restored at link time]) 2911f3561b8bSmrg_LT_DECL([], [need_lib_prefix], [0], 2912f3561b8bSmrg [Do we need the "lib" prefix for modules?]) 2913f3561b8bSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2914f3561b8bSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2915f3561b8bSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2916f3561b8bSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2917f3561b8bSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2918f3561b8bSmrg [Is shlibpath searched before the hard-coded library search path?]) 2919f3561b8bSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2920f3561b8bSmrg_LT_DECL([], [library_names_spec], [1], 2921f3561b8bSmrg [[List of archive names. First name is the real one, the rest are links. 2922f3561b8bSmrg The last name is the one that the linker finds with -lNAME]]) 2923f3561b8bSmrg_LT_DECL([], [soname_spec], [1], 2924f3561b8bSmrg [[The coded name of the library, if different from the real name]]) 2925bd304fc0Smrg_LT_DECL([], [install_override_mode], [1], 2926bd304fc0Smrg [Permission mode override for installation of shared libraries]) 2927f3561b8bSmrg_LT_DECL([], [postinstall_cmds], [2], 2928f3561b8bSmrg [Command to use after installation of a shared archive]) 2929f3561b8bSmrg_LT_DECL([], [postuninstall_cmds], [2], 2930f3561b8bSmrg [Command to use after uninstallation of a shared archive]) 2931f3561b8bSmrg_LT_DECL([], [finish_cmds], [2], 2932f3561b8bSmrg [Commands used to finish a libtool library installation in a directory]) 2933f3561b8bSmrg_LT_DECL([], [finish_eval], [1], 2934f3561b8bSmrg [[As "finish_cmds", except a single script fragment to be evaled but 2935f3561b8bSmrg not shown]]) 2936f3561b8bSmrg_LT_DECL([], [hardcode_into_libs], [0], 2937f3561b8bSmrg [Whether we should hardcode library paths into libraries]) 2938f3561b8bSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2939f3561b8bSmrg [Compile-time system search path for libraries]) 2940f3561b8bSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2941f3561b8bSmrg [Run-time system search path for libraries]) 2942f3561b8bSmrg])# _LT_SYS_DYNAMIC_LINKER 2943f3561b8bSmrg 2944f3561b8bSmrg 2945f3561b8bSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 2946fc5a983dSmrg# -------------------------- 2947fc5a983dSmrg# find a file program which can recognize shared library 2948f3561b8bSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2949f3561b8bSmrg[m4_require([_LT_DECL_EGREP])dnl 2950fc5a983dSmrgAC_MSG_CHECKING([for $1]) 2951fc5a983dSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2952fc5a983dSmrg[case $MAGIC_CMD in 2953fc5a983dSmrg[[\\/*] | ?:[\\/]*]) 2954fc5a983dSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2955fc5a983dSmrg ;; 2956fc5a983dSmrg*) 2957fc5a983dSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2958fc5a983dSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2959fc5a983dSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2960fc5a983dSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2961fc5a983dSmrgdnl not every word. This closes a longstanding sh security hole. 2962f3561b8bSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 2963fc5a983dSmrg for ac_dir in $ac_dummy; do 2964fc5a983dSmrg IFS="$lt_save_ifs" 2965fc5a983dSmrg test -z "$ac_dir" && ac_dir=. 2966fc5a983dSmrg if test -f $ac_dir/$1; then 2967fc5a983dSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2968fc5a983dSmrg if test -n "$file_magic_test_file"; then 2969fc5a983dSmrg case $deplibs_check_method in 2970fc5a983dSmrg "file_magic "*) 2971fc5a983dSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2972fc5a983dSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2973fc5a983dSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2974fc5a983dSmrg $EGREP "$file_magic_regex" > /dev/null; then 2975fc5a983dSmrg : 2976fc5a983dSmrg else 2977f3561b8bSmrg cat <<_LT_EOF 1>&2 2978fc5a983dSmrg 2979fc5a983dSmrg*** Warning: the command libtool uses to detect shared libraries, 2980fc5a983dSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2981fc5a983dSmrg*** The result is that libtool may fail to recognize shared libraries 2982fc5a983dSmrg*** as such. This will affect the creation of libtool libraries that 2983fc5a983dSmrg*** depend on shared libraries, but programs linked with such libtool 2984fc5a983dSmrg*** libraries will work regardless of this problem. Nevertheless, you 2985fc5a983dSmrg*** may want to report the problem to your system manager and/or to 2986fc5a983dSmrg*** bug-libtool@gnu.org 2987fc5a983dSmrg 2988f3561b8bSmrg_LT_EOF 2989fc5a983dSmrg fi ;; 2990fc5a983dSmrg esac 2991fc5a983dSmrg fi 2992fc5a983dSmrg break 2993fc5a983dSmrg fi 2994fc5a983dSmrg done 2995fc5a983dSmrg IFS="$lt_save_ifs" 2996fc5a983dSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 2997fc5a983dSmrg ;; 2998fc5a983dSmrgesac]) 2999fc5a983dSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 3000fc5a983dSmrgif test -n "$MAGIC_CMD"; then 3001fc5a983dSmrg AC_MSG_RESULT($MAGIC_CMD) 3002fc5a983dSmrgelse 3003fc5a983dSmrg AC_MSG_RESULT(no) 3004fc5a983dSmrgfi 3005f3561b8bSmrg_LT_DECL([], [MAGIC_CMD], [0], 3006f3561b8bSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3007f3561b8bSmrg])# _LT_PATH_TOOL_PREFIX 3008fc5a983dSmrg 3009f3561b8bSmrg# Old name: 3010f3561b8bSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3011f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 3012f3561b8bSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3013fc5a983dSmrg 3014f3561b8bSmrg 3015f3561b8bSmrg# _LT_PATH_MAGIC 3016f3561b8bSmrg# -------------- 3017fc5a983dSmrg# find a file program which can recognize a shared library 3018f3561b8bSmrgm4_defun([_LT_PATH_MAGIC], 3019f3561b8bSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3020fc5a983dSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3021fc5a983dSmrg if test -n "$ac_tool_prefix"; then 3022f3561b8bSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3023fc5a983dSmrg else 3024fc5a983dSmrg MAGIC_CMD=: 3025fc5a983dSmrg fi 3026fc5a983dSmrgfi 3027f3561b8bSmrg])# _LT_PATH_MAGIC 3028fc5a983dSmrg 3029fc5a983dSmrg 3030f3561b8bSmrg# LT_PATH_LD 3031fc5a983dSmrg# ---------- 3032fc5a983dSmrg# find the pathname to the GNU or non-GNU linker 3033f3561b8bSmrgAC_DEFUN([LT_PATH_LD], 3034f3561b8bSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3035fc5a983dSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3036fc5a983dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3037f3561b8bSmrgm4_require([_LT_DECL_SED])dnl 3038f3561b8bSmrgm4_require([_LT_DECL_EGREP])dnl 3039bd304fc0Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3040f3561b8bSmrg 3041f3561b8bSmrgAC_ARG_WITH([gnu-ld], 3042f3561b8bSmrg [AS_HELP_STRING([--with-gnu-ld], 3043f3561b8bSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3044f3561b8bSmrg [test "$withval" = no || with_gnu_ld=yes], 3045f3561b8bSmrg [with_gnu_ld=no])dnl 3046f3561b8bSmrg 3047fc5a983dSmrgac_prog=ld 3048fc5a983dSmrgif test "$GCC" = yes; then 3049fc5a983dSmrg # Check if gcc -print-prog-name=ld gives a path. 3050fc5a983dSmrg AC_MSG_CHECKING([for ld used by $CC]) 3051fc5a983dSmrg case $host in 3052fc5a983dSmrg *-*-mingw*) 3053fc5a983dSmrg # gcc leaves a trailing carriage return which upsets mingw 3054fc5a983dSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3055fc5a983dSmrg *) 3056fc5a983dSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3057fc5a983dSmrg esac 3058fc5a983dSmrg case $ac_prog in 3059fc5a983dSmrg # Accept absolute paths. 3060fc5a983dSmrg [[\\/]]* | ?:[[\\/]]*) 3061fc5a983dSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3062fc5a983dSmrg # Canonicalize the pathname of ld 3063f3561b8bSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3064f3561b8bSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3065f3561b8bSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3066fc5a983dSmrg done 3067fc5a983dSmrg test -z "$LD" && LD="$ac_prog" 3068fc5a983dSmrg ;; 3069fc5a983dSmrg "") 3070fc5a983dSmrg # If it fails, then pretend we aren't using GCC. 3071fc5a983dSmrg ac_prog=ld 3072fc5a983dSmrg ;; 3073fc5a983dSmrg *) 3074fc5a983dSmrg # If it is relative, then search for the first ld in PATH. 3075fc5a983dSmrg with_gnu_ld=unknown 3076fc5a983dSmrg ;; 3077fc5a983dSmrg esac 3078fc5a983dSmrgelif test "$with_gnu_ld" = yes; then 3079fc5a983dSmrg AC_MSG_CHECKING([for GNU ld]) 3080fc5a983dSmrgelse 3081fc5a983dSmrg AC_MSG_CHECKING([for non-GNU ld]) 3082fc5a983dSmrgfi 3083fc5a983dSmrgAC_CACHE_VAL(lt_cv_path_LD, 3084fc5a983dSmrg[if test -z "$LD"; then 3085fc5a983dSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3086fc5a983dSmrg for ac_dir in $PATH; do 3087fc5a983dSmrg IFS="$lt_save_ifs" 3088fc5a983dSmrg test -z "$ac_dir" && ac_dir=. 3089fc5a983dSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3090fc5a983dSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 3091fc5a983dSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3092fc5a983dSmrg # but apparently some variants of GNU ld only accept -v. 3093fc5a983dSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3094fc5a983dSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3095fc5a983dSmrg *GNU* | *'with BFD'*) 3096fc5a983dSmrg test "$with_gnu_ld" != no && break 3097fc5a983dSmrg ;; 3098fc5a983dSmrg *) 3099fc5a983dSmrg test "$with_gnu_ld" != yes && break 3100fc5a983dSmrg ;; 3101fc5a983dSmrg esac 3102fc5a983dSmrg fi 3103fc5a983dSmrg done 3104fc5a983dSmrg IFS="$lt_save_ifs" 3105fc5a983dSmrgelse 3106fc5a983dSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 3107fc5a983dSmrgfi]) 3108fc5a983dSmrgLD="$lt_cv_path_LD" 3109fc5a983dSmrgif test -n "$LD"; then 3110fc5a983dSmrg AC_MSG_RESULT($LD) 3111fc5a983dSmrgelse 3112fc5a983dSmrg AC_MSG_RESULT(no) 3113fc5a983dSmrgfi 3114fc5a983dSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3115f3561b8bSmrg_LT_PATH_LD_GNU 3116f3561b8bSmrgAC_SUBST([LD]) 3117fc5a983dSmrg 3118f3561b8bSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3119f3561b8bSmrg])# LT_PATH_LD 3120fc5a983dSmrg 3121f3561b8bSmrg# Old names: 3122f3561b8bSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3123f3561b8bSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3124f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 3125f3561b8bSmrgdnl AC_DEFUN([AM_PROG_LD], []) 3126f3561b8bSmrgdnl AC_DEFUN([AC_PROG_LD], []) 3127f3561b8bSmrg 3128f3561b8bSmrg 3129f3561b8bSmrg# _LT_PATH_LD_GNU 3130f3561b8bSmrg#- -------------- 3131f3561b8bSmrgm4_defun([_LT_PATH_LD_GNU], 3132f3561b8bSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3133fc5a983dSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3134fc5a983dSmrgcase `$LD -v 2>&1 </dev/null` in 3135fc5a983dSmrg*GNU* | *'with BFD'*) 3136fc5a983dSmrg lt_cv_prog_gnu_ld=yes 3137fc5a983dSmrg ;; 3138fc5a983dSmrg*) 3139fc5a983dSmrg lt_cv_prog_gnu_ld=no 3140fc5a983dSmrg ;; 3141fc5a983dSmrgesac]) 3142fc5a983dSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3143f3561b8bSmrg])# _LT_PATH_LD_GNU 3144fc5a983dSmrg 3145fc5a983dSmrg 3146f3561b8bSmrg# _LT_CMD_RELOAD 3147f3561b8bSmrg# -------------- 3148fc5a983dSmrg# find reload flag for linker 3149fc5a983dSmrg# -- PORTME Some linkers may need a different reload flag. 3150f3561b8bSmrgm4_defun([_LT_CMD_RELOAD], 3151fc5a983dSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3152fc5a983dSmrg lt_cv_ld_reload_flag, 3153fc5a983dSmrg [lt_cv_ld_reload_flag='-r']) 3154fc5a983dSmrgreload_flag=$lt_cv_ld_reload_flag 3155fc5a983dSmrgcase $reload_flag in 3156fc5a983dSmrg"" | " "*) ;; 3157fc5a983dSmrg*) reload_flag=" $reload_flag" ;; 3158fc5a983dSmrgesac 3159fc5a983dSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3160fc5a983dSmrgcase $host_os in 3161bd304fc0Smrg cygwin* | mingw* | pw32* | cegcc*) 3162bd304fc0Smrg if test "$GCC" != yes; then 3163bd304fc0Smrg reload_cmds=false 3164bd304fc0Smrg fi 3165bd304fc0Smrg ;; 3166fc5a983dSmrg darwin*) 3167fc5a983dSmrg if test "$GCC" = yes; then 3168fc5a983dSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3169fc5a983dSmrg else 3170fc5a983dSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3171fc5a983dSmrg fi 3172fc5a983dSmrg ;; 3173fc5a983dSmrgesac 3174bd304fc0Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3175bd304fc0Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3176f3561b8bSmrg])# _LT_CMD_RELOAD 3177fc5a983dSmrg 3178fc5a983dSmrg 3179f3561b8bSmrg# _LT_CHECK_MAGIC_METHOD 3180f3561b8bSmrg# ---------------------- 3181fc5a983dSmrg# how to check for library dependencies 3182fc5a983dSmrg# -- PORTME fill in with the dynamic library characteristics 3183f3561b8bSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3184f3561b8bSmrg[m4_require([_LT_DECL_EGREP]) 3185f3561b8bSmrgm4_require([_LT_DECL_OBJDUMP]) 3186f3561b8bSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3187fc5a983dSmrglt_cv_deplibs_check_method, 3188fc5a983dSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3189fc5a983dSmrglt_cv_file_magic_test_file= 3190fc5a983dSmrglt_cv_deplibs_check_method='unknown' 3191fc5a983dSmrg# Need to set the preceding variable on all platforms that support 3192fc5a983dSmrg# interlibrary dependencies. 3193fc5a983dSmrg# 'none' -- dependencies not supported. 3194fc5a983dSmrg# `unknown' -- same as none, but documents that we really don't know. 3195fc5a983dSmrg# 'pass_all' -- all dependencies passed with no checks. 3196fc5a983dSmrg# 'test_compile' -- check by making test program. 3197fc5a983dSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 3198fc5a983dSmrg# which responds to the $file_magic_cmd with a given extended regex. 3199fc5a983dSmrg# If you have `file' or equivalent on your system and you're not sure 3200fc5a983dSmrg# whether `pass_all' will *always* work, you probably want this one. 3201fc5a983dSmrg 3202fc5a983dSmrgcase $host_os in 3203fc5a983dSmrgaix[[4-9]]*) 3204fc5a983dSmrg lt_cv_deplibs_check_method=pass_all 3205fc5a983dSmrg ;; 3206fc5a983dSmrg 3207fc5a983dSmrgbeos*) 3208fc5a983dSmrg lt_cv_deplibs_check_method=pass_all 3209fc5a983dSmrg ;; 3210fc5a983dSmrg 3211fc5a983dSmrgbsdi[[45]]*) 3212fc5a983dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3213fc5a983dSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3214fc5a983dSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3215fc5a983dSmrg ;; 3216fc5a983dSmrg 3217fc5a983dSmrgcygwin*) 3218fc5a983dSmrg # func_win32_libid is a shell function defined in ltmain.sh 3219fc5a983dSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3220fc5a983dSmrg lt_cv_file_magic_cmd='func_win32_libid' 3221fc5a983dSmrg ;; 3222fc5a983dSmrg 3223fc5a983dSmrgmingw* | pw32*) 3224fc5a983dSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3225fc5a983dSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3226fc5a983dSmrg # unless we find 'file', for example because we are cross-compiling. 3227bd304fc0Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3228bd304fc0Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3229fc5a983dSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3230fc5a983dSmrg lt_cv_file_magic_cmd='func_win32_libid' 3231fc5a983dSmrg else 3232bd304fc0Smrg # Keep this pattern in sync with the one in func_win32_libid. 3233bd304fc0Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3234fc5a983dSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3235fc5a983dSmrg fi 3236fc5a983dSmrg ;; 3237fc5a983dSmrg 3238bd304fc0Smrgcegcc*) 3239f3561b8bSmrg # use the weaker test based on 'objdump'. See mingw*. 3240f3561b8bSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3241f3561b8bSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3242f3561b8bSmrg ;; 3243f3561b8bSmrg 3244fc5a983dSmrgdarwin* | rhapsody*) 3245fc5a983dSmrg lt_cv_deplibs_check_method=pass_all 3246fc5a983dSmrg ;; 3247fc5a983dSmrg 3248fc5a983dSmrgfreebsd* | dragonfly*) 3249f3561b8bSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3250fc5a983dSmrg case $host_cpu in 3251fc5a983dSmrg i*86 ) 3252fc5a983dSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3253fc5a983dSmrg # Let's accept both of them until this is cleared up. 3254fc5a983dSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3255fc5a983dSmrg lt_cv_file_magic_cmd=/usr/bin/file 3256fc5a983dSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3257fc5a983dSmrg ;; 3258fc5a983dSmrg esac 3259fc5a983dSmrg else 3260fc5a983dSmrg lt_cv_deplibs_check_method=pass_all 3261fc5a983dSmrg fi 3262fc5a983dSmrg ;; 3263fc5a983dSmrg 3264fc5a983dSmrggnu*) 3265fc5a983dSmrg lt_cv_deplibs_check_method=pass_all 3266fc5a983dSmrg ;; 3267fc5a983dSmrg 3268bd304fc0Smrghaiku*) 3269bd304fc0Smrg lt_cv_deplibs_check_method=pass_all 3270bd304fc0Smrg ;; 3271bd304fc0Smrg 3272fc5a983dSmrghpux10.20* | hpux11*) 3273fc5a983dSmrg lt_cv_file_magic_cmd=/usr/bin/file 3274fc5a983dSmrg case $host_cpu in 3275fc5a983dSmrg ia64*) 3276fc5a983dSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3277fc5a983dSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3278fc5a983dSmrg ;; 3279fc5a983dSmrg hppa*64*) 3280bd304fc0Smrg [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]'] 3281fc5a983dSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3282fc5a983dSmrg ;; 3283fc5a983dSmrg *) 3284bd304fc0Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3285fc5a983dSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3286fc5a983dSmrg ;; 3287fc5a983dSmrg esac 3288fc5a983dSmrg ;; 3289fc5a983dSmrg 3290fc5a983dSmrginterix[[3-9]]*) 3291fc5a983dSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3292fc5a983dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3293fc5a983dSmrg ;; 3294fc5a983dSmrg 3295fc5a983dSmrgirix5* | irix6* | nonstopux*) 3296fc5a983dSmrg case $LD in 3297fc5a983dSmrg *-32|*"-32 ") libmagic=32-bit;; 3298fc5a983dSmrg *-n32|*"-n32 ") libmagic=N32;; 3299fc5a983dSmrg *-64|*"-64 ") libmagic=64-bit;; 3300fc5a983dSmrg *) libmagic=never-match;; 3301fc5a983dSmrg esac 3302fc5a983dSmrg lt_cv_deplibs_check_method=pass_all 3303fc5a983dSmrg ;; 3304fc5a983dSmrg 3305bd304fc0Smrg# This must be glibc/ELF. 33066086d97eSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 3307fc5a983dSmrg lt_cv_deplibs_check_method=pass_all 3308fc5a983dSmrg ;; 3309fc5a983dSmrg 3310bd304fc0Smrgnetbsd*) 3311f3561b8bSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3312fc5a983dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3313fc5a983dSmrg else 3314fc5a983dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3315fc5a983dSmrg fi 3316fc5a983dSmrg ;; 3317fc5a983dSmrg 3318fc5a983dSmrgnewos6*) 3319fc5a983dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3320fc5a983dSmrg lt_cv_file_magic_cmd=/usr/bin/file 3321fc5a983dSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3322fc5a983dSmrg ;; 3323fc5a983dSmrg 3324f3561b8bSmrg*nto* | *qnx*) 3325f3561b8bSmrg lt_cv_deplibs_check_method=pass_all 3326fc5a983dSmrg ;; 3327fc5a983dSmrg 3328fc5a983dSmrgopenbsd*) 3329f3561b8bSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3330fc5a983dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3331fc5a983dSmrg else 3332fc5a983dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3333fc5a983dSmrg fi 3334fc5a983dSmrg ;; 3335fc5a983dSmrg 3336fc5a983dSmrgosf3* | osf4* | osf5*) 3337fc5a983dSmrg lt_cv_deplibs_check_method=pass_all 3338fc5a983dSmrg ;; 3339fc5a983dSmrg 3340fc5a983dSmrgrdos*) 3341fc5a983dSmrg lt_cv_deplibs_check_method=pass_all 3342fc5a983dSmrg ;; 3343fc5a983dSmrg 3344fc5a983dSmrgsolaris*) 3345fc5a983dSmrg lt_cv_deplibs_check_method=pass_all 3346fc5a983dSmrg ;; 3347fc5a983dSmrg 3348f3561b8bSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3349f3561b8bSmrg lt_cv_deplibs_check_method=pass_all 3350f3561b8bSmrg ;; 3351f3561b8bSmrg 3352fc5a983dSmrgsysv4 | sysv4.3*) 3353fc5a983dSmrg case $host_vendor in 3354fc5a983dSmrg motorola) 3355fc5a983dSmrg 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]]' 3356fc5a983dSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3357fc5a983dSmrg ;; 3358fc5a983dSmrg ncr) 3359fc5a983dSmrg lt_cv_deplibs_check_method=pass_all 3360fc5a983dSmrg ;; 3361fc5a983dSmrg sequent) 3362fc5a983dSmrg lt_cv_file_magic_cmd='/bin/file' 3363fc5a983dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3364fc5a983dSmrg ;; 3365fc5a983dSmrg sni) 3366fc5a983dSmrg lt_cv_file_magic_cmd='/bin/file' 3367fc5a983dSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3368fc5a983dSmrg lt_cv_file_magic_test_file=/lib/libc.so 3369fc5a983dSmrg ;; 3370fc5a983dSmrg siemens) 3371fc5a983dSmrg lt_cv_deplibs_check_method=pass_all 3372fc5a983dSmrg ;; 3373fc5a983dSmrg pc) 3374fc5a983dSmrg lt_cv_deplibs_check_method=pass_all 3375fc5a983dSmrg ;; 3376fc5a983dSmrg esac 3377fc5a983dSmrg ;; 3378fc5a983dSmrg 3379f3561b8bSmrgtpf*) 3380fc5a983dSmrg lt_cv_deplibs_check_method=pass_all 3381fc5a983dSmrg ;; 3382fc5a983dSmrgesac 3383fc5a983dSmrg]) 3384bd304fc0Smrg 3385bd304fc0Smrgfile_magic_glob= 3386bd304fc0Smrgwant_nocaseglob=no 3387bd304fc0Smrgif test "$build" = "$host"; then 3388bd304fc0Smrg case $host_os in 3389bd304fc0Smrg mingw* | pw32*) 3390bd304fc0Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3391bd304fc0Smrg want_nocaseglob=yes 3392bd304fc0Smrg else 3393bd304fc0Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3394bd304fc0Smrg fi 3395bd304fc0Smrg ;; 3396bd304fc0Smrg esac 3397bd304fc0Smrgfi 3398bd304fc0Smrg 3399fc5a983dSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3400fc5a983dSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3401fc5a983dSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3402fc5a983dSmrg 3403f3561b8bSmrg_LT_DECL([], [deplibs_check_method], [1], 3404f3561b8bSmrg [Method to check whether dependent libraries are shared objects]) 3405f3561b8bSmrg_LT_DECL([], [file_magic_cmd], [1], 3406bd304fc0Smrg [Command to use when deplibs_check_method = "file_magic"]) 3407bd304fc0Smrg_LT_DECL([], [file_magic_glob], [1], 3408bd304fc0Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3409bd304fc0Smrg_LT_DECL([], [want_nocaseglob], [1], 3410bd304fc0Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3411f3561b8bSmrg])# _LT_CHECK_MAGIC_METHOD 3412fc5a983dSmrg 3413f3561b8bSmrg 3414f3561b8bSmrg# LT_PATH_NM 3415fc5a983dSmrg# ---------- 3416f3561b8bSmrg# find the pathname to a BSD- or MS-compatible name lister 3417f3561b8bSmrgAC_DEFUN([LT_PATH_NM], 3418f3561b8bSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3419f3561b8bSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3420fc5a983dSmrg[if test -n "$NM"; then 3421fc5a983dSmrg # Let the user override the test. 3422fc5a983dSmrg lt_cv_path_NM="$NM" 3423fc5a983dSmrgelse 3424fc5a983dSmrg lt_nm_to_check="${ac_tool_prefix}nm" 3425fc5a983dSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3426fc5a983dSmrg lt_nm_to_check="$lt_nm_to_check nm" 3427fc5a983dSmrg fi 3428fc5a983dSmrg for lt_tmp_nm in $lt_nm_to_check; do 3429fc5a983dSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3430fc5a983dSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3431fc5a983dSmrg IFS="$lt_save_ifs" 3432fc5a983dSmrg test -z "$ac_dir" && ac_dir=. 3433fc5a983dSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 3434fc5a983dSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3435fc5a983dSmrg # Check to see if the nm accepts a BSD-compat flag. 3436fc5a983dSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3437fc5a983dSmrg # nm: unknown option "B" ignored 3438fc5a983dSmrg # Tru64's nm complains that /dev/null is an invalid object file 3439fc5a983dSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3440fc5a983dSmrg */dev/null* | *'Invalid file or object type'*) 3441fc5a983dSmrg lt_cv_path_NM="$tmp_nm -B" 3442fc5a983dSmrg break 3443fc5a983dSmrg ;; 3444fc5a983dSmrg *) 3445fc5a983dSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3446fc5a983dSmrg */dev/null*) 3447fc5a983dSmrg lt_cv_path_NM="$tmp_nm -p" 3448fc5a983dSmrg break 3449fc5a983dSmrg ;; 3450fc5a983dSmrg *) 3451fc5a983dSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3452fc5a983dSmrg continue # so that we can try to find one that supports BSD flags 3453fc5a983dSmrg ;; 3454fc5a983dSmrg esac 3455fc5a983dSmrg ;; 3456fc5a983dSmrg esac 3457fc5a983dSmrg fi 3458fc5a983dSmrg done 3459fc5a983dSmrg IFS="$lt_save_ifs" 3460fc5a983dSmrg done 3461f3561b8bSmrg : ${lt_cv_path_NM=no} 3462fc5a983dSmrgfi]) 3463f3561b8bSmrgif test "$lt_cv_path_NM" != "no"; then 3464f3561b8bSmrg NM="$lt_cv_path_NM" 3465f3561b8bSmrgelse 3466f3561b8bSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 3467bd304fc0Smrg if test -n "$DUMPBIN"; then : 3468bd304fc0Smrg # Let the user override the test. 3469bd304fc0Smrg else 3470bd304fc0Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3471bd304fc0Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3472bd304fc0Smrg *COFF*) 3473bd304fc0Smrg DUMPBIN="$DUMPBIN -symbols" 3474bd304fc0Smrg ;; 3475bd304fc0Smrg *) 3476bd304fc0Smrg DUMPBIN=: 3477bd304fc0Smrg ;; 3478bd304fc0Smrg esac 3479bd304fc0Smrg fi 3480f3561b8bSmrg AC_SUBST([DUMPBIN]) 3481f3561b8bSmrg if test "$DUMPBIN" != ":"; then 3482f3561b8bSmrg NM="$DUMPBIN" 3483f3561b8bSmrg fi 3484f3561b8bSmrgfi 3485f3561b8bSmrgtest -z "$NM" && NM=nm 3486f3561b8bSmrgAC_SUBST([NM]) 3487f3561b8bSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3488f3561b8bSmrg 3489f3561b8bSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3490f3561b8bSmrg [lt_cv_nm_interface="BSD nm" 3491f3561b8bSmrg echo "int some_variable = 0;" > conftest.$ac_ext 3492bd304fc0Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3493f3561b8bSmrg (eval "$ac_compile" 2>conftest.err) 3494f3561b8bSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3495bd304fc0Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3496f3561b8bSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3497f3561b8bSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3498bd304fc0Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3499f3561b8bSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 3500f3561b8bSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3501f3561b8bSmrg lt_cv_nm_interface="MS dumpbin" 3502f3561b8bSmrg fi 3503f3561b8bSmrg rm -f conftest*]) 3504f3561b8bSmrg])# LT_PATH_NM 3505fc5a983dSmrg 3506f3561b8bSmrg# Old names: 3507f3561b8bSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3508f3561b8bSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3509f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 3510f3561b8bSmrgdnl AC_DEFUN([AM_PROG_NM], []) 3511f3561b8bSmrgdnl AC_DEFUN([AC_PROG_NM], []) 3512fc5a983dSmrg 3513bd304fc0Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3514bd304fc0Smrg# -------------------------------- 3515bd304fc0Smrg# how to determine the name of the shared library 3516bd304fc0Smrg# associated with a specific link library. 3517bd304fc0Smrg# -- PORTME fill in with the dynamic library characteristics 3518bd304fc0Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3519bd304fc0Smrg[m4_require([_LT_DECL_EGREP]) 3520bd304fc0Smrgm4_require([_LT_DECL_OBJDUMP]) 3521bd304fc0Smrgm4_require([_LT_DECL_DLLTOOL]) 3522bd304fc0SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3523bd304fc0Smrglt_cv_sharedlib_from_linklib_cmd, 3524bd304fc0Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3525bd304fc0Smrg 3526bd304fc0Smrgcase $host_os in 3527bd304fc0Smrgcygwin* | mingw* | pw32* | cegcc*) 3528bd304fc0Smrg # two different shell functions defined in ltmain.sh 3529bd304fc0Smrg # decide which to use based on capabilities of $DLLTOOL 3530bd304fc0Smrg case `$DLLTOOL --help 2>&1` in 3531bd304fc0Smrg *--identify-strict*) 3532bd304fc0Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3533bd304fc0Smrg ;; 3534bd304fc0Smrg *) 3535bd304fc0Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3536bd304fc0Smrg ;; 3537bd304fc0Smrg esac 3538bd304fc0Smrg ;; 3539bd304fc0Smrg*) 3540bd304fc0Smrg # fallback: assume linklib IS sharedlib 3541bd304fc0Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3542bd304fc0Smrg ;; 3543bd304fc0Smrgesac 3544bd304fc0Smrg]) 3545bd304fc0Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3546bd304fc0Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3547bd304fc0Smrg 3548bd304fc0Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3549bd304fc0Smrg [Command to associate shared and link libraries]) 3550bd304fc0Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3551bd304fc0Smrg 3552bd304fc0Smrg 3553bd304fc0Smrg# _LT_PATH_MANIFEST_TOOL 3554bd304fc0Smrg# ---------------------- 3555bd304fc0Smrg# locate the manifest tool 3556bd304fc0Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3557bd304fc0Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3558bd304fc0Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3559bd304fc0SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3560bd304fc0Smrg [lt_cv_path_mainfest_tool=no 3561bd304fc0Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3562bd304fc0Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3563bd304fc0Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3564bd304fc0Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3565bd304fc0Smrg lt_cv_path_mainfest_tool=yes 3566bd304fc0Smrg fi 3567bd304fc0Smrg rm -f conftest*]) 3568bd304fc0Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 3569bd304fc0Smrg MANIFEST_TOOL=: 3570bd304fc0Smrgfi 3571bd304fc0Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3572bd304fc0Smrg])# _LT_PATH_MANIFEST_TOOL 3573bd304fc0Smrg 3574f3561b8bSmrg 3575f3561b8bSmrg# LT_LIB_M 3576f3561b8bSmrg# -------- 3577fc5a983dSmrg# check for math library 3578f3561b8bSmrgAC_DEFUN([LT_LIB_M], 3579fc5a983dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3580fc5a983dSmrgLIBM= 3581fc5a983dSmrgcase $host in 3582bd304fc0Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3583fc5a983dSmrg # These system don't have libm, or don't need it 3584fc5a983dSmrg ;; 3585fc5a983dSmrg*-ncr-sysv4.3*) 3586fc5a983dSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3587fc5a983dSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3588fc5a983dSmrg ;; 3589fc5a983dSmrg*) 3590fc5a983dSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3591fc5a983dSmrg ;; 3592fc5a983dSmrgesac 3593f3561b8bSmrgAC_SUBST([LIBM]) 3594f3561b8bSmrg])# LT_LIB_M 3595fc5a983dSmrg 3596f3561b8bSmrg# Old name: 3597f3561b8bSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3598f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 3599f3561b8bSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3600fc5a983dSmrg 3601fc5a983dSmrg 3602f3561b8bSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3603f3561b8bSmrg# ------------------------------- 3604f3561b8bSmrgm4_defun([_LT_COMPILER_NO_RTTI], 3605f3561b8bSmrg[m4_require([_LT_TAG_COMPILER])dnl 3606fc5a983dSmrg 3607f3561b8bSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3608fc5a983dSmrg 3609f3561b8bSmrgif test "$GCC" = yes; then 3610bd304fc0Smrg case $cc_basename in 3611bd304fc0Smrg nvcc*) 3612bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3613bd304fc0Smrg *) 3614bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3615bd304fc0Smrg esac 3616fc5a983dSmrg 3617f3561b8bSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3618f3561b8bSmrg lt_cv_prog_compiler_rtti_exceptions, 3619f3561b8bSmrg [-fno-rtti -fno-exceptions], [], 3620f3561b8bSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3621f3561b8bSmrgfi 3622f3561b8bSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3623f3561b8bSmrg [Compiler flag to turn off builtin functions]) 3624f3561b8bSmrg])# _LT_COMPILER_NO_RTTI 3625fc5a983dSmrg 3626fc5a983dSmrg 3627f3561b8bSmrg# _LT_CMD_GLOBAL_SYMBOLS 3628f3561b8bSmrg# ---------------------- 3629f3561b8bSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3630f3561b8bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3631f3561b8bSmrgAC_REQUIRE([AC_PROG_CC])dnl 3632bd304fc0SmrgAC_REQUIRE([AC_PROG_AWK])dnl 3633f3561b8bSmrgAC_REQUIRE([LT_PATH_NM])dnl 3634f3561b8bSmrgAC_REQUIRE([LT_PATH_LD])dnl 3635f3561b8bSmrgm4_require([_LT_DECL_SED])dnl 3636f3561b8bSmrgm4_require([_LT_DECL_EGREP])dnl 3637f3561b8bSmrgm4_require([_LT_TAG_COMPILER])dnl 3638fc5a983dSmrg 3639f3561b8bSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3640f3561b8bSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3641f3561b8bSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3642fc5a983dSmrg[ 3643f3561b8bSmrg# These are sane defaults that work on at least a few old systems. 3644f3561b8bSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3645fc5a983dSmrg 3646f3561b8bSmrg# Character class describing NM global symbol codes. 3647f3561b8bSmrgsymcode='[[BCDEGRST]]' 3648fc5a983dSmrg 3649f3561b8bSmrg# Regexp to match symbols that can be accessed directly from C. 3650f3561b8bSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3651fc5a983dSmrg 3652f3561b8bSmrg# Define system-specific variables. 3653f3561b8bSmrgcase $host_os in 3654f3561b8bSmrgaix*) 3655f3561b8bSmrg symcode='[[BCDT]]' 3656f3561b8bSmrg ;; 3657f3561b8bSmrgcygwin* | mingw* | pw32* | cegcc*) 3658f3561b8bSmrg symcode='[[ABCDGISTW]]' 3659f3561b8bSmrg ;; 3660f3561b8bSmrghpux*) 3661f3561b8bSmrg if test "$host_cpu" = ia64; then 3662f3561b8bSmrg symcode='[[ABCDEGRST]]' 3663f3561b8bSmrg fi 3664f3561b8bSmrg ;; 3665f3561b8bSmrgirix* | nonstopux*) 3666f3561b8bSmrg symcode='[[BCDEGRST]]' 3667f3561b8bSmrg ;; 3668f3561b8bSmrgosf*) 3669f3561b8bSmrg symcode='[[BCDEGQRST]]' 3670f3561b8bSmrg ;; 3671f3561b8bSmrgsolaris*) 3672f3561b8bSmrg symcode='[[BDRT]]' 3673f3561b8bSmrg ;; 3674f3561b8bSmrgsco3.2v5*) 3675f3561b8bSmrg symcode='[[DT]]' 3676f3561b8bSmrg ;; 3677f3561b8bSmrgsysv4.2uw2*) 3678f3561b8bSmrg symcode='[[DT]]' 3679f3561b8bSmrg ;; 3680f3561b8bSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3681f3561b8bSmrg symcode='[[ABDT]]' 3682f3561b8bSmrg ;; 3683f3561b8bSmrgsysv4) 3684f3561b8bSmrg symcode='[[DFNSTU]]' 3685f3561b8bSmrg ;; 3686f3561b8bSmrgesac 3687fc5a983dSmrg 3688f3561b8bSmrg# If we're using GNU nm, then use its standard symbol codes. 3689f3561b8bSmrgcase `$NM -V 2>&1` in 3690f3561b8bSmrg*GNU* | *'with BFD'*) 3691f3561b8bSmrg symcode='[[ABCDGIRSTW]]' ;; 3692f3561b8bSmrgesac 3693fc5a983dSmrg 3694f3561b8bSmrg# Transform an extracted symbol line into a proper C declaration. 3695f3561b8bSmrg# Some systems (esp. on ia64) link data and code symbols differently, 3696f3561b8bSmrg# so use this general approach. 3697f3561b8bSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3698fc5a983dSmrg 3699f3561b8bSmrg# Transform an extracted symbol line into symbol name and symbol address 3700bd304fc0Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3701bd304fc0Smrglt_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'" 3702fc5a983dSmrg 3703f3561b8bSmrg# Handle CRLF in mingw tool chain 3704f3561b8bSmrgopt_cr= 3705f3561b8bSmrgcase $build_os in 3706f3561b8bSmrgmingw*) 3707f3561b8bSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3708f3561b8bSmrg ;; 3709f3561b8bSmrgesac 3710fc5a983dSmrg 3711f3561b8bSmrg# Try without a prefix underscore, then with it. 3712f3561b8bSmrgfor ac_symprfx in "" "_"; do 3713fc5a983dSmrg 3714f3561b8bSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3715f3561b8bSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3716fc5a983dSmrg 3717f3561b8bSmrg # Write the raw and C identifiers. 3718f3561b8bSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3719f3561b8bSmrg # Fake it for dumpbin and say T for any non-static function 3720f3561b8bSmrg # and D for any global variable. 3721f3561b8bSmrg # Also find C++ and __fastcall symbols from MSVC++, 3722f3561b8bSmrg # which start with @ or ?. 3723f3561b8bSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3724f3561b8bSmrg" {last_section=section; section=\$ 3};"\ 3725bd304fc0Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 3726f3561b8bSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3727f3561b8bSmrg" \$ 0!~/External *\|/{next};"\ 3728f3561b8bSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3729f3561b8bSmrg" {if(hide[section]) next};"\ 3730f3561b8bSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3731f3561b8bSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3732f3561b8bSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3733f3561b8bSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3734f3561b8bSmrg" ' prfx=^$ac_symprfx]" 3735f3561b8bSmrg else 3736f3561b8bSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3737fc5a983dSmrg fi 3738bd304fc0Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3739fc5a983dSmrg 3740f3561b8bSmrg # Check to see that the pipe works correctly. 3741f3561b8bSmrg pipe_works=no 3742fc5a983dSmrg 3743f3561b8bSmrg rm -f conftest* 3744f3561b8bSmrg cat > conftest.$ac_ext <<_LT_EOF 3745f3561b8bSmrg#ifdef __cplusplus 3746f3561b8bSmrgextern "C" { 3747f3561b8bSmrg#endif 3748f3561b8bSmrgchar nm_test_var; 3749f3561b8bSmrgvoid nm_test_func(void); 3750f3561b8bSmrgvoid nm_test_func(void){} 3751f3561b8bSmrg#ifdef __cplusplus 3752f3561b8bSmrg} 3753f3561b8bSmrg#endif 3754f3561b8bSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 3755f3561b8bSmrg_LT_EOF 3756fc5a983dSmrg 3757f3561b8bSmrg if AC_TRY_EVAL(ac_compile); then 3758f3561b8bSmrg # Now try to grab the symbols. 3759f3561b8bSmrg nlist=conftest.nm 3760bd304fc0Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3761f3561b8bSmrg # Try sorting and uniquifying the output. 3762f3561b8bSmrg if sort "$nlist" | uniq > "$nlist"T; then 3763f3561b8bSmrg mv -f "$nlist"T "$nlist" 3764f3561b8bSmrg else 3765f3561b8bSmrg rm -f "$nlist"T 3766f3561b8bSmrg fi 3767fc5a983dSmrg 3768f3561b8bSmrg # Make sure that we snagged all the symbols we need. 3769f3561b8bSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3770f3561b8bSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3771f3561b8bSmrg cat <<_LT_EOF > conftest.$ac_ext 3772bd304fc0Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3773bd304fc0Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3774bd304fc0Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 3775bd304fc0Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 3776bd304fc0Smrg# define LT@&t@_DLSYM_CONST 3777bd304fc0Smrg#elif defined(__osf__) 3778bd304fc0Smrg/* This system does not cope well with relocations in const data. */ 3779bd304fc0Smrg# define LT@&t@_DLSYM_CONST 3780bd304fc0Smrg#else 3781bd304fc0Smrg# define LT@&t@_DLSYM_CONST const 3782bd304fc0Smrg#endif 3783bd304fc0Smrg 3784f3561b8bSmrg#ifdef __cplusplus 3785f3561b8bSmrgextern "C" { 3786f3561b8bSmrg#endif 3787fc5a983dSmrg 3788f3561b8bSmrg_LT_EOF 3789f3561b8bSmrg # Now generate the symbol file. 3790f3561b8bSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3791fc5a983dSmrg 3792f3561b8bSmrg cat <<_LT_EOF >> conftest.$ac_ext 3793fc5a983dSmrg 3794f3561b8bSmrg/* The mapping between symbol names and symbols. */ 3795bd304fc0SmrgLT@&t@_DLSYM_CONST struct { 3796f3561b8bSmrg const char *name; 3797f3561b8bSmrg void *address; 3798f3561b8bSmrg} 3799f3561b8bSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3800f3561b8bSmrg{ 3801f3561b8bSmrg { "@PROGRAM@", (void *) 0 }, 3802f3561b8bSmrg_LT_EOF 3803f3561b8bSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3804f3561b8bSmrg cat <<\_LT_EOF >> conftest.$ac_ext 3805f3561b8bSmrg {0, (void *) 0} 3806f3561b8bSmrg}; 3807fc5a983dSmrg 3808f3561b8bSmrg/* This works around a problem in FreeBSD linker */ 3809f3561b8bSmrg#ifdef FREEBSD_WORKAROUND 3810f3561b8bSmrgstatic const void *lt_preloaded_setup() { 3811f3561b8bSmrg return lt__PROGRAM__LTX_preloaded_symbols; 3812f3561b8bSmrg} 3813f3561b8bSmrg#endif 3814fc5a983dSmrg 3815f3561b8bSmrg#ifdef __cplusplus 3816f3561b8bSmrg} 3817f3561b8bSmrg#endif 3818f3561b8bSmrg_LT_EOF 3819f3561b8bSmrg # Now try linking the two files. 3820f3561b8bSmrg mv conftest.$ac_objext conftstm.$ac_objext 3821bd304fc0Smrg lt_globsym_save_LIBS=$LIBS 3822bd304fc0Smrg lt_globsym_save_CFLAGS=$CFLAGS 3823f3561b8bSmrg LIBS="conftstm.$ac_objext" 3824f3561b8bSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3825f3561b8bSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3826f3561b8bSmrg pipe_works=yes 3827f3561b8bSmrg fi 3828bd304fc0Smrg LIBS=$lt_globsym_save_LIBS 3829bd304fc0Smrg CFLAGS=$lt_globsym_save_CFLAGS 3830f3561b8bSmrg else 3831f3561b8bSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3832f3561b8bSmrg fi 3833f3561b8bSmrg else 3834f3561b8bSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3835f3561b8bSmrg fi 3836fc5a983dSmrg else 3837f3561b8bSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3838fc5a983dSmrg fi 3839fc5a983dSmrg else 3840f3561b8bSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3841f3561b8bSmrg cat conftest.$ac_ext >&5 3842fc5a983dSmrg fi 3843f3561b8bSmrg rm -rf conftest* conftst* 3844fc5a983dSmrg 3845f3561b8bSmrg # Do not use the global_symbol_pipe unless it works. 3846f3561b8bSmrg if test "$pipe_works" = yes; then 3847f3561b8bSmrg break 3848f3561b8bSmrg else 3849f3561b8bSmrg lt_cv_sys_global_symbol_pipe= 3850f3561b8bSmrg fi 3851f3561b8bSmrgdone 3852f3561b8bSmrg]) 3853f3561b8bSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3854f3561b8bSmrg lt_cv_sys_global_symbol_to_cdecl= 3855f3561b8bSmrgfi 3856f3561b8bSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3857f3561b8bSmrg AC_MSG_RESULT(failed) 3858fc5a983dSmrgelse 3859f3561b8bSmrg AC_MSG_RESULT(ok) 3860fc5a983dSmrgfi 3861fc5a983dSmrg 3862bd304fc0Smrg# Response file support. 3863bd304fc0Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3864bd304fc0Smrg nm_file_list_spec='@' 3865bd304fc0Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3866bd304fc0Smrg nm_file_list_spec='@' 3867bd304fc0Smrgfi 3868bd304fc0Smrg 3869f3561b8bSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3870f3561b8bSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 3871f3561b8bSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3872f3561b8bSmrg [Transform the output of nm in a proper C declaration]) 3873f3561b8bSmrg_LT_DECL([global_symbol_to_c_name_address], 3874f3561b8bSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3875f3561b8bSmrg [Transform the output of nm in a C name address pair]) 3876f3561b8bSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3877f3561b8bSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3878f3561b8bSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3879bd304fc0Smrg_LT_DECL([], [nm_file_list_spec], [1], 3880bd304fc0Smrg [Specify filename containing input files for $NM]) 3881f3561b8bSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 3882fc5a983dSmrg 3883fc5a983dSmrg 3884f3561b8bSmrg# _LT_COMPILER_PIC([TAGNAME]) 3885f3561b8bSmrg# --------------------------- 3886f3561b8bSmrgm4_defun([_LT_COMPILER_PIC], 3887f3561b8bSmrg[m4_require([_LT_TAG_COMPILER])dnl 3888f3561b8bSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3889f3561b8bSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3890f3561b8bSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3891fc5a983dSmrg 3892f3561b8bSmrgm4_if([$1], [CXX], [ 3893f3561b8bSmrg # C++ specific cases for pic, static, wl, etc. 3894f3561b8bSmrg if test "$GXX" = yes; then 3895f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3896f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3897fc5a983dSmrg 3898f3561b8bSmrg case $host_os in 3899f3561b8bSmrg aix*) 3900f3561b8bSmrg # All AIX code is PIC. 3901fc5a983dSmrg if test "$host_cpu" = ia64; then 3902f3561b8bSmrg # AIX 5 now supports IA64 processor 3903f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3904fc5a983dSmrg fi 3905fc5a983dSmrg ;; 3906fc5a983dSmrg 3907f3561b8bSmrg amigaos*) 3908fc5a983dSmrg case $host_cpu in 3909f3561b8bSmrg powerpc) 3910f3561b8bSmrg # see comment about AmigaOS4 .so support 3911f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3912f3561b8bSmrg ;; 3913f3561b8bSmrg m68k) 3914f3561b8bSmrg # FIXME: we need at least 68020 code to build shared libraries, but 3915f3561b8bSmrg # adding the `-m68020' flag to GCC prevents building anything better, 3916f3561b8bSmrg # like `-m68040'. 3917f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3918fc5a983dSmrg ;; 3919fc5a983dSmrg esac 3920fc5a983dSmrg ;; 3921fc5a983dSmrg 3922f3561b8bSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3923f3561b8bSmrg # PIC is the default for these OSes. 3924f3561b8bSmrg ;; 3925f3561b8bSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3926f3561b8bSmrg # This hack is so that the source file can tell whether it is being 3927f3561b8bSmrg # built for inclusion in a dll (and should export symbols for example). 3928f3561b8bSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3929f3561b8bSmrg # (--disable-auto-import) libraries 3930f3561b8bSmrg m4_if([$1], [GCJ], [], 3931f3561b8bSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3932f3561b8bSmrg ;; 3933f3561b8bSmrg darwin* | rhapsody*) 3934f3561b8bSmrg # PIC is the default on this platform 3935f3561b8bSmrg # Common symbols not allowed in MH_DYLIB files 3936f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3937f3561b8bSmrg ;; 3938f3561b8bSmrg *djgpp*) 3939f3561b8bSmrg # DJGPP does not support shared libraries at all 3940f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3941f3561b8bSmrg ;; 3942bd304fc0Smrg haiku*) 3943bd304fc0Smrg # PIC is the default for Haiku. 3944bd304fc0Smrg # The "-static" flag exists, but is broken. 3945bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 3946bd304fc0Smrg ;; 3947f3561b8bSmrg interix[[3-9]]*) 3948f3561b8bSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3949f3561b8bSmrg # Instead, we relocate shared libraries at runtime. 3950f3561b8bSmrg ;; 3951f3561b8bSmrg sysv4*MP*) 3952f3561b8bSmrg if test -d /usr/nec; then 3953f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3954f3561b8bSmrg fi 3955f3561b8bSmrg ;; 3956f3561b8bSmrg hpux*) 3957f3561b8bSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3958f3561b8bSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3959f3561b8bSmrg # sets the default TLS model and affects inlining. 3960f3561b8bSmrg case $host_cpu in 3961f3561b8bSmrg hppa*64*) 3962fc5a983dSmrg ;; 3963fc5a983dSmrg *) 3964f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3965fc5a983dSmrg ;; 3966f3561b8bSmrg esac 3967f3561b8bSmrg ;; 3968f3561b8bSmrg *qnx* | *nto*) 3969f3561b8bSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3970f3561b8bSmrg # it will coredump. 3971f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3972f3561b8bSmrg ;; 3973f3561b8bSmrg *) 3974f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3975f3561b8bSmrg ;; 3976fc5a983dSmrg esac 3977f3561b8bSmrg else 3978f3561b8bSmrg case $host_os in 3979f3561b8bSmrg aix[[4-9]]*) 3980f3561b8bSmrg # All AIX code is PIC. 3981f3561b8bSmrg if test "$host_cpu" = ia64; then 3982f3561b8bSmrg # AIX 5 now supports IA64 processor 3983f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3984f3561b8bSmrg else 3985f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3986fc5a983dSmrg fi 3987fc5a983dSmrg ;; 3988f3561b8bSmrg chorus*) 3989f3561b8bSmrg case $cc_basename in 3990f3561b8bSmrg cxch68*) 3991f3561b8bSmrg # Green Hills C++ Compiler 3992f3561b8bSmrg # _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" 3993fc5a983dSmrg ;; 3994fc5a983dSmrg esac 3995fc5a983dSmrg ;; 3996bd304fc0Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3997bd304fc0Smrg # This hack is so that the source file can tell whether it is being 3998bd304fc0Smrg # built for inclusion in a dll (and should export symbols for example). 3999bd304fc0Smrg m4_if([$1], [GCJ], [], 4000bd304fc0Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4001bd304fc0Smrg ;; 4002f3561b8bSmrg dgux*) 4003f3561b8bSmrg case $cc_basename in 4004f3561b8bSmrg ec++*) 4005f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4006f3561b8bSmrg ;; 4007f3561b8bSmrg ghcx*) 4008f3561b8bSmrg # Green Hills C++ Compiler 4009f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4010f3561b8bSmrg ;; 4011f3561b8bSmrg *) 4012f3561b8bSmrg ;; 4013fc5a983dSmrg esac 4014fc5a983dSmrg ;; 4015f3561b8bSmrg freebsd* | dragonfly*) 4016f3561b8bSmrg # FreeBSD uses GNU C++ 4017fc5a983dSmrg ;; 4018f3561b8bSmrg hpux9* | hpux10* | hpux11*) 4019f3561b8bSmrg case $cc_basename in 4020f3561b8bSmrg CC*) 4021f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4022f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4023f3561b8bSmrg if test "$host_cpu" != ia64; then 4024f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4025f3561b8bSmrg fi 4026f3561b8bSmrg ;; 4027f3561b8bSmrg aCC*) 4028f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4029f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4030f3561b8bSmrg case $host_cpu in 4031f3561b8bSmrg hppa*64*|ia64*) 4032f3561b8bSmrg # +Z the default 4033f3561b8bSmrg ;; 4034f3561b8bSmrg *) 4035f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4036f3561b8bSmrg ;; 4037f3561b8bSmrg esac 4038f3561b8bSmrg ;; 4039f3561b8bSmrg *) 4040f3561b8bSmrg ;; 4041f3561b8bSmrg esac 4042fc5a983dSmrg ;; 4043f3561b8bSmrg interix*) 4044f3561b8bSmrg # This is c89, which is MS Visual C++ (no shared libs) 4045f3561b8bSmrg # Anyone wants to do a port? 4046fc5a983dSmrg ;; 4047f3561b8bSmrg irix5* | irix6* | nonstopux*) 4048f3561b8bSmrg case $cc_basename in 4049f3561b8bSmrg CC*) 4050f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4051f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4052f3561b8bSmrg # CC pic flag -KPIC is the default. 4053f3561b8bSmrg ;; 4054f3561b8bSmrg *) 4055f3561b8bSmrg ;; 4056f3561b8bSmrg esac 4057fc5a983dSmrg ;; 40586086d97eSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4059f3561b8bSmrg case $cc_basename in 4060f3561b8bSmrg KCC*) 4061f3561b8bSmrg # KAI C++ Compiler 4062f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4063f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4064f3561b8bSmrg ;; 4065f3561b8bSmrg ecpc* ) 4066f3561b8bSmrg # old Intel C++ for x86_64 which still supported -KPIC. 4067f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4068f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4069f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4070f3561b8bSmrg ;; 4071f3561b8bSmrg icpc* ) 4072f3561b8bSmrg # Intel C++, used to be incompatible with GCC. 4073f3561b8bSmrg # ICC 10 doesn't accept -KPIC any more. 4074f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4075f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4076f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4077f3561b8bSmrg ;; 4078f3561b8bSmrg pgCC* | pgcpp*) 4079f3561b8bSmrg # Portland Group C++ compiler 4080f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4081f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4082f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4083f3561b8bSmrg ;; 4084f3561b8bSmrg cxx*) 4085f3561b8bSmrg # Compaq C++ 4086f3561b8bSmrg # Make sure the PIC flag is empty. It appears that all Alpha 4087f3561b8bSmrg # Linux and Compaq Tru64 Unix objects are PIC. 4088f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4089f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4090f3561b8bSmrg ;; 4091bd304fc0Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4092bd304fc0Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4093f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4094f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4095f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4096f3561b8bSmrg ;; 4097f3561b8bSmrg *) 4098f3561b8bSmrg case `$CC -V 2>&1 | sed 5q` in 4099f3561b8bSmrg *Sun\ C*) 4100f3561b8bSmrg # Sun C++ 5.9 4101f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4102f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4103f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4104f3561b8bSmrg ;; 4105f3561b8bSmrg esac 4106f3561b8bSmrg ;; 4107f3561b8bSmrg esac 4108fc5a983dSmrg ;; 4109f3561b8bSmrg lynxos*) 4110fc5a983dSmrg ;; 4111f3561b8bSmrg m88k*) 4112fc5a983dSmrg ;; 4113f3561b8bSmrg mvs*) 4114f3561b8bSmrg case $cc_basename in 4115f3561b8bSmrg cxx*) 4116f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4117f3561b8bSmrg ;; 4118f3561b8bSmrg *) 4119f3561b8bSmrg ;; 4120f3561b8bSmrg esac 4121fc5a983dSmrg ;; 4122bd304fc0Smrg netbsd*) 4123fc5a983dSmrg ;; 4124f3561b8bSmrg *qnx* | *nto*) 4125f3561b8bSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4126f3561b8bSmrg # it will coredump. 4127f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4128f3561b8bSmrg ;; 4129f3561b8bSmrg osf3* | osf4* | osf5*) 4130f3561b8bSmrg case $cc_basename in 4131f3561b8bSmrg KCC*) 4132f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4133f3561b8bSmrg ;; 4134f3561b8bSmrg RCC*) 4135f3561b8bSmrg # Rational C++ 2.4.1 4136f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4137f3561b8bSmrg ;; 4138f3561b8bSmrg cxx*) 4139f3561b8bSmrg # Digital/Compaq C++ 4140f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4141f3561b8bSmrg # Make sure the PIC flag is empty. It appears that all Alpha 4142f3561b8bSmrg # Linux and Compaq Tru64 Unix objects are PIC. 4143f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4144f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4145f3561b8bSmrg ;; 4146f3561b8bSmrg *) 4147f3561b8bSmrg ;; 4148f3561b8bSmrg esac 4149fc5a983dSmrg ;; 4150f3561b8bSmrg psos*) 4151fc5a983dSmrg ;; 4152f3561b8bSmrg solaris*) 4153f3561b8bSmrg case $cc_basename in 4154bd304fc0Smrg CC* | sunCC*) 4155f3561b8bSmrg # Sun C++ 4.2, 5.x and Centerline C++ 4156f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4157f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4158f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4159f3561b8bSmrg ;; 4160f3561b8bSmrg gcx*) 4161f3561b8bSmrg # Green Hills C++ Compiler 4162f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4163f3561b8bSmrg ;; 4164f3561b8bSmrg *) 4165f3561b8bSmrg ;; 4166f3561b8bSmrg esac 4167fc5a983dSmrg ;; 4168f3561b8bSmrg sunos4*) 4169f3561b8bSmrg case $cc_basename in 4170f3561b8bSmrg CC*) 4171f3561b8bSmrg # Sun C++ 4.x 4172f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4173f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4174f3561b8bSmrg ;; 4175f3561b8bSmrg lcc*) 4176f3561b8bSmrg # Lucid 4177f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4178f3561b8bSmrg ;; 4179fc5a983dSmrg *) 4180fc5a983dSmrg ;; 4181fc5a983dSmrg esac 4182fc5a983dSmrg ;; 4183f3561b8bSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4184f3561b8bSmrg case $cc_basename in 4185f3561b8bSmrg CC*) 4186f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4187f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4188f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4189f3561b8bSmrg ;; 4190f3561b8bSmrg esac 4191fc5a983dSmrg ;; 4192f3561b8bSmrg tandem*) 4193f3561b8bSmrg case $cc_basename in 4194f3561b8bSmrg NCC*) 4195f3561b8bSmrg # NonStop-UX NCC 3.20 4196f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4197f3561b8bSmrg ;; 4198fc5a983dSmrg *) 4199fc5a983dSmrg ;; 4200f3561b8bSmrg esac 4201fc5a983dSmrg ;; 4202f3561b8bSmrg vxworks*) 4203fc5a983dSmrg ;; 4204fc5a983dSmrg *) 4205f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4206fc5a983dSmrg ;; 4207fc5a983dSmrg esac 4208f3561b8bSmrg fi 4209f3561b8bSmrg], 4210f3561b8bSmrg[ 4211f3561b8bSmrg if test "$GCC" = yes; then 4212f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4213f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4214f3561b8bSmrg 4215f3561b8bSmrg case $host_os in 4216f3561b8bSmrg aix*) 4217f3561b8bSmrg # All AIX code is PIC. 4218f3561b8bSmrg if test "$host_cpu" = ia64; then 4219f3561b8bSmrg # AIX 5 now supports IA64 processor 4220f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4221f3561b8bSmrg fi 4222f3561b8bSmrg ;; 4223f3561b8bSmrg 4224f3561b8bSmrg amigaos*) 4225f3561b8bSmrg case $host_cpu in 4226f3561b8bSmrg powerpc) 4227f3561b8bSmrg # see comment about AmigaOS4 .so support 4228f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4229f3561b8bSmrg ;; 4230f3561b8bSmrg m68k) 4231f3561b8bSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4232f3561b8bSmrg # adding the `-m68020' flag to GCC prevents building anything better, 4233f3561b8bSmrg # like `-m68040'. 4234f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4235f3561b8bSmrg ;; 4236f3561b8bSmrg esac 4237f3561b8bSmrg ;; 4238f3561b8bSmrg 4239f3561b8bSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4240f3561b8bSmrg # PIC is the default for these OSes. 4241f3561b8bSmrg ;; 4242f3561b8bSmrg 4243f3561b8bSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4244f3561b8bSmrg # This hack is so that the source file can tell whether it is being 4245f3561b8bSmrg # built for inclusion in a dll (and should export symbols for example). 4246f3561b8bSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4247f3561b8bSmrg # (--disable-auto-import) libraries 4248f3561b8bSmrg m4_if([$1], [GCJ], [], 4249f3561b8bSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4250f3561b8bSmrg ;; 4251f3561b8bSmrg 4252f3561b8bSmrg darwin* | rhapsody*) 4253f3561b8bSmrg # PIC is the default on this platform 4254f3561b8bSmrg # Common symbols not allowed in MH_DYLIB files 4255f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4256f3561b8bSmrg ;; 4257f3561b8bSmrg 4258bd304fc0Smrg haiku*) 4259bd304fc0Smrg # PIC is the default for Haiku. 4260bd304fc0Smrg # The "-static" flag exists, but is broken. 4261bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4262bd304fc0Smrg ;; 4263bd304fc0Smrg 4264f3561b8bSmrg hpux*) 4265f3561b8bSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4266f3561b8bSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4267f3561b8bSmrg # sets the default TLS model and affects inlining. 4268f3561b8bSmrg case $host_cpu in 4269f3561b8bSmrg hppa*64*) 4270f3561b8bSmrg # +Z the default 4271fc5a983dSmrg ;; 4272fc5a983dSmrg *) 4273f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4274fc5a983dSmrg ;; 4275f3561b8bSmrg esac 4276f3561b8bSmrg ;; 4277f3561b8bSmrg 4278f3561b8bSmrg interix[[3-9]]*) 4279f3561b8bSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4280f3561b8bSmrg # Instead, we relocate shared libraries at runtime. 4281f3561b8bSmrg ;; 4282f3561b8bSmrg 4283f3561b8bSmrg msdosdjgpp*) 4284f3561b8bSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4285f3561b8bSmrg # on systems that don't support them. 4286f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4287f3561b8bSmrg enable_shared=no 4288f3561b8bSmrg ;; 4289f3561b8bSmrg 4290f3561b8bSmrg *nto* | *qnx*) 4291f3561b8bSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4292f3561b8bSmrg # it will coredump. 4293f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4294f3561b8bSmrg ;; 4295f3561b8bSmrg 4296f3561b8bSmrg sysv4*MP*) 4297f3561b8bSmrg if test -d /usr/nec; then 4298f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4299f3561b8bSmrg fi 4300f3561b8bSmrg ;; 4301f3561b8bSmrg 4302f3561b8bSmrg *) 4303f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4304f3561b8bSmrg ;; 4305fc5a983dSmrg esac 4306bd304fc0Smrg 4307bd304fc0Smrg case $cc_basename in 4308bd304fc0Smrg nvcc*) # Cuda Compiler Driver 2.2 4309bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4310bd304fc0Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4311bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4312bd304fc0Smrg fi 4313bd304fc0Smrg ;; 4314bd304fc0Smrg esac 4315f3561b8bSmrg else 4316f3561b8bSmrg # PORTME Check for flag to pass linker flags through the system compiler. 4317f3561b8bSmrg case $host_os in 4318f3561b8bSmrg aix*) 4319f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4320f3561b8bSmrg if test "$host_cpu" = ia64; then 4321f3561b8bSmrg # AIX 5 now supports IA64 processor 4322f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4323f3561b8bSmrg else 4324f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4325f3561b8bSmrg fi 4326f3561b8bSmrg ;; 4327f3561b8bSmrg 4328f3561b8bSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4329f3561b8bSmrg # This hack is so that the source file can tell whether it is being 4330f3561b8bSmrg # built for inclusion in a dll (and should export symbols for example). 4331f3561b8bSmrg m4_if([$1], [GCJ], [], 4332f3561b8bSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4333f3561b8bSmrg ;; 4334f3561b8bSmrg 4335f3561b8bSmrg hpux9* | hpux10* | hpux11*) 4336f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4337f3561b8bSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4338f3561b8bSmrg # not for PA HP-UX. 4339f3561b8bSmrg case $host_cpu in 4340f3561b8bSmrg hppa*64*|ia64*) 4341f3561b8bSmrg # +Z the default 4342fc5a983dSmrg ;; 4343fc5a983dSmrg *) 4344f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4345fc5a983dSmrg ;; 4346f3561b8bSmrg esac 4347f3561b8bSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4348f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4349f3561b8bSmrg ;; 4350fc5a983dSmrg 4351f3561b8bSmrg irix5* | irix6* | nonstopux*) 4352f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4353f3561b8bSmrg # PIC (with -KPIC) is the default. 4354f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4355f3561b8bSmrg ;; 4356fc5a983dSmrg 43576086d97eSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4358f3561b8bSmrg case $cc_basename in 4359f3561b8bSmrg # old Intel for x86_64 which still supported -KPIC. 4360f3561b8bSmrg ecc*) 4361f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4362f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4363f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4364f3561b8bSmrg ;; 4365f3561b8bSmrg # icc used to be incompatible with GCC. 4366f3561b8bSmrg # ICC 10 doesn't accept -KPIC any more. 4367f3561b8bSmrg icc* | ifort*) 4368f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4369f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4370f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4371f3561b8bSmrg ;; 4372f3561b8bSmrg # Lahey Fortran 8.1. 4373f3561b8bSmrg lf95*) 4374f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4375f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4376f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4377f3561b8bSmrg ;; 4378bd304fc0Smrg nagfor*) 4379bd304fc0Smrg # NAG Fortran compiler 4380bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4381bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4382bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4383bd304fc0Smrg ;; 4384bd304fc0Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4385f3561b8bSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 4386f3561b8bSmrg # which looks to be a dead project) 4387f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4388f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4389f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4390f3561b8bSmrg ;; 4391f3561b8bSmrg ccc*) 4392f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4393f3561b8bSmrg # All Alpha code is PIC. 4394f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4395f3561b8bSmrg ;; 4396bd304fc0Smrg xl* | bgxl* | bgf* | mpixl*) 4397bd304fc0Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4398f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4399f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4400f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4401f3561b8bSmrg ;; 4402f3561b8bSmrg *) 4403f3561b8bSmrg case `$CC -V 2>&1 | sed 5q` in 4404bd304fc0Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4405bd304fc0Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4406bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4407bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4408bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4409bd304fc0Smrg ;; 4410bd304fc0Smrg *Sun\ F* | *Sun*Fortran*) 4411bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4412bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4413bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4414bd304fc0Smrg ;; 4415f3561b8bSmrg *Sun\ C*) 4416f3561b8bSmrg # Sun C 5.9 4417f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4418f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4419f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4420f3561b8bSmrg ;; 4421bd304fc0Smrg *Intel*\ [[CF]]*Compiler*) 4422bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4423bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4424bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4425bd304fc0Smrg ;; 4426bd304fc0Smrg *Portland\ Group*) 4427bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4428bd304fc0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4429f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4430f3561b8bSmrg ;; 4431f3561b8bSmrg esac 4432f3561b8bSmrg ;; 4433f3561b8bSmrg esac 4434f3561b8bSmrg ;; 4435fc5a983dSmrg 4436f3561b8bSmrg newsos6) 4437f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4438f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4439f3561b8bSmrg ;; 4440fc5a983dSmrg 4441f3561b8bSmrg *nto* | *qnx*) 4442f3561b8bSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4443f3561b8bSmrg # it will coredump. 4444f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4445f3561b8bSmrg ;; 4446fc5a983dSmrg 4447f3561b8bSmrg osf3* | osf4* | osf5*) 4448f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4449f3561b8bSmrg # All OSF/1 code is PIC. 4450f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4451f3561b8bSmrg ;; 4452fc5a983dSmrg 4453f3561b8bSmrg rdos*) 4454f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4455f3561b8bSmrg ;; 4456fc5a983dSmrg 4457f3561b8bSmrg solaris*) 4458f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4459f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4460f3561b8bSmrg case $cc_basename in 4461bd304fc0Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4462f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4463f3561b8bSmrg *) 4464f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4465f3561b8bSmrg esac 4466f3561b8bSmrg ;; 4467fc5a983dSmrg 4468f3561b8bSmrg sunos4*) 4469f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4470f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4471f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4472f3561b8bSmrg ;; 4473fc5a983dSmrg 4474f3561b8bSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 4475f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4476f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4477f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4478f3561b8bSmrg ;; 4479fc5a983dSmrg 4480f3561b8bSmrg sysv4*MP*) 4481f3561b8bSmrg if test -d /usr/nec ;then 4482f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4483f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4484f3561b8bSmrg fi 4485f3561b8bSmrg ;; 4486fc5a983dSmrg 4487f3561b8bSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4488f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4489f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4490f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4491f3561b8bSmrg ;; 4492fc5a983dSmrg 4493f3561b8bSmrg unicos*) 4494f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4495f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4496f3561b8bSmrg ;; 4497fc5a983dSmrg 4498f3561b8bSmrg uts4*) 4499f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4500f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4501f3561b8bSmrg ;; 4502fc5a983dSmrg 4503f3561b8bSmrg *) 4504f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4505f3561b8bSmrg ;; 4506f3561b8bSmrg esac 4507f3561b8bSmrg fi 4508f3561b8bSmrg]) 4509f3561b8bSmrgcase $host_os in 4510f3561b8bSmrg # For platforms which do not support PIC, -DPIC is meaningless: 4511f3561b8bSmrg *djgpp*) 4512f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4513f3561b8bSmrg ;; 4514f3561b8bSmrg *) 4515f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4516f3561b8bSmrg ;; 4517f3561b8bSmrgesac 4518bd304fc0Smrg 4519bd304fc0SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4520bd304fc0Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4521bd304fc0Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4522bd304fc0Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4523fc5a983dSmrg 4524f3561b8bSmrg# 4525f3561b8bSmrg# Check to make sure the PIC flag actually works. 4526f3561b8bSmrg# 4527f3561b8bSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4528f3561b8bSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4529f3561b8bSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4530f3561b8bSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4531f3561b8bSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4532f3561b8bSmrg "" | " "*) ;; 4533f3561b8bSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4534f3561b8bSmrg esac], 4535f3561b8bSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4536f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4537f3561b8bSmrgfi 4538f3561b8bSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4539f3561b8bSmrg [Additional compiler flags for building library objects]) 4540fc5a983dSmrg 4541bd304fc0Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4542bd304fc0Smrg [How to pass a linker flag through the compiler]) 4543f3561b8bSmrg# 4544f3561b8bSmrg# Check to make sure the static flag actually works. 4545f3561b8bSmrg# 4546f3561b8bSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4547f3561b8bSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4548f3561b8bSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4549f3561b8bSmrg $lt_tmp_static_flag, 4550f3561b8bSmrg [], 4551f3561b8bSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4552f3561b8bSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4553f3561b8bSmrg [Compiler flag to prevent dynamic linking]) 4554f3561b8bSmrg])# _LT_COMPILER_PIC 4555fc5a983dSmrg 4556f3561b8bSmrg 4557f3561b8bSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 4558f3561b8bSmrg# ---------------------------- 4559f3561b8bSmrg# See if the linker supports building shared libraries. 4560f3561b8bSmrgm4_defun([_LT_LINKER_SHLIBS], 4561f3561b8bSmrg[AC_REQUIRE([LT_PATH_LD])dnl 4562f3561b8bSmrgAC_REQUIRE([LT_PATH_NM])dnl 4563bd304fc0Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4564f3561b8bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4565f3561b8bSmrgm4_require([_LT_DECL_EGREP])dnl 4566f3561b8bSmrgm4_require([_LT_DECL_SED])dnl 4567f3561b8bSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4568f3561b8bSmrgm4_require([_LT_TAG_COMPILER])dnl 4569f3561b8bSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4570f3561b8bSmrgm4_if([$1], [CXX], [ 4571f3561b8bSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4572bd304fc0Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4573f3561b8bSmrg case $host_os in 4574f3561b8bSmrg aix[[4-9]]*) 4575f3561b8bSmrg # If we're using GNU nm, then we don't want the "-C" option. 4576f3561b8bSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4577bd304fc0Smrg # Also, AIX nm treats weak defined symbols like other global defined 4578bd304fc0Smrg # symbols, whereas GNU nm marks them as "W". 4579f3561b8bSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4580bd304fc0Smrg _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' 4581f3561b8bSmrg else 4582f3561b8bSmrg _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' 4583fc5a983dSmrg fi 4584fc5a983dSmrg ;; 4585f3561b8bSmrg pw32*) 4586f3561b8bSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4587bd304fc0Smrg ;; 4588f3561b8bSmrg cygwin* | mingw* | cegcc*) 4589bd304fc0Smrg case $cc_basename in 4590bd304fc0Smrg cl*) 4591bd304fc0Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4592bd304fc0Smrg ;; 4593bd304fc0Smrg *) 4594bd304fc0Smrg _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' 4595bd304fc0Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4596bd304fc0Smrg ;; 4597bd304fc0Smrg esac 4598bd304fc0Smrg ;; 4599f3561b8bSmrg *) 4600f3561b8bSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4601bd304fc0Smrg ;; 4602f3561b8bSmrg esac 4603f3561b8bSmrg], [ 4604f3561b8bSmrg runpath_var= 4605f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 4606f3561b8bSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4607f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)= 4608f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4609f3561b8bSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 4610f3561b8bSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4611f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4612f3561b8bSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4613f3561b8bSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 4614f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4615f3561b8bSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4616f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4617f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4618f3561b8bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4619f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4620f3561b8bSmrg _LT_TAGVAR(inherit_rpath, $1)=no 4621f3561b8bSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4622f3561b8bSmrg _LT_TAGVAR(module_cmds, $1)= 4623f3561b8bSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 4624f3561b8bSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4625f3561b8bSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4626f3561b8bSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4627f3561b8bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4628f3561b8bSmrg # include_expsyms should be a list of space-separated symbols to be *always* 4629f3561b8bSmrg # included in the symbol list 4630f3561b8bSmrg _LT_TAGVAR(include_expsyms, $1)= 4631f3561b8bSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 4632f3561b8bSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4633f3561b8bSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4634f3561b8bSmrg # as well as any symbol that contains `d'. 4635f3561b8bSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4636f3561b8bSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4637f3561b8bSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 4638f3561b8bSmrg # the symbol is explicitly referenced. Since portable code cannot 4639f3561b8bSmrg # rely on this symbol name, it's probably fine to never include it in 4640f3561b8bSmrg # preloaded symbol tables. 4641f3561b8bSmrg # Exclude shared library initialization/finalization symbols. 4642f3561b8bSmrgdnl Note also adjust exclude_expsyms for C++ above. 4643f3561b8bSmrg extract_expsyms_cmds= 4644fc5a983dSmrg 4645f3561b8bSmrg case $host_os in 4646f3561b8bSmrg cygwin* | mingw* | pw32* | cegcc*) 4647f3561b8bSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4648f3561b8bSmrg # When not using gcc, we currently assume that we are using 4649f3561b8bSmrg # Microsoft Visual C++. 4650f3561b8bSmrg if test "$GCC" != yes; then 4651f3561b8bSmrg with_gnu_ld=no 4652fc5a983dSmrg fi 4653fc5a983dSmrg ;; 4654f3561b8bSmrg interix*) 4655f3561b8bSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4656f3561b8bSmrg with_gnu_ld=yes 4657f3561b8bSmrg ;; 4658f3561b8bSmrg openbsd*) 4659f3561b8bSmrg with_gnu_ld=no 4660f3561b8bSmrg ;; 4661fc5a983dSmrg esac 4662fc5a983dSmrg 4663f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 4664bd304fc0Smrg 4665bd304fc0Smrg # On some targets, GNU ld is compatible enough with the native linker 4666bd304fc0Smrg # that we're better off using the native interface for both. 4667bd304fc0Smrg lt_use_gnu_ld_interface=no 4668f3561b8bSmrg if test "$with_gnu_ld" = yes; then 4669bd304fc0Smrg case $host_os in 4670bd304fc0Smrg aix*) 4671bd304fc0Smrg # The AIX port of GNU ld has always aspired to compatibility 4672bd304fc0Smrg # with the native linker. However, as the warning in the GNU ld 4673bd304fc0Smrg # block says, versions before 2.19.5* couldn't really create working 4674bd304fc0Smrg # shared libraries, regardless of the interface used. 4675bd304fc0Smrg case `$LD -v 2>&1` in 4676bd304fc0Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4677bd304fc0Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4678bd304fc0Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4679bd304fc0Smrg *) 4680bd304fc0Smrg lt_use_gnu_ld_interface=yes 4681bd304fc0Smrg ;; 4682bd304fc0Smrg esac 4683bd304fc0Smrg ;; 4684bd304fc0Smrg *) 4685bd304fc0Smrg lt_use_gnu_ld_interface=yes 4686bd304fc0Smrg ;; 4687bd304fc0Smrg esac 4688bd304fc0Smrg fi 4689bd304fc0Smrg 4690bd304fc0Smrg if test "$lt_use_gnu_ld_interface" = yes; then 4691f3561b8bSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 4692f3561b8bSmrg wlarc='${wl}' 4693fc5a983dSmrg 4694f3561b8bSmrg # Set some defaults for GNU ld with shared library support. These 4695f3561b8bSmrg # are reset later if shared libraries are not supported. Putting them 4696f3561b8bSmrg # here allows them to be overridden if necessary. 4697f3561b8bSmrg runpath_var=LD_RUN_PATH 4698f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4699f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4700f3561b8bSmrg # ancient GNU ld didn't support --whole-archive et. al. 4701f3561b8bSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4702f3561b8bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4703f3561b8bSmrg else 4704f3561b8bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4705f3561b8bSmrg fi 4706f3561b8bSmrg supports_anon_versioning=no 4707f3561b8bSmrg case `$LD -v 2>&1` in 47086086d97eSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 4709f3561b8bSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4710f3561b8bSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4711f3561b8bSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4712f3561b8bSmrg *\ 2.11.*) ;; # other 2.11 versions 4713f3561b8bSmrg *) supports_anon_versioning=yes ;; 4714f3561b8bSmrg esac 4715fc5a983dSmrg 4716f3561b8bSmrg # See if GNU ld supports shared libraries. 4717f3561b8bSmrg case $host_os in 4718f3561b8bSmrg aix[[3-9]]*) 4719f3561b8bSmrg # On AIX/PPC, the GNU linker is very broken 4720f3561b8bSmrg if test "$host_cpu" != ia64; then 4721f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4722f3561b8bSmrg cat <<_LT_EOF 1>&2 4723fc5a983dSmrg 4724bd304fc0Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 4725f3561b8bSmrg*** to be unable to reliably create shared libraries on AIX. 4726f3561b8bSmrg*** Therefore, libtool is disabling shared libraries support. If you 4727bd304fc0Smrg*** really care for shared libraries, you may want to install binutils 4728bd304fc0Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4729bd304fc0Smrg*** You will then need to restart the configuration process. 4730fc5a983dSmrg 4731f3561b8bSmrg_LT_EOF 4732f3561b8bSmrg fi 4733f3561b8bSmrg ;; 4734fc5a983dSmrg 4735f3561b8bSmrg amigaos*) 4736f3561b8bSmrg case $host_cpu in 4737f3561b8bSmrg powerpc) 4738f3561b8bSmrg # see comment about AmigaOS4 .so support 4739f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4740f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4741f3561b8bSmrg ;; 4742f3561b8bSmrg m68k) 4743f3561b8bSmrg _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)' 4744f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4745f3561b8bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4746f3561b8bSmrg ;; 4747f3561b8bSmrg esac 4748f3561b8bSmrg ;; 4749fc5a983dSmrg 4750f3561b8bSmrg beos*) 4751f3561b8bSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4752f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4753f3561b8bSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4754f3561b8bSmrg # support --undefined. This deserves some investigation. FIXME 4755f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4756f3561b8bSmrg else 4757f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4758f3561b8bSmrg fi 4759f3561b8bSmrg ;; 4760fc5a983dSmrg 4761f3561b8bSmrg cygwin* | mingw* | pw32* | cegcc*) 4762f3561b8bSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4763f3561b8bSmrg # as there is no search path for DLLs. 4764f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4765bd304fc0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4766f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4767f3561b8bSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4768f3561b8bSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4769bd304fc0Smrg _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' 4770bd304fc0Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4771f3561b8bSmrg 4772f3561b8bSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4773f3561b8bSmrg _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' 4774f3561b8bSmrg # If the export-symbols file already is a .def file (1st line 4775f3561b8bSmrg # is EXPORTS), use it as is; otherwise, prepend... 4776f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4777f3561b8bSmrg cp $export_symbols $output_objdir/$soname.def; 4778f3561b8bSmrg else 4779f3561b8bSmrg echo EXPORTS > $output_objdir/$soname.def; 4780f3561b8bSmrg cat $export_symbols >> $output_objdir/$soname.def; 4781f3561b8bSmrg fi~ 4782f3561b8bSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4783f3561b8bSmrg else 4784f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4785f3561b8bSmrg fi 4786f3561b8bSmrg ;; 4787fc5a983dSmrg 4788bd304fc0Smrg haiku*) 4789bd304fc0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4790bd304fc0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4791bd304fc0Smrg ;; 4792bd304fc0Smrg 4793f3561b8bSmrg interix[[3-9]]*) 4794f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4795f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4796f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4797f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4798f3561b8bSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4799f3561b8bSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4800f3561b8bSmrg # default) and relocated if they conflict, which is a slow very memory 4801f3561b8bSmrg # consuming and fragmenting process. To avoid this, we pick a random, 4802f3561b8bSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4803f3561b8bSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4804f3561b8bSmrg _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' 4805f3561b8bSmrg _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' 4806f3561b8bSmrg ;; 4807fc5a983dSmrg 48086086d97eSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4809f3561b8bSmrg tmp_diet=no 4810f3561b8bSmrg if test "$host_os" = linux-dietlibc; then 4811f3561b8bSmrg case $cc_basename in 4812f3561b8bSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4813f3561b8bSmrg esac 4814f3561b8bSmrg fi 4815f3561b8bSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4816f3561b8bSmrg && test "$tmp_diet" = no 4817f3561b8bSmrg then 4818bd304fc0Smrg tmp_addflag=' $pic_flag' 4819f3561b8bSmrg tmp_sharedflag='-shared' 4820f3561b8bSmrg case $cc_basename,$host_cpu in 4821f3561b8bSmrg pgcc*) # Portland Group C compiler 4822bd304fc0Smrg _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' 4823f3561b8bSmrg tmp_addflag=' $pic_flag' 4824f3561b8bSmrg ;; 4825bd304fc0Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 4826bd304fc0Smrg # Portland Group f77 and f90 compilers 4827bd304fc0Smrg _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' 4828f3561b8bSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 4829f3561b8bSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4830f3561b8bSmrg tmp_addflag=' -i_dynamic' ;; 4831f3561b8bSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4832f3561b8bSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4833f3561b8bSmrg ifc* | ifort*) # Intel Fortran compiler 4834f3561b8bSmrg tmp_addflag=' -nofor_main' ;; 4835f3561b8bSmrg lf95*) # Lahey Fortran 8.1 4836f3561b8bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4837f3561b8bSmrg tmp_sharedflag='--shared' ;; 4838bd304fc0Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4839f3561b8bSmrg tmp_sharedflag='-qmkshrobj' 4840f3561b8bSmrg tmp_addflag= ;; 4841bd304fc0Smrg nvcc*) # Cuda Compiler Driver 2.2 4842bd304fc0Smrg _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' 4843bd304fc0Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4844bd304fc0Smrg ;; 4845f3561b8bSmrg esac 4846f3561b8bSmrg case `$CC -V 2>&1 | sed 5q` in 4847f3561b8bSmrg *Sun\ C*) # Sun C 5.9 4848bd304fc0Smrg _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' 4849f3561b8bSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4850f3561b8bSmrg tmp_sharedflag='-G' ;; 4851f3561b8bSmrg *Sun\ F*) # Sun Fortran 8.3 4852f3561b8bSmrg tmp_sharedflag='-G' ;; 4853f3561b8bSmrg esac 4854f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4855fc5a983dSmrg 4856f3561b8bSmrg if test "x$supports_anon_versioning" = xyes; then 4857f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4858f3561b8bSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4859f3561b8bSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4860f3561b8bSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4861f3561b8bSmrg fi 4862fc5a983dSmrg 4863f3561b8bSmrg case $cc_basename in 4864bd304fc0Smrg xlf* | bgf* | bgxlf* | mpixlf*) 4865f3561b8bSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4866f3561b8bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4867bd304fc0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4868bd304fc0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4869f3561b8bSmrg if test "x$supports_anon_versioning" = xyes; then 4870f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4871f3561b8bSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4872f3561b8bSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4873bd304fc0Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4874f3561b8bSmrg fi 4875f3561b8bSmrg ;; 4876f3561b8bSmrg esac 4877f3561b8bSmrg else 4878f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4879f3561b8bSmrg fi 4880f3561b8bSmrg ;; 4881fc5a983dSmrg 4882bd304fc0Smrg netbsd*) 4883f3561b8bSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4884f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4885f3561b8bSmrg wlarc= 4886f3561b8bSmrg else 4887bd304fc0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4888bd304fc0Smrg _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' 4889f3561b8bSmrg fi 4890f3561b8bSmrg ;; 4891fc5a983dSmrg 4892f3561b8bSmrg solaris*) 4893f3561b8bSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4894f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4895f3561b8bSmrg cat <<_LT_EOF 1>&2 4896fc5a983dSmrg 4897f3561b8bSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4898f3561b8bSmrg*** create shared libraries on Solaris systems. Therefore, libtool 4899f3561b8bSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 4900f3561b8bSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 4901f3561b8bSmrg*** your PATH or compiler configuration so that the native linker is 4902f3561b8bSmrg*** used, and then restart. 4903fc5a983dSmrg 4904f3561b8bSmrg_LT_EOF 4905f3561b8bSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4906bd304fc0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4907bd304fc0Smrg _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' 4908f3561b8bSmrg else 4909f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4910f3561b8bSmrg fi 4911f3561b8bSmrg ;; 4912fc5a983dSmrg 4913f3561b8bSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4914f3561b8bSmrg case `$LD -v 2>&1` in 4915f3561b8bSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4916f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4917f3561b8bSmrg cat <<_LT_EOF 1>&2 4918fc5a983dSmrg 4919f3561b8bSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4920f3561b8bSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4921f3561b8bSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 4922f3561b8bSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4923f3561b8bSmrg*** your PATH or compiler configuration so that the native linker is 4924f3561b8bSmrg*** used, and then restart. 4925fc5a983dSmrg 4926f3561b8bSmrg_LT_EOF 4927f3561b8bSmrg ;; 4928f3561b8bSmrg *) 4929f3561b8bSmrg # For security reasons, it is highly recommended that you always 4930f3561b8bSmrg # use absolute paths for naming shared libraries, and exclude the 4931f3561b8bSmrg # DT_RUNPATH tag from executables and libraries. But doing so 4932f3561b8bSmrg # requires that you compile everything twice, which is a pain. 4933f3561b8bSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4934f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4935f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4936f3561b8bSmrg _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' 4937f3561b8bSmrg else 4938f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4939f3561b8bSmrg fi 4940f3561b8bSmrg ;; 4941f3561b8bSmrg esac 4942f3561b8bSmrg ;; 4943fc5a983dSmrg 4944f3561b8bSmrg sunos4*) 4945f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4946f3561b8bSmrg wlarc= 4947f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4948f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4949f3561b8bSmrg ;; 4950fc5a983dSmrg 4951f3561b8bSmrg *) 4952f3561b8bSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4953bd304fc0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4954bd304fc0Smrg _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' 4955f3561b8bSmrg else 4956f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4957f3561b8bSmrg fi 4958f3561b8bSmrg ;; 4959f3561b8bSmrg esac 4960fc5a983dSmrg 4961f3561b8bSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4962f3561b8bSmrg runpath_var= 4963f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4964f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4965f3561b8bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4966f3561b8bSmrg fi 4967f3561b8bSmrg else 4968f3561b8bSmrg # PORTME fill in a description of your system's linker (not GNU ld) 4969f3561b8bSmrg case $host_os in 4970f3561b8bSmrg aix3*) 4971f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4972f3561b8bSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 4973f3561b8bSmrg _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' 4974f3561b8bSmrg # Note: this linker hardcodes the directories in LIBPATH if there 4975f3561b8bSmrg # are no directories specified by -L. 4976f3561b8bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4977f3561b8bSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4978f3561b8bSmrg # Neither direct hardcoding nor static linking is supported with a 4979f3561b8bSmrg # broken collect2. 4980f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4981f3561b8bSmrg fi 4982f3561b8bSmrg ;; 4983fc5a983dSmrg 4984f3561b8bSmrg aix[[4-9]]*) 4985f3561b8bSmrg if test "$host_cpu" = ia64; then 4986f3561b8bSmrg # On IA64, the linker does run time linking by default, so we don't 4987f3561b8bSmrg # have to do anything special. 4988f3561b8bSmrg aix_use_runtimelinking=no 4989f3561b8bSmrg exp_sym_flag='-Bexport' 4990f3561b8bSmrg no_entry_flag="" 4991f3561b8bSmrg else 4992f3561b8bSmrg # If we're using GNU nm, then we don't want the "-C" option. 4993f3561b8bSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4994bd304fc0Smrg # Also, AIX nm treats weak defined symbols like other global 4995bd304fc0Smrg # defined symbols, whereas GNU nm marks them as "W". 4996f3561b8bSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4997bd304fc0Smrg _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' 4998f3561b8bSmrg else 4999f3561b8bSmrg _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' 5000f3561b8bSmrg fi 5001f3561b8bSmrg aix_use_runtimelinking=no 5002fc5a983dSmrg 5003f3561b8bSmrg # Test if we are trying to use run time linking or normal 5004f3561b8bSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5005f3561b8bSmrg # need to do runtime linking. 5006f3561b8bSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5007f3561b8bSmrg for ld_flag in $LDFLAGS; do 5008f3561b8bSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5009f3561b8bSmrg aix_use_runtimelinking=yes 5010f3561b8bSmrg break 5011f3561b8bSmrg fi 5012f3561b8bSmrg done 5013f3561b8bSmrg ;; 5014f3561b8bSmrg esac 5015fc5a983dSmrg 5016f3561b8bSmrg exp_sym_flag='-bexport' 5017f3561b8bSmrg no_entry_flag='-bnoentry' 5018f3561b8bSmrg fi 5019f3561b8bSmrg 5020f3561b8bSmrg # When large executables or shared objects are built, AIX ld can 5021f3561b8bSmrg # have problems creating the table of contents. If linking a library 5022f3561b8bSmrg # or program results in "error TOC overflow" add -mminimal-toc to 5023f3561b8bSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5024f3561b8bSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5025fc5a983dSmrg 5026f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='' 5027f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5028f3561b8bSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5029f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5030f3561b8bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5031f3561b8bSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5032fc5a983dSmrg 5033f3561b8bSmrg if test "$GCC" = yes; then 5034f3561b8bSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5035f3561b8bSmrg # We only want to do this on AIX 4.2 and lower, the check 5036f3561b8bSmrg # below for broken collect2 doesn't work under 4.3+ 5037f3561b8bSmrg collect2name=`${CC} -print-prog-name=collect2` 5038f3561b8bSmrg if test -f "$collect2name" && 5039f3561b8bSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5040f3561b8bSmrg then 5041f3561b8bSmrg # We have reworked collect2 5042f3561b8bSmrg : 5043f3561b8bSmrg else 5044f3561b8bSmrg # We have old collect2 5045f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5046f3561b8bSmrg # It fails to find uninstalled libraries when the uninstalled 5047f3561b8bSmrg # path is not listed in the libpath. Setting hardcode_minus_L 5048f3561b8bSmrg # to unsupported forces relinking 5049f3561b8bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5050f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5051f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5052f3561b8bSmrg fi 5053f3561b8bSmrg ;; 5054f3561b8bSmrg esac 5055f3561b8bSmrg shared_flag='-shared' 5056f3561b8bSmrg if test "$aix_use_runtimelinking" = yes; then 5057f3561b8bSmrg shared_flag="$shared_flag "'${wl}-G' 5058f3561b8bSmrg fi 5059f3561b8bSmrg else 5060f3561b8bSmrg # not using gcc 5061f3561b8bSmrg if test "$host_cpu" = ia64; then 5062f3561b8bSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5063f3561b8bSmrg # chokes on -Wl,-G. The following line is correct: 5064f3561b8bSmrg shared_flag='-G' 5065f3561b8bSmrg else 5066f3561b8bSmrg if test "$aix_use_runtimelinking" = yes; then 5067f3561b8bSmrg shared_flag='${wl}-G' 5068f3561b8bSmrg else 5069f3561b8bSmrg shared_flag='${wl}-bM:SRE' 5070f3561b8bSmrg fi 5071f3561b8bSmrg fi 5072f3561b8bSmrg fi 5073fc5a983dSmrg 5074f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5075f3561b8bSmrg # It seems that -bexpall does not export symbols beginning with 5076f3561b8bSmrg # underscore (_), so it is better to generate a list of symbols to export. 5077f3561b8bSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5078f3561b8bSmrg if test "$aix_use_runtimelinking" = yes; then 5079f3561b8bSmrg # Warning - without using the other runtime loading flags (-brtl), 5080f3561b8bSmrg # -berok will link without error, but may produce a broken library. 5081f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5082f3561b8bSmrg # Determine the default libpath from the value encoded in an 5083f3561b8bSmrg # empty executable. 5084bd304fc0Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5085f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5086bd304fc0Smrg _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" 5087f3561b8bSmrg else 5088f3561b8bSmrg if test "$host_cpu" = ia64; then 5089f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5090f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5091f3561b8bSmrg _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" 5092f3561b8bSmrg else 5093f3561b8bSmrg # Determine the default libpath from the value encoded in an 5094f3561b8bSmrg # empty executable. 5095bd304fc0Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5096f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5097f3561b8bSmrg # Warning - without using the other run time loading flags, 5098f3561b8bSmrg # -berok will link without error, but may produce a broken library. 5099f3561b8bSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5100f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5101bd304fc0Smrg if test "$with_gnu_ld" = yes; then 5102bd304fc0Smrg # We only use this code for GNU lds that support --whole-archive. 5103bd304fc0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5104bd304fc0Smrg else 5105bd304fc0Smrg # Exported symbols can be pulled into shared objects from archives 5106bd304fc0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5107bd304fc0Smrg fi 5108f3561b8bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5109f3561b8bSmrg # This is similar to how AIX traditionally builds its shared libraries. 5110f3561b8bSmrg _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' 5111f3561b8bSmrg fi 5112f3561b8bSmrg fi 5113f3561b8bSmrg ;; 5114fc5a983dSmrg 5115f3561b8bSmrg amigaos*) 5116f3561b8bSmrg case $host_cpu in 5117f3561b8bSmrg powerpc) 5118f3561b8bSmrg # see comment about AmigaOS4 .so support 5119f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5120f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5121f3561b8bSmrg ;; 5122f3561b8bSmrg m68k) 5123f3561b8bSmrg _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)' 5124f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5125f3561b8bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5126f3561b8bSmrg ;; 5127f3561b8bSmrg esac 5128f3561b8bSmrg ;; 5129fc5a983dSmrg 5130f3561b8bSmrg bsdi[[45]]*) 5131f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5132f3561b8bSmrg ;; 5133fc5a983dSmrg 5134f3561b8bSmrg cygwin* | mingw* | pw32* | cegcc*) 5135f3561b8bSmrg # When not using gcc, we currently assume that we are using 5136f3561b8bSmrg # Microsoft Visual C++. 5137f3561b8bSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5138f3561b8bSmrg # no search path for DLLs. 5139bd304fc0Smrg case $cc_basename in 5140bd304fc0Smrg cl*) 5141bd304fc0Smrg # Native MSVC 5142bd304fc0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5143bd304fc0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5144bd304fc0Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5145bd304fc0Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5146bd304fc0Smrg # Tell ltmain to make .lib files, not .a files. 5147bd304fc0Smrg libext=lib 5148bd304fc0Smrg # Tell ltmain to make .dll files, not .so files. 5149bd304fc0Smrg shrext_cmds=".dll" 5150bd304fc0Smrg # FIXME: Setting linknames here is a bad hack. 5151bd304fc0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5152bd304fc0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5153bd304fc0Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5154bd304fc0Smrg else 5155bd304fc0Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5156bd304fc0Smrg fi~ 5157bd304fc0Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5158bd304fc0Smrg linknames=' 5159bd304fc0Smrg # The linker will not automatically build a static lib if we build a DLL. 5160bd304fc0Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5161bd304fc0Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5162bd304fc0Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5163bd304fc0Smrg _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' 5164bd304fc0Smrg # Don't use ranlib 5165bd304fc0Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5166bd304fc0Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5167bd304fc0Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5168bd304fc0Smrg case $lt_outputfile in 5169bd304fc0Smrg *.exe|*.EXE) ;; 5170bd304fc0Smrg *) 5171bd304fc0Smrg lt_outputfile="$lt_outputfile.exe" 5172bd304fc0Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 5173bd304fc0Smrg ;; 5174bd304fc0Smrg esac~ 5175bd304fc0Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5176bd304fc0Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5177bd304fc0Smrg $RM "$lt_outputfile.manifest"; 5178bd304fc0Smrg fi' 5179bd304fc0Smrg ;; 5180bd304fc0Smrg *) 5181bd304fc0Smrg # Assume MSVC wrapper 5182bd304fc0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5183bd304fc0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5184bd304fc0Smrg # Tell ltmain to make .lib files, not .a files. 5185bd304fc0Smrg libext=lib 5186bd304fc0Smrg # Tell ltmain to make .dll files, not .so files. 5187bd304fc0Smrg shrext_cmds=".dll" 5188bd304fc0Smrg # FIXME: Setting linknames here is a bad hack. 5189bd304fc0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5190bd304fc0Smrg # The linker will automatically build a .lib file if we build a DLL. 5191bd304fc0Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5192bd304fc0Smrg # FIXME: Should let the user specify the lib program. 5193bd304fc0Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5194bd304fc0Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5195bd304fc0Smrg ;; 5196bd304fc0Smrg esac 5197f3561b8bSmrg ;; 5198fc5a983dSmrg 5199f3561b8bSmrg darwin* | rhapsody*) 5200f3561b8bSmrg _LT_DARWIN_LINKER_FEATURES($1) 5201f3561b8bSmrg ;; 5202fc5a983dSmrg 5203f3561b8bSmrg dgux*) 5204f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5205f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5206f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5207f3561b8bSmrg ;; 5208fc5a983dSmrg 5209f3561b8bSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5210f3561b8bSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 5211f3561b8bSmrg # does not break anything, and helps significantly (at the cost of a little 5212f3561b8bSmrg # extra space). 5213f3561b8bSmrg freebsd2.2*) 5214f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5215f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5216f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5217f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5218f3561b8bSmrg ;; 5219fc5a983dSmrg 5220f3561b8bSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5221bd304fc0Smrg freebsd2.*) 5222f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5223f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5224f3561b8bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5225f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5226f3561b8bSmrg ;; 5227fc5a983dSmrg 5228f3561b8bSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5229f3561b8bSmrg freebsd* | dragonfly*) 5230bd304fc0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5231f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5232f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5233f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5234f3561b8bSmrg ;; 5235fc5a983dSmrg 5236f3561b8bSmrg hpux9*) 5237f3561b8bSmrg if test "$GCC" = yes; then 5238bd304fc0Smrg _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' 5239f3561b8bSmrg else 5240f3561b8bSmrg _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' 5241f3561b8bSmrg fi 5242f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5243f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5244f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5245fc5a983dSmrg 5246f3561b8bSmrg # hardcode_minus_L: Not really in the search PATH, 5247f3561b8bSmrg # but as the default location of the library. 5248f3561b8bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5249f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5250f3561b8bSmrg ;; 5251fc5a983dSmrg 5252f3561b8bSmrg hpux10*) 5253bd304fc0Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5254bd304fc0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5255f3561b8bSmrg else 5256f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5257f3561b8bSmrg fi 5258f3561b8bSmrg if test "$with_gnu_ld" = no; then 5259f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5260f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5261f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5262f3561b8bSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5263f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5264f3561b8bSmrg # hardcode_minus_L: Not really in the search PATH, 5265f3561b8bSmrg # but as the default location of the library. 5266f3561b8bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5267f3561b8bSmrg fi 5268f3561b8bSmrg ;; 5269fc5a983dSmrg 5270f3561b8bSmrg hpux11*) 5271bd304fc0Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5272f3561b8bSmrg case $host_cpu in 5273f3561b8bSmrg hppa*64*) 5274f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5275f3561b8bSmrg ;; 5276f3561b8bSmrg ia64*) 5277bd304fc0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5278f3561b8bSmrg ;; 5279f3561b8bSmrg *) 5280bd304fc0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5281f3561b8bSmrg ;; 5282f3561b8bSmrg esac 5283f3561b8bSmrg else 5284f3561b8bSmrg case $host_cpu in 5285f3561b8bSmrg hppa*64*) 5286f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5287f3561b8bSmrg ;; 5288f3561b8bSmrg ia64*) 5289f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5290f3561b8bSmrg ;; 5291f3561b8bSmrg *) 5292bd304fc0Smrg m4_if($1, [], [ 5293bd304fc0Smrg # Older versions of the 11.00 compiler do not understand -b yet 5294bd304fc0Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5295bd304fc0Smrg _LT_LINKER_OPTION([if $CC understands -b], 5296bd304fc0Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5297bd304fc0Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5298bd304fc0Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5299bd304fc0Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5300f3561b8bSmrg ;; 5301f3561b8bSmrg esac 5302f3561b8bSmrg fi 5303f3561b8bSmrg if test "$with_gnu_ld" = no; then 5304f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5305f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5306fc5a983dSmrg 5307f3561b8bSmrg case $host_cpu in 5308f3561b8bSmrg hppa*64*|ia64*) 5309f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5310f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5311f3561b8bSmrg ;; 5312f3561b8bSmrg *) 5313f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5314f3561b8bSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5315f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5316f3561b8bSmrg 5317f3561b8bSmrg # hardcode_minus_L: Not really in the search PATH, 5318f3561b8bSmrg # but as the default location of the library. 5319f3561b8bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5320f3561b8bSmrg ;; 5321f3561b8bSmrg esac 5322f3561b8bSmrg fi 5323fc5a983dSmrg ;; 5324f3561b8bSmrg 5325f3561b8bSmrg irix5* | irix6* | nonstopux*) 5326f3561b8bSmrg if test "$GCC" = yes; then 5327bd304fc0Smrg _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' 5328f3561b8bSmrg # Try to use the -exported_symbol ld option, if it does not 5329f3561b8bSmrg # work, assume that -exports_file does not work either and 5330f3561b8bSmrg # implicitly export all symbols. 5331bd304fc0Smrg # This should be the same for all languages, so no per-tag cache variable. 5332bd304fc0Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5333bd304fc0Smrg [lt_cv_irix_exported_symbol], 5334bd304fc0Smrg [save_LDFLAGS="$LDFLAGS" 5335bd304fc0Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5336bd304fc0Smrg AC_LINK_IFELSE( 5337bd304fc0Smrg [AC_LANG_SOURCE( 5338bd304fc0Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5339bd304fc0Smrg [C++], [[int foo (void) { return 0; }]], 5340bd304fc0Smrg [Fortran 77], [[ 5341bd304fc0Smrg subroutine foo 5342bd304fc0Smrg end]], 5343bd304fc0Smrg [Fortran], [[ 5344bd304fc0Smrg subroutine foo 5345bd304fc0Smrg end]])])], 5346bd304fc0Smrg [lt_cv_irix_exported_symbol=yes], 5347bd304fc0Smrg [lt_cv_irix_exported_symbol=no]) 5348bd304fc0Smrg LDFLAGS="$save_LDFLAGS"]) 5349bd304fc0Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 5350bd304fc0Smrg _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' 5351bd304fc0Smrg fi 5352f3561b8bSmrg else 5353bd304fc0Smrg _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' 5354bd304fc0Smrg _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' 5355f3561b8bSmrg fi 5356f3561b8bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5357f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5358f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5359f3561b8bSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 5360f3561b8bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5361fc5a983dSmrg ;; 5362fc5a983dSmrg 5363bd304fc0Smrg netbsd*) 5364f3561b8bSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5365f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5366f3561b8bSmrg else 5367f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5368f3561b8bSmrg fi 5369f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5370f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5371f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5372f3561b8bSmrg ;; 5373fc5a983dSmrg 5374f3561b8bSmrg newsos6) 5375f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5376f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5377f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5378f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5379f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5380f3561b8bSmrg ;; 5381fc5a983dSmrg 5382f3561b8bSmrg *nto* | *qnx*) 5383f3561b8bSmrg ;; 5384fc5a983dSmrg 5385f3561b8bSmrg openbsd*) 5386f3561b8bSmrg if test -f /usr/libexec/ld.so; then 5387f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5388f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5389f3561b8bSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5390f3561b8bSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5391f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5392f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5393f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5394f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5395f3561b8bSmrg else 5396f3561b8bSmrg case $host_os in 5397f3561b8bSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5398f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5399f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5400f3561b8bSmrg ;; 5401f3561b8bSmrg *) 5402f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5403f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5404f3561b8bSmrg ;; 5405f3561b8bSmrg esac 5406f3561b8bSmrg fi 5407f3561b8bSmrg else 5408f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5409f3561b8bSmrg fi 5410f3561b8bSmrg ;; 5411fc5a983dSmrg 5412f3561b8bSmrg os2*) 5413f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5414f3561b8bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5415f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5416bd304fc0Smrg _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' 5417f3561b8bSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5418f3561b8bSmrg ;; 5419fc5a983dSmrg 5420f3561b8bSmrg osf3*) 5421f3561b8bSmrg if test "$GCC" = yes; then 5422f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5423bd304fc0Smrg _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' 5424f3561b8bSmrg else 5425f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5426bd304fc0Smrg _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' 5427f3561b8bSmrg fi 5428f3561b8bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5429f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5430f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5431f3561b8bSmrg ;; 5432fc5a983dSmrg 5433f3561b8bSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5434f3561b8bSmrg if test "$GCC" = yes; then 5435f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5436bd304fc0Smrg _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' 5437f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5438f3561b8bSmrg else 5439f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5440bd304fc0Smrg _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' 5441f3561b8bSmrg _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~ 5442bd304fc0Smrg $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' 5443fc5a983dSmrg 5444f3561b8bSmrg # Both c and cxx compiler support -rpath directly 5445f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5446f3561b8bSmrg fi 5447f3561b8bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5448f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5449f3561b8bSmrg ;; 5450fc5a983dSmrg 5451f3561b8bSmrg solaris*) 5452f3561b8bSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5453f3561b8bSmrg if test "$GCC" = yes; then 5454f3561b8bSmrg wlarc='${wl}' 5455bd304fc0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5456f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5457bd304fc0Smrg $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' 5458f3561b8bSmrg else 5459f3561b8bSmrg case `$CC -V 2>&1` in 5460f3561b8bSmrg *"Compilers 5.0"*) 5461f3561b8bSmrg wlarc='' 5462f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5463f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5464f3561b8bSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5465f3561b8bSmrg ;; 5466f3561b8bSmrg *) 5467f3561b8bSmrg wlarc='${wl}' 5468f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5469f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5470f3561b8bSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5471f3561b8bSmrg ;; 5472f3561b8bSmrg esac 5473f3561b8bSmrg fi 5474f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5475f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5476f3561b8bSmrg case $host_os in 5477f3561b8bSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5478f3561b8bSmrg *) 5479f3561b8bSmrg # The compiler driver will combine and reorder linker options, 5480f3561b8bSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 5481f3561b8bSmrg # but is careful enough not to reorder. 5482f3561b8bSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5483f3561b8bSmrg if test "$GCC" = yes; then 5484f3561b8bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5485f3561b8bSmrg else 5486f3561b8bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5487f3561b8bSmrg fi 5488f3561b8bSmrg ;; 5489f3561b8bSmrg esac 5490f3561b8bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5491f3561b8bSmrg ;; 5492fc5a983dSmrg 5493f3561b8bSmrg sunos4*) 5494f3561b8bSmrg if test "x$host_vendor" = xsequent; then 5495f3561b8bSmrg # Use $CC to link under sequent, because it throws in some extra .o 5496f3561b8bSmrg # files that make .init and .fini sections work. 5497f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5498f3561b8bSmrg else 5499f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5500f3561b8bSmrg fi 5501f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5502f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5503f3561b8bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5504f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5505f3561b8bSmrg ;; 5506fc5a983dSmrg 5507f3561b8bSmrg sysv4) 5508f3561b8bSmrg case $host_vendor in 5509f3561b8bSmrg sni) 5510f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5511f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5512f3561b8bSmrg ;; 5513f3561b8bSmrg siemens) 5514f3561b8bSmrg ## LD is ld it makes a PLAMLIB 5515f3561b8bSmrg ## CC just makes a GrossModule. 5516f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5517f3561b8bSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5518f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5519f3561b8bSmrg ;; 5520f3561b8bSmrg motorola) 5521f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5522f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5523f3561b8bSmrg ;; 5524f3561b8bSmrg esac 5525f3561b8bSmrg runpath_var='LD_RUN_PATH' 5526f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5527f3561b8bSmrg ;; 5528fc5a983dSmrg 5529f3561b8bSmrg sysv4.3*) 5530f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5531f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5532f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5533f3561b8bSmrg ;; 5534fc5a983dSmrg 5535f3561b8bSmrg sysv4*MP*) 5536f3561b8bSmrg if test -d /usr/nec; then 5537f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5538f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5539f3561b8bSmrg runpath_var=LD_RUN_PATH 5540f3561b8bSmrg hardcode_runpath_var=yes 5541f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5542f3561b8bSmrg fi 5543f3561b8bSmrg ;; 5544fc5a983dSmrg 5545f3561b8bSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5546f3561b8bSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5547f3561b8bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5548f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5549f3561b8bSmrg runpath_var='LD_RUN_PATH' 5550fc5a983dSmrg 5551f3561b8bSmrg if test "$GCC" = yes; then 5552f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5553f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5554f3561b8bSmrg else 5555f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5556f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5557f3561b8bSmrg fi 5558f3561b8bSmrg ;; 5559fc5a983dSmrg 5560f3561b8bSmrg sysv5* | sco3.2v5* | sco5v6*) 5561f3561b8bSmrg # Note: We can NOT use -z defs as we might desire, because we do not 5562f3561b8bSmrg # link with -lc, and that would cause any symbols used from libc to 5563f3561b8bSmrg # always be unresolved, which means just about no library would 5564f3561b8bSmrg # ever link correctly. If we're not using GNU ld we use -z text 5565f3561b8bSmrg # though, which does catch some bad symbols but isn't as heavy-handed 5566f3561b8bSmrg # as -z defs. 5567f3561b8bSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5568f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5569f3561b8bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5570f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5571f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5572f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5573f3561b8bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5574f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5575f3561b8bSmrg runpath_var='LD_RUN_PATH' 5576fc5a983dSmrg 5577f3561b8bSmrg if test "$GCC" = yes; then 5578f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5579f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5580f3561b8bSmrg else 5581f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5582f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5583f3561b8bSmrg fi 5584f3561b8bSmrg ;; 5585fc5a983dSmrg 5586f3561b8bSmrg uts4*) 5587f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5588f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5589f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5590f3561b8bSmrg ;; 5591fc5a983dSmrg 5592f3561b8bSmrg *) 5593f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5594f3561b8bSmrg ;; 5595f3561b8bSmrg esac 5596fc5a983dSmrg 5597f3561b8bSmrg if test x$host_vendor = xsni; then 5598f3561b8bSmrg case $host in 5599f3561b8bSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5600f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5601f3561b8bSmrg ;; 5602f3561b8bSmrg esac 5603f3561b8bSmrg fi 5604f3561b8bSmrg fi 5605f3561b8bSmrg]) 5606f3561b8bSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5607f3561b8bSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5608fc5a983dSmrg 5609f3561b8bSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5610fc5a983dSmrg 5611f3561b8bSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5612f3561b8bSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5613f3561b8bSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 5614f3561b8bSmrg [The commands to extract the exported symbol list from a shared archive]) 5615fc5a983dSmrg 5616f3561b8bSmrg# 5617f3561b8bSmrg# Do we need to explicitly link libc? 5618f3561b8bSmrg# 5619f3561b8bSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5620f3561b8bSmrgx|xyes) 5621f3561b8bSmrg # Assume -lc should be added 5622f3561b8bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5623fc5a983dSmrg 5624f3561b8bSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5625f3561b8bSmrg case $_LT_TAGVAR(archive_cmds, $1) in 5626f3561b8bSmrg *'~'*) 5627f3561b8bSmrg # FIXME: we may have to deal with multi-command sequences. 5628f3561b8bSmrg ;; 5629f3561b8bSmrg '$CC '*) 5630f3561b8bSmrg # Test whether the compiler implicitly links with -lc since on some 5631f3561b8bSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5632f3561b8bSmrg # to ld, don't add -lc before -lgcc. 5633bd304fc0Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5634bd304fc0Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5635bd304fc0Smrg [$RM conftest* 5636bd304fc0Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5637bd304fc0Smrg 5638bd304fc0Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5639bd304fc0Smrg soname=conftest 5640bd304fc0Smrg lib=conftest 5641bd304fc0Smrg libobjs=conftest.$ac_objext 5642bd304fc0Smrg deplibs= 5643bd304fc0Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5644bd304fc0Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5645bd304fc0Smrg compiler_flags=-v 5646bd304fc0Smrg linker_flags=-v 5647bd304fc0Smrg verstring= 5648bd304fc0Smrg output_objdir=. 5649bd304fc0Smrg libname=conftest 5650bd304fc0Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5651bd304fc0Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 5652bd304fc0Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5653bd304fc0Smrg then 5654bd304fc0Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5655bd304fc0Smrg else 5656bd304fc0Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5657bd304fc0Smrg fi 5658bd304fc0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5659bd304fc0Smrg else 5660bd304fc0Smrg cat conftest.err 1>&5 5661bd304fc0Smrg fi 5662bd304fc0Smrg $RM conftest* 5663bd304fc0Smrg ]) 5664bd304fc0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5665f3561b8bSmrg ;; 5666f3561b8bSmrg esac 5667f3561b8bSmrg fi 5668f3561b8bSmrg ;; 5669f3561b8bSmrgesac 5670fc5a983dSmrg 5671f3561b8bSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5672f3561b8bSmrg [Whether or not to add -lc for building shared libraries]) 5673f3561b8bSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5674f3561b8bSmrg [enable_shared_with_static_runtimes], [0], 5675f3561b8bSmrg [Whether or not to disallow shared libs when runtime libs are static]) 5676f3561b8bSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5677f3561b8bSmrg [Compiler flag to allow reflexive dlopens]) 5678f3561b8bSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5679f3561b8bSmrg [Compiler flag to generate shared objects directly from archives]) 5680f3561b8bSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 5681f3561b8bSmrg [Whether the compiler copes with passing no objects directly]) 5682f3561b8bSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5683f3561b8bSmrg [Create an old-style archive from a shared archive]) 5684f3561b8bSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5685f3561b8bSmrg [Create a temporary old-style archive to link instead of a shared archive]) 5686f3561b8bSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5687f3561b8bSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5688f3561b8bSmrg_LT_TAGDECL([], [module_cmds], [2], 5689f3561b8bSmrg [Commands used to build a loadable module if different from building 5690f3561b8bSmrg a shared archive.]) 5691f3561b8bSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5692f3561b8bSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 5693f3561b8bSmrg [Whether we are building with GNU ld or not]) 5694f3561b8bSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5695f3561b8bSmrg [Flag that allows shared libraries with undefined symbols to be built]) 5696f3561b8bSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 5697f3561b8bSmrg [Flag that enforces no undefined symbols]) 5698f3561b8bSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5699f3561b8bSmrg [Flag to hardcode $libdir into a binary during linking. 5700f3561b8bSmrg This must work even if $libdir does not exist]) 5701f3561b8bSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5702f3561b8bSmrg [Whether we need a single "-rpath" flag with a separated argument]) 5703f3561b8bSmrg_LT_TAGDECL([], [hardcode_direct], [0], 5704f3561b8bSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5705f3561b8bSmrg DIR into the resulting binary]) 5706f3561b8bSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5707f3561b8bSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5708f3561b8bSmrg DIR into the resulting binary and the resulting library dependency is 5709f3561b8bSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5710f3561b8bSmrg library is relocated]) 5711f3561b8bSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5712f3561b8bSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5713f3561b8bSmrg into the resulting binary]) 5714f3561b8bSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5715f3561b8bSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5716f3561b8bSmrg into the resulting binary]) 5717f3561b8bSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 5718f3561b8bSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 5719f3561b8bSmrg into the library and all subsequent libraries and executables linked 5720f3561b8bSmrg against it]) 5721f3561b8bSmrg_LT_TAGDECL([], [inherit_rpath], [0], 5722f3561b8bSmrg [Set to yes if linker adds runtime paths of dependent libraries 5723f3561b8bSmrg to runtime path list]) 5724f3561b8bSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 5725f3561b8bSmrg [Whether libtool must link a program against all its dependency libraries]) 5726f3561b8bSmrg_LT_TAGDECL([], [always_export_symbols], [0], 5727f3561b8bSmrg [Set to "yes" if exported symbols are required]) 5728f3561b8bSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5729f3561b8bSmrg [The commands to list exported symbols]) 5730f3561b8bSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 5731f3561b8bSmrg [Symbols that should not be listed in the preloaded symbols]) 5732f3561b8bSmrg_LT_TAGDECL([], [include_expsyms], [1], 5733f3561b8bSmrg [Symbols that must always be exported]) 5734f3561b8bSmrg_LT_TAGDECL([], [prelink_cmds], [2], 5735f3561b8bSmrg [Commands necessary for linking programs (against libraries) with templates]) 5736bd304fc0Smrg_LT_TAGDECL([], [postlink_cmds], [2], 5737bd304fc0Smrg [Commands necessary for finishing linking programs]) 5738f3561b8bSmrg_LT_TAGDECL([], [file_list_spec], [1], 5739f3561b8bSmrg [Specify filename containing input files]) 5740f3561b8bSmrgdnl FIXME: Not yet implemented 5741f3561b8bSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5742f3561b8bSmrgdnl [Compiler flag to generate thread safe objects]) 5743f3561b8bSmrg])# _LT_LINKER_SHLIBS 5744f3561b8bSmrg 5745f3561b8bSmrg 5746f3561b8bSmrg# _LT_LANG_C_CONFIG([TAG]) 5747f3561b8bSmrg# ------------------------ 5748f3561b8bSmrg# Ensure that the configuration variables for a C compiler are suitably 5749f3561b8bSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 5750f3561b8bSmrg# the compiler configuration to `libtool'. 5751f3561b8bSmrgm4_defun([_LT_LANG_C_CONFIG], 5752f3561b8bSmrg[m4_require([_LT_DECL_EGREP])dnl 5753f3561b8bSmrglt_save_CC="$CC" 5754f3561b8bSmrgAC_LANG_PUSH(C) 5755fc5a983dSmrg 5756f3561b8bSmrg# Source file extension for C test sources. 5757f3561b8bSmrgac_ext=c 5758fc5a983dSmrg 5759f3561b8bSmrg# Object file extension for compiled C test sources. 5760f3561b8bSmrgobjext=o 5761f3561b8bSmrg_LT_TAGVAR(objext, $1)=$objext 5762fc5a983dSmrg 5763f3561b8bSmrg# Code to be used in simple compile tests 5764f3561b8bSmrglt_simple_compile_test_code="int some_variable = 0;" 5765fc5a983dSmrg 5766f3561b8bSmrg# Code to be used in simple link tests 5767f3561b8bSmrglt_simple_link_test_code='int main(){return(0);}' 5768fc5a983dSmrg 5769f3561b8bSmrg_LT_TAG_COMPILER 5770f3561b8bSmrg# Save the default compiler, since it gets overwritten when the other 5771f3561b8bSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5772f3561b8bSmrgcompiler_DEFAULT=$CC 5773fc5a983dSmrg 5774f3561b8bSmrg# save warnings/boilerplate of simple test code 5775f3561b8bSmrg_LT_COMPILER_BOILERPLATE 5776f3561b8bSmrg_LT_LINKER_BOILERPLATE 5777fc5a983dSmrg 5778f3561b8bSmrgif test -n "$compiler"; then 5779f3561b8bSmrg _LT_COMPILER_NO_RTTI($1) 5780f3561b8bSmrg _LT_COMPILER_PIC($1) 5781f3561b8bSmrg _LT_COMPILER_C_O($1) 5782f3561b8bSmrg _LT_COMPILER_FILE_LOCKS($1) 5783f3561b8bSmrg _LT_LINKER_SHLIBS($1) 5784f3561b8bSmrg _LT_SYS_DYNAMIC_LINKER($1) 5785f3561b8bSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 5786f3561b8bSmrg LT_SYS_DLOPEN_SELF 5787f3561b8bSmrg _LT_CMD_STRIPLIB 5788f3561b8bSmrg 5789f3561b8bSmrg # Report which library types will actually be built 5790f3561b8bSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5791f3561b8bSmrg AC_MSG_RESULT([$can_build_shared]) 5792f3561b8bSmrg 5793f3561b8bSmrg AC_MSG_CHECKING([whether to build shared libraries]) 5794f3561b8bSmrg test "$can_build_shared" = "no" && enable_shared=no 5795f3561b8bSmrg 5796f3561b8bSmrg # On AIX, shared libraries and static libraries use the same namespace, and 5797f3561b8bSmrg # are all built from PIC. 5798f3561b8bSmrg case $host_os in 5799f3561b8bSmrg aix3*) 5800f3561b8bSmrg test "$enable_shared" = yes && enable_static=no 5801f3561b8bSmrg if test -n "$RANLIB"; then 5802f3561b8bSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5803f3561b8bSmrg postinstall_cmds='$RANLIB $lib' 5804f3561b8bSmrg fi 5805f3561b8bSmrg ;; 5806fc5a983dSmrg 5807f3561b8bSmrg aix[[4-9]]*) 5808f3561b8bSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5809f3561b8bSmrg test "$enable_shared" = yes && enable_static=no 5810f3561b8bSmrg fi 5811f3561b8bSmrg ;; 5812f3561b8bSmrg esac 5813f3561b8bSmrg AC_MSG_RESULT([$enable_shared]) 5814fc5a983dSmrg 5815f3561b8bSmrg AC_MSG_CHECKING([whether to build static libraries]) 5816f3561b8bSmrg # Make sure either enable_shared or enable_static is yes. 5817f3561b8bSmrg test "$enable_shared" = yes || enable_static=yes 5818f3561b8bSmrg AC_MSG_RESULT([$enable_static]) 5819fc5a983dSmrg 5820f3561b8bSmrg _LT_CONFIG($1) 5821f3561b8bSmrgfi 5822f3561b8bSmrgAC_LANG_POP 5823f3561b8bSmrgCC="$lt_save_CC" 5824f3561b8bSmrg])# _LT_LANG_C_CONFIG 5825fc5a983dSmrg 5826fc5a983dSmrg 5827f3561b8bSmrg# _LT_LANG_CXX_CONFIG([TAG]) 5828f3561b8bSmrg# -------------------------- 5829f3561b8bSmrg# Ensure that the configuration variables for a C++ compiler are suitably 5830f3561b8bSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 5831f3561b8bSmrg# the compiler configuration to `libtool'. 5832f3561b8bSmrgm4_defun([_LT_LANG_CXX_CONFIG], 5833bd304fc0Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5834f3561b8bSmrgm4_require([_LT_DECL_EGREP])dnl 5835bd304fc0Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5836bd304fc0Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5837bd304fc0Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5838bd304fc0Smrg (test "X$CXX" != "Xg++"))) ; then 5839bd304fc0Smrg AC_PROG_CXXCPP 5840bd304fc0Smrgelse 5841bd304fc0Smrg _lt_caught_CXX_error=yes 5842bd304fc0Smrgfi 5843f3561b8bSmrg 5844f3561b8bSmrgAC_LANG_PUSH(C++) 5845f3561b8bSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5846f3561b8bSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 5847f3561b8bSmrg_LT_TAGVAR(always_export_symbols, $1)=no 5848f3561b8bSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5849f3561b8bSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 5850f3561b8bSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5851f3561b8bSmrg_LT_TAGVAR(hardcode_direct, $1)=no 5852f3561b8bSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5853f3561b8bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5854f3561b8bSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5855f3561b8bSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5856f3561b8bSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5857f3561b8bSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 5858f3561b8bSmrg_LT_TAGVAR(inherit_rpath, $1)=no 5859f3561b8bSmrg_LT_TAGVAR(module_cmds, $1)= 5860f3561b8bSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 5861f3561b8bSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5862f3561b8bSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5863bd304fc0Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 5864bd304fc0Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5865f3561b8bSmrg_LT_TAGVAR(no_undefined_flag, $1)= 5866f3561b8bSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5867f3561b8bSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5868fc5a983dSmrg 5869f3561b8bSmrg# Source file extension for C++ test sources. 5870f3561b8bSmrgac_ext=cpp 5871fc5a983dSmrg 5872f3561b8bSmrg# Object file extension for compiled C++ test sources. 5873f3561b8bSmrgobjext=o 5874f3561b8bSmrg_LT_TAGVAR(objext, $1)=$objext 5875f3561b8bSmrg 5876f3561b8bSmrg# No sense in running all these tests if we already determined that 5877f3561b8bSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 5878f3561b8bSmrg# are currently assumed to apply to all compilers on this platform, 5879f3561b8bSmrg# and will be corrupted by setting them based on a non-working compiler. 5880f3561b8bSmrgif test "$_lt_caught_CXX_error" != yes; then 5881f3561b8bSmrg # Code to be used in simple compile tests 5882f3561b8bSmrg lt_simple_compile_test_code="int some_variable = 0;" 5883f3561b8bSmrg 5884f3561b8bSmrg # Code to be used in simple link tests 5885f3561b8bSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5886f3561b8bSmrg 5887f3561b8bSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5888f3561b8bSmrg _LT_TAG_COMPILER 5889f3561b8bSmrg 5890f3561b8bSmrg # save warnings/boilerplate of simple test code 5891f3561b8bSmrg _LT_COMPILER_BOILERPLATE 5892f3561b8bSmrg _LT_LINKER_BOILERPLATE 5893f3561b8bSmrg 5894f3561b8bSmrg # Allow CC to be a program name with arguments. 5895f3561b8bSmrg lt_save_CC=$CC 5896bd304fc0Smrg lt_save_CFLAGS=$CFLAGS 5897f3561b8bSmrg lt_save_LD=$LD 5898f3561b8bSmrg lt_save_GCC=$GCC 5899f3561b8bSmrg GCC=$GXX 5900f3561b8bSmrg lt_save_with_gnu_ld=$with_gnu_ld 5901f3561b8bSmrg lt_save_path_LD=$lt_cv_path_LD 5902f3561b8bSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5903f3561b8bSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5904f3561b8bSmrg else 5905f3561b8bSmrg $as_unset lt_cv_prog_gnu_ld 5906f3561b8bSmrg fi 5907f3561b8bSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 5908f3561b8bSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 5909f3561b8bSmrg else 5910f3561b8bSmrg $as_unset lt_cv_path_LD 5911f3561b8bSmrg fi 5912f3561b8bSmrg test -z "${LDCXX+set}" || LD=$LDCXX 5913f3561b8bSmrg CC=${CXX-"c++"} 5914bd304fc0Smrg CFLAGS=$CXXFLAGS 5915f3561b8bSmrg compiler=$CC 5916f3561b8bSmrg _LT_TAGVAR(compiler, $1)=$CC 5917f3561b8bSmrg _LT_CC_BASENAME([$compiler]) 5918fc5a983dSmrg 5919f3561b8bSmrg if test -n "$compiler"; then 5920f3561b8bSmrg # We don't want -fno-exception when compiling C++ code, so set the 5921f3561b8bSmrg # no_builtin_flag separately 5922f3561b8bSmrg if test "$GXX" = yes; then 5923f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5924f3561b8bSmrg else 5925f3561b8bSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5926f3561b8bSmrg fi 5927fc5a983dSmrg 5928f3561b8bSmrg if test "$GXX" = yes; then 5929f3561b8bSmrg # Set up default GNU C++ configuration 5930fc5a983dSmrg 5931f3561b8bSmrg LT_PATH_LD 5932fc5a983dSmrg 5933f3561b8bSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5934f3561b8bSmrg # archiving commands below assume that GNU ld is being used. 5935f3561b8bSmrg if test "$with_gnu_ld" = yes; then 5936bd304fc0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5937bd304fc0Smrg _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' 5938fc5a983dSmrg 5939f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5940f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5941fc5a983dSmrg 5942f3561b8bSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5943f3561b8bSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5944f3561b8bSmrg # investigate it a little bit more. (MM) 5945f3561b8bSmrg wlarc='${wl}' 5946fc5a983dSmrg 5947f3561b8bSmrg # ancient GNU ld didn't support --whole-archive et. al. 5948f3561b8bSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5949f3561b8bSmrg $GREP 'no-whole-archive' > /dev/null; then 5950f3561b8bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5951f3561b8bSmrg else 5952f3561b8bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5953f3561b8bSmrg fi 5954f3561b8bSmrg else 5955f3561b8bSmrg with_gnu_ld=no 5956f3561b8bSmrg wlarc= 5957f3561b8bSmrg 5958f3561b8bSmrg # A generic and very simple default shared library creation 5959f3561b8bSmrg # command for GNU C++ for the case where it uses the native 5960f3561b8bSmrg # linker, instead of GNU ld. If possible, this setting should 5961f3561b8bSmrg # overridden to take advantage of the native linker features on 5962f3561b8bSmrg # the platform it is being used on. 5963f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5964f3561b8bSmrg fi 5965fc5a983dSmrg 5966f3561b8bSmrg # Commands to make compiler produce verbose output that lists 5967f3561b8bSmrg # what "hidden" libraries, object files and flags are used when 5968f3561b8bSmrg # linking a shared library. 5969bd304fc0Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5970fc5a983dSmrg 5971f3561b8bSmrg else 5972f3561b8bSmrg GXX=no 5973f3561b8bSmrg with_gnu_ld=no 5974f3561b8bSmrg wlarc= 5975f3561b8bSmrg fi 5976fc5a983dSmrg 5977f3561b8bSmrg # PORTME: fill in a description of your system's C++ link characteristics 5978f3561b8bSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5979f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5980f3561b8bSmrg case $host_os in 5981f3561b8bSmrg aix3*) 5982f3561b8bSmrg # FIXME: insert proper C++ library support 5983f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5984f3561b8bSmrg ;; 5985f3561b8bSmrg aix[[4-9]]*) 5986f3561b8bSmrg if test "$host_cpu" = ia64; then 5987f3561b8bSmrg # On IA64, the linker does run time linking by default, so we don't 5988f3561b8bSmrg # have to do anything special. 5989f3561b8bSmrg aix_use_runtimelinking=no 5990f3561b8bSmrg exp_sym_flag='-Bexport' 5991f3561b8bSmrg no_entry_flag="" 5992f3561b8bSmrg else 5993f3561b8bSmrg aix_use_runtimelinking=no 5994f3561b8bSmrg 5995f3561b8bSmrg # Test if we are trying to use run time linking or normal 5996f3561b8bSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5997f3561b8bSmrg # need to do runtime linking. 5998f3561b8bSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5999f3561b8bSmrg for ld_flag in $LDFLAGS; do 6000f3561b8bSmrg case $ld_flag in 6001f3561b8bSmrg *-brtl*) 6002f3561b8bSmrg aix_use_runtimelinking=yes 6003f3561b8bSmrg break 6004f3561b8bSmrg ;; 6005f3561b8bSmrg esac 6006f3561b8bSmrg done 6007f3561b8bSmrg ;; 6008f3561b8bSmrg esac 6009fc5a983dSmrg 6010f3561b8bSmrg exp_sym_flag='-bexport' 6011f3561b8bSmrg no_entry_flag='-bnoentry' 6012f3561b8bSmrg fi 6013fc5a983dSmrg 6014f3561b8bSmrg # When large executables or shared objects are built, AIX ld can 6015f3561b8bSmrg # have problems creating the table of contents. If linking a library 6016f3561b8bSmrg # or program results in "error TOC overflow" add -mminimal-toc to 6017f3561b8bSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6018f3561b8bSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6019f3561b8bSmrg 6020f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='' 6021f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6022f3561b8bSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6023f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6024f3561b8bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6025f3561b8bSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6026f3561b8bSmrg 6027f3561b8bSmrg if test "$GXX" = yes; then 6028f3561b8bSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6029f3561b8bSmrg # We only want to do this on AIX 4.2 and lower, the check 6030f3561b8bSmrg # below for broken collect2 doesn't work under 4.3+ 6031f3561b8bSmrg collect2name=`${CC} -print-prog-name=collect2` 6032f3561b8bSmrg if test -f "$collect2name" && 6033f3561b8bSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6034f3561b8bSmrg then 6035f3561b8bSmrg # We have reworked collect2 6036f3561b8bSmrg : 6037f3561b8bSmrg else 6038f3561b8bSmrg # We have old collect2 6039f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6040f3561b8bSmrg # It fails to find uninstalled libraries when the uninstalled 6041f3561b8bSmrg # path is not listed in the libpath. Setting hardcode_minus_L 6042f3561b8bSmrg # to unsupported forces relinking 6043f3561b8bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6044f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6045f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6046f3561b8bSmrg fi 6047f3561b8bSmrg esac 6048f3561b8bSmrg shared_flag='-shared' 6049f3561b8bSmrg if test "$aix_use_runtimelinking" = yes; then 6050f3561b8bSmrg shared_flag="$shared_flag "'${wl}-G' 6051f3561b8bSmrg fi 6052f3561b8bSmrg else 6053f3561b8bSmrg # not using gcc 6054f3561b8bSmrg if test "$host_cpu" = ia64; then 6055f3561b8bSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6056f3561b8bSmrg # chokes on -Wl,-G. The following line is correct: 6057f3561b8bSmrg shared_flag='-G' 6058f3561b8bSmrg else 6059f3561b8bSmrg if test "$aix_use_runtimelinking" = yes; then 6060f3561b8bSmrg shared_flag='${wl}-G' 6061f3561b8bSmrg else 6062f3561b8bSmrg shared_flag='${wl}-bM:SRE' 6063f3561b8bSmrg fi 6064f3561b8bSmrg fi 6065f3561b8bSmrg fi 6066fc5a983dSmrg 6067f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6068f3561b8bSmrg # It seems that -bexpall does not export symbols beginning with 6069f3561b8bSmrg # underscore (_), so it is better to generate a list of symbols to 6070f3561b8bSmrg # export. 6071f3561b8bSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6072f3561b8bSmrg if test "$aix_use_runtimelinking" = yes; then 6073f3561b8bSmrg # Warning - without using the other runtime loading flags (-brtl), 6074f3561b8bSmrg # -berok will link without error, but may produce a broken library. 6075f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6076f3561b8bSmrg # Determine the default libpath from the value encoded in an empty 6077f3561b8bSmrg # executable. 6078bd304fc0Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6079f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6080f3561b8bSmrg 6081bd304fc0Smrg _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" 6082f3561b8bSmrg else 6083f3561b8bSmrg if test "$host_cpu" = ia64; then 6084f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6085f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6086f3561b8bSmrg _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" 6087f3561b8bSmrg else 6088f3561b8bSmrg # Determine the default libpath from the value encoded in an 6089f3561b8bSmrg # empty executable. 6090bd304fc0Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6091f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6092f3561b8bSmrg # Warning - without using the other run time loading flags, 6093f3561b8bSmrg # -berok will link without error, but may produce a broken library. 6094f3561b8bSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6095f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6096bd304fc0Smrg if test "$with_gnu_ld" = yes; then 6097bd304fc0Smrg # We only use this code for GNU lds that support --whole-archive. 6098bd304fc0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6099bd304fc0Smrg else 6100bd304fc0Smrg # Exported symbols can be pulled into shared objects from archives 6101bd304fc0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6102bd304fc0Smrg fi 6103f3561b8bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6104f3561b8bSmrg # This is similar to how AIX traditionally builds its shared 6105f3561b8bSmrg # libraries. 6106f3561b8bSmrg _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' 6107f3561b8bSmrg fi 6108f3561b8bSmrg fi 6109f3561b8bSmrg ;; 6110fc5a983dSmrg 6111f3561b8bSmrg beos*) 6112f3561b8bSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6113f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6114f3561b8bSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6115f3561b8bSmrg # support --undefined. This deserves some investigation. FIXME 6116f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6117f3561b8bSmrg else 6118f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6119f3561b8bSmrg fi 6120f3561b8bSmrg ;; 6121fc5a983dSmrg 6122f3561b8bSmrg chorus*) 6123f3561b8bSmrg case $cc_basename in 6124f3561b8bSmrg *) 6125f3561b8bSmrg # FIXME: insert proper C++ library support 6126f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6127f3561b8bSmrg ;; 6128f3561b8bSmrg esac 6129f3561b8bSmrg ;; 6130fc5a983dSmrg 6131f3561b8bSmrg cygwin* | mingw* | pw32* | cegcc*) 6132bd304fc0Smrg case $GXX,$cc_basename in 6133bd304fc0Smrg ,cl* | no,cl*) 6134bd304fc0Smrg # Native MSVC 6135bd304fc0Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6136bd304fc0Smrg # no search path for DLLs. 6137bd304fc0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6138bd304fc0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6139bd304fc0Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6140bd304fc0Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6141bd304fc0Smrg # Tell ltmain to make .lib files, not .a files. 6142bd304fc0Smrg libext=lib 6143bd304fc0Smrg # Tell ltmain to make .dll files, not .so files. 6144bd304fc0Smrg shrext_cmds=".dll" 6145bd304fc0Smrg # FIXME: Setting linknames here is a bad hack. 6146bd304fc0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6147bd304fc0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6148bd304fc0Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6149bd304fc0Smrg else 6150bd304fc0Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6151bd304fc0Smrg fi~ 6152bd304fc0Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6153bd304fc0Smrg linknames=' 6154bd304fc0Smrg # The linker will not automatically build a static lib if we build a DLL. 6155bd304fc0Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6156bd304fc0Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6157bd304fc0Smrg # Don't use ranlib 6158bd304fc0Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6159bd304fc0Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6160bd304fc0Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6161bd304fc0Smrg case $lt_outputfile in 6162bd304fc0Smrg *.exe|*.EXE) ;; 6163bd304fc0Smrg *) 6164bd304fc0Smrg lt_outputfile="$lt_outputfile.exe" 6165bd304fc0Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6166bd304fc0Smrg ;; 6167bd304fc0Smrg esac~ 6168bd304fc0Smrg func_to_tool_file "$lt_outputfile"~ 6169bd304fc0Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6170bd304fc0Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6171bd304fc0Smrg $RM "$lt_outputfile.manifest"; 6172bd304fc0Smrg fi' 6173bd304fc0Smrg ;; 6174bd304fc0Smrg *) 6175bd304fc0Smrg # g++ 6176bd304fc0Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6177bd304fc0Smrg # as there is no search path for DLLs. 6178bd304fc0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6179bd304fc0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6180bd304fc0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6181bd304fc0Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6182bd304fc0Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6183bd304fc0Smrg 6184bd304fc0Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6185bd304fc0Smrg _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' 6186bd304fc0Smrg # If the export-symbols file already is a .def file (1st line 6187bd304fc0Smrg # is EXPORTS), use it as is; otherwise, prepend... 6188bd304fc0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6189bd304fc0Smrg cp $export_symbols $output_objdir/$soname.def; 6190bd304fc0Smrg else 6191bd304fc0Smrg echo EXPORTS > $output_objdir/$soname.def; 6192bd304fc0Smrg cat $export_symbols >> $output_objdir/$soname.def; 6193bd304fc0Smrg fi~ 6194bd304fc0Smrg $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' 6195bd304fc0Smrg else 6196bd304fc0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6197bd304fc0Smrg fi 6198bd304fc0Smrg ;; 6199bd304fc0Smrg esac 6200bd304fc0Smrg ;; 6201f3561b8bSmrg darwin* | rhapsody*) 6202f3561b8bSmrg _LT_DARWIN_LINKER_FEATURES($1) 6203f3561b8bSmrg ;; 6204fc5a983dSmrg 6205f3561b8bSmrg dgux*) 6206f3561b8bSmrg case $cc_basename in 6207f3561b8bSmrg ec++*) 6208f3561b8bSmrg # FIXME: insert proper C++ library support 6209f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6210f3561b8bSmrg ;; 6211f3561b8bSmrg ghcx*) 6212f3561b8bSmrg # Green Hills C++ Compiler 6213f3561b8bSmrg # FIXME: insert proper C++ library support 6214f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6215f3561b8bSmrg ;; 6216f3561b8bSmrg *) 6217f3561b8bSmrg # FIXME: insert proper C++ library support 6218f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6219f3561b8bSmrg ;; 6220f3561b8bSmrg esac 6221f3561b8bSmrg ;; 6222f3561b8bSmrg 6223bd304fc0Smrg freebsd2.*) 6224f3561b8bSmrg # C++ shared libraries reported to be fairly broken before 6225f3561b8bSmrg # switch to ELF 6226f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6227f3561b8bSmrg ;; 6228fc5a983dSmrg 6229f3561b8bSmrg freebsd-elf*) 6230f3561b8bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6231f3561b8bSmrg ;; 6232fc5a983dSmrg 6233f3561b8bSmrg freebsd* | dragonfly*) 6234f3561b8bSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6235f3561b8bSmrg # conventions 6236f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6237f3561b8bSmrg ;; 6238fc5a983dSmrg 6239f3561b8bSmrg gnu*) 6240f3561b8bSmrg ;; 6241fc5a983dSmrg 6242bd304fc0Smrg haiku*) 6243bd304fc0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6244bd304fc0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6245bd304fc0Smrg ;; 6246bd304fc0Smrg 6247f3561b8bSmrg hpux9*) 6248f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6249f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6250f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6251f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6252f3561b8bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6253f3561b8bSmrg # but as the default 6254f3561b8bSmrg # location of the library. 6255f3561b8bSmrg 6256f3561b8bSmrg case $cc_basename in 6257f3561b8bSmrg CC*) 6258f3561b8bSmrg # FIXME: insert proper C++ library support 6259f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6260f3561b8bSmrg ;; 6261f3561b8bSmrg aCC*) 6262f3561b8bSmrg _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' 6263f3561b8bSmrg # Commands to make compiler produce verbose output that lists 6264f3561b8bSmrg # what "hidden" libraries, object files and flags are used when 6265f3561b8bSmrg # linking a shared library. 6266f3561b8bSmrg # 6267f3561b8bSmrg # There doesn't appear to be a way to prevent this compiler from 6268f3561b8bSmrg # explicitly linking system object files so we need to strip them 6269f3561b8bSmrg # from the output so that they don't get included in the library 6270f3561b8bSmrg # dependencies. 6271bd304fc0Smrg 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"' 6272f3561b8bSmrg ;; 6273f3561b8bSmrg *) 6274f3561b8bSmrg if test "$GXX" = yes; then 6275bd304fc0Smrg _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' 6276f3561b8bSmrg else 6277f3561b8bSmrg # FIXME: insert proper C++ library support 6278f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6279f3561b8bSmrg fi 6280f3561b8bSmrg ;; 6281f3561b8bSmrg esac 6282f3561b8bSmrg ;; 6283fc5a983dSmrg 6284f3561b8bSmrg hpux10*|hpux11*) 6285f3561b8bSmrg if test $with_gnu_ld = no; then 6286f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6287f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6288f3561b8bSmrg 6289f3561b8bSmrg case $host_cpu in 6290f3561b8bSmrg hppa*64*|ia64*) 6291f3561b8bSmrg ;; 6292f3561b8bSmrg *) 6293f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6294f3561b8bSmrg ;; 6295f3561b8bSmrg esac 6296f3561b8bSmrg fi 6297f3561b8bSmrg case $host_cpu in 6298f3561b8bSmrg hppa*64*|ia64*) 6299f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6300f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6301f3561b8bSmrg ;; 6302f3561b8bSmrg *) 6303f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6304f3561b8bSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6305f3561b8bSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6306f3561b8bSmrg # but as the default 6307f3561b8bSmrg # location of the library. 6308f3561b8bSmrg ;; 6309f3561b8bSmrg esac 6310f3561b8bSmrg 6311f3561b8bSmrg case $cc_basename in 6312f3561b8bSmrg CC*) 6313f3561b8bSmrg # FIXME: insert proper C++ library support 6314f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6315f3561b8bSmrg ;; 6316f3561b8bSmrg aCC*) 6317f3561b8bSmrg case $host_cpu in 6318f3561b8bSmrg hppa*64*) 6319f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6320f3561b8bSmrg ;; 6321f3561b8bSmrg ia64*) 6322f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6323f3561b8bSmrg ;; 6324f3561b8bSmrg *) 6325f3561b8bSmrg _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' 6326f3561b8bSmrg ;; 6327f3561b8bSmrg esac 6328f3561b8bSmrg # Commands to make compiler produce verbose output that lists 6329f3561b8bSmrg # what "hidden" libraries, object files and flags are used when 6330f3561b8bSmrg # linking a shared library. 6331f3561b8bSmrg # 6332f3561b8bSmrg # There doesn't appear to be a way to prevent this compiler from 6333f3561b8bSmrg # explicitly linking system object files so we need to strip them 6334f3561b8bSmrg # from the output so that they don't get included in the library 6335f3561b8bSmrg # dependencies. 6336bd304fc0Smrg 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"' 6337f3561b8bSmrg ;; 6338f3561b8bSmrg *) 6339f3561b8bSmrg if test "$GXX" = yes; then 6340f3561b8bSmrg if test $with_gnu_ld = no; then 6341f3561b8bSmrg case $host_cpu in 6342f3561b8bSmrg hppa*64*) 6343f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6344f3561b8bSmrg ;; 6345f3561b8bSmrg ia64*) 6346bd304fc0Smrg _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' 6347f3561b8bSmrg ;; 6348f3561b8bSmrg *) 6349bd304fc0Smrg _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' 6350f3561b8bSmrg ;; 6351f3561b8bSmrg esac 6352f3561b8bSmrg fi 6353f3561b8bSmrg else 6354f3561b8bSmrg # FIXME: insert proper C++ library support 6355f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6356f3561b8bSmrg fi 6357f3561b8bSmrg ;; 6358f3561b8bSmrg esac 6359f3561b8bSmrg ;; 6360fc5a983dSmrg 6361f3561b8bSmrg interix[[3-9]]*) 6362f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6363f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6364f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6365f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6366f3561b8bSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6367f3561b8bSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6368f3561b8bSmrg # default) and relocated if they conflict, which is a slow very memory 6369f3561b8bSmrg # consuming and fragmenting process. To avoid this, we pick a random, 6370f3561b8bSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6371f3561b8bSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6372f3561b8bSmrg _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' 6373f3561b8bSmrg _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' 6374f3561b8bSmrg ;; 6375f3561b8bSmrg irix5* | irix6*) 6376f3561b8bSmrg case $cc_basename in 6377f3561b8bSmrg CC*) 6378f3561b8bSmrg # SGI C++ 6379bd304fc0Smrg _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' 6380f3561b8bSmrg 6381f3561b8bSmrg # Archives containing C++ object files must be created using 6382f3561b8bSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6383f3561b8bSmrg # necessary to make sure instantiated templates are included 6384f3561b8bSmrg # in the archive. 6385f3561b8bSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6386f3561b8bSmrg ;; 6387f3561b8bSmrg *) 6388f3561b8bSmrg if test "$GXX" = yes; then 6389f3561b8bSmrg if test "$with_gnu_ld" = no; then 6390bd304fc0Smrg _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' 6391f3561b8bSmrg else 6392bd304fc0Smrg _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' 6393f3561b8bSmrg fi 6394f3561b8bSmrg fi 6395f3561b8bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6396f3561b8bSmrg ;; 6397f3561b8bSmrg esac 6398f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6399f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6400f3561b8bSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 6401f3561b8bSmrg ;; 6402fc5a983dSmrg 64036086d97eSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6404f3561b8bSmrg case $cc_basename in 6405f3561b8bSmrg KCC*) 6406f3561b8bSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6407f3561b8bSmrg 6408f3561b8bSmrg # KCC will only create a shared library if the output file 6409f3561b8bSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6410f3561b8bSmrg # to its proper name (with version) after linking. 6411f3561b8bSmrg _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' 6412f3561b8bSmrg _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' 6413f3561b8bSmrg # Commands to make compiler produce verbose output that lists 6414f3561b8bSmrg # what "hidden" libraries, object files and flags are used when 6415f3561b8bSmrg # linking a shared library. 6416f3561b8bSmrg # 6417f3561b8bSmrg # There doesn't appear to be a way to prevent this compiler from 6418f3561b8bSmrg # explicitly linking system object files so we need to strip them 6419f3561b8bSmrg # from the output so that they don't get included in the library 6420f3561b8bSmrg # dependencies. 6421bd304fc0Smrg 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"' 6422f3561b8bSmrg 6423f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6424f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6425f3561b8bSmrg 6426f3561b8bSmrg # Archives containing C++ object files must be created using 6427f3561b8bSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6428f3561b8bSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6429f3561b8bSmrg ;; 6430f3561b8bSmrg icpc* | ecpc* ) 6431f3561b8bSmrg # Intel C++ 6432f3561b8bSmrg with_gnu_ld=yes 6433f3561b8bSmrg # version 8.0 and above of icpc choke on multiply defined symbols 6434f3561b8bSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6435f3561b8bSmrg # earlier do not add the objects themselves. 6436f3561b8bSmrg case `$CC -V 2>&1` in 6437f3561b8bSmrg *"Version 7."*) 6438f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6439f3561b8bSmrg _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' 6440f3561b8bSmrg ;; 6441f3561b8bSmrg *) # Version 8.0 or newer 6442f3561b8bSmrg tmp_idyn= 6443f3561b8bSmrg case $host_cpu in 6444f3561b8bSmrg ia64*) tmp_idyn=' -i_dynamic';; 6445f3561b8bSmrg esac 6446f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6447f3561b8bSmrg _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' 6448f3561b8bSmrg ;; 6449f3561b8bSmrg esac 6450f3561b8bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6451f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6452f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6453f3561b8bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6454f3561b8bSmrg ;; 6455f3561b8bSmrg pgCC* | pgcpp*) 6456f3561b8bSmrg # Portland Group C++ compiler 6457f3561b8bSmrg case `$CC -V` in 6458bd304fc0Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6459f3561b8bSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6460f3561b8bSmrg rm -rf $tpldir~ 6461f3561b8bSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6462bd304fc0Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6463f3561b8bSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6464f3561b8bSmrg rm -rf $tpldir~ 6465f3561b8bSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6466bd304fc0Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6467f3561b8bSmrg $RANLIB $oldlib' 6468f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6469f3561b8bSmrg rm -rf $tpldir~ 6470f3561b8bSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6471bd304fc0Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6472f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6473f3561b8bSmrg rm -rf $tpldir~ 6474f3561b8bSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6475bd304fc0Smrg $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' 6476f3561b8bSmrg ;; 6477bd304fc0Smrg *) # Version 6 and above use weak symbols 6478f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6479f3561b8bSmrg _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' 6480f3561b8bSmrg ;; 6481f3561b8bSmrg esac 6482fc5a983dSmrg 6483f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6484f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6485bd304fc0Smrg _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' 6486f3561b8bSmrg ;; 6487f3561b8bSmrg cxx*) 6488f3561b8bSmrg # Compaq C++ 6489f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6490f3561b8bSmrg _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' 6491fc5a983dSmrg 6492f3561b8bSmrg runpath_var=LD_RUN_PATH 6493f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6494f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6495fc5a983dSmrg 6496f3561b8bSmrg # Commands to make compiler produce verbose output that lists 6497f3561b8bSmrg # what "hidden" libraries, object files and flags are used when 6498f3561b8bSmrg # linking a shared library. 6499f3561b8bSmrg # 6500f3561b8bSmrg # There doesn't appear to be a way to prevent this compiler from 6501f3561b8bSmrg # explicitly linking system object files so we need to strip them 6502f3561b8bSmrg # from the output so that they don't get included in the library 6503f3561b8bSmrg # dependencies. 6504bd304fc0Smrg 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' 6505f3561b8bSmrg ;; 6506bd304fc0Smrg xl* | mpixl* | bgxl*) 6507f3561b8bSmrg # IBM XL 8.0 on PPC, with GNU ld 6508f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6509f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6510f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6511f3561b8bSmrg if test "x$supports_anon_versioning" = xyes; then 6512f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6513f3561b8bSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6514f3561b8bSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6515f3561b8bSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6516f3561b8bSmrg fi 6517f3561b8bSmrg ;; 6518f3561b8bSmrg *) 6519f3561b8bSmrg case `$CC -V 2>&1 | sed 5q` in 6520f3561b8bSmrg *Sun\ C*) 6521f3561b8bSmrg # Sun C++ 5.9 6522f3561b8bSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6523f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6524f3561b8bSmrg _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' 6525f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6526bd304fc0Smrg _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' 6527f3561b8bSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6528f3561b8bSmrg 6529f3561b8bSmrg # Not sure whether something based on 6530f3561b8bSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6531f3561b8bSmrg # would be better. 6532bd304fc0Smrg output_verbose_link_cmd='func_echo_all' 6533f3561b8bSmrg 6534f3561b8bSmrg # Archives containing C++ object files must be created using 6535f3561b8bSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6536f3561b8bSmrg # necessary to make sure instantiated templates are included 6537f3561b8bSmrg # in the archive. 6538f3561b8bSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6539f3561b8bSmrg ;; 6540f3561b8bSmrg esac 6541f3561b8bSmrg ;; 6542f3561b8bSmrg esac 6543f3561b8bSmrg ;; 6544fc5a983dSmrg 6545f3561b8bSmrg lynxos*) 6546f3561b8bSmrg # FIXME: insert proper C++ library support 6547f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6548f3561b8bSmrg ;; 6549fc5a983dSmrg 6550f3561b8bSmrg m88k*) 6551f3561b8bSmrg # FIXME: insert proper C++ library support 6552f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6553f3561b8bSmrg ;; 6554fc5a983dSmrg 6555f3561b8bSmrg mvs*) 6556f3561b8bSmrg case $cc_basename in 6557f3561b8bSmrg cxx*) 6558f3561b8bSmrg # FIXME: insert proper C++ library support 6559f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6560f3561b8bSmrg ;; 6561f3561b8bSmrg *) 6562f3561b8bSmrg # FIXME: insert proper C++ library support 6563f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6564f3561b8bSmrg ;; 6565f3561b8bSmrg esac 6566f3561b8bSmrg ;; 6567fc5a983dSmrg 6568f3561b8bSmrg netbsd*) 6569f3561b8bSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6570f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6571f3561b8bSmrg wlarc= 6572f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6573f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6574f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6575f3561b8bSmrg fi 6576f3561b8bSmrg # Workaround some broken pre-1.5 toolchains 6577f3561b8bSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6578f3561b8bSmrg ;; 6579fc5a983dSmrg 6580f3561b8bSmrg *nto* | *qnx*) 6581f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6582f3561b8bSmrg ;; 6583fc5a983dSmrg 6584f3561b8bSmrg openbsd2*) 6585f3561b8bSmrg # C++ shared libraries are fairly broken 6586f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6587f3561b8bSmrg ;; 6588fc5a983dSmrg 6589f3561b8bSmrg openbsd*) 6590f3561b8bSmrg if test -f /usr/libexec/ld.so; then 6591f3561b8bSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6592f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6593f3561b8bSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6594f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6595f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6596f3561b8bSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6597f3561b8bSmrg _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' 6598f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6599f3561b8bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6600f3561b8bSmrg fi 6601bd304fc0Smrg output_verbose_link_cmd=func_echo_all 6602f3561b8bSmrg else 6603f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6604f3561b8bSmrg fi 6605f3561b8bSmrg ;; 6606fc5a983dSmrg 6607f3561b8bSmrg osf3* | osf4* | osf5*) 6608f3561b8bSmrg case $cc_basename in 6609f3561b8bSmrg KCC*) 6610f3561b8bSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6611f3561b8bSmrg 6612f3561b8bSmrg # KCC will only create a shared library if the output file 6613f3561b8bSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6614f3561b8bSmrg # to its proper name (with version) after linking. 6615f3561b8bSmrg _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' 6616f3561b8bSmrg 6617f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6618f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6619f3561b8bSmrg 6620f3561b8bSmrg # Archives containing C++ object files must be created using 6621f3561b8bSmrg # the KAI C++ compiler. 6622f3561b8bSmrg case $host in 6623f3561b8bSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6624f3561b8bSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6625f3561b8bSmrg esac 6626f3561b8bSmrg ;; 6627f3561b8bSmrg RCC*) 6628f3561b8bSmrg # Rational C++ 2.4.1 6629f3561b8bSmrg # FIXME: insert proper C++ library support 6630f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6631f3561b8bSmrg ;; 6632f3561b8bSmrg cxx*) 6633f3561b8bSmrg case $host in 6634f3561b8bSmrg osf3*) 6635f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6636bd304fc0Smrg _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' 6637f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6638f3561b8bSmrg ;; 6639f3561b8bSmrg *) 6640f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6641bd304fc0Smrg _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' 6642f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6643f3561b8bSmrg echo "-hidden">> $lib.exp~ 6644bd304fc0Smrg $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~ 6645f3561b8bSmrg $RM $lib.exp' 6646f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6647f3561b8bSmrg ;; 6648f3561b8bSmrg esac 6649fc5a983dSmrg 6650f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6651fc5a983dSmrg 6652f3561b8bSmrg # Commands to make compiler produce verbose output that lists 6653f3561b8bSmrg # what "hidden" libraries, object files and flags are used when 6654f3561b8bSmrg # linking a shared library. 6655f3561b8bSmrg # 6656f3561b8bSmrg # There doesn't appear to be a way to prevent this compiler from 6657f3561b8bSmrg # explicitly linking system object files so we need to strip them 6658f3561b8bSmrg # from the output so that they don't get included in the library 6659f3561b8bSmrg # dependencies. 6660bd304fc0Smrg 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"' 6661f3561b8bSmrg ;; 6662f3561b8bSmrg *) 6663f3561b8bSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6664f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6665f3561b8bSmrg case $host in 6666f3561b8bSmrg osf3*) 6667bd304fc0Smrg _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' 6668f3561b8bSmrg ;; 6669f3561b8bSmrg *) 6670bd304fc0Smrg _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' 6671f3561b8bSmrg ;; 6672f3561b8bSmrg esac 6673f3561b8bSmrg 6674f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6675f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6676f3561b8bSmrg 6677f3561b8bSmrg # Commands to make compiler produce verbose output that lists 6678f3561b8bSmrg # what "hidden" libraries, object files and flags are used when 6679f3561b8bSmrg # linking a shared library. 6680bd304fc0Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6681f3561b8bSmrg 6682f3561b8bSmrg else 6683f3561b8bSmrg # FIXME: insert proper C++ library support 6684f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6685f3561b8bSmrg fi 6686f3561b8bSmrg ;; 6687f3561b8bSmrg esac 6688f3561b8bSmrg ;; 6689fc5a983dSmrg 6690f3561b8bSmrg psos*) 6691f3561b8bSmrg # FIXME: insert proper C++ library support 6692f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6693f3561b8bSmrg ;; 6694fc5a983dSmrg 6695f3561b8bSmrg sunos4*) 6696f3561b8bSmrg case $cc_basename in 6697f3561b8bSmrg CC*) 6698f3561b8bSmrg # Sun C++ 4.x 6699f3561b8bSmrg # FIXME: insert proper C++ library support 6700f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6701f3561b8bSmrg ;; 6702f3561b8bSmrg lcc*) 6703f3561b8bSmrg # Lucid 6704f3561b8bSmrg # FIXME: insert proper C++ library support 6705f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6706f3561b8bSmrg ;; 6707f3561b8bSmrg *) 6708f3561b8bSmrg # FIXME: insert proper C++ library support 6709f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6710f3561b8bSmrg ;; 6711f3561b8bSmrg esac 6712f3561b8bSmrg ;; 6713fc5a983dSmrg 6714f3561b8bSmrg solaris*) 6715f3561b8bSmrg case $cc_basename in 6716bd304fc0Smrg CC* | sunCC*) 6717f3561b8bSmrg # Sun C++ 4.2, 5.x and Centerline C++ 6718f3561b8bSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6719f3561b8bSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6720f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6721f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6722f3561b8bSmrg $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' 6723f3561b8bSmrg 6724f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6725f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6726f3561b8bSmrg case $host_os in 6727f3561b8bSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6728f3561b8bSmrg *) 6729f3561b8bSmrg # The compiler driver will combine and reorder linker options, 6730f3561b8bSmrg # but understands `-z linker_flag'. 6731f3561b8bSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6732f3561b8bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6733f3561b8bSmrg ;; 6734f3561b8bSmrg esac 6735f3561b8bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6736fc5a983dSmrg 6737bd304fc0Smrg output_verbose_link_cmd='func_echo_all' 6738fc5a983dSmrg 6739f3561b8bSmrg # Archives containing C++ object files must be created using 6740f3561b8bSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6741f3561b8bSmrg # necessary to make sure instantiated templates are included 6742f3561b8bSmrg # in the archive. 6743f3561b8bSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6744f3561b8bSmrg ;; 6745f3561b8bSmrg gcx*) 6746f3561b8bSmrg # Green Hills C++ Compiler 6747f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6748fc5a983dSmrg 6749f3561b8bSmrg # The C++ compiler must be used to create the archive. 6750f3561b8bSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6751f3561b8bSmrg ;; 6752f3561b8bSmrg *) 6753f3561b8bSmrg # GNU C++ compiler with Solaris linker 6754f3561b8bSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6755f3561b8bSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6756f3561b8bSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6757bd304fc0Smrg _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' 6758f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6759bd304fc0Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6760f3561b8bSmrg 6761f3561b8bSmrg # Commands to make compiler produce verbose output that lists 6762f3561b8bSmrg # what "hidden" libraries, object files and flags are used when 6763f3561b8bSmrg # linking a shared library. 6764bd304fc0Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6765f3561b8bSmrg else 6766f3561b8bSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6767f3561b8bSmrg # platform. 6768f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6769f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6770f3561b8bSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6771f3561b8bSmrg 6772f3561b8bSmrg # Commands to make compiler produce verbose output that lists 6773f3561b8bSmrg # what "hidden" libraries, object files and flags are used when 6774f3561b8bSmrg # linking a shared library. 6775bd304fc0Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6776f3561b8bSmrg fi 6777f3561b8bSmrg 6778f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6779f3561b8bSmrg case $host_os in 6780f3561b8bSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6781f3561b8bSmrg *) 6782f3561b8bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6783f3561b8bSmrg ;; 6784f3561b8bSmrg esac 6785f3561b8bSmrg fi 6786f3561b8bSmrg ;; 6787f3561b8bSmrg esac 6788f3561b8bSmrg ;; 6789fc5a983dSmrg 6790f3561b8bSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6791f3561b8bSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6792f3561b8bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6793f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6794f3561b8bSmrg runpath_var='LD_RUN_PATH' 6795fc5a983dSmrg 6796f3561b8bSmrg case $cc_basename in 6797f3561b8bSmrg CC*) 6798f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6799f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6800f3561b8bSmrg ;; 6801f3561b8bSmrg *) 6802f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6803f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6804f3561b8bSmrg ;; 6805f3561b8bSmrg esac 6806f3561b8bSmrg ;; 6807fc5a983dSmrg 6808f3561b8bSmrg sysv5* | sco3.2v5* | sco5v6*) 6809f3561b8bSmrg # Note: We can NOT use -z defs as we might desire, because we do not 6810f3561b8bSmrg # link with -lc, and that would cause any symbols used from libc to 6811f3561b8bSmrg # always be unresolved, which means just about no library would 6812f3561b8bSmrg # ever link correctly. If we're not using GNU ld we use -z text 6813f3561b8bSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6814f3561b8bSmrg # as -z defs. 6815f3561b8bSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6816f3561b8bSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6817f3561b8bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6818f3561b8bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6819f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6820f3561b8bSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6821f3561b8bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6822f3561b8bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6823f3561b8bSmrg runpath_var='LD_RUN_PATH' 6824fc5a983dSmrg 6825f3561b8bSmrg case $cc_basename in 6826f3561b8bSmrg CC*) 6827f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6828f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6829bd304fc0Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6830bd304fc0Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 6831bd304fc0Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6832bd304fc0Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 6833f3561b8bSmrg ;; 6834f3561b8bSmrg *) 6835f3561b8bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6836f3561b8bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6837f3561b8bSmrg ;; 6838f3561b8bSmrg esac 6839f3561b8bSmrg ;; 6840fc5a983dSmrg 6841f3561b8bSmrg tandem*) 6842f3561b8bSmrg case $cc_basename in 6843f3561b8bSmrg NCC*) 6844f3561b8bSmrg # NonStop-UX NCC 3.20 6845f3561b8bSmrg # FIXME: insert proper C++ library support 6846f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6847f3561b8bSmrg ;; 6848f3561b8bSmrg *) 6849f3561b8bSmrg # FIXME: insert proper C++ library support 6850f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6851f3561b8bSmrg ;; 6852f3561b8bSmrg esac 6853f3561b8bSmrg ;; 6854fc5a983dSmrg 6855f3561b8bSmrg vxworks*) 6856f3561b8bSmrg # FIXME: insert proper C++ library support 6857f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6858f3561b8bSmrg ;; 6859fc5a983dSmrg 6860f3561b8bSmrg *) 6861f3561b8bSmrg # FIXME: insert proper C++ library support 6862f3561b8bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6863f3561b8bSmrg ;; 6864f3561b8bSmrg esac 6865fc5a983dSmrg 6866f3561b8bSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6867f3561b8bSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6868f3561b8bSmrg 6869f3561b8bSmrg _LT_TAGVAR(GCC, $1)="$GXX" 6870f3561b8bSmrg _LT_TAGVAR(LD, $1)="$LD" 6871f3561b8bSmrg 6872f3561b8bSmrg ## CAVEAT EMPTOR: 6873f3561b8bSmrg ## There is no encapsulation within the following macros, do not change 6874f3561b8bSmrg ## the running order or otherwise move them around unless you know exactly 6875f3561b8bSmrg ## what you are doing... 6876f3561b8bSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 6877f3561b8bSmrg _LT_COMPILER_PIC($1) 6878f3561b8bSmrg _LT_COMPILER_C_O($1) 6879f3561b8bSmrg _LT_COMPILER_FILE_LOCKS($1) 6880f3561b8bSmrg _LT_LINKER_SHLIBS($1) 6881f3561b8bSmrg _LT_SYS_DYNAMIC_LINKER($1) 6882f3561b8bSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6883f3561b8bSmrg 6884f3561b8bSmrg _LT_CONFIG($1) 6885f3561b8bSmrg fi # test -n "$compiler" 6886f3561b8bSmrg 6887f3561b8bSmrg CC=$lt_save_CC 6888bd304fc0Smrg CFLAGS=$lt_save_CFLAGS 6889f3561b8bSmrg LDCXX=$LD 6890f3561b8bSmrg LD=$lt_save_LD 6891f3561b8bSmrg GCC=$lt_save_GCC 6892f3561b8bSmrg with_gnu_ld=$lt_save_with_gnu_ld 6893f3561b8bSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 6894f3561b8bSmrg lt_cv_path_LD=$lt_save_path_LD 6895f3561b8bSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6896f3561b8bSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6897f3561b8bSmrgfi # test "$_lt_caught_CXX_error" != yes 6898fc5a983dSmrg 6899f3561b8bSmrgAC_LANG_POP 6900f3561b8bSmrg])# _LT_LANG_CXX_CONFIG 6901fc5a983dSmrg 6902fc5a983dSmrg 6903bd304fc0Smrg# _LT_FUNC_STRIPNAME_CNF 6904bd304fc0Smrg# ---------------------- 6905bd304fc0Smrg# func_stripname_cnf prefix suffix name 6906bd304fc0Smrg# strip PREFIX and SUFFIX off of NAME. 6907bd304fc0Smrg# PREFIX and SUFFIX must not contain globbing or regex special 6908bd304fc0Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 6909bd304fc0Smrg# dot (in which case that matches only a dot). 6910bd304fc0Smrg# 6911bd304fc0Smrg# This function is identical to the (non-XSI) version of func_stripname, 6912bd304fc0Smrg# except this one can be used by m4 code that may be executed by configure, 6913bd304fc0Smrg# rather than the libtool script. 6914bd304fc0Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6915bd304fc0SmrgAC_REQUIRE([_LT_DECL_SED]) 6916bd304fc0SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6917bd304fc0Smrgfunc_stripname_cnf () 6918bd304fc0Smrg{ 6919bd304fc0Smrg case ${2} in 6920bd304fc0Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6921bd304fc0Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6922bd304fc0Smrg esac 6923bd304fc0Smrg} # func_stripname_cnf 6924bd304fc0Smrg])# _LT_FUNC_STRIPNAME_CNF 6925bd304fc0Smrg 6926f3561b8bSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6927f3561b8bSmrg# --------------------------------- 6928f3561b8bSmrg# Figure out "hidden" library dependencies from verbose 6929f3561b8bSmrg# compiler output when linking a shared library. 6930f3561b8bSmrg# Parse the compiler output and extract the necessary 6931f3561b8bSmrg# objects, libraries and library flags. 6932f3561b8bSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6933f3561b8bSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6934bd304fc0SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6935f3561b8bSmrg# Dependencies to place before and after the object being linked: 6936f3561b8bSmrg_LT_TAGVAR(predep_objects, $1)= 6937f3561b8bSmrg_LT_TAGVAR(postdep_objects, $1)= 6938f3561b8bSmrg_LT_TAGVAR(predeps, $1)= 6939f3561b8bSmrg_LT_TAGVAR(postdeps, $1)= 6940f3561b8bSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6941fc5a983dSmrg 6942f3561b8bSmrgdnl we can't use the lt_simple_compile_test_code here, 6943f3561b8bSmrgdnl because it contains code intended for an executable, 6944f3561b8bSmrgdnl not a library. It's possible we should let each 6945f3561b8bSmrgdnl tag define a new lt_????_link_test_code variable, 6946f3561b8bSmrgdnl but it's only used here... 6947f3561b8bSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6948f3561b8bSmrgint a; 6949f3561b8bSmrgvoid foo (void) { a = 0; } 6950f3561b8bSmrg_LT_EOF 6951f3561b8bSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6952f3561b8bSmrgclass Foo 6953f3561b8bSmrg{ 6954f3561b8bSmrgpublic: 6955f3561b8bSmrg Foo (void) { a = 0; } 6956f3561b8bSmrgprivate: 6957f3561b8bSmrg int a; 6958f3561b8bSmrg}; 6959f3561b8bSmrg_LT_EOF 6960f3561b8bSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6961f3561b8bSmrg subroutine foo 6962f3561b8bSmrg implicit none 6963f3561b8bSmrg integer*4 a 6964f3561b8bSmrg a=0 6965f3561b8bSmrg return 6966f3561b8bSmrg end 6967f3561b8bSmrg_LT_EOF 6968f3561b8bSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6969f3561b8bSmrg subroutine foo 6970f3561b8bSmrg implicit none 6971f3561b8bSmrg integer a 6972f3561b8bSmrg a=0 6973f3561b8bSmrg return 6974f3561b8bSmrg end 6975f3561b8bSmrg_LT_EOF 6976f3561b8bSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6977f3561b8bSmrgpublic class foo { 6978f3561b8bSmrg private int a; 6979f3561b8bSmrg public void bar (void) { 6980f3561b8bSmrg a = 0; 6981f3561b8bSmrg } 6982f3561b8bSmrg}; 6983f3561b8bSmrg_LT_EOF 6984bd304fc0Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 6985bd304fc0Smrgpackage foo 6986bd304fc0Smrgfunc foo() { 6987bd304fc0Smrg} 6988bd304fc0Smrg_LT_EOF 6989f3561b8bSmrg]) 6990bd304fc0Smrg 6991bd304fc0Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 6992bd304fc0Smrgcase "$CC $CFLAGS " in #( 6993bd304fc0Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6994bd304fc0Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 6995bd304fc0Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 6996bd304fc0Smrgesac 6997bd304fc0Smrg 6998f3561b8bSmrgdnl Parse the compiler output and extract the necessary 6999f3561b8bSmrgdnl objects, libraries and library flags. 7000f3561b8bSmrgif AC_TRY_EVAL(ac_compile); then 7001f3561b8bSmrg # Parse the compiler output and extract the necessary 7002f3561b8bSmrg # objects, libraries and library flags. 7003fc5a983dSmrg 7004f3561b8bSmrg # Sentinel used to keep track of whether or not we are before 7005f3561b8bSmrg # the conftest object file. 7006f3561b8bSmrg pre_test_object_deps_done=no 7007fc5a983dSmrg 7008f3561b8bSmrg for p in `eval "$output_verbose_link_cmd"`; do 7009bd304fc0Smrg case ${prev}${p} in 7010fc5a983dSmrg 7011f3561b8bSmrg -L* | -R* | -l*) 7012f3561b8bSmrg # Some compilers place space between "-{L,R}" and the path. 7013f3561b8bSmrg # Remove the space. 7014f3561b8bSmrg if test $p = "-L" || 7015f3561b8bSmrg test $p = "-R"; then 7016f3561b8bSmrg prev=$p 7017f3561b8bSmrg continue 7018f3561b8bSmrg fi 7019fc5a983dSmrg 7020bd304fc0Smrg # Expand the sysroot to ease extracting the directories later. 7021bd304fc0Smrg if test -z "$prev"; then 7022bd304fc0Smrg case $p in 7023bd304fc0Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7024bd304fc0Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7025bd304fc0Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7026bd304fc0Smrg esac 7027bd304fc0Smrg fi 7028bd304fc0Smrg case $p in 7029bd304fc0Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7030bd304fc0Smrg esac 7031f3561b8bSmrg if test "$pre_test_object_deps_done" = no; then 7032bd304fc0Smrg case ${prev} in 7033bd304fc0Smrg -L | -R) 7034f3561b8bSmrg # Internal compiler library paths should come after those 7035f3561b8bSmrg # provided the user. The postdeps already come after the 7036f3561b8bSmrg # user supplied libs so there is no need to process them. 7037f3561b8bSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7038f3561b8bSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 7039f3561b8bSmrg else 7040f3561b8bSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 7041f3561b8bSmrg fi 7042f3561b8bSmrg ;; 7043f3561b8bSmrg # The "-l" case would never come before the object being 7044f3561b8bSmrg # linked, so don't bother handling this case. 7045f3561b8bSmrg esac 7046f3561b8bSmrg else 7047f3561b8bSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7048f3561b8bSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 7049f3561b8bSmrg else 7050f3561b8bSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 7051f3561b8bSmrg fi 7052f3561b8bSmrg fi 7053bd304fc0Smrg prev= 7054f3561b8bSmrg ;; 7055fc5a983dSmrg 7056bd304fc0Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 7057f3561b8bSmrg *.$objext) 7058f3561b8bSmrg # This assumes that the test object file only shows up 7059f3561b8bSmrg # once in the compiler output. 7060f3561b8bSmrg if test "$p" = "conftest.$objext"; then 7061f3561b8bSmrg pre_test_object_deps_done=yes 7062f3561b8bSmrg continue 7063f3561b8bSmrg fi 7064fc5a983dSmrg 7065f3561b8bSmrg if test "$pre_test_object_deps_done" = no; then 7066f3561b8bSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7067f3561b8bSmrg _LT_TAGVAR(predep_objects, $1)="$p" 7068f3561b8bSmrg else 7069f3561b8bSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7070f3561b8bSmrg fi 7071f3561b8bSmrg else 7072f3561b8bSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7073f3561b8bSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 7074f3561b8bSmrg else 7075f3561b8bSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7076f3561b8bSmrg fi 7077f3561b8bSmrg fi 7078f3561b8bSmrg ;; 7079fc5a983dSmrg 7080f3561b8bSmrg *) ;; # Ignore the rest. 7081fc5a983dSmrg 7082f3561b8bSmrg esac 7083f3561b8bSmrg done 7084fc5a983dSmrg 7085f3561b8bSmrg # Clean up. 7086f3561b8bSmrg rm -f a.out a.exe 7087fc5a983dSmrgelse 7088f3561b8bSmrg echo "libtool.m4: error: problem compiling $1 test program" 7089fc5a983dSmrgfi 7090fc5a983dSmrg 7091f3561b8bSmrg$RM -f confest.$objext 7092bd304fc0SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 7093fc5a983dSmrg 7094f3561b8bSmrg# PORTME: override above test on systems where it is broken 7095f3561b8bSmrgm4_if([$1], [CXX], 7096f3561b8bSmrg[case $host_os in 7097f3561b8bSmrginterix[[3-9]]*) 7098f3561b8bSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7099f3561b8bSmrg # hack all around it, let's just trust "g++" to DTRT. 7100f3561b8bSmrg _LT_TAGVAR(predep_objects,$1)= 7101f3561b8bSmrg _LT_TAGVAR(postdep_objects,$1)= 7102f3561b8bSmrg _LT_TAGVAR(postdeps,$1)= 7103f3561b8bSmrg ;; 7104fc5a983dSmrg 7105f3561b8bSmrglinux*) 7106f3561b8bSmrg case `$CC -V 2>&1 | sed 5q` in 7107f3561b8bSmrg *Sun\ C*) 7108f3561b8bSmrg # Sun C++ 5.9 7109fc5a983dSmrg 7110f3561b8bSmrg # The more standards-conforming stlport4 library is 7111f3561b8bSmrg # incompatible with the Cstd library. Avoid specifying 7112f3561b8bSmrg # it if it's in CXXFLAGS. Ignore libCrun as 7113f3561b8bSmrg # -library=stlport4 depends on it. 7114f3561b8bSmrg case " $CXX $CXXFLAGS " in 7115f3561b8bSmrg *" -library=stlport4 "*) 7116f3561b8bSmrg solaris_use_stlport4=yes 7117f3561b8bSmrg ;; 7118f3561b8bSmrg esac 7119fc5a983dSmrg 7120f3561b8bSmrg if test "$solaris_use_stlport4" != yes; then 7121f3561b8bSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7122f3561b8bSmrg fi 7123f3561b8bSmrg ;; 7124f3561b8bSmrg esac 7125f3561b8bSmrg ;; 7126f3561b8bSmrg 7127f3561b8bSmrgsolaris*) 7128f3561b8bSmrg case $cc_basename in 7129bd304fc0Smrg CC* | sunCC*) 7130f3561b8bSmrg # The more standards-conforming stlport4 library is 7131f3561b8bSmrg # incompatible with the Cstd library. Avoid specifying 7132f3561b8bSmrg # it if it's in CXXFLAGS. Ignore libCrun as 7133f3561b8bSmrg # -library=stlport4 depends on it. 7134f3561b8bSmrg case " $CXX $CXXFLAGS " in 7135f3561b8bSmrg *" -library=stlport4 "*) 7136f3561b8bSmrg solaris_use_stlport4=yes 7137f3561b8bSmrg ;; 7138f3561b8bSmrg esac 7139fc5a983dSmrg 7140f3561b8bSmrg # Adding this requires a known-good setup of shared libraries for 7141f3561b8bSmrg # Sun compiler versions before 5.6, else PIC objects from an old 7142f3561b8bSmrg # archive will be linked into the output, leading to subtle bugs. 7143f3561b8bSmrg if test "$solaris_use_stlport4" != yes; then 7144f3561b8bSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7145f3561b8bSmrg fi 7146f3561b8bSmrg ;; 7147f3561b8bSmrg esac 7148f3561b8bSmrg ;; 7149f3561b8bSmrgesac 7150f3561b8bSmrg]) 7151fc5a983dSmrg 7152f3561b8bSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 7153f3561b8bSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7154f3561b8bSmrgesac 7155f3561b8bSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7156f3561b8bSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7157f3561b8bSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7158f3561b8bSmrgfi 7159f3561b8bSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7160f3561b8bSmrg [The directories searched by this compiler when creating a shared library]) 7161f3561b8bSmrg_LT_TAGDECL([], [predep_objects], [1], 7162f3561b8bSmrg [Dependencies to place before and after the objects being linked to 7163f3561b8bSmrg create a shared library]) 7164f3561b8bSmrg_LT_TAGDECL([], [postdep_objects], [1]) 7165f3561b8bSmrg_LT_TAGDECL([], [predeps], [1]) 7166f3561b8bSmrg_LT_TAGDECL([], [postdeps], [1]) 7167f3561b8bSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7168f3561b8bSmrg [The library search path used internally by the compiler when linking 7169f3561b8bSmrg a shared library]) 7170f3561b8bSmrg])# _LT_SYS_HIDDEN_LIBDEPS 7171f3561b8bSmrg 7172f3561b8bSmrg 7173f3561b8bSmrg# _LT_LANG_F77_CONFIG([TAG]) 7174f3561b8bSmrg# -------------------------- 7175f3561b8bSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 7176f3561b8bSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7177f3561b8bSmrg# to write the compiler configuration to `libtool'. 7178f3561b8bSmrgm4_defun([_LT_LANG_F77_CONFIG], 7179bd304fc0Smrg[AC_LANG_PUSH(Fortran 77) 7180bd304fc0Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 7181bd304fc0Smrg _lt_disable_F77=yes 7182bd304fc0Smrgfi 7183fc5a983dSmrg 7184f3561b8bSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7185f3561b8bSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7186f3561b8bSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7187f3561b8bSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7188f3561b8bSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7189f3561b8bSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7190f3561b8bSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7191f3561b8bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7192f3561b8bSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7193f3561b8bSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7194f3561b8bSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7195f3561b8bSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7196f3561b8bSmrg_LT_TAGVAR(module_cmds, $1)= 7197f3561b8bSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7198f3561b8bSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7199f3561b8bSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7200bd304fc0Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7201bd304fc0Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7202f3561b8bSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7203f3561b8bSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7204f3561b8bSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7205fc5a983dSmrg 7206f3561b8bSmrg# Source file extension for f77 test sources. 7207f3561b8bSmrgac_ext=f 7208fc5a983dSmrg 7209f3561b8bSmrg# Object file extension for compiled f77 test sources. 7210f3561b8bSmrgobjext=o 7211f3561b8bSmrg_LT_TAGVAR(objext, $1)=$objext 7212f3561b8bSmrg 7213f3561b8bSmrg# No sense in running all these tests if we already determined that 7214f3561b8bSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 7215f3561b8bSmrg# are currently assumed to apply to all compilers on this platform, 7216f3561b8bSmrg# and will be corrupted by setting them based on a non-working compiler. 7217f3561b8bSmrgif test "$_lt_disable_F77" != yes; then 7218f3561b8bSmrg # Code to be used in simple compile tests 7219f3561b8bSmrg lt_simple_compile_test_code="\ 7220f3561b8bSmrg subroutine t 7221f3561b8bSmrg return 7222f3561b8bSmrg end 7223f3561b8bSmrg" 7224fc5a983dSmrg 7225f3561b8bSmrg # Code to be used in simple link tests 7226f3561b8bSmrg lt_simple_link_test_code="\ 7227f3561b8bSmrg program t 7228f3561b8bSmrg end 7229f3561b8bSmrg" 7230fc5a983dSmrg 7231f3561b8bSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7232f3561b8bSmrg _LT_TAG_COMPILER 7233fc5a983dSmrg 7234f3561b8bSmrg # save warnings/boilerplate of simple test code 7235f3561b8bSmrg _LT_COMPILER_BOILERPLATE 7236f3561b8bSmrg _LT_LINKER_BOILERPLATE 7237fc5a983dSmrg 7238f3561b8bSmrg # Allow CC to be a program name with arguments. 7239f3561b8bSmrg lt_save_CC="$CC" 7240f3561b8bSmrg lt_save_GCC=$GCC 7241bd304fc0Smrg lt_save_CFLAGS=$CFLAGS 7242f3561b8bSmrg CC=${F77-"f77"} 7243bd304fc0Smrg CFLAGS=$FFLAGS 7244f3561b8bSmrg compiler=$CC 7245f3561b8bSmrg _LT_TAGVAR(compiler, $1)=$CC 7246f3561b8bSmrg _LT_CC_BASENAME([$compiler]) 7247f3561b8bSmrg GCC=$G77 7248f3561b8bSmrg if test -n "$compiler"; then 7249f3561b8bSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7250f3561b8bSmrg AC_MSG_RESULT([$can_build_shared]) 7251fc5a983dSmrg 7252f3561b8bSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7253f3561b8bSmrg test "$can_build_shared" = "no" && enable_shared=no 7254fc5a983dSmrg 7255f3561b8bSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7256f3561b8bSmrg # are all built from PIC. 7257f3561b8bSmrg case $host_os in 7258f3561b8bSmrg aix3*) 7259f3561b8bSmrg test "$enable_shared" = yes && enable_static=no 7260f3561b8bSmrg if test -n "$RANLIB"; then 7261f3561b8bSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7262f3561b8bSmrg postinstall_cmds='$RANLIB $lib' 7263f3561b8bSmrg fi 7264f3561b8bSmrg ;; 7265f3561b8bSmrg aix[[4-9]]*) 7266f3561b8bSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7267f3561b8bSmrg test "$enable_shared" = yes && enable_static=no 7268f3561b8bSmrg fi 7269f3561b8bSmrg ;; 7270f3561b8bSmrg esac 7271f3561b8bSmrg AC_MSG_RESULT([$enable_shared]) 7272f3561b8bSmrg 7273f3561b8bSmrg AC_MSG_CHECKING([whether to build static libraries]) 7274f3561b8bSmrg # Make sure either enable_shared or enable_static is yes. 7275f3561b8bSmrg test "$enable_shared" = yes || enable_static=yes 7276f3561b8bSmrg AC_MSG_RESULT([$enable_static]) 7277f3561b8bSmrg 7278f3561b8bSmrg _LT_TAGVAR(GCC, $1)="$G77" 7279f3561b8bSmrg _LT_TAGVAR(LD, $1)="$LD" 7280f3561b8bSmrg 7281f3561b8bSmrg ## CAVEAT EMPTOR: 7282f3561b8bSmrg ## There is no encapsulation within the following macros, do not change 7283f3561b8bSmrg ## the running order or otherwise move them around unless you know exactly 7284f3561b8bSmrg ## what you are doing... 7285f3561b8bSmrg _LT_COMPILER_PIC($1) 7286f3561b8bSmrg _LT_COMPILER_C_O($1) 7287f3561b8bSmrg _LT_COMPILER_FILE_LOCKS($1) 7288f3561b8bSmrg _LT_LINKER_SHLIBS($1) 7289f3561b8bSmrg _LT_SYS_DYNAMIC_LINKER($1) 7290f3561b8bSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7291f3561b8bSmrg 7292f3561b8bSmrg _LT_CONFIG($1) 7293f3561b8bSmrg fi # test -n "$compiler" 7294f3561b8bSmrg 7295f3561b8bSmrg GCC=$lt_save_GCC 7296f3561b8bSmrg CC="$lt_save_CC" 7297bd304fc0Smrg CFLAGS="$lt_save_CFLAGS" 7298f3561b8bSmrgfi # test "$_lt_disable_F77" != yes 7299fc5a983dSmrg 7300f3561b8bSmrgAC_LANG_POP 7301f3561b8bSmrg])# _LT_LANG_F77_CONFIG 7302fc5a983dSmrg 7303fc5a983dSmrg 7304f3561b8bSmrg# _LT_LANG_FC_CONFIG([TAG]) 7305f3561b8bSmrg# ------------------------- 7306f3561b8bSmrg# Ensure that the configuration variables for a Fortran compiler are 7307f3561b8bSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7308f3561b8bSmrg# to write the compiler configuration to `libtool'. 7309f3561b8bSmrgm4_defun([_LT_LANG_FC_CONFIG], 7310bd304fc0Smrg[AC_LANG_PUSH(Fortran) 7311bd304fc0Smrg 7312bd304fc0Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 7313bd304fc0Smrg _lt_disable_FC=yes 7314bd304fc0Smrgfi 7315f3561b8bSmrg 7316f3561b8bSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7317f3561b8bSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7318f3561b8bSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7319f3561b8bSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7320f3561b8bSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7321f3561b8bSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7322f3561b8bSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7323f3561b8bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7324f3561b8bSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7325f3561b8bSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7326f3561b8bSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7327f3561b8bSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7328f3561b8bSmrg_LT_TAGVAR(module_cmds, $1)= 7329f3561b8bSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7330f3561b8bSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7331f3561b8bSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7332bd304fc0Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7333bd304fc0Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7334f3561b8bSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7335f3561b8bSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7336f3561b8bSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7337f3561b8bSmrg 7338f3561b8bSmrg# Source file extension for fc test sources. 7339f3561b8bSmrgac_ext=${ac_fc_srcext-f} 7340f3561b8bSmrg 7341f3561b8bSmrg# Object file extension for compiled fc test sources. 7342f3561b8bSmrgobjext=o 7343f3561b8bSmrg_LT_TAGVAR(objext, $1)=$objext 7344f3561b8bSmrg 7345f3561b8bSmrg# No sense in running all these tests if we already determined that 7346f3561b8bSmrg# the FC compiler isn't working. Some variables (like enable_shared) 7347f3561b8bSmrg# are currently assumed to apply to all compilers on this platform, 7348f3561b8bSmrg# and will be corrupted by setting them based on a non-working compiler. 7349f3561b8bSmrgif test "$_lt_disable_FC" != yes; then 7350f3561b8bSmrg # Code to be used in simple compile tests 7351f3561b8bSmrg lt_simple_compile_test_code="\ 7352f3561b8bSmrg subroutine t 7353f3561b8bSmrg return 7354f3561b8bSmrg end 7355f3561b8bSmrg" 7356fc5a983dSmrg 7357f3561b8bSmrg # Code to be used in simple link tests 7358f3561b8bSmrg lt_simple_link_test_code="\ 7359f3561b8bSmrg program t 7360f3561b8bSmrg end 7361f3561b8bSmrg" 7362fc5a983dSmrg 7363f3561b8bSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7364f3561b8bSmrg _LT_TAG_COMPILER 7365fc5a983dSmrg 7366f3561b8bSmrg # save warnings/boilerplate of simple test code 7367f3561b8bSmrg _LT_COMPILER_BOILERPLATE 7368f3561b8bSmrg _LT_LINKER_BOILERPLATE 7369fc5a983dSmrg 7370f3561b8bSmrg # Allow CC to be a program name with arguments. 7371f3561b8bSmrg lt_save_CC="$CC" 7372f3561b8bSmrg lt_save_GCC=$GCC 7373bd304fc0Smrg lt_save_CFLAGS=$CFLAGS 7374f3561b8bSmrg CC=${FC-"f95"} 7375bd304fc0Smrg CFLAGS=$FCFLAGS 7376f3561b8bSmrg compiler=$CC 7377f3561b8bSmrg GCC=$ac_cv_fc_compiler_gnu 7378f3561b8bSmrg 7379f3561b8bSmrg _LT_TAGVAR(compiler, $1)=$CC 7380f3561b8bSmrg _LT_CC_BASENAME([$compiler]) 7381f3561b8bSmrg 7382f3561b8bSmrg if test -n "$compiler"; then 7383f3561b8bSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7384f3561b8bSmrg AC_MSG_RESULT([$can_build_shared]) 7385fc5a983dSmrg 7386f3561b8bSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7387f3561b8bSmrg test "$can_build_shared" = "no" && enable_shared=no 7388f3561b8bSmrg 7389f3561b8bSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7390f3561b8bSmrg # are all built from PIC. 7391fc5a983dSmrg case $host_os in 7392f3561b8bSmrg aix3*) 7393f3561b8bSmrg test "$enable_shared" = yes && enable_static=no 7394f3561b8bSmrg if test -n "$RANLIB"; then 7395f3561b8bSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7396f3561b8bSmrg postinstall_cmds='$RANLIB $lib' 7397f3561b8bSmrg fi 7398f3561b8bSmrg ;; 7399fc5a983dSmrg aix[[4-9]]*) 7400f3561b8bSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7401f3561b8bSmrg test "$enable_shared" = yes && enable_static=no 7402fc5a983dSmrg fi 7403f3561b8bSmrg ;; 7404fc5a983dSmrg esac 7405f3561b8bSmrg AC_MSG_RESULT([$enable_shared]) 7406f3561b8bSmrg 7407f3561b8bSmrg AC_MSG_CHECKING([whether to build static libraries]) 7408f3561b8bSmrg # Make sure either enable_shared or enable_static is yes. 7409f3561b8bSmrg test "$enable_shared" = yes || enable_static=yes 7410f3561b8bSmrg AC_MSG_RESULT([$enable_static]) 7411f3561b8bSmrg 7412f3561b8bSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7413f3561b8bSmrg _LT_TAGVAR(LD, $1)="$LD" 7414f3561b8bSmrg 7415f3561b8bSmrg ## CAVEAT EMPTOR: 7416f3561b8bSmrg ## There is no encapsulation within the following macros, do not change 7417f3561b8bSmrg ## the running order or otherwise move them around unless you know exactly 7418f3561b8bSmrg ## what you are doing... 7419f3561b8bSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 7420f3561b8bSmrg _LT_COMPILER_PIC($1) 7421f3561b8bSmrg _LT_COMPILER_C_O($1) 7422f3561b8bSmrg _LT_COMPILER_FILE_LOCKS($1) 7423f3561b8bSmrg _LT_LINKER_SHLIBS($1) 7424f3561b8bSmrg _LT_SYS_DYNAMIC_LINKER($1) 7425f3561b8bSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7426f3561b8bSmrg 7427f3561b8bSmrg _LT_CONFIG($1) 7428f3561b8bSmrg fi # test -n "$compiler" 7429f3561b8bSmrg 7430f3561b8bSmrg GCC=$lt_save_GCC 7431bd304fc0Smrg CC=$lt_save_CC 7432bd304fc0Smrg CFLAGS=$lt_save_CFLAGS 7433f3561b8bSmrgfi # test "$_lt_disable_FC" != yes 7434fc5a983dSmrg 7435f3561b8bSmrgAC_LANG_POP 7436f3561b8bSmrg])# _LT_LANG_FC_CONFIG 7437fc5a983dSmrg 7438fc5a983dSmrg 7439f3561b8bSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 7440f3561b8bSmrg# -------------------------- 7441f3561b8bSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7442f3561b8bSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7443f3561b8bSmrg# to write the compiler configuration to `libtool'. 7444f3561b8bSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 7445f3561b8bSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7446f3561b8bSmrgAC_LANG_SAVE 7447fc5a983dSmrg 7448f3561b8bSmrg# Source file extension for Java test sources. 7449f3561b8bSmrgac_ext=java 7450fc5a983dSmrg 7451f3561b8bSmrg# Object file extension for compiled Java test sources. 7452f3561b8bSmrgobjext=o 7453f3561b8bSmrg_LT_TAGVAR(objext, $1)=$objext 7454fc5a983dSmrg 7455f3561b8bSmrg# Code to be used in simple compile tests 7456f3561b8bSmrglt_simple_compile_test_code="class foo {}" 7457fc5a983dSmrg 7458f3561b8bSmrg# Code to be used in simple link tests 7459f3561b8bSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7460fc5a983dSmrg 7461f3561b8bSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7462f3561b8bSmrg_LT_TAG_COMPILER 7463fc5a983dSmrg 7464f3561b8bSmrg# save warnings/boilerplate of simple test code 7465f3561b8bSmrg_LT_COMPILER_BOILERPLATE 7466f3561b8bSmrg_LT_LINKER_BOILERPLATE 7467f3561b8bSmrg 7468f3561b8bSmrg# Allow CC to be a program name with arguments. 7469bd304fc0Smrglt_save_CC=$CC 7470bd304fc0Smrglt_save_CFLAGS=$CFLAGS 7471f3561b8bSmrglt_save_GCC=$GCC 7472f3561b8bSmrgGCC=yes 7473f3561b8bSmrgCC=${GCJ-"gcj"} 7474bd304fc0SmrgCFLAGS=$GCJFLAGS 7475f3561b8bSmrgcompiler=$CC 7476f3561b8bSmrg_LT_TAGVAR(compiler, $1)=$CC 7477f3561b8bSmrg_LT_TAGVAR(LD, $1)="$LD" 7478f3561b8bSmrg_LT_CC_BASENAME([$compiler]) 7479f3561b8bSmrg 7480f3561b8bSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7481f3561b8bSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7482f3561b8bSmrg 7483f3561b8bSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7484bd304fc0Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7485bd304fc0Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7486f3561b8bSmrg 7487f3561b8bSmrgif test -n "$compiler"; then 7488f3561b8bSmrg _LT_COMPILER_NO_RTTI($1) 7489f3561b8bSmrg _LT_COMPILER_PIC($1) 7490f3561b8bSmrg _LT_COMPILER_C_O($1) 7491f3561b8bSmrg _LT_COMPILER_FILE_LOCKS($1) 7492f3561b8bSmrg _LT_LINKER_SHLIBS($1) 7493f3561b8bSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7494f3561b8bSmrg 7495f3561b8bSmrg _LT_CONFIG($1) 7496f3561b8bSmrgfi 7497f3561b8bSmrg 7498f3561b8bSmrgAC_LANG_RESTORE 7499f3561b8bSmrg 7500f3561b8bSmrgGCC=$lt_save_GCC 7501bd304fc0SmrgCC=$lt_save_CC 7502bd304fc0SmrgCFLAGS=$lt_save_CFLAGS 7503f3561b8bSmrg])# _LT_LANG_GCJ_CONFIG 7504f3561b8bSmrg 7505f3561b8bSmrg 7506bd304fc0Smrg# _LT_LANG_GO_CONFIG([TAG]) 7507bd304fc0Smrg# -------------------------- 7508bd304fc0Smrg# Ensure that the configuration variables for the GNU Go compiler 7509bd304fc0Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7510bd304fc0Smrg# to write the compiler configuration to `libtool'. 7511bd304fc0Smrgm4_defun([_LT_LANG_GO_CONFIG], 7512bd304fc0Smrg[AC_REQUIRE([LT_PROG_GO])dnl 7513bd304fc0SmrgAC_LANG_SAVE 7514bd304fc0Smrg 7515bd304fc0Smrg# Source file extension for Go test sources. 7516bd304fc0Smrgac_ext=go 7517bd304fc0Smrg 7518bd304fc0Smrg# Object file extension for compiled Go test sources. 7519bd304fc0Smrgobjext=o 7520bd304fc0Smrg_LT_TAGVAR(objext, $1)=$objext 7521bd304fc0Smrg 7522bd304fc0Smrg# Code to be used in simple compile tests 7523bd304fc0Smrglt_simple_compile_test_code="package main; func main() { }" 7524bd304fc0Smrg 7525bd304fc0Smrg# Code to be used in simple link tests 7526bd304fc0Smrglt_simple_link_test_code='package main; func main() { }' 7527bd304fc0Smrg 7528bd304fc0Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7529bd304fc0Smrg_LT_TAG_COMPILER 7530bd304fc0Smrg 7531bd304fc0Smrg# save warnings/boilerplate of simple test code 7532bd304fc0Smrg_LT_COMPILER_BOILERPLATE 7533bd304fc0Smrg_LT_LINKER_BOILERPLATE 7534bd304fc0Smrg 7535bd304fc0Smrg# Allow CC to be a program name with arguments. 7536bd304fc0Smrglt_save_CC=$CC 7537bd304fc0Smrglt_save_CFLAGS=$CFLAGS 7538bd304fc0Smrglt_save_GCC=$GCC 7539bd304fc0SmrgGCC=yes 7540bd304fc0SmrgCC=${GOC-"gccgo"} 7541bd304fc0SmrgCFLAGS=$GOFLAGS 7542bd304fc0Smrgcompiler=$CC 7543bd304fc0Smrg_LT_TAGVAR(compiler, $1)=$CC 7544bd304fc0Smrg_LT_TAGVAR(LD, $1)="$LD" 7545bd304fc0Smrg_LT_CC_BASENAME([$compiler]) 7546bd304fc0Smrg 7547bd304fc0Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 7548bd304fc0Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7549bd304fc0Smrg 7550bd304fc0Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7551bd304fc0Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7552bd304fc0Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7553bd304fc0Smrg 7554bd304fc0Smrgif test -n "$compiler"; then 7555bd304fc0Smrg _LT_COMPILER_NO_RTTI($1) 7556bd304fc0Smrg _LT_COMPILER_PIC($1) 7557bd304fc0Smrg _LT_COMPILER_C_O($1) 7558bd304fc0Smrg _LT_COMPILER_FILE_LOCKS($1) 7559bd304fc0Smrg _LT_LINKER_SHLIBS($1) 7560bd304fc0Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7561bd304fc0Smrg 7562bd304fc0Smrg _LT_CONFIG($1) 7563bd304fc0Smrgfi 7564bd304fc0Smrg 7565bd304fc0SmrgAC_LANG_RESTORE 7566bd304fc0Smrg 7567bd304fc0SmrgGCC=$lt_save_GCC 7568bd304fc0SmrgCC=$lt_save_CC 7569bd304fc0SmrgCFLAGS=$lt_save_CFLAGS 7570bd304fc0Smrg])# _LT_LANG_GO_CONFIG 7571bd304fc0Smrg 7572bd304fc0Smrg 7573f3561b8bSmrg# _LT_LANG_RC_CONFIG([TAG]) 7574f3561b8bSmrg# ------------------------- 7575f3561b8bSmrg# Ensure that the configuration variables for the Windows resource compiler 7576f3561b8bSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7577f3561b8bSmrg# to write the compiler configuration to `libtool'. 7578f3561b8bSmrgm4_defun([_LT_LANG_RC_CONFIG], 7579f3561b8bSmrg[AC_REQUIRE([LT_PROG_RC])dnl 7580f3561b8bSmrgAC_LANG_SAVE 7581f3561b8bSmrg 7582f3561b8bSmrg# Source file extension for RC test sources. 7583f3561b8bSmrgac_ext=rc 7584f3561b8bSmrg 7585f3561b8bSmrg# Object file extension for compiled RC test sources. 7586f3561b8bSmrgobjext=o 7587f3561b8bSmrg_LT_TAGVAR(objext, $1)=$objext 7588f3561b8bSmrg 7589f3561b8bSmrg# Code to be used in simple compile tests 7590f3561b8bSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7591f3561b8bSmrg 7592f3561b8bSmrg# Code to be used in simple link tests 7593f3561b8bSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 7594f3561b8bSmrg 7595f3561b8bSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7596f3561b8bSmrg_LT_TAG_COMPILER 7597f3561b8bSmrg 7598f3561b8bSmrg# save warnings/boilerplate of simple test code 7599f3561b8bSmrg_LT_COMPILER_BOILERPLATE 7600f3561b8bSmrg_LT_LINKER_BOILERPLATE 7601f3561b8bSmrg 7602f3561b8bSmrg# Allow CC to be a program name with arguments. 7603f3561b8bSmrglt_save_CC="$CC" 7604bd304fc0Smrglt_save_CFLAGS=$CFLAGS 7605f3561b8bSmrglt_save_GCC=$GCC 7606f3561b8bSmrgGCC= 7607f3561b8bSmrgCC=${RC-"windres"} 7608bd304fc0SmrgCFLAGS= 7609f3561b8bSmrgcompiler=$CC 7610f3561b8bSmrg_LT_TAGVAR(compiler, $1)=$CC 7611f3561b8bSmrg_LT_CC_BASENAME([$compiler]) 7612f3561b8bSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7613fc5a983dSmrg 7614f3561b8bSmrgif test -n "$compiler"; then 7615f3561b8bSmrg : 7616f3561b8bSmrg _LT_CONFIG($1) 7617f3561b8bSmrgfi 7618fc5a983dSmrg 7619f3561b8bSmrgGCC=$lt_save_GCC 7620f3561b8bSmrgAC_LANG_RESTORE 7621bd304fc0SmrgCC=$lt_save_CC 7622bd304fc0SmrgCFLAGS=$lt_save_CFLAGS 7623f3561b8bSmrg])# _LT_LANG_RC_CONFIG 7624fc5a983dSmrg 7625fc5a983dSmrg 7626f3561b8bSmrg# LT_PROG_GCJ 7627f3561b8bSmrg# ----------- 7628f3561b8bSmrgAC_DEFUN([LT_PROG_GCJ], 7629f3561b8bSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7630f3561b8bSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7631f3561b8bSmrg [AC_CHECK_TOOL(GCJ, gcj,) 7632f3561b8bSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7633f3561b8bSmrg AC_SUBST(GCJFLAGS)])])[]dnl 7634f3561b8bSmrg]) 7635fc5a983dSmrg 7636f3561b8bSmrg# Old name: 7637f3561b8bSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7638f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 7639f3561b8bSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7640fc5a983dSmrg 7641fc5a983dSmrg 7642bd304fc0Smrg# LT_PROG_GO 7643bd304fc0Smrg# ---------- 7644bd304fc0SmrgAC_DEFUN([LT_PROG_GO], 7645bd304fc0Smrg[AC_CHECK_TOOL(GOC, gccgo,) 7646bd304fc0Smrg]) 7647bd304fc0Smrg 7648bd304fc0Smrg 7649f3561b8bSmrg# LT_PROG_RC 7650f3561b8bSmrg# ---------- 7651f3561b8bSmrgAC_DEFUN([LT_PROG_RC], 7652f3561b8bSmrg[AC_CHECK_TOOL(RC, windres,) 7653f3561b8bSmrg]) 7654fc5a983dSmrg 7655f3561b8bSmrg# Old name: 7656f3561b8bSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7657f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 7658f3561b8bSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 7659fc5a983dSmrg 7660fc5a983dSmrg 7661f3561b8bSmrg# _LT_DECL_EGREP 7662f3561b8bSmrg# -------------- 7663f3561b8bSmrg# If we don't have a new enough Autoconf to choose the best grep 7664f3561b8bSmrg# available, choose the one first in the user's PATH. 7665f3561b8bSmrgm4_defun([_LT_DECL_EGREP], 7666f3561b8bSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7667f3561b8bSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7668f3561b8bSmrgtest -z "$GREP" && GREP=grep 7669f3561b8bSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7670f3561b8bSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7671f3561b8bSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7672f3561b8bSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7673f3561b8bSmrgAC_SUBST([GREP]) 7674f3561b8bSmrg]) 7675fc5a983dSmrg 7676fc5a983dSmrg 7677f3561b8bSmrg# _LT_DECL_OBJDUMP 7678f3561b8bSmrg# -------------- 7679f3561b8bSmrg# If we don't have a new enough Autoconf to choose the best objdump 7680f3561b8bSmrg# available, choose the one first in the user's PATH. 7681f3561b8bSmrgm4_defun([_LT_DECL_OBJDUMP], 7682f3561b8bSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7683f3561b8bSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7684f3561b8bSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7685f3561b8bSmrgAC_SUBST([OBJDUMP]) 7686f3561b8bSmrg]) 7687fc5a983dSmrg 7688bd304fc0Smrg# _LT_DECL_DLLTOOL 7689bd304fc0Smrg# ---------------- 7690bd304fc0Smrg# Ensure DLLTOOL variable is set. 7691bd304fc0Smrgm4_defun([_LT_DECL_DLLTOOL], 7692bd304fc0Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7693bd304fc0Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7694bd304fc0Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7695bd304fc0SmrgAC_SUBST([DLLTOOL]) 7696bd304fc0Smrg]) 7697fc5a983dSmrg 7698f3561b8bSmrg# _LT_DECL_SED 7699f3561b8bSmrg# ------------ 7700f3561b8bSmrg# Check for a fully-functional sed program, that truncates 7701f3561b8bSmrg# as few characters as possible. Prefer GNU sed if found. 7702f3561b8bSmrgm4_defun([_LT_DECL_SED], 7703f3561b8bSmrg[AC_PROG_SED 7704f3561b8bSmrgtest -z "$SED" && SED=sed 7705f3561b8bSmrgXsed="$SED -e 1s/^X//" 7706f3561b8bSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7707f3561b8bSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7708f3561b8bSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7709f3561b8bSmrg])# _LT_DECL_SED 7710fc5a983dSmrg 7711f3561b8bSmrgm4_ifndef([AC_PROG_SED], [ 7712f3561b8bSmrg# NOTE: This macro has been submitted for inclusion into # 7713f3561b8bSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7714f3561b8bSmrg# a released version of Autoconf we should remove this # 7715f3561b8bSmrg# macro and use it instead. # 7716fc5a983dSmrg 7717f3561b8bSmrgm4_defun([AC_PROG_SED], 7718f3561b8bSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7719f3561b8bSmrgAC_CACHE_VAL(lt_cv_path_SED, 7720f3561b8bSmrg[# Loop through the user's path and test for sed and gsed. 7721f3561b8bSmrg# Then use that list of sed's as ones to test for truncation. 7722f3561b8bSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7723f3561b8bSmrgfor as_dir in $PATH 7724f3561b8bSmrgdo 7725f3561b8bSmrg IFS=$as_save_IFS 7726f3561b8bSmrg test -z "$as_dir" && as_dir=. 7727f3561b8bSmrg for lt_ac_prog in sed gsed; do 7728f3561b8bSmrg for ac_exec_ext in '' $ac_executable_extensions; do 7729f3561b8bSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7730f3561b8bSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7731f3561b8bSmrg fi 7732f3561b8bSmrg done 7733f3561b8bSmrg done 7734f3561b8bSmrgdone 7735f3561b8bSmrgIFS=$as_save_IFS 7736f3561b8bSmrglt_ac_max=0 7737f3561b8bSmrglt_ac_count=0 7738f3561b8bSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7739f3561b8bSmrg# along with /bin/sed that truncates output. 7740f3561b8bSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7741f3561b8bSmrg test ! -f $lt_ac_sed && continue 7742f3561b8bSmrg cat /dev/null > conftest.in 7743f3561b8bSmrg lt_ac_count=0 7744f3561b8bSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7745f3561b8bSmrg # Check for GNU sed and select it if it is found. 7746f3561b8bSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7747f3561b8bSmrg lt_cv_path_SED=$lt_ac_sed 7748f3561b8bSmrg break 7749fc5a983dSmrg fi 7750f3561b8bSmrg while true; do 7751f3561b8bSmrg cat conftest.in conftest.in >conftest.tmp 7752f3561b8bSmrg mv conftest.tmp conftest.in 7753f3561b8bSmrg cp conftest.in conftest.nl 7754f3561b8bSmrg echo >>conftest.nl 7755f3561b8bSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7756f3561b8bSmrg cmp -s conftest.out conftest.nl || break 7757f3561b8bSmrg # 10000 chars as input seems more than enough 7758f3561b8bSmrg test $lt_ac_count -gt 10 && break 7759f3561b8bSmrg lt_ac_count=`expr $lt_ac_count + 1` 7760f3561b8bSmrg if test $lt_ac_count -gt $lt_ac_max; then 7761f3561b8bSmrg lt_ac_max=$lt_ac_count 7762f3561b8bSmrg lt_cv_path_SED=$lt_ac_sed 7763f3561b8bSmrg fi 7764f3561b8bSmrg done 7765f3561b8bSmrgdone 7766fc5a983dSmrg]) 7767f3561b8bSmrgSED=$lt_cv_path_SED 7768f3561b8bSmrgAC_SUBST([SED]) 7769f3561b8bSmrgAC_MSG_RESULT([$SED]) 7770f3561b8bSmrg])#AC_PROG_SED 7771f3561b8bSmrg])#m4_ifndef 7772fc5a983dSmrg 7773f3561b8bSmrg# Old name: 7774f3561b8bSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7775f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 7776f3561b8bSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7777f3561b8bSmrg 7778f3561b8bSmrg 7779f3561b8bSmrg# _LT_CHECK_SHELL_FEATURES 7780f3561b8bSmrg# ------------------------ 7781f3561b8bSmrg# Find out whether the shell is Bourne or XSI compatible, 7782f3561b8bSmrg# or has some other useful features. 7783f3561b8bSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7784f3561b8bSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7785f3561b8bSmrg# Try some XSI features 7786f3561b8bSmrgxsi_shell=no 7787f3561b8bSmrg( _lt_dummy="a/b/c" 7788bd304fc0Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7789bd304fc0Smrg = c,a/b,b/c, \ 7790f3561b8bSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7791f3561b8bSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7792f3561b8bSmrg && xsi_shell=yes 7793f3561b8bSmrgAC_MSG_RESULT([$xsi_shell]) 7794f3561b8bSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7795f3561b8bSmrg 7796f3561b8bSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7797f3561b8bSmrglt_shell_append=no 7798f3561b8bSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7799f3561b8bSmrg >/dev/null 2>&1 \ 7800f3561b8bSmrg && lt_shell_append=yes 7801f3561b8bSmrgAC_MSG_RESULT([$lt_shell_append]) 7802f3561b8bSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7803f3561b8bSmrg 7804f3561b8bSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7805f3561b8bSmrg lt_unset=unset 7806f3561b8bSmrgelse 7807f3561b8bSmrg lt_unset=false 7808fc5a983dSmrgfi 7809f3561b8bSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7810f3561b8bSmrg 7811f3561b8bSmrg# test EBCDIC or ASCII 7812f3561b8bSmrgcase `echo X|tr X '\101'` in 7813f3561b8bSmrg A) # ASCII based system 7814f3561b8bSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7815f3561b8bSmrg lt_SP2NL='tr \040 \012' 7816f3561b8bSmrg lt_NL2SP='tr \015\012 \040\040' 7817f3561b8bSmrg ;; 7818f3561b8bSmrg *) # EBCDIC based system 7819f3561b8bSmrg lt_SP2NL='tr \100 \n' 7820f3561b8bSmrg lt_NL2SP='tr \r\n \100\100' 7821f3561b8bSmrg ;; 7822bd304fc0Smrgesac 7823bd304fc0Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7824bd304fc0Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7825bd304fc0Smrg])# _LT_CHECK_SHELL_FEATURES 7826f3561b8bSmrg 7827f3561b8bSmrg 7828bd304fc0Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7829bd304fc0Smrg# ------------------------------------------------------ 7830bd304fc0Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7831bd304fc0Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7832bd304fc0Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 7833bd304fc0Smrg[dnl { 7834bd304fc0Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 7835bd304fc0Smrg$1 ()\ 7836bd304fc0Smrg{\ 7837bd304fc0Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7838bd304fc0Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7839bd304fc0Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7840bd304fc0Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7841bd304fc0Smrgtest 0 -eq $? || _lt_function_replace_fail=: 7842bd304fc0Smrg]) 7843f3561b8bSmrg 7844f3561b8bSmrg 7845bd304fc0Smrg# _LT_PROG_REPLACE_SHELLFNS 7846bd304fc0Smrg# ------------------------- 7847bd304fc0Smrg# Replace existing portable implementations of several shell functions with 7848bd304fc0Smrg# equivalent extended shell implementations where those features are available.. 7849bd304fc0Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7850bd304fc0Smrg[if test x"$xsi_shell" = xyes; then 7851bd304fc0Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7852bd304fc0Smrg case ${1} in 7853bd304fc0Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7854bd304fc0Smrg * ) func_dirname_result="${3}" ;; 7855bd304fc0Smrg esac]) 7856bd304fc0Smrg 7857bd304fc0Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7858bd304fc0Smrg func_basename_result="${1##*/}"]) 7859bd304fc0Smrg 7860bd304fc0Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7861bd304fc0Smrg case ${1} in 7862bd304fc0Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7863bd304fc0Smrg * ) func_dirname_result="${3}" ;; 7864bd304fc0Smrg esac 7865bd304fc0Smrg func_basename_result="${1##*/}"]) 7866f3561b8bSmrg 7867bd304fc0Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7868bd304fc0Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7869bd304fc0Smrg # positional parameters, so assign one to ordinary parameter first. 7870bd304fc0Smrg func_stripname_result=${3} 7871bd304fc0Smrg func_stripname_result=${func_stripname_result#"${1}"} 7872bd304fc0Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 7873f3561b8bSmrg 7874bd304fc0Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7875bd304fc0Smrg func_split_long_opt_name=${1%%=*} 7876bd304fc0Smrg func_split_long_opt_arg=${1#*=}]) 7877f3561b8bSmrg 7878bd304fc0Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7879bd304fc0Smrg func_split_short_opt_arg=${1#??} 7880bd304fc0Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 7881fc5a983dSmrg 7882bd304fc0Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7883bd304fc0Smrg case ${1} in 7884bd304fc0Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7885bd304fc0Smrg *) func_lo2o_result=${1} ;; 7886bd304fc0Smrg esac]) 7887fc5a983dSmrg 7888bd304fc0Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 7889fc5a983dSmrg 7890bd304fc0Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7891fc5a983dSmrg 7892bd304fc0Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7893bd304fc0Smrgfi 7894fc5a983dSmrg 7895bd304fc0Smrgif test x"$lt_shell_append" = xyes; then 7896bd304fc0Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7897fc5a983dSmrg 7898bd304fc0Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7899bd304fc0Smrg func_quote_for_eval "${2}" 7900bd304fc0Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7901bd304fc0Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 7902fc5a983dSmrg 7903bd304fc0Smrg # Save a `func_append' function call where possible by direct use of '+=' 7904bd304fc0Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7905bd304fc0Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7906bd304fc0Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7907bd304fc0Smrg test 0 -eq $? || _lt_function_replace_fail=: 7908bd304fc0Smrgelse 7909bd304fc0Smrg # Save a `func_append' function call even when '+=' is not available 7910bd304fc0Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7911bd304fc0Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7912bd304fc0Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7913bd304fc0Smrg test 0 -eq $? || _lt_function_replace_fail=: 7914bd304fc0Smrgfi 7915fc5a983dSmrg 7916bd304fc0Smrgif test x"$_lt_function_replace_fail" = x":"; then 7917bd304fc0Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7918bd304fc0Smrgfi 7919bd304fc0Smrg]) 7920fc5a983dSmrg 7921bd304fc0Smrg# _LT_PATH_CONVERSION_FUNCTIONS 7922bd304fc0Smrg# ----------------------------- 7923bd304fc0Smrg# Determine which file name conversion functions should be used by 7924bd304fc0Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7925bd304fc0Smrg# for certain cross-compile configurations and native mingw. 7926bd304fc0Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7927bd304fc0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7928bd304fc0SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7929bd304fc0SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 7930bd304fc0SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7931bd304fc0Smrg[case $host in 7932bd304fc0Smrg *-*-mingw* ) 7933bd304fc0Smrg case $build in 7934bd304fc0Smrg *-*-mingw* ) # actually msys 7935bd304fc0Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7936bd304fc0Smrg ;; 7937bd304fc0Smrg *-*-cygwin* ) 7938bd304fc0Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7939bd304fc0Smrg ;; 7940bd304fc0Smrg * ) # otherwise, assume *nix 7941bd304fc0Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7942bd304fc0Smrg ;; 7943bd304fc0Smrg esac 7944f3561b8bSmrg ;; 7945bd304fc0Smrg *-*-cygwin* ) 7946bd304fc0Smrg case $build in 7947bd304fc0Smrg *-*-mingw* ) # actually msys 7948bd304fc0Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7949bd304fc0Smrg ;; 7950bd304fc0Smrg *-*-cygwin* ) 7951bd304fc0Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7952bd304fc0Smrg ;; 7953bd304fc0Smrg * ) # otherwise, assume *nix 7954bd304fc0Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7955bd304fc0Smrg ;; 7956bd304fc0Smrg esac 7957f3561b8bSmrg ;; 7958bd304fc0Smrg * ) # unhandled hosts (and "normal" native builds) 7959bd304fc0Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7960bd304fc0Smrg ;; 7961bd304fc0Smrgesac 7962bd304fc0Smrg]) 7963bd304fc0Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 7964bd304fc0SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7965bd304fc0Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7966bd304fc0Smrg [0], [convert $build file names to $host format])dnl 7967bd304fc0Smrg 7968bd304fc0SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7969bd304fc0SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7970bd304fc0Smrg[#assume ordinary cross tools, or native build. 7971bd304fc0Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 7972bd304fc0Smrgcase $host in 7973bd304fc0Smrg *-*-mingw* ) 7974bd304fc0Smrg case $build in 7975bd304fc0Smrg *-*-mingw* ) # actually msys 7976bd304fc0Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7977bd304fc0Smrg ;; 7978bd304fc0Smrg esac 7979bd304fc0Smrg ;; 7980bd304fc0Smrgesac 7981f3561b8bSmrg]) 7982bd304fc0Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7983bd304fc0SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7984bd304fc0Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7985bd304fc0Smrg [0], [convert $build files to toolchain format])dnl 7986bd304fc0Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 7987fc5a983dSmrg 7988f3561b8bSmrg# Helper functions for option handling. -*- Autoconf -*- 7989f3561b8bSmrg# 7990bd304fc0Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 7991bd304fc0Smrg# Inc. 7992f3561b8bSmrg# Written by Gary V. Vaughan, 2004 7993f3561b8bSmrg# 7994f3561b8bSmrg# This file is free software; the Free Software Foundation gives 7995f3561b8bSmrg# unlimited permission to copy and/or distribute it, with or without 7996f3561b8bSmrg# modifications, as long as this notice is preserved. 7997fc5a983dSmrg 7998bd304fc0Smrg# serial 7 ltoptions.m4 7999fc5a983dSmrg 8000f3561b8bSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8001f3561b8bSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8002fc5a983dSmrg 8003fc5a983dSmrg 8004f3561b8bSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8005f3561b8bSmrg# ------------------------------------------ 8006f3561b8bSmrgm4_define([_LT_MANGLE_OPTION], 8007f3561b8bSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8008fc5a983dSmrg 8009fc5a983dSmrg 8010f3561b8bSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8011f3561b8bSmrg# --------------------------------------- 8012f3561b8bSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8013f3561b8bSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8014f3561b8bSmrg# saved as a flag. 8015f3561b8bSmrgm4_define([_LT_SET_OPTION], 8016f3561b8bSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8017f3561b8bSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8018f3561b8bSmrg _LT_MANGLE_DEFUN([$1], [$2]), 8019f3561b8bSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 8020f3561b8bSmrg]) 8021fc5a983dSmrg 8022fc5a983dSmrg 8023f3561b8bSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8024f3561b8bSmrg# ------------------------------------------------------------ 8025f3561b8bSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8026f3561b8bSmrgm4_define([_LT_IF_OPTION], 8027f3561b8bSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8028f3561b8bSmrg 8029f3561b8bSmrg 8030f3561b8bSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8031f3561b8bSmrg# ------------------------------------------------------- 8032f3561b8bSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8033f3561b8bSmrg# are set. 8034f3561b8bSmrgm4_define([_LT_UNLESS_OPTIONS], 8035f3561b8bSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8036f3561b8bSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8037f3561b8bSmrg [m4_define([$0_found])])])[]dnl 8038f3561b8bSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8039f3561b8bSmrg])[]dnl 8040f3561b8bSmrg]) 8041fc5a983dSmrg 8042fc5a983dSmrg 8043f3561b8bSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8044f3561b8bSmrg# ---------------------------------------- 8045f3561b8bSmrg# OPTION-LIST is a space-separated list of Libtool options associated 8046f3561b8bSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 8047f3561b8bSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8048f3561b8bSmrg# the unknown option and exit. 8049f3561b8bSmrgm4_defun([_LT_SET_OPTIONS], 8050f3561b8bSmrg[# Set options 8051f3561b8bSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8052f3561b8bSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 8053f3561b8bSmrg 8054f3561b8bSmrgm4_if([$1],[LT_INIT],[ 8055f3561b8bSmrg dnl 8056f3561b8bSmrg dnl Simply set some default values (i.e off) if boolean options were not 8057f3561b8bSmrg dnl specified: 8058f3561b8bSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8059f3561b8bSmrg ]) 8060f3561b8bSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8061f3561b8bSmrg ]) 8062f3561b8bSmrg dnl 8063f3561b8bSmrg dnl If no reference was made to various pairs of opposing options, then 8064f3561b8bSmrg dnl we run the default mode handler for the pair. For example, if neither 8065f3561b8bSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 8066f3561b8bSmrg dnl archives by default: 8067f3561b8bSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8068f3561b8bSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8069f3561b8bSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8070f3561b8bSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8071f3561b8bSmrg [_LT_ENABLE_FAST_INSTALL]) 8072f3561b8bSmrg ]) 8073f3561b8bSmrg])# _LT_SET_OPTIONS 8074fc5a983dSmrg 8075fc5a983dSmrg 8076fc5a983dSmrg 8077f3561b8bSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8078f3561b8bSmrg# ----------------------------------------- 8079f3561b8bSmrgm4_define([_LT_MANGLE_DEFUN], 8080f3561b8bSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8081fc5a983dSmrg 8082fc5a983dSmrg 8083f3561b8bSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8084f3561b8bSmrg# ----------------------------------------------- 8085f3561b8bSmrgm4_define([LT_OPTION_DEFINE], 8086f3561b8bSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8087f3561b8bSmrg])# LT_OPTION_DEFINE 8088fc5a983dSmrg 8089fc5a983dSmrg 8090f3561b8bSmrg# dlopen 8091f3561b8bSmrg# ------ 8092f3561b8bSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8093f3561b8bSmrg]) 8094f3561b8bSmrg 8095f3561b8bSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 8096f3561b8bSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 8097f3561b8bSmrgAC_DIAGNOSE([obsolete], 8098f3561b8bSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8099f3561b8bSmrgput the `dlopen' option into LT_INIT's first parameter.]) 8100f3561b8bSmrg]) 8101f3561b8bSmrg 8102f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 8103f3561b8bSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8104f3561b8bSmrg 8105f3561b8bSmrg 8106f3561b8bSmrg# win32-dll 8107f3561b8bSmrg# --------- 8108f3561b8bSmrg# Declare package support for building win32 dll's. 8109f3561b8bSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8110f3561b8bSmrg[enable_win32_dll=yes 8111f3561b8bSmrg 8112f3561b8bSmrgcase $host in 8113bd304fc0Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8114f3561b8bSmrg AC_CHECK_TOOL(AS, as, false) 8115f3561b8bSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8116f3561b8bSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 8117f3561b8bSmrg ;; 8118f3561b8bSmrgesac 8119fc5a983dSmrg 8120f3561b8bSmrgtest -z "$AS" && AS=as 8121bd304fc0Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8122fc5a983dSmrg 8123f3561b8bSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8124bd304fc0Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8125fc5a983dSmrg 8126f3561b8bSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8127bd304fc0Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8128f3561b8bSmrg])# win32-dll 8129fc5a983dSmrg 8130f3561b8bSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8131f3561b8bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8132f3561b8bSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 8133f3561b8bSmrgAC_DIAGNOSE([obsolete], 8134f3561b8bSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8135f3561b8bSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 8136f3561b8bSmrg]) 8137fc5a983dSmrg 8138f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 8139f3561b8bSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8140fc5a983dSmrg 8141fc5a983dSmrg 8142f3561b8bSmrg# _LT_ENABLE_SHARED([DEFAULT]) 8143f3561b8bSmrg# ---------------------------- 8144f3561b8bSmrg# implement the --enable-shared flag, and supports the `shared' and 8145f3561b8bSmrg# `disable-shared' LT_INIT options. 8146f3561b8bSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8147f3561b8bSmrgm4_define([_LT_ENABLE_SHARED], 8148f3561b8bSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8149f3561b8bSmrgAC_ARG_ENABLE([shared], 8150f3561b8bSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8151f3561b8bSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8152f3561b8bSmrg [p=${PACKAGE-default} 8153f3561b8bSmrg case $enableval in 8154f3561b8bSmrg yes) enable_shared=yes ;; 8155f3561b8bSmrg no) enable_shared=no ;; 8156f3561b8bSmrg *) 8157f3561b8bSmrg enable_shared=no 8158f3561b8bSmrg # Look at the argument we got. We use all the common list separators. 8159f3561b8bSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8160f3561b8bSmrg for pkg in $enableval; do 8161f3561b8bSmrg IFS="$lt_save_ifs" 8162f3561b8bSmrg if test "X$pkg" = "X$p"; then 8163f3561b8bSmrg enable_shared=yes 8164f3561b8bSmrg fi 8165f3561b8bSmrg done 8166f3561b8bSmrg IFS="$lt_save_ifs" 8167fc5a983dSmrg ;; 8168f3561b8bSmrg esac], 8169f3561b8bSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8170fc5a983dSmrg 8171f3561b8bSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8172f3561b8bSmrg [Whether or not to build shared libraries]) 8173f3561b8bSmrg])# _LT_ENABLE_SHARED 8174fc5a983dSmrg 8175f3561b8bSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8176f3561b8bSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8177fc5a983dSmrg 8178f3561b8bSmrg# Old names: 8179f3561b8bSmrgAC_DEFUN([AC_ENABLE_SHARED], 8180f3561b8bSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8181f3561b8bSmrg]) 8182fc5a983dSmrg 8183f3561b8bSmrgAC_DEFUN([AC_DISABLE_SHARED], 8184f3561b8bSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8185f3561b8bSmrg]) 8186fc5a983dSmrg 8187f3561b8bSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8188f3561b8bSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8189fc5a983dSmrg 8190f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 8191f3561b8bSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8192f3561b8bSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8193fc5a983dSmrg 8194fc5a983dSmrg 8195fc5a983dSmrg 8196f3561b8bSmrg# _LT_ENABLE_STATIC([DEFAULT]) 8197f3561b8bSmrg# ---------------------------- 8198f3561b8bSmrg# implement the --enable-static flag, and support the `static' and 8199f3561b8bSmrg# `disable-static' LT_INIT options. 8200f3561b8bSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8201f3561b8bSmrgm4_define([_LT_ENABLE_STATIC], 8202f3561b8bSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8203f3561b8bSmrgAC_ARG_ENABLE([static], 8204f3561b8bSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8205f3561b8bSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8206f3561b8bSmrg [p=${PACKAGE-default} 8207f3561b8bSmrg case $enableval in 8208f3561b8bSmrg yes) enable_static=yes ;; 8209f3561b8bSmrg no) enable_static=no ;; 8210f3561b8bSmrg *) 8211f3561b8bSmrg enable_static=no 8212f3561b8bSmrg # Look at the argument we got. We use all the common list separators. 8213f3561b8bSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8214f3561b8bSmrg for pkg in $enableval; do 8215f3561b8bSmrg IFS="$lt_save_ifs" 8216f3561b8bSmrg if test "X$pkg" = "X$p"; then 8217f3561b8bSmrg enable_static=yes 8218f3561b8bSmrg fi 8219f3561b8bSmrg done 8220f3561b8bSmrg IFS="$lt_save_ifs" 8221fc5a983dSmrg ;; 8222f3561b8bSmrg esac], 8223f3561b8bSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8224fc5a983dSmrg 8225f3561b8bSmrg _LT_DECL([build_old_libs], [enable_static], [0], 8226f3561b8bSmrg [Whether or not to build static libraries]) 8227f3561b8bSmrg])# _LT_ENABLE_STATIC 8228fc5a983dSmrg 8229f3561b8bSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8230f3561b8bSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8231fc5a983dSmrg 8232f3561b8bSmrg# Old names: 8233f3561b8bSmrgAC_DEFUN([AC_ENABLE_STATIC], 8234f3561b8bSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8235f3561b8bSmrg]) 8236fc5a983dSmrg 8237f3561b8bSmrgAC_DEFUN([AC_DISABLE_STATIC], 8238f3561b8bSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8239f3561b8bSmrg]) 8240fc5a983dSmrg 8241f3561b8bSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8242f3561b8bSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8243fc5a983dSmrg 8244f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 8245f3561b8bSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8246f3561b8bSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8247fc5a983dSmrg 8248fc5a983dSmrg 8249fc5a983dSmrg 8250f3561b8bSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8251f3561b8bSmrg# ---------------------------------- 8252f3561b8bSmrg# implement the --enable-fast-install flag, and support the `fast-install' 8253f3561b8bSmrg# and `disable-fast-install' LT_INIT options. 8254f3561b8bSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8255f3561b8bSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 8256f3561b8bSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8257f3561b8bSmrgAC_ARG_ENABLE([fast-install], 8258f3561b8bSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8259f3561b8bSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8260f3561b8bSmrg [p=${PACKAGE-default} 8261f3561b8bSmrg case $enableval in 8262f3561b8bSmrg yes) enable_fast_install=yes ;; 8263f3561b8bSmrg no) enable_fast_install=no ;; 8264f3561b8bSmrg *) 8265f3561b8bSmrg enable_fast_install=no 8266f3561b8bSmrg # Look at the argument we got. We use all the common list separators. 8267f3561b8bSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8268f3561b8bSmrg for pkg in $enableval; do 8269f3561b8bSmrg IFS="$lt_save_ifs" 8270f3561b8bSmrg if test "X$pkg" = "X$p"; then 8271f3561b8bSmrg enable_fast_install=yes 8272fc5a983dSmrg fi 8273f3561b8bSmrg done 8274f3561b8bSmrg IFS="$lt_save_ifs" 8275fc5a983dSmrg ;; 8276f3561b8bSmrg esac], 8277f3561b8bSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8278fc5a983dSmrg 8279f3561b8bSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 8280f3561b8bSmrg [Whether or not to optimize for fast installation])dnl 8281f3561b8bSmrg])# _LT_ENABLE_FAST_INSTALL 8282fc5a983dSmrg 8283f3561b8bSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8284f3561b8bSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8285fc5a983dSmrg 8286f3561b8bSmrg# Old names: 8287f3561b8bSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8288f3561b8bSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8289f3561b8bSmrgAC_DIAGNOSE([obsolete], 8290f3561b8bSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8291f3561b8bSmrgthe `fast-install' option into LT_INIT's first parameter.]) 8292f3561b8bSmrg]) 8293fc5a983dSmrg 8294f3561b8bSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8295f3561b8bSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8296f3561b8bSmrgAC_DIAGNOSE([obsolete], 8297f3561b8bSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8298f3561b8bSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 8299f3561b8bSmrg]) 8300fc5a983dSmrg 8301f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 8302f3561b8bSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8303f3561b8bSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8304fc5a983dSmrg 8305fc5a983dSmrg 8306f3561b8bSmrg# _LT_WITH_PIC([MODE]) 8307f3561b8bSmrg# -------------------- 8308f3561b8bSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 8309f3561b8bSmrg# LT_INIT options. 8310f3561b8bSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 8311f3561b8bSmrgm4_define([_LT_WITH_PIC], 8312f3561b8bSmrg[AC_ARG_WITH([pic], 8313bd304fc0Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8314f3561b8bSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8315bd304fc0Smrg [lt_p=${PACKAGE-default} 8316bd304fc0Smrg case $withval in 8317bd304fc0Smrg yes|no) pic_mode=$withval ;; 8318bd304fc0Smrg *) 8319bd304fc0Smrg pic_mode=default 8320bd304fc0Smrg # Look at the argument we got. We use all the common list separators. 8321bd304fc0Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8322bd304fc0Smrg for lt_pkg in $withval; do 8323bd304fc0Smrg IFS="$lt_save_ifs" 8324bd304fc0Smrg if test "X$lt_pkg" = "X$lt_p"; then 8325bd304fc0Smrg pic_mode=yes 8326bd304fc0Smrg fi 8327bd304fc0Smrg done 8328bd304fc0Smrg IFS="$lt_save_ifs" 8329bd304fc0Smrg ;; 8330bd304fc0Smrg esac], 8331f3561b8bSmrg [pic_mode=default]) 8332fc5a983dSmrg 8333f3561b8bSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 8334fc5a983dSmrg 8335f3561b8bSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8336f3561b8bSmrg])# _LT_WITH_PIC 8337fc5a983dSmrg 8338f3561b8bSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8339f3561b8bSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8340f3561b8bSmrg 8341f3561b8bSmrg# Old name: 8342f3561b8bSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8343f3561b8bSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8344f3561b8bSmrgAC_DIAGNOSE([obsolete], 8345f3561b8bSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8346f3561b8bSmrgput the `pic-only' option into LT_INIT's first parameter.]) 8347fc5a983dSmrg]) 8348fc5a983dSmrg 8349f3561b8bSmrgdnl aclocal-1.4 backwards compatibility: 8350f3561b8bSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8351fc5a983dSmrg 8352fc5a983dSmrg 8353f3561b8bSmrgm4_define([_LTDL_MODE], []) 8354f3561b8bSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8355f3561b8bSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8356f3561b8bSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8357f3561b8bSmrg [m4_define([_LTDL_MODE], [recursive])]) 8358f3561b8bSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8359f3561b8bSmrg [m4_define([_LTDL_MODE], [subproject])]) 8360fc5a983dSmrg 8361f3561b8bSmrgm4_define([_LTDL_TYPE], []) 8362f3561b8bSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8363f3561b8bSmrg [m4_define([_LTDL_TYPE], [installable])]) 8364f3561b8bSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8365f3561b8bSmrg [m4_define([_LTDL_TYPE], [convenience])]) 8366fc5a983dSmrg 8367f3561b8bSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8368fc5a983dSmrg# 8369f3561b8bSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 8370f3561b8bSmrg# Written by Gary V. Vaughan, 2004 8371fc5a983dSmrg# 8372f3561b8bSmrg# This file is free software; the Free Software Foundation gives 8373f3561b8bSmrg# unlimited permission to copy and/or distribute it, with or without 8374f3561b8bSmrg# modifications, as long as this notice is preserved. 8375f3561b8bSmrg 8376f3561b8bSmrg# serial 6 ltsugar.m4 8377f3561b8bSmrg 8378f3561b8bSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8379f3561b8bSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8380f3561b8bSmrg 8381f3561b8bSmrg 8382f3561b8bSmrg# lt_join(SEP, ARG1, [ARG2...]) 8383f3561b8bSmrg# ----------------------------- 8384f3561b8bSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8385f3561b8bSmrg# associated separator. 8386f3561b8bSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8387f3561b8bSmrg# versions in m4sugar had bugs. 8388f3561b8bSmrgm4_define([lt_join], 8389f3561b8bSmrg[m4_if([$#], [1], [], 8390f3561b8bSmrg [$#], [2], [[$2]], 8391f3561b8bSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8392f3561b8bSmrgm4_define([_lt_join], 8393f3561b8bSmrg[m4_if([$#$2], [2], [], 8394f3561b8bSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8395f3561b8bSmrg 8396f3561b8bSmrg 8397f3561b8bSmrg# lt_car(LIST) 8398f3561b8bSmrg# lt_cdr(LIST) 8399f3561b8bSmrg# ------------ 8400f3561b8bSmrg# Manipulate m4 lists. 8401f3561b8bSmrg# These macros are necessary as long as will still need to support 8402f3561b8bSmrg# Autoconf-2.59 which quotes differently. 8403f3561b8bSmrgm4_define([lt_car], [[$1]]) 8404f3561b8bSmrgm4_define([lt_cdr], 8405f3561b8bSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8406f3561b8bSmrg [$#], 1, [], 8407f3561b8bSmrg [m4_dquote(m4_shift($@))])]) 8408f3561b8bSmrgm4_define([lt_unquote], $1) 8409f3561b8bSmrg 8410f3561b8bSmrg 8411f3561b8bSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8412f3561b8bSmrg# ------------------------------------------ 8413f3561b8bSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 8414f3561b8bSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8415f3561b8bSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8416f3561b8bSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8417f3561b8bSmrg# than defined and empty). 8418fc5a983dSmrg# 8419f3561b8bSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8420f3561b8bSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8421f3561b8bSmrgm4_define([lt_append], 8422f3561b8bSmrg[m4_define([$1], 8423f3561b8bSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8424f3561b8bSmrg 8425f3561b8bSmrg 8426f3561b8bSmrg 8427f3561b8bSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8428f3561b8bSmrg# ---------------------------------------------------------- 8429f3561b8bSmrg# Produce a SEP delimited list of all paired combinations of elements of 8430f3561b8bSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8431f3561b8bSmrg# has the form PREFIXmINFIXSUFFIXn. 8432f3561b8bSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8433f3561b8bSmrgm4_define([lt_combine], 8434f3561b8bSmrg[m4_if(m4_eval([$# > 3]), [1], 8435f3561b8bSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8436f3561b8bSmrg[[m4_foreach([_Lt_prefix], [$2], 8437f3561b8bSmrg [m4_foreach([_Lt_suffix], 8438f3561b8bSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8439f3561b8bSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8440f3561b8bSmrg 8441f3561b8bSmrg 8442f3561b8bSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8443f3561b8bSmrg# ----------------------------------------------------------------------- 8444f3561b8bSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8445f3561b8bSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8446f3561b8bSmrgm4_define([lt_if_append_uniq], 8447f3561b8bSmrg[m4_ifdef([$1], 8448f3561b8bSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8449f3561b8bSmrg [lt_append([$1], [$2], [$3])$4], 8450f3561b8bSmrg [$5])], 8451f3561b8bSmrg [lt_append([$1], [$2], [$3])$4])]) 8452f3561b8bSmrg 8453f3561b8bSmrg 8454f3561b8bSmrg# lt_dict_add(DICT, KEY, VALUE) 8455f3561b8bSmrg# ----------------------------- 8456f3561b8bSmrgm4_define([lt_dict_add], 8457f3561b8bSmrg[m4_define([$1($2)], [$3])]) 8458fc5a983dSmrg 8459fc5a983dSmrg 8460f3561b8bSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8461f3561b8bSmrg# -------------------------------------------- 8462f3561b8bSmrgm4_define([lt_dict_add_subkey], 8463f3561b8bSmrg[m4_define([$1($2:$3)], [$4])]) 8464fc5a983dSmrg 8465fc5a983dSmrg 8466f3561b8bSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8467f3561b8bSmrg# ---------------------------------- 8468f3561b8bSmrgm4_define([lt_dict_fetch], 8469f3561b8bSmrg[m4_ifval([$3], 8470f3561b8bSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8471f3561b8bSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8472fc5a983dSmrg 8473fc5a983dSmrg 8474f3561b8bSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8475f3561b8bSmrg# ----------------------------------------------------------------- 8476f3561b8bSmrgm4_define([lt_if_dict_fetch], 8477f3561b8bSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8478f3561b8bSmrg [$5], 8479f3561b8bSmrg [$6])]) 8480fc5a983dSmrg 8481f3561b8bSmrg 8482f3561b8bSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8483f3561b8bSmrg# -------------------------------------------------------------- 8484f3561b8bSmrgm4_define([lt_dict_filter], 8485f3561b8bSmrg[m4_if([$5], [], [], 8486f3561b8bSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8487f3561b8bSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8488f3561b8bSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8489fc5a983dSmrg]) 8490fc5a983dSmrg 8491f3561b8bSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8492f3561b8bSmrg# 8493f3561b8bSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 8494f3561b8bSmrg# Written by Scott James Remnant, 2004 8495f3561b8bSmrg# 8496f3561b8bSmrg# This file is free software; the Free Software Foundation gives 8497f3561b8bSmrg# unlimited permission to copy and/or distribute it, with or without 8498f3561b8bSmrg# modifications, as long as this notice is preserved. 8499fc5a983dSmrg 8500bd304fc0Smrg# @configure_input@ 8501fc5a983dSmrg 8502bd304fc0Smrg# serial 3337 ltversion.m4 8503f3561b8bSmrg# This file is part of GNU Libtool 8504fc5a983dSmrg 8505bd304fc0Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 8506bd304fc0Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 8507fc5a983dSmrg 8508f3561b8bSmrgAC_DEFUN([LTVERSION_VERSION], 8509bd304fc0Smrg[macro_version='2.4.2' 8510bd304fc0Smrgmacro_revision='1.3337' 8511f3561b8bSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8512f3561b8bSmrg_LT_DECL(, macro_revision, 0) 8513fc5a983dSmrg]) 8514fc5a983dSmrg 8515f3561b8bSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8516f3561b8bSmrg# 8517bd304fc0Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 8518f3561b8bSmrg# Written by Scott James Remnant, 2004. 8519f3561b8bSmrg# 8520f3561b8bSmrg# This file is free software; the Free Software Foundation gives 8521f3561b8bSmrg# unlimited permission to copy and/or distribute it, with or without 8522f3561b8bSmrg# modifications, as long as this notice is preserved. 8523f3561b8bSmrg 8524bd304fc0Smrg# serial 5 lt~obsolete.m4 8525f3561b8bSmrg 8526f3561b8bSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 8527f3561b8bSmrg# 8528f3561b8bSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 8529f3561b8bSmrg# which have later been changed to m4_define as they aren't part of the 8530f3561b8bSmrg# exported API, or moved to Autoconf or Automake where they belong. 8531f3561b8bSmrg# 8532f3561b8bSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8533f3561b8bSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8534f3561b8bSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 8535f3561b8bSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8536f3561b8bSmrg# and doesn't know about Autoconf macros at all.) 8537f3561b8bSmrg# 8538f3561b8bSmrg# So we provide this file, which has a silly filename so it's always 8539f3561b8bSmrg# included after everything else. This provides aclocal with the 8540f3561b8bSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8541f3561b8bSmrg# because those macros already exist, or will be overwritten later. 8542f3561b8bSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8543f3561b8bSmrg# 8544f3561b8bSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8545f3561b8bSmrg# Yes, that means every name once taken will need to remain here until 8546f3561b8bSmrg# we give up compatibility with versions before 1.7, at which point 8547f3561b8bSmrg# we need to keep only those names which we still refer to. 8548f3561b8bSmrg 8549f3561b8bSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8550f3561b8bSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8551f3561b8bSmrg 8552f3561b8bSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8553f3561b8bSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8554f3561b8bSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8555f3561b8bSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8556f3561b8bSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8557f3561b8bSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8558f3561b8bSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8559f3561b8bSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8560f3561b8bSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8561f3561b8bSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8562f3561b8bSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8563f3561b8bSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8564f3561b8bSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8565f3561b8bSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8566f3561b8bSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8567f3561b8bSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8568f3561b8bSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8569f3561b8bSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8570f3561b8bSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8571f3561b8bSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8572f3561b8bSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8573f3561b8bSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8574f3561b8bSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8575f3561b8bSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8576f3561b8bSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8577f3561b8bSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8578f3561b8bSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8579f3561b8bSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8580f3561b8bSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8581f3561b8bSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8582f3561b8bSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8583f3561b8bSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8584f3561b8bSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8585f3561b8bSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8586f3561b8bSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8587f3561b8bSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8588f3561b8bSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8589f3561b8bSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8590f3561b8bSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8591f3561b8bSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8592f3561b8bSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8593f3561b8bSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8594f3561b8bSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8595f3561b8bSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8596f3561b8bSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8597f3561b8bSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8598f3561b8bSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8599f3561b8bSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8600f3561b8bSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8601f3561b8bSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8602f3561b8bSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8603f3561b8bSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8604f3561b8bSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8605f3561b8bSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8606bd304fc0Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8607bd304fc0Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8608bd304fc0Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8609bd304fc0Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8610bd304fc0Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8611bd304fc0Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8612bd304fc0Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 8613f3561b8bSmrg 8614fc5a983dSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 8615bd304fc0Smrg# serial 1 (pkg-config-0.24) 8616fc5a983dSmrg# 8617fc5a983dSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 8618fc5a983dSmrg# 8619fc5a983dSmrg# This program is free software; you can redistribute it and/or modify 8620fc5a983dSmrg# it under the terms of the GNU General Public License as published by 8621fc5a983dSmrg# the Free Software Foundation; either version 2 of the License, or 8622fc5a983dSmrg# (at your option) any later version. 8623fc5a983dSmrg# 8624fc5a983dSmrg# This program is distributed in the hope that it will be useful, but 8625fc5a983dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 8626fc5a983dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8627fc5a983dSmrg# General Public License for more details. 8628fc5a983dSmrg# 8629fc5a983dSmrg# You should have received a copy of the GNU General Public License 8630fc5a983dSmrg# along with this program; if not, write to the Free Software 8631fc5a983dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 8632fc5a983dSmrg# 8633fc5a983dSmrg# As a special exception to the GNU General Public License, if you 8634fc5a983dSmrg# distribute this file as part of a program that contains a 8635fc5a983dSmrg# configuration script generated by Autoconf, you may include it under 8636fc5a983dSmrg# the same distribution terms that you use for the rest of that program. 8637fc5a983dSmrg 8638fc5a983dSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 8639fc5a983dSmrg# ---------------------------------- 8640fc5a983dSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 8641fc5a983dSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 8642fc5a983dSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 8643bd304fc0SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 8644bd304fc0SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 8645bd304fc0SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 8646bd304fc0Smrg 8647fc5a983dSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8648fc5a983dSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8649fc5a983dSmrgfi 8650fc5a983dSmrgif test -n "$PKG_CONFIG"; then 8651fc5a983dSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 8652fc5a983dSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8653fc5a983dSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8654fc5a983dSmrg AC_MSG_RESULT([yes]) 8655fc5a983dSmrg else 8656fc5a983dSmrg AC_MSG_RESULT([no]) 8657fc5a983dSmrg PKG_CONFIG="" 8658fc5a983dSmrg fi 8659fc5a983dSmrgfi[]dnl 8660fc5a983dSmrg])# PKG_PROG_PKG_CONFIG 8661fc5a983dSmrg 8662fc5a983dSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8663fc5a983dSmrg# 8664fc5a983dSmrg# Check to see whether a particular set of modules exists. Similar 8665fc5a983dSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8666fc5a983dSmrg# 8667bd304fc0Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8668bd304fc0Smrg# only at the first occurence in configure.ac, so if the first place 8669bd304fc0Smrg# it's called might be skipped (such as if it is within an "if", you 8670bd304fc0Smrg# have to call PKG_CHECK_EXISTS manually 8671fc5a983dSmrg# -------------------------------------------------------------- 8672fc5a983dSmrgAC_DEFUN([PKG_CHECK_EXISTS], 8673fc5a983dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8674fc5a983dSmrgif test -n "$PKG_CONFIG" && \ 8675fc5a983dSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8676bd304fc0Smrg m4_default([$2], [:]) 8677fc5a983dSmrgm4_ifvaln([$3], [else 8678fc5a983dSmrg $3])dnl 8679fc5a983dSmrgfi]) 8680fc5a983dSmrg 8681fc5a983dSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8682fc5a983dSmrg# --------------------------------------------- 8683fc5a983dSmrgm4_define([_PKG_CONFIG], 8684bd304fc0Smrg[if test -n "$$1"; then 8685bd304fc0Smrg pkg_cv_[]$1="$$1" 8686bd304fc0Smrg elif test -n "$PKG_CONFIG"; then 8687bd304fc0Smrg PKG_CHECK_EXISTS([$3], 8688bd304fc0Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 8689bd304fc0Smrg [pkg_failed=yes]) 8690bd304fc0Smrg else 8691bd304fc0Smrg pkg_failed=untried 8692fc5a983dSmrgfi[]dnl 8693fc5a983dSmrg])# _PKG_CONFIG 8694fc5a983dSmrg 8695fc5a983dSmrg# _PKG_SHORT_ERRORS_SUPPORTED 8696fc5a983dSmrg# ----------------------------- 8697fc5a983dSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8698fc5a983dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8699fc5a983dSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8700fc5a983dSmrg _pkg_short_errors_supported=yes 8701fc5a983dSmrgelse 8702fc5a983dSmrg _pkg_short_errors_supported=no 8703fc5a983dSmrgfi[]dnl 8704fc5a983dSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 8705fc5a983dSmrg 8706fc5a983dSmrg 8707fc5a983dSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8708fc5a983dSmrg# [ACTION-IF-NOT-FOUND]) 8709fc5a983dSmrg# 8710fc5a983dSmrg# 8711fc5a983dSmrg# Note that if there is a possibility the first call to 8712fc5a983dSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8713fc5a983dSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8714fc5a983dSmrg# 8715fc5a983dSmrg# 8716fc5a983dSmrg# -------------------------------------------------------------- 8717fc5a983dSmrgAC_DEFUN([PKG_CHECK_MODULES], 8718fc5a983dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8719fc5a983dSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8720fc5a983dSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8721fc5a983dSmrg 8722fc5a983dSmrgpkg_failed=no 8723fc5a983dSmrgAC_MSG_CHECKING([for $1]) 8724fc5a983dSmrg 8725fc5a983dSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8726fc5a983dSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8727fc5a983dSmrg 8728fc5a983dSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8729fc5a983dSmrgand $1[]_LIBS to avoid the need to call pkg-config. 8730fc5a983dSmrgSee the pkg-config man page for more details.]) 8731fc5a983dSmrg 8732fc5a983dSmrgif test $pkg_failed = yes; then 8733bd304fc0Smrg AC_MSG_RESULT([no]) 8734fc5a983dSmrg _PKG_SHORT_ERRORS_SUPPORTED 8735fc5a983dSmrg if test $_pkg_short_errors_supported = yes; then 8736bd304fc0Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 8737fc5a983dSmrg else 8738bd304fc0Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 8739fc5a983dSmrg fi 8740fc5a983dSmrg # Put the nasty error message in config.log where it belongs 8741fc5a983dSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8742fc5a983dSmrg 8743bd304fc0Smrg m4_default([$4], [AC_MSG_ERROR( 8744fc5a983dSmrg[Package requirements ($2) were not met: 8745fc5a983dSmrg 8746fc5a983dSmrg$$1_PKG_ERRORS 8747fc5a983dSmrg 8748fc5a983dSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8749fc5a983dSmrginstalled software in a non-standard prefix. 8750fc5a983dSmrg 8751bd304fc0Smrg_PKG_TEXT]) 8752bd304fc0Smrg ]) 8753fc5a983dSmrgelif test $pkg_failed = untried; then 8754bd304fc0Smrg AC_MSG_RESULT([no]) 8755bd304fc0Smrg m4_default([$4], [AC_MSG_FAILURE( 8756fc5a983dSmrg[The pkg-config script could not be found or is too old. Make sure it 8757fc5a983dSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 8758fc5a983dSmrgpath to pkg-config. 8759fc5a983dSmrg 8760fc5a983dSmrg_PKG_TEXT 8761fc5a983dSmrg 8762bd304fc0SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 8763bd304fc0Smrg ]) 8764fc5a983dSmrgelse 8765fc5a983dSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8766fc5a983dSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8767fc5a983dSmrg AC_MSG_RESULT([yes]) 8768bd304fc0Smrg $3 8769fc5a983dSmrgfi[]dnl 8770fc5a983dSmrg])# PKG_CHECK_MODULES 8771fc5a983dSmrg 8772f3561b8bSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 8773fc5a983dSmrgdnl 8774bd304fc0Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 8775fc5a983dSmrgdnl 8776fc5a983dSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 877771ba42d0Smrgdnl copy of this software and associated documentation files (the "Software"), 877871ba42d0Smrgdnl to deal in the Software without restriction, including without limitation 877971ba42d0Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 878071ba42d0Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 878171ba42d0Smrgdnl Software is furnished to do so, subject to the following conditions: 8782fc5a983dSmrgdnl 878371ba42d0Smrgdnl The above copyright notice and this permission notice (including the next 878471ba42d0Smrgdnl paragraph) shall be included in all copies or substantial portions of the 878571ba42d0Smrgdnl Software. 8786fc5a983dSmrgdnl 878771ba42d0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 878871ba42d0Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 878971ba42d0Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 879071ba42d0Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 879171ba42d0Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 879271ba42d0Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 879371ba42d0Smrgdnl DEALINGS IN THE SOFTWARE. 8794fc5a983dSmrg 8795fc5a983dSmrg# XORG_MACROS_VERSION(required-version) 8796fc5a983dSmrg# ------------------------------------- 8797fc5a983dSmrg# Minimum version: 1.1.0 8798fc5a983dSmrg# 8799fc5a983dSmrg# If you're using a macro added in Version 1.1 or newer, include this in 8800fc5a983dSmrg# your configure.ac with the minimum required version, such as: 8801fc5a983dSmrg# XORG_MACROS_VERSION(1.1) 8802fc5a983dSmrg# 8803bd2f6fc9Smrg# To ensure that this macro is defined, also add: 8804bd2f6fc9Smrg# m4_ifndef([XORG_MACROS_VERSION], 8805bd2f6fc9Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 8806fc5a983dSmrg# 8807fc5a983dSmrg# 8808fc5a983dSmrg# See the "minimum version" comment for each macro you use to see what 8809fc5a983dSmrg# version you require. 8810bd2f6fc9Smrgm4_defun([XORG_MACROS_VERSION],[ 8811bd304fc0Smrgm4_define([vers_have], [1.17]) 8812bd2f6fc9Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 8813bd2f6fc9Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 8814bd2f6fc9Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 8815bd2f6fc9Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 8816bd2f6fc9Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 8817bd2f6fc9Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 8818bd2f6fc9Smrgm4_undefine([vers_have]) 8819bd2f6fc9Smrgm4_undefine([maj_have]) 8820bd2f6fc9Smrgm4_undefine([maj_needed]) 8821fc5a983dSmrg]) # XORG_MACROS_VERSION 8822fc5a983dSmrg 8823fc5a983dSmrg# XORG_PROG_RAWCPP() 8824fc5a983dSmrg# ------------------ 8825fc5a983dSmrg# Minimum version: 1.0.0 8826fc5a983dSmrg# 8827fc5a983dSmrg# Find cpp program and necessary flags for use in pre-processing text files 8828fc5a983dSmrg# such as man pages and config files 8829fc5a983dSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 8830fc5a983dSmrgAC_REQUIRE([AC_PROG_CPP]) 8831fc5a983dSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 8832fc5a983dSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 8833fc5a983dSmrg 8834fc5a983dSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 8835fc5a983dSmrg# which is not the best choice for supporting other OS'es, but covers most 8836fc5a983dSmrg# of the ones we need for now. 8837fc5a983dSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 8838bd304fc0SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 8839fc5a983dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8840fc5a983dSmrg AC_MSG_RESULT([no]) 8841fc5a983dSmrgelse 8842fc5a983dSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8843fc5a983dSmrg RAWCPPFLAGS=-undef 8844fc5a983dSmrg AC_MSG_RESULT([yes]) 8845f3561b8bSmrg # under Cygwin unix is still defined even with -undef 8846f3561b8bSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8847f3561b8bSmrg RAWCPPFLAGS="-undef -ansi" 8848f3561b8bSmrg AC_MSG_RESULT([yes, with -ansi]) 8849fc5a983dSmrg else 8850fc5a983dSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 8851fc5a983dSmrg fi 8852fc5a983dSmrgfi 8853fc5a983dSmrgrm -f conftest.$ac_ext 8854fc5a983dSmrg 8855fc5a983dSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 8856bd304fc0SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 8857fc5a983dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8858fc5a983dSmrg AC_MSG_RESULT([no]) 8859fc5a983dSmrgelse 8860fc5a983dSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8861fc5a983dSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 8862fc5a983dSmrg AC_MSG_RESULT([yes]) 8863fc5a983dSmrg else 8864fc5a983dSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 8865fc5a983dSmrg fi 8866fc5a983dSmrgfi 8867fc5a983dSmrgrm -f conftest.$ac_ext 8868fc5a983dSmrgAC_SUBST(RAWCPPFLAGS) 8869fc5a983dSmrg]) # XORG_PROG_RAWCPP 8870fc5a983dSmrg 8871fc5a983dSmrg# XORG_MANPAGE_SECTIONS() 8872fc5a983dSmrg# ----------------------- 8873fc5a983dSmrg# Minimum version: 1.0.0 8874fc5a983dSmrg# 8875fc5a983dSmrg# Determine which sections man pages go in for the different man page types 8876fc5a983dSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 8877fc5a983dSmrg# Not sure if there's any better way than just hardcoding by OS name. 8878fc5a983dSmrg# Override default settings by setting environment variables 88796086d97eSmrg# Added MAN_SUBSTS in version 1.8 88806086d97eSmrg# Added AC_PROG_SED in version 1.8 8881fc5a983dSmrg 8882fc5a983dSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 8883fc5a983dSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 88846086d97eSmrgAC_REQUIRE([AC_PROG_SED]) 8885fc5a983dSmrg 8886fc5a983dSmrgif test x$APP_MAN_SUFFIX = x ; then 8887fc5a983dSmrg APP_MAN_SUFFIX=1 8888fc5a983dSmrgfi 8889fc5a983dSmrgif test x$APP_MAN_DIR = x ; then 8890fc5a983dSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 8891fc5a983dSmrgfi 8892fc5a983dSmrg 8893fc5a983dSmrgif test x$LIB_MAN_SUFFIX = x ; then 8894fc5a983dSmrg LIB_MAN_SUFFIX=3 8895fc5a983dSmrgfi 8896fc5a983dSmrgif test x$LIB_MAN_DIR = x ; then 8897fc5a983dSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 8898fc5a983dSmrgfi 8899fc5a983dSmrg 8900fc5a983dSmrgif test x$FILE_MAN_SUFFIX = x ; then 8901fc5a983dSmrg case $host_os in 8902fc5a983dSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 8903fc5a983dSmrg *) FILE_MAN_SUFFIX=5 ;; 8904fc5a983dSmrg esac 8905fc5a983dSmrgfi 8906fc5a983dSmrgif test x$FILE_MAN_DIR = x ; then 8907fc5a983dSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 8908fc5a983dSmrgfi 8909fc5a983dSmrg 8910fc5a983dSmrgif test x$MISC_MAN_SUFFIX = x ; then 8911fc5a983dSmrg case $host_os in 8912fc5a983dSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 8913fc5a983dSmrg *) MISC_MAN_SUFFIX=7 ;; 8914fc5a983dSmrg esac 8915fc5a983dSmrgfi 8916fc5a983dSmrgif test x$MISC_MAN_DIR = x ; then 8917fc5a983dSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 8918fc5a983dSmrgfi 8919fc5a983dSmrg 8920fc5a983dSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 8921fc5a983dSmrg case $host_os in 8922fc5a983dSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 8923fc5a983dSmrg *) DRIVER_MAN_SUFFIX=4 ;; 8924fc5a983dSmrg esac 8925fc5a983dSmrgfi 8926fc5a983dSmrgif test x$DRIVER_MAN_DIR = x ; then 8927fc5a983dSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 8928fc5a983dSmrgfi 8929fc5a983dSmrg 8930fc5a983dSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 8931fc5a983dSmrg case $host_os in 8932fc5a983dSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 8933fc5a983dSmrg *) ADMIN_MAN_SUFFIX=8 ;; 8934fc5a983dSmrg esac 8935fc5a983dSmrgfi 8936fc5a983dSmrgif test x$ADMIN_MAN_DIR = x ; then 8937fc5a983dSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 8938fc5a983dSmrgfi 8939fc5a983dSmrg 8940fc5a983dSmrg 8941fc5a983dSmrgAC_SUBST([APP_MAN_SUFFIX]) 8942fc5a983dSmrgAC_SUBST([LIB_MAN_SUFFIX]) 8943fc5a983dSmrgAC_SUBST([FILE_MAN_SUFFIX]) 8944fc5a983dSmrgAC_SUBST([MISC_MAN_SUFFIX]) 8945fc5a983dSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 8946fc5a983dSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 8947fc5a983dSmrgAC_SUBST([APP_MAN_DIR]) 8948fc5a983dSmrgAC_SUBST([LIB_MAN_DIR]) 8949fc5a983dSmrgAC_SUBST([FILE_MAN_DIR]) 8950fc5a983dSmrgAC_SUBST([MISC_MAN_DIR]) 8951fc5a983dSmrgAC_SUBST([DRIVER_MAN_DIR]) 8952fc5a983dSmrgAC_SUBST([ADMIN_MAN_DIR]) 89536086d97eSmrg 89546086d97eSmrgXORG_MAN_PAGE="X Version 11" 89556086d97eSmrgAC_SUBST([XORG_MAN_PAGE]) 89566086d97eSmrgMAN_SUBSTS="\ 89576086d97eSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 89586086d97eSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 89596086d97eSmrg -e 's|__xservername__|Xorg|g' \ 89606086d97eSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 89616086d97eSmrg -e 's|__projectroot__|\$(prefix)|g' \ 8962bd304fc0Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 89636086d97eSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 89646086d97eSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 89656086d97eSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 89666086d97eSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 89676086d97eSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 89686086d97eSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 89696086d97eSmrgAC_SUBST([MAN_SUBSTS]) 89706086d97eSmrg 8971fc5a983dSmrg]) # XORG_MANPAGE_SECTIONS 8972fc5a983dSmrg 89736086d97eSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 89746086d97eSmrg# ------------------------ 89756086d97eSmrg# Minimum version: 1.7.0 89766086d97eSmrg# 89776086d97eSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 89786086d97eSmrg# provided by xorg-sgml-doctools, if installed. 89796086d97eSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 89806086d97eSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 89816086d97eSmrgXORG_SGML_PATH= 89826086d97eSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 89836086d97eSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 89846086d97eSmrg [m4_ifval([$1],[:], 89856086d97eSmrg [if test x"$cross_compiling" != x"yes" ; then 89866086d97eSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 89876086d97eSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 89886086d97eSmrg fi]) 89896086d97eSmrg ]) 89906086d97eSmrg 89916086d97eSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 89926086d97eSmrg# the path and the name of the doc stylesheet 89936086d97eSmrgif test "x$XORG_SGML_PATH" != "x" ; then 89946086d97eSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 89956086d97eSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 89966086d97eSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 89976086d97eSmrgelse 89986086d97eSmrg AC_MSG_RESULT([no]) 89996086d97eSmrgfi 90006086d97eSmrg 90016086d97eSmrgAC_SUBST(XORG_SGML_PATH) 90026086d97eSmrgAC_SUBST(STYLESHEET_SRCDIR) 90036086d97eSmrgAC_SUBST(XSL_STYLESHEET) 90046086d97eSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 90056086d97eSmrg]) # XORG_CHECK_SGML_DOCTOOLS 90066086d97eSmrg 9007fc5a983dSmrg# XORG_CHECK_LINUXDOC 9008fc5a983dSmrg# ------------------- 9009fc5a983dSmrg# Minimum version: 1.0.0 9010fc5a983dSmrg# 9011fc5a983dSmrg# Defines the variable MAKE_TEXT if the necessary tools and 9012fc5a983dSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9013fc5a983dSmrg# Whether or not the necessary tools and files are found can be checked 9014fc5a983dSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9015fc5a983dSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 90166086d97eSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 90176086d97eSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9018fc5a983dSmrg 9019fc5a983dSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9020fc5a983dSmrg 90216086d97eSmrgAC_MSG_CHECKING([whether to build documentation]) 9022fc5a983dSmrg 90236086d97eSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9024fc5a983dSmrg BUILDDOC=yes 9025fc5a983dSmrgelse 9026fc5a983dSmrg BUILDDOC=no 9027fc5a983dSmrgfi 9028fc5a983dSmrg 9029fc5a983dSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9030fc5a983dSmrg 9031fc5a983dSmrgAC_MSG_RESULT([$BUILDDOC]) 9032fc5a983dSmrg 90336086d97eSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9034fc5a983dSmrg 90356086d97eSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9036fc5a983dSmrg BUILDPDFDOC=yes 9037fc5a983dSmrgelse 9038fc5a983dSmrg BUILDPDFDOC=no 9039fc5a983dSmrgfi 9040fc5a983dSmrg 9041fc5a983dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9042fc5a983dSmrg 9043fc5a983dSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9044fc5a983dSmrg 90456086d97eSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9046fc5a983dSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9047fc5a983dSmrgMAKE_PDF="$PS2PDF" 9048fc5a983dSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9049fc5a983dSmrg 9050fc5a983dSmrgAC_SUBST(MAKE_TEXT) 9051fc5a983dSmrgAC_SUBST(MAKE_PS) 9052fc5a983dSmrgAC_SUBST(MAKE_PDF) 9053fc5a983dSmrgAC_SUBST(MAKE_HTML) 9054fc5a983dSmrg]) # XORG_CHECK_LINUXDOC 9055fc5a983dSmrg 9056fc5a983dSmrg# XORG_CHECK_DOCBOOK 9057fc5a983dSmrg# ------------------- 9058fc5a983dSmrg# Minimum version: 1.0.0 9059fc5a983dSmrg# 9060fc5a983dSmrg# Checks for the ability to build output formats from SGML DocBook source. 9061fc5a983dSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9062fc5a983dSmrg# indicates whether the necessary tools and files are found and, if set, 9063fc5a983dSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9064fc5a983dSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 90656086d97eSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 90666086d97eSmrg 9067fc5a983dSmrgBUILDTXTDOC=no 9068fc5a983dSmrgBUILDPDFDOC=no 9069fc5a983dSmrgBUILDPSDOC=no 9070fc5a983dSmrgBUILDHTMLDOC=no 9071fc5a983dSmrg 9072fc5a983dSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9073fc5a983dSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9074fc5a983dSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9075fc5a983dSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9076fc5a983dSmrg 90776086d97eSmrgAC_MSG_CHECKING([whether to build text documentation]) 90786086d97eSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9079fc5a983dSmrg test x$BUILD_TXTDOC != xno; then 9080fc5a983dSmrg BUILDTXTDOC=yes 9081fc5a983dSmrgfi 9082fc5a983dSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9083fc5a983dSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9084fc5a983dSmrg 90856086d97eSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 90866086d97eSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9087fc5a983dSmrg test x$BUILD_PDFDOC != xno; then 9088fc5a983dSmrg BUILDPDFDOC=yes 9089fc5a983dSmrgfi 9090fc5a983dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9091fc5a983dSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9092fc5a983dSmrg 90936086d97eSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 90946086d97eSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9095fc5a983dSmrg test x$BUILD_PSDOC != xno; then 9096fc5a983dSmrg BUILDPSDOC=yes 9097fc5a983dSmrgfi 9098fc5a983dSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9099fc5a983dSmrgAC_MSG_RESULT([$BUILDPSDOC]) 9100fc5a983dSmrg 91016086d97eSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 91026086d97eSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9103fc5a983dSmrg test x$BUILD_HTMLDOC != xno; then 9104fc5a983dSmrg BUILDHTMLDOC=yes 9105fc5a983dSmrgfi 9106fc5a983dSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9107fc5a983dSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9108fc5a983dSmrg 9109fc5a983dSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9110fc5a983dSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9111fc5a983dSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9112fc5a983dSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9113fc5a983dSmrg 9114fc5a983dSmrgAC_SUBST(MAKE_TEXT) 9115fc5a983dSmrgAC_SUBST(MAKE_PS) 9116fc5a983dSmrgAC_SUBST(MAKE_PDF) 9117fc5a983dSmrgAC_SUBST(MAKE_HTML) 9118fc5a983dSmrg]) # XORG_CHECK_DOCBOOK 9119fc5a983dSmrg 9120bd304fc0Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 912171ba42d0Smrg# ---------------- 912271ba42d0Smrg# Minimum version: 1.5.0 9123bd304fc0Smrg# Minimum version for optional DEFAULT argument: 1.11.0 912471ba42d0Smrg# 912571ba42d0Smrg# Documentation tools are not always available on all platforms and sometimes 912671ba42d0Smrg# not at the appropriate level. This macro enables a module to test for the 912771ba42d0Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 912871ba42d0Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9129bd304fc0Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9130bd304fc0Smrg# --with-xmlto assumes 'auto'. 913171ba42d0Smrg# 913271ba42d0Smrg# Interface to module: 913371ba42d0Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 913471ba42d0Smrg# XMLTO: returns the path of the xmlto program found 913571ba42d0Smrg# returns the path set by the user in the environment 913671ba42d0Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 913771ba42d0Smrg# 'no' user instructs the module not to use xmlto 913871ba42d0Smrg# 91396086d97eSmrg# Added in version 1.10.0 91406086d97eSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 91416086d97eSmrg# xmlto for text output requires either lynx, links, or w3m browsers 91426086d97eSmrg# 914371ba42d0Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 914471ba42d0Smrg# 914571ba42d0SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 914671ba42d0SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9147bd304fc0Smrgm4_define([_defopt], m4_default([$2], [auto])) 914871ba42d0SmrgAC_ARG_WITH(xmlto, 914971ba42d0Smrg AS_HELP_STRING([--with-xmlto], 9150bd304fc0Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9151bd304fc0Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9152bd304fc0Smrgm4_undefine([_defopt]) 915371ba42d0Smrg 915471ba42d0Smrgif test "x$use_xmlto" = x"auto"; then 915571ba42d0Smrg AC_PATH_PROG([XMLTO], [xmlto]) 915671ba42d0Smrg if test "x$XMLTO" = "x"; then 915771ba42d0Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 915871ba42d0Smrg have_xmlto=no 915971ba42d0Smrg else 916071ba42d0Smrg have_xmlto=yes 916171ba42d0Smrg fi 916271ba42d0Smrgelif test "x$use_xmlto" = x"yes" ; then 916371ba42d0Smrg AC_PATH_PROG([XMLTO], [xmlto]) 916471ba42d0Smrg if test "x$XMLTO" = "x"; then 916571ba42d0Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 916671ba42d0Smrg fi 916771ba42d0Smrg have_xmlto=yes 916871ba42d0Smrgelif test "x$use_xmlto" = x"no" ; then 916971ba42d0Smrg if test "x$XMLTO" != "x"; then 917071ba42d0Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 917171ba42d0Smrg fi 917271ba42d0Smrg have_xmlto=no 917371ba42d0Smrgelse 917471ba42d0Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 917571ba42d0Smrgfi 91766086d97eSmrg 91776086d97eSmrg# Test for a minimum version of xmlto, if provided. 91786086d97eSmrgm4_ifval([$1], 91796086d97eSmrg[if test "$have_xmlto" = yes; then 91806086d97eSmrg # scrape the xmlto version 91816086d97eSmrg AC_MSG_CHECKING([the xmlto version]) 91826086d97eSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 91836086d97eSmrg AC_MSG_RESULT([$xmlto_version]) 91846086d97eSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 91856086d97eSmrg [if test "x$use_xmlto" = xauto; then 91866086d97eSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 91876086d97eSmrg have_xmlto=no 91886086d97eSmrg else 91896086d97eSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 91906086d97eSmrg fi]) 91916086d97eSmrgfi]) 91926086d97eSmrg 91936086d97eSmrg# Test for the ability of xmlto to generate a text target 91946086d97eSmrghave_xmlto_text=no 91956086d97eSmrgcat > conftest.xml << "EOF" 91966086d97eSmrgEOF 91976086d97eSmrgAS_IF([test "$have_xmlto" = yes], 91986086d97eSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 91996086d97eSmrg [have_xmlto_text=yes], 92006086d97eSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 92016086d97eSmrgrm -f conftest.xml 92026086d97eSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 920371ba42d0SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 92046086d97eSmrg]) # XORG_WITH_XMLTO 920571ba42d0Smrg 9206bd304fc0Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9207bd304fc0Smrg# -------------------------------------------- 9208bd304fc0Smrg# Minimum version: 1.12.0 9209bd304fc0Smrg# Minimum version for optional DEFAULT argument: 1.12.0 9210bd304fc0Smrg# 9211bd304fc0Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9212bd304fc0Smrg# XML-based language used for the transformation of XML documents. 9213bd304fc0Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9214bd304fc0Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9215bd304fc0Smrg# The XSLT processor is often used as a standalone tool for transformations. 9216bd304fc0Smrg# It should not be assumed that this tool is used only to work with documnetation. 9217bd304fc0Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9218bd304fc0Smrg# 9219bd304fc0Smrg# Interface to module: 9220bd304fc0Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9221bd304fc0Smrg# XSLTPROC: returns the path of the xsltproc program found 9222bd304fc0Smrg# returns the path set by the user in the environment 9223bd304fc0Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9224bd304fc0Smrg# 'no' user instructs the module not to use xsltproc 9225bd304fc0Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9226bd304fc0Smrg# 9227bd304fc0Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9228bd304fc0Smrg# 9229bd304fc0SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9230bd304fc0SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9231bd304fc0Smrg# Preserves the interface, should it be implemented later 9232bd304fc0Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9233bd304fc0Smrgm4_define([_defopt], m4_default([$2], [auto])) 9234bd304fc0SmrgAC_ARG_WITH(xsltproc, 9235bd304fc0Smrg AS_HELP_STRING([--with-xsltproc], 9236bd304fc0Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9237bd304fc0Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9238bd304fc0Smrgm4_undefine([_defopt]) 9239bd304fc0Smrg 9240bd304fc0Smrgif test "x$use_xsltproc" = x"auto"; then 9241bd304fc0Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9242bd304fc0Smrg if test "x$XSLTPROC" = "x"; then 9243bd304fc0Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9244bd304fc0Smrg have_xsltproc=no 9245bd304fc0Smrg else 9246bd304fc0Smrg have_xsltproc=yes 9247bd304fc0Smrg fi 9248bd304fc0Smrgelif test "x$use_xsltproc" = x"yes" ; then 9249bd304fc0Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9250bd304fc0Smrg if test "x$XSLTPROC" = "x"; then 9251bd304fc0Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9252bd304fc0Smrg fi 9253bd304fc0Smrg have_xsltproc=yes 9254bd304fc0Smrgelif test "x$use_xsltproc" = x"no" ; then 9255bd304fc0Smrg if test "x$XSLTPROC" != "x"; then 9256bd304fc0Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9257bd304fc0Smrg fi 9258bd304fc0Smrg have_xsltproc=no 9259bd304fc0Smrgelse 9260bd304fc0Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9261bd304fc0Smrgfi 9262bd304fc0Smrg 9263bd304fc0SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9264bd304fc0Smrg]) # XORG_WITH_XSLTPROC 9265bd304fc0Smrg 9266bd304fc0Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9267bd304fc0Smrg# ---------------------------------------- 9268bd304fc0Smrg# Minimum version: 1.15.0 9269bd304fc0Smrg# 9270bd304fc0Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 9271bd304fc0Smrg# scanning arbitrary text files, extracting information from those text files, 9272bd304fc0Smrg# and printing reports based on that information. 9273bd304fc0Smrg# 9274bd304fc0Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9275bd304fc0Smrg# 9276bd304fc0Smrg# Interface to module: 9277bd304fc0Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 9278bd304fc0Smrg# PERL: returns the path of the perl program found 9279bd304fc0Smrg# returns the path set by the user in the environment 9280bd304fc0Smrg# --with-perl: 'yes' user instructs the module to use perl 9281bd304fc0Smrg# 'no' user instructs the module not to use perl 9282bd304fc0Smrg# have_perl: returns yes if perl found in PATH or no 9283bd304fc0Smrg# 9284bd304fc0Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9285bd304fc0Smrg# 9286bd304fc0SmrgAC_DEFUN([XORG_WITH_PERL],[ 9287bd304fc0SmrgAC_ARG_VAR([PERL], [Path to perl command]) 9288bd304fc0Smrg# Preserves the interface, should it be implemented later 9289bd304fc0Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9290bd304fc0Smrgm4_define([_defopt], m4_default([$2], [auto])) 9291bd304fc0SmrgAC_ARG_WITH(perl, 9292bd304fc0Smrg AS_HELP_STRING([--with-perl], 9293bd304fc0Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 9294bd304fc0Smrg [use_perl=$withval], [use_perl=]_defopt) 9295bd304fc0Smrgm4_undefine([_defopt]) 9296bd304fc0Smrg 9297bd304fc0Smrgif test "x$use_perl" = x"auto"; then 9298bd304fc0Smrg AC_PATH_PROG([PERL], [perl]) 9299bd304fc0Smrg if test "x$PERL" = "x"; then 9300bd304fc0Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9301bd304fc0Smrg have_perl=no 9302bd304fc0Smrg else 9303bd304fc0Smrg have_perl=yes 9304bd304fc0Smrg fi 9305bd304fc0Smrgelif test "x$use_perl" = x"yes" ; then 9306bd304fc0Smrg AC_PATH_PROG([PERL], [perl]) 9307bd304fc0Smrg if test "x$PERL" = "x"; then 9308bd304fc0Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9309bd304fc0Smrg fi 9310bd304fc0Smrg have_perl=yes 9311bd304fc0Smrgelif test "x$use_perl" = x"no" ; then 9312bd304fc0Smrg if test "x$PERL" != "x"; then 9313bd304fc0Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9314bd304fc0Smrg fi 9315bd304fc0Smrg have_perl=no 9316bd304fc0Smrgelse 9317bd304fc0Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9318bd304fc0Smrgfi 9319bd304fc0Smrg 9320bd304fc0SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9321bd304fc0Smrg]) # XORG_WITH_PERL 9322bd304fc0Smrg 9323bd304fc0Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 932471ba42d0Smrg# ---------------- 932571ba42d0Smrg# Minimum version: 1.5.0 9326bd304fc0Smrg# Minimum version for optional DEFAULT argument: 1.11.0 932771ba42d0Smrg# 932871ba42d0Smrg# Documentation tools are not always available on all platforms and sometimes 932971ba42d0Smrg# not at the appropriate level. This macro enables a module to test for the 933071ba42d0Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 933171ba42d0Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9332bd304fc0Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9333bd304fc0Smrg# --with-asciidoc assumes 'auto'. 933471ba42d0Smrg# 933571ba42d0Smrg# Interface to module: 933671ba42d0Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 933771ba42d0Smrg# ASCIIDOC: returns the path of the asciidoc program found 933871ba42d0Smrg# returns the path set by the user in the environment 933971ba42d0Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 934071ba42d0Smrg# 'no' user instructs the module not to use asciidoc 934171ba42d0Smrg# 934271ba42d0Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 934371ba42d0Smrg# 934471ba42d0SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 934571ba42d0SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9346bd304fc0Smrgm4_define([_defopt], m4_default([$2], [auto])) 934771ba42d0SmrgAC_ARG_WITH(asciidoc, 934871ba42d0Smrg AS_HELP_STRING([--with-asciidoc], 9349bd304fc0Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9350bd304fc0Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9351bd304fc0Smrgm4_undefine([_defopt]) 935271ba42d0Smrg 935371ba42d0Smrgif test "x$use_asciidoc" = x"auto"; then 935471ba42d0Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 935571ba42d0Smrg if test "x$ASCIIDOC" = "x"; then 935671ba42d0Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 935771ba42d0Smrg have_asciidoc=no 935871ba42d0Smrg else 935971ba42d0Smrg have_asciidoc=yes 936071ba42d0Smrg fi 936171ba42d0Smrgelif test "x$use_asciidoc" = x"yes" ; then 936271ba42d0Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 936371ba42d0Smrg if test "x$ASCIIDOC" = "x"; then 936471ba42d0Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 936571ba42d0Smrg fi 936671ba42d0Smrg have_asciidoc=yes 936771ba42d0Smrgelif test "x$use_asciidoc" = x"no" ; then 936871ba42d0Smrg if test "x$ASCIIDOC" != "x"; then 936971ba42d0Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 937071ba42d0Smrg fi 937171ba42d0Smrg have_asciidoc=no 937271ba42d0Smrgelse 937371ba42d0Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 937471ba42d0Smrgfi 93756086d97eSmrgm4_ifval([$1], 93766086d97eSmrg[if test "$have_asciidoc" = yes; then 93776086d97eSmrg # scrape the asciidoc version 93786086d97eSmrg AC_MSG_CHECKING([the asciidoc version]) 93796086d97eSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 93806086d97eSmrg AC_MSG_RESULT([$asciidoc_version]) 93816086d97eSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 93826086d97eSmrg [if test "x$use_asciidoc" = xauto; then 93836086d97eSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 93846086d97eSmrg have_asciidoc=no 93856086d97eSmrg else 93866086d97eSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 93876086d97eSmrg fi]) 93886086d97eSmrgfi]) 938971ba42d0SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 93906086d97eSmrg]) # XORG_WITH_ASCIIDOC 939171ba42d0Smrg 9392bd304fc0Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 93936086d97eSmrg# -------------------------------- 939471ba42d0Smrg# Minimum version: 1.5.0 9395bd304fc0Smrg# Minimum version for optional DEFAULT argument: 1.11.0 939671ba42d0Smrg# 939771ba42d0Smrg# Documentation tools are not always available on all platforms and sometimes 939871ba42d0Smrg# not at the appropriate level. This macro enables a module to test for the 939971ba42d0Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 940071ba42d0Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 9401bd304fc0Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 9402bd304fc0Smrg# --with-doxygen assumes 'auto'. 940371ba42d0Smrg# 940471ba42d0Smrg# Interface to module: 940571ba42d0Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 940671ba42d0Smrg# DOXYGEN: returns the path of the doxygen program found 940771ba42d0Smrg# returns the path set by the user in the environment 940871ba42d0Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 940971ba42d0Smrg# 'no' user instructs the module not to use doxygen 941071ba42d0Smrg# 941171ba42d0Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 941271ba42d0Smrg# 941371ba42d0SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 941471ba42d0SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 9415bd304fc0Smrgm4_define([_defopt], m4_default([$2], [auto])) 941671ba42d0SmrgAC_ARG_WITH(doxygen, 941771ba42d0Smrg AS_HELP_STRING([--with-doxygen], 9418bd304fc0Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 9419bd304fc0Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 9420bd304fc0Smrgm4_undefine([_defopt]) 942171ba42d0Smrg 942271ba42d0Smrgif test "x$use_doxygen" = x"auto"; then 942371ba42d0Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 942471ba42d0Smrg if test "x$DOXYGEN" = "x"; then 942571ba42d0Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 942671ba42d0Smrg have_doxygen=no 942771ba42d0Smrg else 942871ba42d0Smrg have_doxygen=yes 942971ba42d0Smrg fi 943071ba42d0Smrgelif test "x$use_doxygen" = x"yes" ; then 943171ba42d0Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 943271ba42d0Smrg if test "x$DOXYGEN" = "x"; then 943371ba42d0Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 943471ba42d0Smrg fi 943571ba42d0Smrg have_doxygen=yes 943671ba42d0Smrgelif test "x$use_doxygen" = x"no" ; then 943771ba42d0Smrg if test "x$DOXYGEN" != "x"; then 943871ba42d0Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 943971ba42d0Smrg fi 944071ba42d0Smrg have_doxygen=no 944171ba42d0Smrgelse 944271ba42d0Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 944371ba42d0Smrgfi 94446086d97eSmrgm4_ifval([$1], 94456086d97eSmrg[if test "$have_doxygen" = yes; then 94466086d97eSmrg # scrape the doxygen version 94476086d97eSmrg AC_MSG_CHECKING([the doxygen version]) 94486086d97eSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 94496086d97eSmrg AC_MSG_RESULT([$doxygen_version]) 94506086d97eSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 94516086d97eSmrg [if test "x$use_doxygen" = xauto; then 94526086d97eSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 94536086d97eSmrg have_doxygen=no 94546086d97eSmrg else 94556086d97eSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 94566086d97eSmrg fi]) 94576086d97eSmrgfi]) 945871ba42d0SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 94596086d97eSmrg]) # XORG_WITH_DOXYGEN 94606086d97eSmrg 9461bd304fc0Smrg# XORG_WITH_GROFF([DEFAULT]) 94626086d97eSmrg# ---------------- 94636086d97eSmrg# Minimum version: 1.6.0 9464bd304fc0Smrg# Minimum version for optional DEFAULT argument: 1.11.0 94656086d97eSmrg# 94666086d97eSmrg# Documentation tools are not always available on all platforms and sometimes 94676086d97eSmrg# not at the appropriate level. This macro enables a module to test for the 94686086d97eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 94696086d97eSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 9470bd304fc0Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 9471bd304fc0Smrg# --with-groff assumes 'auto'. 94726086d97eSmrg# 94736086d97eSmrg# Interface to module: 94746086d97eSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 94756086d97eSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 94766086d97eSmrg# HAVE_GROFF_MS: the -ms macros package 94776086d97eSmrg# GROFF: returns the path of the groff program found 94786086d97eSmrg# returns the path set by the user in the environment 94796086d97eSmrg# --with-groff: 'yes' user instructs the module to use groff 94806086d97eSmrg# 'no' user instructs the module not to use groff 94816086d97eSmrg# 94826086d97eSmrg# Added in version 1.9.0: 94836086d97eSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 94846086d97eSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 94856086d97eSmrg# psselect from the psutils package. 94866086d97eSmrg# the ghostcript package. Refer to the grohtml man pages 94876086d97eSmrg# 94886086d97eSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 94896086d97eSmrg# 94906086d97eSmrg# OS and distros often splits groff in a basic and full package, the former 94916086d97eSmrg# having the groff program and the later having devices, fonts and macros 94926086d97eSmrg# Checking for the groff executable is not enough. 94936086d97eSmrg# 94946086d97eSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 94956086d97eSmrg# unset HAVE_GROFF or GROFF env variables. 94966086d97eSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 94976086d97eSmrg# 94986086d97eSmrgAC_DEFUN([XORG_WITH_GROFF],[ 94996086d97eSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 9500bd304fc0Smrgm4_define([_defopt], m4_default([$1], [auto])) 95016086d97eSmrgAC_ARG_WITH(groff, 95026086d97eSmrg AS_HELP_STRING([--with-groff], 9503bd304fc0Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 9504bd304fc0Smrg [use_groff=$withval], [use_groff=]_defopt) 9505bd304fc0Smrgm4_undefine([_defopt]) 95066086d97eSmrg 95076086d97eSmrgif test "x$use_groff" = x"auto"; then 95086086d97eSmrg AC_PATH_PROG([GROFF], [groff]) 95096086d97eSmrg if test "x$GROFF" = "x"; then 95106086d97eSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 95116086d97eSmrg have_groff=no 95126086d97eSmrg else 95136086d97eSmrg have_groff=yes 95146086d97eSmrg fi 95156086d97eSmrgelif test "x$use_groff" = x"yes" ; then 95166086d97eSmrg AC_PATH_PROG([GROFF], [groff]) 95176086d97eSmrg if test "x$GROFF" = "x"; then 95186086d97eSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 95196086d97eSmrg fi 95206086d97eSmrg have_groff=yes 95216086d97eSmrgelif test "x$use_groff" = x"no" ; then 95226086d97eSmrg if test "x$GROFF" != "x"; then 95236086d97eSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 95246086d97eSmrg fi 95256086d97eSmrg have_groff=no 95266086d97eSmrgelse 95276086d97eSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 95286086d97eSmrgfi 95296086d97eSmrg 95306086d97eSmrg# We have groff, test for the presence of the macro packages 95316086d97eSmrgif test "x$have_groff" = x"yes"; then 95326086d97eSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 95336086d97eSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 95346086d97eSmrg groff_ms_works=yes 95356086d97eSmrg else 95366086d97eSmrg groff_ms_works=no 95376086d97eSmrg fi 95386086d97eSmrg AC_MSG_RESULT([$groff_ms_works]) 95396086d97eSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 95406086d97eSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 95416086d97eSmrg groff_mm_works=yes 95426086d97eSmrg else 95436086d97eSmrg groff_mm_works=no 95446086d97eSmrg fi 95456086d97eSmrg AC_MSG_RESULT([$groff_mm_works]) 95466086d97eSmrgfi 95476086d97eSmrg 95486086d97eSmrg# We have groff, test for HTML dependencies, one command per package 95496086d97eSmrgif test "x$have_groff" = x"yes"; then 95506086d97eSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 95516086d97eSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 95526086d97eSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 95536086d97eSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 95546086d97eSmrg have_groff_html=yes 95556086d97eSmrg else 95566086d97eSmrg have_groff_html=no 95576086d97eSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 95586086d97eSmrg fi 95596086d97eSmrgfi 95606086d97eSmrg 95616086d97eSmrg# Set Automake conditionals for Makefiles 95626086d97eSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 95636086d97eSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 95646086d97eSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 95656086d97eSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 95666086d97eSmrg]) # XORG_WITH_GROFF 95676086d97eSmrg 9568bd304fc0Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 9569bd304fc0Smrg# --------------------------------------- 95706086d97eSmrg# Minimum version: 1.6.0 9571bd304fc0Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9572bd304fc0Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 95736086d97eSmrg# 95746086d97eSmrg# Documentation tools are not always available on all platforms and sometimes 95756086d97eSmrg# not at the appropriate level. This macro enables a module to test for the 95766086d97eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 95776086d97eSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 9578bd304fc0Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 9579bd304fc0Smrg# --with-fop assumes 'auto'. 95806086d97eSmrg# 95816086d97eSmrg# Interface to module: 95826086d97eSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 95836086d97eSmrg# FOP: returns the path of the fop program found 95846086d97eSmrg# returns the path set by the user in the environment 95856086d97eSmrg# --with-fop: 'yes' user instructs the module to use fop 95866086d97eSmrg# 'no' user instructs the module not to use fop 95876086d97eSmrg# 95886086d97eSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 95896086d97eSmrg# 95906086d97eSmrgAC_DEFUN([XORG_WITH_FOP],[ 95916086d97eSmrgAC_ARG_VAR([FOP], [Path to fop command]) 9592bd304fc0Smrgm4_define([_defopt], m4_default([$2], [auto])) 95936086d97eSmrgAC_ARG_WITH(fop, 95946086d97eSmrg AS_HELP_STRING([--with-fop], 9595bd304fc0Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 9596bd304fc0Smrg [use_fop=$withval], [use_fop=]_defopt) 9597bd304fc0Smrgm4_undefine([_defopt]) 95986086d97eSmrg 95996086d97eSmrgif test "x$use_fop" = x"auto"; then 96006086d97eSmrg AC_PATH_PROG([FOP], [fop]) 96016086d97eSmrg if test "x$FOP" = "x"; then 96026086d97eSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 96036086d97eSmrg have_fop=no 96046086d97eSmrg else 96056086d97eSmrg have_fop=yes 96066086d97eSmrg fi 96076086d97eSmrgelif test "x$use_fop" = x"yes" ; then 96086086d97eSmrg AC_PATH_PROG([FOP], [fop]) 96096086d97eSmrg if test "x$FOP" = "x"; then 96106086d97eSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 96116086d97eSmrg fi 96126086d97eSmrg have_fop=yes 96136086d97eSmrgelif test "x$use_fop" = x"no" ; then 96146086d97eSmrg if test "x$FOP" != "x"; then 96156086d97eSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 96166086d97eSmrg fi 96176086d97eSmrg have_fop=no 96186086d97eSmrgelse 96196086d97eSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 96206086d97eSmrgfi 9621bd304fc0Smrg 9622bd304fc0Smrg# Test for a minimum version of fop, if provided. 9623bd304fc0Smrgm4_ifval([$1], 9624bd304fc0Smrg[if test "$have_fop" = yes; then 9625bd304fc0Smrg # scrape the fop version 9626bd304fc0Smrg AC_MSG_CHECKING([for fop minimum version]) 9627bd304fc0Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 9628bd304fc0Smrg AC_MSG_RESULT([$fop_version]) 9629bd304fc0Smrg AS_VERSION_COMPARE([$fop_version], [$1], 9630bd304fc0Smrg [if test "x$use_fop" = xauto; then 9631bd304fc0Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 9632bd304fc0Smrg have_fop=no 9633bd304fc0Smrg else 9634bd304fc0Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 9635bd304fc0Smrg fi]) 9636bd304fc0Smrgfi]) 96376086d97eSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 96386086d97eSmrg]) # XORG_WITH_FOP 96396086d97eSmrg 9640bd304fc0Smrg# XORG_WITH_PS2PDF([DEFAULT]) 96416086d97eSmrg# ---------------- 96426086d97eSmrg# Minimum version: 1.6.0 9643bd304fc0Smrg# Minimum version for optional DEFAULT argument: 1.11.0 96446086d97eSmrg# 96456086d97eSmrg# Documentation tools are not always available on all platforms and sometimes 96466086d97eSmrg# not at the appropriate level. This macro enables a module to test for the 96476086d97eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 96486086d97eSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 9649bd304fc0Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 9650bd304fc0Smrg# --with-ps2pdf assumes 'auto'. 96516086d97eSmrg# 96526086d97eSmrg# Interface to module: 96536086d97eSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 96546086d97eSmrg# PS2PDF: returns the path of the ps2pdf program found 96556086d97eSmrg# returns the path set by the user in the environment 96566086d97eSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 96576086d97eSmrg# 'no' user instructs the module not to use ps2pdf 96586086d97eSmrg# 96596086d97eSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 96606086d97eSmrg# 96616086d97eSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 96626086d97eSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 9663bd304fc0Smrgm4_define([_defopt], m4_default([$1], [auto])) 96646086d97eSmrgAC_ARG_WITH(ps2pdf, 96656086d97eSmrg AS_HELP_STRING([--with-ps2pdf], 9666bd304fc0Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 9667bd304fc0Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 9668bd304fc0Smrgm4_undefine([_defopt]) 96696086d97eSmrg 96706086d97eSmrgif test "x$use_ps2pdf" = x"auto"; then 96716086d97eSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 96726086d97eSmrg if test "x$PS2PDF" = "x"; then 96736086d97eSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 96746086d97eSmrg have_ps2pdf=no 96756086d97eSmrg else 96766086d97eSmrg have_ps2pdf=yes 96776086d97eSmrg fi 96786086d97eSmrgelif test "x$use_ps2pdf" = x"yes" ; then 96796086d97eSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 96806086d97eSmrg if test "x$PS2PDF" = "x"; then 96816086d97eSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 96826086d97eSmrg fi 96836086d97eSmrg have_ps2pdf=yes 96846086d97eSmrgelif test "x$use_ps2pdf" = x"no" ; then 96856086d97eSmrg if test "x$PS2PDF" != "x"; then 96866086d97eSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 96876086d97eSmrg fi 96886086d97eSmrg have_ps2pdf=no 96896086d97eSmrgelse 96906086d97eSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 96916086d97eSmrgfi 96926086d97eSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 96936086d97eSmrg]) # XORG_WITH_PS2PDF 96946086d97eSmrg 96956086d97eSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 96966086d97eSmrg# ---------------- 96976086d97eSmrg# Minimum version: 1.6.0 96986086d97eSmrg# 96996086d97eSmrg# Documentation tools are not always available on all platforms and sometimes 97006086d97eSmrg# not at the appropriate level. This macro enables a builder to skip all 97016086d97eSmrg# documentation targets except traditional man pages. 97026086d97eSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 97036086d97eSmrg# maximum flexibilty in controlling documentation building. 97046086d97eSmrg# Refer to: 97056086d97eSmrg# XORG_WITH_XMLTO --with-xmlto 97066086d97eSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 97076086d97eSmrg# XORG_WITH_DOXYGEN --with-doxygen 97086086d97eSmrg# XORG_WITH_FOP --with-fop 97096086d97eSmrg# XORG_WITH_GROFF --with-groff 97106086d97eSmrg# XORG_WITH_PS2PDF --with-ps2pdf 97116086d97eSmrg# 97126086d97eSmrg# Interface to module: 97136086d97eSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 97146086d97eSmrg# --enable-docs: 'yes' user instructs the module to generate docs 97156086d97eSmrg# 'no' user instructs the module not to generate docs 97166086d97eSmrg# parm1: specify the default value, yes or no. 97176086d97eSmrg# 97186086d97eSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 9719bd304fc0Smrgm4_define([docs_default], m4_default([$1], [yes])) 97206086d97eSmrgAC_ARG_ENABLE(docs, 97216086d97eSmrg AS_HELP_STRING([--enable-docs], 9722bd304fc0Smrg [Enable building the documentation (default: ]docs_default[)]), 9723bd304fc0Smrg [build_docs=$enableval], [build_docs=]docs_default) 9724bd304fc0Smrgm4_undefine([docs_default]) 97256086d97eSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 97266086d97eSmrgAC_MSG_CHECKING([whether to build documentation]) 97276086d97eSmrgAC_MSG_RESULT([$build_docs]) 97286086d97eSmrg]) # XORG_ENABLE_DOCS 97296086d97eSmrg 97306086d97eSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 97316086d97eSmrg# ---------------- 97326086d97eSmrg# Minimum version: 1.6.0 97336086d97eSmrg# 97346086d97eSmrg# This macro enables a builder to skip all developer documentation. 97356086d97eSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 97366086d97eSmrg# maximum flexibilty in controlling documentation building. 97376086d97eSmrg# Refer to: 97386086d97eSmrg# XORG_WITH_XMLTO --with-xmlto 97396086d97eSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 97406086d97eSmrg# XORG_WITH_DOXYGEN --with-doxygen 97416086d97eSmrg# XORG_WITH_FOP --with-fop 97426086d97eSmrg# XORG_WITH_GROFF --with-groff 97436086d97eSmrg# XORG_WITH_PS2PDF --with-ps2pdf 97446086d97eSmrg# 97456086d97eSmrg# Interface to module: 97466086d97eSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 97476086d97eSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 97486086d97eSmrg# 'no' user instructs the module not to generate developer docs 97496086d97eSmrg# parm1: specify the default value, yes or no. 97506086d97eSmrg# 97516086d97eSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 9752bd304fc0Smrgm4_define([devel_default], m4_default([$1], [yes])) 97536086d97eSmrgAC_ARG_ENABLE(devel-docs, 97546086d97eSmrg AS_HELP_STRING([--enable-devel-docs], 9755bd304fc0Smrg [Enable building the developer documentation (default: ]devel_default[)]), 9756bd304fc0Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 9757bd304fc0Smrgm4_undefine([devel_default]) 97586086d97eSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 97596086d97eSmrgAC_MSG_CHECKING([whether to build developer documentation]) 97606086d97eSmrgAC_MSG_RESULT([$build_devel_docs]) 97616086d97eSmrg]) # XORG_ENABLE_DEVEL_DOCS 97626086d97eSmrg 97636086d97eSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 97646086d97eSmrg# ---------------- 97656086d97eSmrg# Minimum version: 1.6.0 97666086d97eSmrg# 97676086d97eSmrg# This macro enables a builder to skip all functional specification targets. 97686086d97eSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 97696086d97eSmrg# maximum flexibilty in controlling documentation building. 97706086d97eSmrg# Refer to: 97716086d97eSmrg# XORG_WITH_XMLTO --with-xmlto 97726086d97eSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 97736086d97eSmrg# XORG_WITH_DOXYGEN --with-doxygen 97746086d97eSmrg# XORG_WITH_FOP --with-fop 97756086d97eSmrg# XORG_WITH_GROFF --with-groff 97766086d97eSmrg# XORG_WITH_PS2PDF --with-ps2pdf 97776086d97eSmrg# 97786086d97eSmrg# Interface to module: 97796086d97eSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 97806086d97eSmrg# --enable-specs: 'yes' user instructs the module to generate specs 97816086d97eSmrg# 'no' user instructs the module not to generate specs 97826086d97eSmrg# parm1: specify the default value, yes or no. 97836086d97eSmrg# 97846086d97eSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 9785bd304fc0Smrgm4_define([spec_default], m4_default([$1], [yes])) 97866086d97eSmrgAC_ARG_ENABLE(specs, 97876086d97eSmrg AS_HELP_STRING([--enable-specs], 9788bd304fc0Smrg [Enable building the specs (default: ]spec_default[)]), 9789bd304fc0Smrg [build_specs=$enableval], [build_specs=]spec_default) 9790bd304fc0Smrgm4_undefine([spec_default]) 97916086d97eSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 97926086d97eSmrgAC_MSG_CHECKING([whether to build functional specifications]) 97936086d97eSmrgAC_MSG_RESULT([$build_specs]) 97946086d97eSmrg]) # XORG_ENABLE_SPECS 979571ba42d0Smrg 9796bd304fc0Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 9797bd304fc0Smrg# ---------------------------------------------- 9798bd304fc0Smrg# Minimum version: 1.13.0 9799bd304fc0Smrg# 9800bd304fc0Smrg# This macro enables a builder to enable/disable unit testing 9801bd304fc0Smrg# It makes no assumption about the test cases implementation 9802bd304fc0Smrg# Test cases may or may not use Automake "Support for test suites" 9803bd304fc0Smrg# They may or may not use the software utility library GLib 9804bd304fc0Smrg# 9805bd304fc0Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 9806bd304fc0Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 9807bd304fc0Smrg# The variable enable_unit_tests is used by other macros in this file. 9808bd304fc0Smrg# 9809bd304fc0Smrg# Interface to module: 9810bd304fc0Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 9811bd304fc0Smrg# enable_unit_tests: used in configure.ac for additional configuration 9812bd304fc0Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 9813bd304fc0Smrg# 'no' user instructs the module not to build tests 9814bd304fc0Smrg# parm1: specify the default value, yes or no. 9815bd304fc0Smrg# 9816bd304fc0SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 9817bd304fc0SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 9818bd304fc0SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 9819bd304fc0SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9820bd304fc0Smrgm4_define([_defopt], m4_default([$1], [auto])) 9821bd304fc0SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 9822bd304fc0Smrg [Enable building unit test cases (default: ]_defopt[)]), 9823bd304fc0Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 9824bd304fc0Smrgm4_undefine([_defopt]) 9825bd304fc0SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 9826bd304fc0SmrgAC_MSG_CHECKING([whether to build unit test cases]) 9827bd304fc0SmrgAC_MSG_RESULT([$enable_unit_tests]) 9828bd304fc0Smrg]) # XORG_ENABLE_UNIT_TESTS 9829bd304fc0Smrg 9830bd304fc0Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 9831bd304fc0Smrg# ------------------------------------------------------ 9832bd304fc0Smrg# Minimum version: 1.17.0 9833bd304fc0Smrg# 9834bd304fc0Smrg# This macro enables a builder to enable/disable integration testing 9835bd304fc0Smrg# It makes no assumption about the test cases' implementation 9836bd304fc0Smrg# Test cases may or may not use Automake "Support for test suites" 9837bd304fc0Smrg# 9838bd304fc0Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 9839bd304fc0Smrg# usually requires less dependencies and may be built and run under less 9840bd304fc0Smrg# stringent environments than integration tests. 9841bd304fc0Smrg# 9842bd304fc0Smrg# Interface to module: 9843bd304fc0Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 9844bd304fc0Smrg# enable_integration_tests: used in configure.ac for additional configuration 9845bd304fc0Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 9846bd304fc0Smrg# 'no' user instructs the module not to build tests 9847bd304fc0Smrg# parm1: specify the default value, yes or no. 9848bd304fc0Smrg# 9849bd304fc0SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 9850bd304fc0SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9851bd304fc0Smrgm4_define([_defopt], m4_default([$1], [auto])) 9852bd304fc0SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 9853bd304fc0Smrg [Enable building integration test cases (default: ]_defopt[)]), 9854bd304fc0Smrg [enable_integration_tests=$enableval], 9855bd304fc0Smrg [enable_integration_tests=]_defopt) 9856bd304fc0Smrgm4_undefine([_defopt]) 9857bd304fc0SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 9858bd304fc0Smrg [test "x$enable_integration_tests" != xno]) 9859bd304fc0SmrgAC_MSG_CHECKING([whether to build unit test cases]) 9860bd304fc0SmrgAC_MSG_RESULT([$enable_integration_tests]) 9861bd304fc0Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 9862bd304fc0Smrg 9863bd304fc0Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 9864bd304fc0Smrg# ---------------------------------------- 9865bd304fc0Smrg# Minimum version: 1.13.0 9866bd304fc0Smrg# 9867bd304fc0Smrg# GLib is a library which provides advanced data structures and functions. 9868bd304fc0Smrg# This macro enables a module to test for the presence of Glib. 9869bd304fc0Smrg# 9870bd304fc0Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 9871bd304fc0Smrg# Otherwise the value of $enable_unit_tests is blank. 9872bd304fc0Smrg# 9873bd304fc0Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 9874bd304fc0Smrg# test support usually requires less dependencies and may be built and run under 9875bd304fc0Smrg# less stringent environments than integration tests. 9876bd304fc0Smrg# 9877bd304fc0Smrg# Interface to module: 9878bd304fc0Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 9879bd304fc0Smrg# with_glib: used in configure.ac to know if GLib has been found 9880bd304fc0Smrg# --with-glib: 'yes' user instructs the module to use glib 9881bd304fc0Smrg# 'no' user instructs the module not to use glib 9882bd304fc0Smrg# 9883bd304fc0SmrgAC_DEFUN([XORG_WITH_GLIB],[ 9884bd304fc0SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9885bd304fc0Smrgm4_define([_defopt], m4_default([$2], [auto])) 9886bd304fc0SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 9887bd304fc0Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 9888bd304fc0Smrg [with_glib=$withval], [with_glib=]_defopt) 9889bd304fc0Smrgm4_undefine([_defopt]) 9890bd304fc0Smrg 9891bd304fc0Smrghave_glib=no 9892bd304fc0Smrg# Do not probe GLib if user explicitly disabled unit testing 9893bd304fc0Smrgif test "x$enable_unit_tests" != x"no"; then 9894bd304fc0Smrg # Do not probe GLib if user explicitly disabled it 9895bd304fc0Smrg if test "x$with_glib" != x"no"; then 9896bd304fc0Smrg m4_ifval( 9897bd304fc0Smrg [$1], 9898bd304fc0Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 9899bd304fc0Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 9900bd304fc0Smrg ) 9901bd304fc0Smrg fi 9902bd304fc0Smrgfi 9903bd304fc0Smrg 9904bd304fc0Smrg# Not having GLib when unit testing has been explicitly requested is an error 9905bd304fc0Smrgif test "x$enable_unit_tests" = x"yes"; then 9906bd304fc0Smrg if test "x$have_glib" = x"no"; then 9907bd304fc0Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9908bd304fc0Smrg fi 9909bd304fc0Smrgfi 9910bd304fc0Smrg 9911bd304fc0Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 9912bd304fc0Smrgif test "x$enable_unit_tests" = x"no"; then 9913bd304fc0Smrg if test "x$with_glib" = x"yes"; then 9914bd304fc0Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9915bd304fc0Smrg fi 9916bd304fc0Smrgfi 9917bd304fc0Smrg 9918bd304fc0Smrg# Not having GLib when it has been explicitly requested is an error 9919bd304fc0Smrgif test "x$with_glib" = x"yes"; then 9920bd304fc0Smrg if test "x$have_glib" = x"no"; then 9921bd304fc0Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 9922bd304fc0Smrg fi 9923bd304fc0Smrgfi 9924bd304fc0Smrg 9925bd304fc0SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 9926bd304fc0Smrg]) # XORG_WITH_GLIB 9927bd304fc0Smrg 9928bd304fc0Smrg# XORG_LD_WRAP([required|optional]) 9929bd304fc0Smrg# --------------------------------- 9930bd304fc0Smrg# Minimum version: 1.13.0 9931bd304fc0Smrg# 9932bd304fc0Smrg# Check if linker supports -wrap, passed via compiler flags 9933bd304fc0Smrg# 9934bd304fc0Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 9935bd304fc0Smrg# Otherwise the value of $enable_unit_tests is blank. 9936bd304fc0Smrg# 9937bd304fc0Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 9938bd304fc0Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 9939bd304fc0Smrg# available, an argument of "optional" allows use when some unit tests require 9940bd304fc0Smrg# ld -wrap and others do not. 9941bd304fc0Smrg# 9942bd304fc0SmrgAC_DEFUN([XORG_LD_WRAP],[ 9943bd304fc0SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 9944bd304fc0Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 9945bd304fc0Smrg void __wrap_exit(int status) { return; }], 9946bd304fc0Smrg [exit(0);])]) 9947bd304fc0Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 9948bd304fc0Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 9949bd304fc0Smrg if test "x$have_ld_wrap" = x"no"; then 9950bd304fc0Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 9951bd304fc0Smrg fi 9952bd304fc0Smrgfi 9953bd304fc0SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 9954bd304fc0Smrg# 9955bd304fc0Smrg]) # XORG_LD_WRAP 9956bd304fc0Smrg 9957bd304fc0Smrg# XORG_CHECK_LINKER_FLAGS 9958bd304fc0Smrg# ----------------------- 9959bd304fc0Smrg# SYNOPSIS 9960bd304fc0Smrg# 9961bd304fc0Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 9962bd304fc0Smrg# 9963bd304fc0Smrg# DESCRIPTION 9964bd304fc0Smrg# 9965bd304fc0Smrg# Check whether the given linker FLAGS work with the current language's 9966bd304fc0Smrg# linker, or whether they give an error. 9967bd304fc0Smrg# 9968bd304fc0Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 9969bd304fc0Smrg# success/failure. 9970bd304fc0Smrg# 9971bd304fc0Smrg# PROGRAM-SOURCE is the program source to link with, if needed 9972bd304fc0Smrg# 9973bd304fc0Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 9974bd304fc0Smrg# 9975bd304fc0Smrg# LICENSE 9976bd304fc0Smrg# 9977bd304fc0Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 9978bd304fc0Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 9979bd304fc0Smrg# Copyright (c) 2009 Matteo Frigo 9980bd304fc0Smrg# 9981bd304fc0Smrg# This program is free software: you can redistribute it and/or modify it 9982bd304fc0Smrg# under the terms of the GNU General Public License as published by the 9983bd304fc0Smrg# Free Software Foundation, either version 3 of the License, or (at your 9984bd304fc0Smrg# option) any later version. 9985bd304fc0Smrg# 9986bd304fc0Smrg# This program is distributed in the hope that it will be useful, but 9987bd304fc0Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9988bd304fc0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 9989bd304fc0Smrg# Public License for more details. 9990bd304fc0Smrg# 9991bd304fc0Smrg# You should have received a copy of the GNU General Public License along 9992bd304fc0Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 9993bd304fc0Smrg# 9994bd304fc0Smrg# As a special exception, the respective Autoconf Macro's copyright owner 9995bd304fc0Smrg# gives unlimited permission to copy, distribute and modify the configure 9996bd304fc0Smrg# scripts that are the output of Autoconf when processing the Macro. You 9997bd304fc0Smrg# need not follow the terms of the GNU General Public License when using 9998bd304fc0Smrg# or distributing such scripts, even though portions of the text of the 9999bd304fc0Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 10000bd304fc0Smrg# all other use of the material that constitutes the Autoconf Macro. 10001bd304fc0Smrg# 10002bd304fc0Smrg# This special exception to the GPL applies to versions of the Autoconf 10003bd304fc0Smrg# Macro released by the Autoconf Archive. When you make and distribute a 10004bd304fc0Smrg# modified version of the Autoconf Macro, you may extend this special 10005bd304fc0Smrg# exception to the GPL to apply to your modified version as well.# 10006bd304fc0SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10007bd304fc0Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10008bd304fc0Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10009bd304fc0SmrgAS_LITERAL_IF([$1], 10010bd304fc0Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10011bd304fc0Smrg ax_save_FLAGS=$LDFLAGS 10012bd304fc0Smrg LDFLAGS="$1" 10013bd304fc0Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10014bd304fc0Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10015bd304fc0Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10016bd304fc0Smrg LDFLAGS=$ax_save_FLAGS])], 10017bd304fc0Smrg [ax_save_FLAGS=$LDFLAGS 10018bd304fc0Smrg LDFLAGS="$1" 10019bd304fc0Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10020bd304fc0Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10021bd304fc0Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10022bd304fc0Smrg LDFLAGS=$ax_save_FLAGS]) 10023bd304fc0Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10024bd304fc0SmrgAC_MSG_RESULT($xorg_check_linker_flags) 10025bd304fc0Smrgif test "x$xorg_check_linker_flags" = xyes; then 10026bd304fc0Smrg m4_default([$2], :) 10027bd304fc0Smrgelse 10028bd304fc0Smrg m4_default([$3], :) 10029bd304fc0Smrgfi 10030bd304fc0Smrg]) # XORG_CHECK_LINKER_FLAGS 10031bd304fc0Smrg 10032bd304fc0Smrg# XORG_MEMORY_CHECK_FLAGS 10033bd304fc0Smrg# ----------------------- 10034bd304fc0Smrg# Minimum version: 1.16.0 10035bd304fc0Smrg# 10036bd304fc0Smrg# This macro attempts to find appropriate memory checking functionality 10037bd304fc0Smrg# for various platforms which unit testing code may use to catch various 10038bd304fc0Smrg# forms of memory allocation and access errors in testing. 10039bd304fc0Smrg# 10040bd304fc0Smrg# Interface to module: 10041bd304fc0Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10042bd304fc0Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 10043bd304fc0Smrg# 10044bd304fc0Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10045bd304fc0Smrg# 10046bd304fc0SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10047bd304fc0Smrg 10048bd304fc0SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10049bd304fc0SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10050bd304fc0Smrg [Environment variables to enable memory checking in tests]) 10051bd304fc0Smrg 10052bd304fc0Smrg# Check for different types of support on different platforms 10053bd304fc0Smrgcase $host_os in 10054bd304fc0Smrg solaris*) 10055bd304fc0Smrg AC_CHECK_LIB([umem], [umem_alloc], 10056bd304fc0Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10057bd304fc0Smrg ;; 10058bd304fc0Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10059bd304fc0Smrg # both directly and inverted, so should not be 0 or 255. 10060bd304fc0Smrg malloc_debug_env='MALLOC_PERTURB_=15' 10061bd304fc0Smrg ;; 10062bd304fc0Smrg darwin*) 10063bd304fc0Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10064bd304fc0Smrg ;; 10065bd304fc0Smrg *bsd*) 10066bd304fc0Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10067bd304fc0Smrg ;; 10068bd304fc0Smrgesac 10069bd304fc0Smrg 10070bd304fc0Smrg# User supplied flags override default flags 10071bd304fc0Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10072bd304fc0Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10073bd304fc0Smrgfi 10074bd304fc0Smrg 10075bd304fc0SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10076bd304fc0Smrg]) # XORG_WITH_LINT 10077bd304fc0Smrg 10078fc5a983dSmrg# XORG_CHECK_MALLOC_ZERO 10079fc5a983dSmrg# ---------------------- 10080fc5a983dSmrg# Minimum version: 1.0.0 10081fc5a983dSmrg# 10082fc5a983dSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10083fc5a983dSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 10084fc5a983dSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10085fc5a983dSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10086fc5a983dSmrgAC_ARG_ENABLE(malloc0returnsnull, 1008771ba42d0Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 10088fc5a983dSmrg [malloc(0) returns NULL (default: auto)]), 10089fc5a983dSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 10090fc5a983dSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10091fc5a983dSmrg 10092fc5a983dSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 10093fc5a983dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10094bd304fc0Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10095bd304fc0Smrg#include <stdlib.h> 10096bd304fc0Smrg],[ 10097fc5a983dSmrg char *m0, *r0, *c0, *p; 10098fc5a983dSmrg m0 = malloc(0); 10099fc5a983dSmrg p = malloc(10); 10100fc5a983dSmrg r0 = realloc(p,0); 10101bd304fc0Smrg c0 = calloc(0,10); 10102bd304fc0Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10103bd304fc0Smrg])], 10104fc5a983dSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 1010571ba42d0Smrg [MALLOC_ZERO_RETURNS_NULL=no], 1010671ba42d0Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 10107fc5a983dSmrgfi 10108fc5a983dSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10109fc5a983dSmrg 10110fc5a983dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10111fc5a983dSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10112fc5a983dSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10113fc5a983dSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10114fc5a983dSmrgelse 10115fc5a983dSmrg MALLOC_ZERO_CFLAGS="" 10116fc5a983dSmrg XMALLOC_ZERO_CFLAGS="" 10117fc5a983dSmrg XTMALLOC_ZERO_CFLAGS="" 10118fc5a983dSmrgfi 10119fc5a983dSmrg 10120fc5a983dSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 10121fc5a983dSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 10122fc5a983dSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10123fc5a983dSmrg]) # XORG_CHECK_MALLOC_ZERO 10124fc5a983dSmrg 10125fc5a983dSmrg# XORG_WITH_LINT() 10126fc5a983dSmrg# ---------------- 10127fc5a983dSmrg# Minimum version: 1.1.0 10128fc5a983dSmrg# 101296086d97eSmrg# This macro enables the use of a tool that flags some suspicious and 101306086d97eSmrg# non-portable constructs (likely to be bugs) in C language source code. 101316086d97eSmrg# It will attempt to locate the tool and use appropriate options. 101326086d97eSmrg# There are various lint type tools on different platforms. 101336086d97eSmrg# 101346086d97eSmrg# Interface to module: 101356086d97eSmrg# LINT: returns the path to the tool found on the platform 101366086d97eSmrg# or the value set to LINT on the configure cmd line 101376086d97eSmrg# also an Automake conditional 101386086d97eSmrg# LINT_FLAGS: an Automake variable with appropriate flags 101396086d97eSmrg# 101406086d97eSmrg# --with-lint: 'yes' user instructs the module to use lint 101416086d97eSmrg# 'no' user instructs the module not to use lint (default) 101426086d97eSmrg# 101436086d97eSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 101446086d97eSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 10145fc5a983dSmrg# 10146fc5a983dSmrgAC_DEFUN([XORG_WITH_LINT],[ 10147fc5a983dSmrg 101486086d97eSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 101496086d97eSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1015071ba42d0SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10151fc5a983dSmrg [Use a lint-style source code checker (default: disabled)])], 10152fc5a983dSmrg [use_lint=$withval], [use_lint=no]) 101536086d97eSmrg 101546086d97eSmrg# Obtain platform specific info like program name and options 101556086d97eSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 101566086d97eSmrgcase $host_os in 101576086d97eSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 101586086d97eSmrg lint_name=splint 101596086d97eSmrg lint_options="-badflag" 101606086d97eSmrg ;; 101616086d97eSmrg *freebsd* | *netbsd*) 101626086d97eSmrg lint_name=lint 101636086d97eSmrg lint_options="-u -b" 101646086d97eSmrg ;; 101656086d97eSmrg *solaris*) 101666086d97eSmrg lint_name=lint 101676086d97eSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 101686086d97eSmrg ;; 101696086d97eSmrgesac 101706086d97eSmrg 101716086d97eSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 101726086d97eSmrgif test "x$use_lint" = x"yes" ; then 101736086d97eSmrg AC_PATH_PROG([LINT], [$lint_name]) 101746086d97eSmrg if test "x$LINT" = "x"; then 101756086d97eSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 101766086d97eSmrg fi 101776086d97eSmrgelif test "x$use_lint" = x"no" ; then 101786086d97eSmrg if test "x$LINT" != "x"; then 101796086d97eSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 101806086d97eSmrg fi 10181fc5a983dSmrgelse 101826086d97eSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10183fc5a983dSmrgfi 101846086d97eSmrg 101856086d97eSmrg# User supplied flags override default flags 101866086d97eSmrgif test "x$LINT_FLAGS" != "x"; then 101876086d97eSmrg lint_options=$LINT_FLAGS 10188fc5a983dSmrgfi 10189fc5a983dSmrg 101906086d97eSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 101916086d97eSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10192fc5a983dSmrg 10193fc5a983dSmrg]) # XORG_WITH_LINT 10194fc5a983dSmrg 10195fc5a983dSmrg# XORG_LINT_LIBRARY(LIBNAME) 10196fc5a983dSmrg# -------------------------- 10197fc5a983dSmrg# Minimum version: 1.1.0 10198fc5a983dSmrg# 10199fc5a983dSmrg# Sets up flags for building lint libraries for checking programs that call 10200fc5a983dSmrg# functions in the library. 10201fc5a983dSmrg# 102026086d97eSmrg# Interface to module: 102036086d97eSmrg# LINTLIB - Automake variable with the name of lint library file to make 102046086d97eSmrg# MAKE_LINT_LIB - Automake conditional 102056086d97eSmrg# 102066086d97eSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 102076086d97eSmrg# - 'no' user instructs the module not to create a lint library (default) 10208fc5a983dSmrg 10209fc5a983dSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 10210fc5a983dSmrgAC_REQUIRE([XORG_WITH_LINT]) 1021171ba42d0SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10212fc5a983dSmrg [Create lint library (default: disabled)])], 10213fc5a983dSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 102146086d97eSmrg 102156086d97eSmrgif test "x$make_lint_lib" = x"yes" ; then 102166086d97eSmrg LINTLIB=llib-l$1.ln 102176086d97eSmrg if test "x$LINT" = "x"; then 102186086d97eSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 102196086d97eSmrg fi 102206086d97eSmrgelif test "x$make_lint_lib" != x"no" ; then 102216086d97eSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10222fc5a983dSmrgfi 102236086d97eSmrg 10224fc5a983dSmrgAC_SUBST(LINTLIB) 10225fc5a983dSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10226fc5a983dSmrg 10227fc5a983dSmrg]) # XORG_LINT_LIBRARY 10228fc5a983dSmrg 10229bd304fc0Smrg# XORG_COMPILER_BRAND 10230bd304fc0Smrg# ------------------- 10231bd304fc0Smrg# Minimum version: 1.14.0 10232bd304fc0Smrg# 10233bd304fc0Smrg# Checks for various brands of compilers and sets flags as appropriate: 10234bd304fc0Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10235bd304fc0Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10236bd304fc0Smrg# clang compiler - sets CLANGCC to "yes" 10237bd304fc0Smrg# Intel compiler - sets INTELCC to "yes" 10238bd304fc0Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10239bd304fc0Smrg# 10240bd304fc0SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10241bd304fc0SmrgAC_LANG_CASE( 10242bd304fc0Smrg [C], [ 10243bd304fc0Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10244bd304fc0Smrg ], 10245bd304fc0Smrg [C++], [ 10246bd304fc0Smrg AC_REQUIRE([AC_PROG_CXX]) 10247bd304fc0Smrg ] 10248bd304fc0Smrg) 10249bd304fc0SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10250bd304fc0SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10251bd304fc0SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10252bd304fc0Smrg]) # XORG_COMPILER_BRAND 10253bd304fc0Smrg 10254bd304fc0Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10255bd304fc0Smrg# --------------- 10256bd304fc0Smrg# Minimum version: 1.16.0 10257bd304fc0Smrg# 10258bd304fc0Smrg# Test if the compiler works when passed the given flag as a command line argument. 10259bd304fc0Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10260bd304fc0Smrg# next flag in the list until there are no more options. 10261bd304fc0Smrg# 10262bd304fc0Smrg# Note that this does not guarantee that the compiler supports the flag as some 10263bd304fc0Smrg# compilers will simply ignore arguments that they do not understand, but we do 10264bd304fc0Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10265bd304fc0Smrg# -Werror=unused-command-line-argument 10266bd304fc0Smrg# 10267bd304fc0SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10268bd304fc0Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10269bd304fc0Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10270bd304fc0Smrg 10271bd304fc0SmrgAC_LANG_COMPILER_REQUIRE 10272bd304fc0Smrg 10273bd304fc0SmrgAC_LANG_CASE( 10274bd304fc0Smrg [C], [ 10275bd304fc0Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10276bd304fc0Smrg define([PREFIX], [C]) 10277bd304fc0Smrg define([CACHE_PREFIX], [cc]) 10278bd304fc0Smrg define([COMPILER], [$CC]) 10279bd304fc0Smrg ], 10280bd304fc0Smrg [C++], [ 10281bd304fc0Smrg define([PREFIX], [CXX]) 10282bd304fc0Smrg define([CACHE_PREFIX], [cxx]) 10283bd304fc0Smrg define([COMPILER], [$CXX]) 10284bd304fc0Smrg ] 10285bd304fc0Smrg) 10286bd304fc0Smrg 10287bd304fc0Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10288bd304fc0Smrg 10289bd304fc0Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10290bd304fc0Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10291bd304fc0Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10292bd304fc0Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10293bd304fc0Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10294bd304fc0Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10295bd304fc0Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10296bd304fc0Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10297bd304fc0Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10298bd304fc0Smrgfi 10299bd304fc0Smrg 10300bd304fc0Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10301bd304fc0Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10302bd304fc0Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10303bd304fc0Smrg fi 10304bd304fc0Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10305bd304fc0Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10306bd304fc0Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10307bd304fc0Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10308bd304fc0Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10309bd304fc0Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10310bd304fc0Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10311bd304fc0Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10312bd304fc0Smrgfi 10313bd304fc0Smrg 10314bd304fc0Smrgfound="no" 10315bd304fc0Smrgm4_foreach([flag], m4_cdr($@), [ 10316bd304fc0Smrg if test $found = "no" ; then 10317bd304fc0Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 10318bd304fc0Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10319bd304fc0Smrg fi 10320bd304fc0Smrg 10321bd304fc0Smrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 10322bd304fc0Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10323bd304fc0Smrg fi 10324bd304fc0Smrg 10325bd304fc0Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10326bd304fc0Smrg 10327bd304fc0Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10328bd304fc0Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10329bd304fc0Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10330bd304fc0Smrg AC_CACHE_VAL($cacheid, 10331bd304fc0Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10332bd304fc0Smrg [eval $cacheid=yes], 10333bd304fc0Smrg [eval $cacheid=no])]) 10334bd304fc0Smrg 10335bd304fc0Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10336bd304fc0Smrg 10337bd304fc0Smrg eval supported=\$$cacheid 10338bd304fc0Smrg AC_MSG_RESULT([$supported]) 10339bd304fc0Smrg if test "$supported" = "yes" ; then 10340bd304fc0Smrg $1="$$1 ]flag[" 10341bd304fc0Smrg found="yes" 10342bd304fc0Smrg fi 10343bd304fc0Smrg fi 10344bd304fc0Smrg]) 10345bd304fc0Smrg]) # XORG_TESTSET_CFLAG 10346bd304fc0Smrg 10347bd304fc0Smrg# XORG_COMPILER_FLAGS 10348bd304fc0Smrg# --------------- 10349bd304fc0Smrg# Minimum version: 1.16.0 10350bd304fc0Smrg# 10351bd304fc0Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10352bd304fc0Smrg# arguments supported by the selected compiler which do NOT alter the generated 10353bd304fc0Smrg# code. These arguments will cause the compiler to print various warnings 10354bd304fc0Smrg# during compilation AND turn a conservative set of warnings into errors. 10355bd304fc0Smrg# 10356bd304fc0Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10357bd304fc0Smrg# future versions of util-macros as options are added to new compilers. 10358bd304fc0Smrg# 10359bd304fc0SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10360bd304fc0SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10361bd304fc0Smrg 10362bd304fc0SmrgAC_ARG_ENABLE(selective-werror, 10363bd304fc0Smrg AS_HELP_STRING([--disable-selective-werror], 10364bd304fc0Smrg [Turn off selective compiler errors. (default: enabled)]), 10365bd304fc0Smrg [SELECTIVE_WERROR=$enableval], 10366bd304fc0Smrg [SELECTIVE_WERROR=yes]) 10367bd304fc0Smrg 10368bd304fc0SmrgAC_LANG_CASE( 10369bd304fc0Smrg [C], [ 10370bd304fc0Smrg define([PREFIX], [C]) 10371bd304fc0Smrg ], 10372bd304fc0Smrg [C++], [ 10373bd304fc0Smrg define([PREFIX], [CXX]) 10374bd304fc0Smrg ] 10375bd304fc0Smrg) 10376bd304fc0Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 10377bd304fc0Smrgif test "x$SUNCC" = "xyes"; then 10378bd304fc0Smrg [BASE_]PREFIX[FLAGS]="-v" 10379bd304fc0Smrgelse 10380bd304fc0Smrg [BASE_]PREFIX[FLAGS]="" 10381bd304fc0Smrgfi 10382bd304fc0Smrg 10383bd304fc0Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10384bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10385bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10386bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10387bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10388bd304fc0Smrg 10389bd304fc0SmrgAC_LANG_CASE( 10390bd304fc0Smrg [C], [ 10391bd304fc0Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10392bd304fc0Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10393bd304fc0Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10394bd304fc0Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 10395bd304fc0Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 10396bd304fc0Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10397bd304fc0Smrg ] 10398bd304fc0Smrg) 10399bd304fc0Smrg 10400bd304fc0Smrg# This chunk adds additional warnings that could catch undesired effects. 10401bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10402bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10403bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10404bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10405bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10406bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10407bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 10408bd304fc0Smrg 10409bd304fc0Smrg# These are currently disabled because they are noisy. They will be enabled 10410bd304fc0Smrg# in the future once the codebase is sufficiently modernized to silence 10411bd304fc0Smrg# them. For now, I don't want them to drown out the other warnings. 10412bd304fc0Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10413bd304fc0Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10414bd304fc0Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 10415bd304fc0Smrg 10416bd304fc0Smrg# Turn some warnings into errors, so we don't accidently get successful builds 10417bd304fc0Smrg# when there are problems that should be fixed. 10418bd304fc0Smrg 10419bd304fc0Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 10420bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10421bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10422bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10423bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10424bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10425bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10426bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10427bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10428bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10429bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10430bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10431bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10432bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10433bd304fc0Smrgelse 10434bd304fc0SmrgAC_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]) 10435bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10436bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10437bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10438bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10439bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10440bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10441bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10442bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10443bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10444bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10445bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10446bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10447bd304fc0SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10448bd304fc0Smrgfi 10449bd304fc0Smrg 10450bd304fc0SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10451bd304fc0Smrg]) # XORG_COMPILER_FLAGS 10452bd304fc0Smrg 10453f3561b8bSmrg# XORG_CWARNFLAGS 10454f3561b8bSmrg# --------------- 10455f3561b8bSmrg# Minimum version: 1.2.0 10456bd304fc0Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 10457f3561b8bSmrg# 10458f3561b8bSmrg# Defines CWARNFLAGS to enable C compiler warnings. 10459f3561b8bSmrg# 10460bd304fc0Smrg# This function is deprecated because it defines -fno-strict-aliasing 10461bd304fc0Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 10462bd304fc0Smrg# is needed, then it should be added explicitly in the module when 10463bd304fc0Smrg# it is updated to use BASE_CFLAGS. 10464bd304fc0Smrg# 10465f3561b8bSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 10466bd304fc0SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10467bd304fc0SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10468bd304fc0SmrgAC_LANG_CASE( 10469bd304fc0Smrg [C], [ 10470bd304fc0Smrg CWARNFLAGS="$BASE_CFLAGS" 10471bd304fc0Smrg if test "x$GCC" = xyes ; then 10472bd304fc0Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 10473bd304fc0Smrg fi 10474bd304fc0Smrg AC_SUBST(CWARNFLAGS) 10475bd304fc0Smrg ] 10476bd304fc0Smrg) 10477f3561b8bSmrg]) # XORG_CWARNFLAGS 1047871ba42d0Smrg 1047971ba42d0Smrg# XORG_STRICT_OPTION 1048071ba42d0Smrg# ----------------------- 1048171ba42d0Smrg# Minimum version: 1.3.0 1048271ba42d0Smrg# 10483bd304fc0Smrg# Add configure option to enable strict compilation flags, such as treating 10484bd304fc0Smrg# warnings as fatal errors. 10485bd304fc0Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 10486bd304fc0Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 10487bd304fc0Smrg# 10488bd304fc0Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 10489bd304fc0Smrg# when strict compilation is unconditionally desired. 1049071ba42d0SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 1049171ba42d0SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 10492bd304fc0SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1049371ba42d0Smrg 1049471ba42d0SmrgAC_ARG_ENABLE(strict-compilation, 1049571ba42d0Smrg AS_HELP_STRING([--enable-strict-compilation], 1049671ba42d0Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 1049771ba42d0Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 10498bd304fc0Smrg 10499bd304fc0SmrgAC_LANG_CASE( 10500bd304fc0Smrg [C], [ 10501bd304fc0Smrg define([PREFIX], [C]) 10502bd304fc0Smrg ], 10503bd304fc0Smrg [C++], [ 10504bd304fc0Smrg define([PREFIX], [CXX]) 10505bd304fc0Smrg ] 10506bd304fc0Smrg) 10507bd304fc0Smrg 10508bd304fc0Smrg[STRICT_]PREFIX[FLAGS]="" 10509bd304fc0SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 10510bd304fc0SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 10511bd304fc0Smrg 10512bd304fc0Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 10513bd304fc0Smrg# activate it with -Werror, so we add it here explicitly. 10514bd304fc0SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 10515bd304fc0Smrg 1051671ba42d0Smrgif test "x$STRICT_COMPILE" = "xyes"; then 10517bd304fc0Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 10518bd304fc0Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 1051971ba42d0Smrgfi 10520bd304fc0SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 10521bd304fc0SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10522bd304fc0SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 1052371ba42d0Smrg]) # XORG_STRICT_OPTION 1052471ba42d0Smrg 1052571ba42d0Smrg# XORG_DEFAULT_OPTIONS 1052671ba42d0Smrg# -------------------- 1052771ba42d0Smrg# Minimum version: 1.3.0 1052871ba42d0Smrg# 1052971ba42d0Smrg# Defines default options for X.Org modules. 1053071ba42d0Smrg# 1053171ba42d0SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 105326086d97eSmrgAC_REQUIRE([AC_PROG_INSTALL]) 10533bd304fc0SmrgXORG_COMPILER_FLAGS 1053471ba42d0SmrgXORG_CWARNFLAGS 1053571ba42d0SmrgXORG_STRICT_OPTION 1053671ba42d0SmrgXORG_RELEASE_VERSION 1053771ba42d0SmrgXORG_CHANGELOG 1053871ba42d0SmrgXORG_INSTALL 1053971ba42d0SmrgXORG_MANPAGE_SECTIONS 105406086d97eSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 105416086d97eSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 1054271ba42d0Smrg]) # XORG_DEFAULT_OPTIONS 1054371ba42d0Smrg 1054471ba42d0Smrg# XORG_INSTALL() 1054571ba42d0Smrg# ---------------- 1054671ba42d0Smrg# Minimum version: 1.4.0 1054771ba42d0Smrg# 1054871ba42d0Smrg# Defines the variable INSTALL_CMD as the command to copy 1054971ba42d0Smrg# INSTALL from $prefix/share/util-macros. 1055071ba42d0Smrg# 1055171ba42d0SmrgAC_DEFUN([XORG_INSTALL], [ 1055271ba42d0SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1055371ba42d0Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 1055471ba42d0SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 1055571ba42d0Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 1055671ba42d0Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 1055771ba42d0Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 1055871ba42d0SmrgAC_SUBST([INSTALL_CMD]) 1055971ba42d0Smrg]) # XORG_INSTALL 10560fc5a983dSmrgdnl Copyright 2005 Red Hat, Inc 10561fc5a983dSmrgdnl 10562fc5a983dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 10563fc5a983dSmrgdnl documentation for any purpose is hereby granted without fee, provided that 10564fc5a983dSmrgdnl the above copyright notice appear in all copies and that both that 10565fc5a983dSmrgdnl copyright notice and this permission notice appear in supporting 10566fc5a983dSmrgdnl documentation. 10567fc5a983dSmrgdnl 10568fc5a983dSmrgdnl The above copyright notice and this permission notice shall be included 10569fc5a983dSmrgdnl in all copies or substantial portions of the Software. 10570fc5a983dSmrgdnl 10571fc5a983dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10572fc5a983dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10573fc5a983dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10574fc5a983dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10575fc5a983dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10576fc5a983dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10577fc5a983dSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 10578fc5a983dSmrgdnl 10579fc5a983dSmrgdnl Except as contained in this notice, the name of the copyright holders shall 10580fc5a983dSmrgdnl not be used in advertising or otherwise to promote the sale, use or 10581fc5a983dSmrgdnl other dealings in this Software without prior written authorization 10582fc5a983dSmrgdnl from the copyright holders. 10583fc5a983dSmrgdnl 10584fc5a983dSmrg 10585fc5a983dSmrg# XORG_RELEASE_VERSION 10586fc5a983dSmrg# -------------------- 105876086d97eSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 10588fc5a983dSmrg 10589fc5a983dSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 10590fc5a983dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 10591fc5a983dSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 10592fc5a983dSmrg [Major version of this package]) 10593fc5a983dSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 10594fc5a983dSmrg if test "x$PVM" = "x"; then 10595fc5a983dSmrg PVM="0" 10596fc5a983dSmrg fi 10597fc5a983dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 10598fc5a983dSmrg [$PVM], 10599fc5a983dSmrg [Minor version of this package]) 10600fc5a983dSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 10601fc5a983dSmrg if test "x$PVP" = "x"; then 10602fc5a983dSmrg PVP="0" 10603fc5a983dSmrg fi 10604fc5a983dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 10605fc5a983dSmrg [$PVP], 10606fc5a983dSmrg [Patch version of this package]) 10607fc5a983dSmrg]) 10608fc5a983dSmrg 10609f3561b8bSmrg# XORG_CHANGELOG() 10610f3561b8bSmrg# ---------------- 10611f3561b8bSmrg# Minimum version: 1.2.0 10612f3561b8bSmrg# 10613f3561b8bSmrg# Defines the variable CHANGELOG_CMD as the command to generate 10614f3561b8bSmrg# ChangeLog from git. 10615f3561b8bSmrg# 10616f3561b8bSmrg# 10617f3561b8bSmrgAC_DEFUN([XORG_CHANGELOG], [ 1061871ba42d0SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 1061971ba42d0Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 1062071ba42d0Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 10621f3561b8bSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 10622f3561b8bSmrgAC_SUBST([CHANGELOG_CMD]) 10623f3561b8bSmrg]) # XORG_CHANGELOG 10624f3561b8bSmrg 10625f3561b8bSmrgdnl Copyright 2005 Red Hat, Inc 10626f3561b8bSmrgdnl 10627f3561b8bSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 10628f3561b8bSmrgdnl documentation for any purpose is hereby granted without fee, provided that 10629f3561b8bSmrgdnl the above copyright notice appear in all copies and that both that 10630f3561b8bSmrgdnl copyright notice and this permission notice appear in supporting 10631f3561b8bSmrgdnl documentation. 10632f3561b8bSmrgdnl 10633f3561b8bSmrgdnl The above copyright notice and this permission notice shall be included 10634f3561b8bSmrgdnl in all copies or substantial portions of the Software. 10635f3561b8bSmrgdnl 10636f3561b8bSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10637f3561b8bSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10638f3561b8bSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10639f3561b8bSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10640f3561b8bSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10641f3561b8bSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10642f3561b8bSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 10643f3561b8bSmrgdnl 10644f3561b8bSmrgdnl Except as contained in this notice, the name of the copyright holders shall 10645f3561b8bSmrgdnl not be used in advertising or otherwise to promote the sale, use or 10646f3561b8bSmrgdnl other dealings in this Software without prior written authorization 10647f3561b8bSmrgdnl from the copyright holders. 10648f3561b8bSmrgdnl 10649f3561b8bSmrg 10650f3561b8bSmrg# XORG_DRIVER_CHECK_EXT() 10651f3561b8bSmrg# -------------------------- 10652f3561b8bSmrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 10653f3561b8bSmrg# is defined, then add $1 to $REQUIRED_MODULES. 10654f3561b8bSmrg 10655f3561b8bSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 106566086d97eSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10657f3561b8bSmrg SAVE_CFLAGS="$CFLAGS" 106586086d97eSmrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 10659f3561b8bSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 10660f3561b8bSmrg#include "xorg-server.h" 10661f3561b8bSmrg#if !defined $1 10662f3561b8bSmrg#error $1 not defined 10663f3561b8bSmrg#endif 10664f3561b8bSmrg ]])], 10665f3561b8bSmrg [_EXT_CHECK=yes], 10666f3561b8bSmrg [_EXT_CHECK=no]) 10667f3561b8bSmrg CFLAGS="$SAVE_CFLAGS" 10668f3561b8bSmrg AC_MSG_CHECKING([if $1 is defined]) 10669f3561b8bSmrg AC_MSG_RESULT([$_EXT_CHECK]) 10670f3561b8bSmrg if test "$_EXT_CHECK" != no; then 10671f3561b8bSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 10672f3561b8bSmrg fi 10673f3561b8bSmrg]) 10674f3561b8bSmrg 10675bd304fc0Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software 10676bd304fc0Smrg# Foundation, Inc. 10677fc5a983dSmrg# 10678fc5a983dSmrg# This file is free software; the Free Software Foundation 10679fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 10680fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 10681fc5a983dSmrg 10682bd304fc0Smrg# serial 1 10683bd304fc0Smrg 10684fc5a983dSmrg# AM_AUTOMAKE_VERSION(VERSION) 10685fc5a983dSmrg# ---------------------------- 10686fc5a983dSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 10687fc5a983dSmrg# generated from the m4 files accompanying Automake X.Y. 10688fc5a983dSmrg# (This private macro should not be called outside this file.) 10689fc5a983dSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 1069071ba42d0Smrg[am__api_version='1.11' 10691fc5a983dSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 10692fc5a983dSmrgdnl require some minimum version. Point them to the right macro. 10693bd304fc0Smrgm4_if([$1], [1.11.3], [], 10694fc5a983dSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 10695fc5a983dSmrg]) 10696fc5a983dSmrg 10697fc5a983dSmrg# _AM_AUTOCONF_VERSION(VERSION) 10698fc5a983dSmrg# ----------------------------- 10699fc5a983dSmrg# aclocal traces this macro to find the Autoconf version. 10700fc5a983dSmrg# This is a private macro too. Using m4_define simplifies 10701fc5a983dSmrg# the logic in aclocal, which can simply ignore this definition. 10702fc5a983dSmrgm4_define([_AM_AUTOCONF_VERSION], []) 10703fc5a983dSmrg 10704fc5a983dSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 10705fc5a983dSmrg# ------------------------------- 10706fc5a983dSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 10707f3561b8bSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 10708fc5a983dSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 10709bd304fc0Smrg[AM_AUTOMAKE_VERSION([1.11.3])dnl 10710fc5a983dSmrgm4_ifndef([AC_AUTOCONF_VERSION], 10711fc5a983dSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 10712f3561b8bSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 10713fc5a983dSmrg 10714fc5a983dSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 10715fc5a983dSmrg 10716bd304fc0Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 10717fc5a983dSmrg# 10718fc5a983dSmrg# This file is free software; the Free Software Foundation 10719fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 10720fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 10721fc5a983dSmrg 10722bd304fc0Smrg# serial 1 10723bd304fc0Smrg 10724fc5a983dSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 10725fc5a983dSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 10726fc5a983dSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 10727fc5a983dSmrg# 10728fc5a983dSmrg# Of course, Automake must honor this variable whenever it calls a 10729fc5a983dSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 10730fc5a983dSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 10731fc5a983dSmrg# depending on how configure is run. This is pretty annoying, since 10732fc5a983dSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 10733fc5a983dSmrg# source directory, any form will work fine, but in subdirectories a 10734fc5a983dSmrg# relative path needs to be adjusted first. 10735fc5a983dSmrg# 10736fc5a983dSmrg# $ac_aux_dir/missing 10737fc5a983dSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 10738fc5a983dSmrg# $top_srcdir/$ac_aux_dir/missing 10739fc5a983dSmrg# fails if $ac_aux_dir is absolute, 10740fc5a983dSmrg# fails when called from a subdirectory in a VPATH build with 10741fc5a983dSmrg# a relative $ac_aux_dir 10742fc5a983dSmrg# 10743fc5a983dSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 10744fc5a983dSmrg# are both prefixed by $srcdir. In an in-source build this is usually 10745fc5a983dSmrg# harmless because $srcdir is `.', but things will broke when you 10746fc5a983dSmrg# start a VPATH build or use an absolute $srcdir. 10747fc5a983dSmrg# 10748fc5a983dSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 10749fc5a983dSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 10750fc5a983dSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 10751fc5a983dSmrg# and then we would define $MISSING as 10752fc5a983dSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 10753fc5a983dSmrg# This will work as long as MISSING is not called from configure, because 10754fc5a983dSmrg# unfortunately $(top_srcdir) has no meaning in configure. 10755fc5a983dSmrg# However there are other variables, like CC, which are often used in 10756fc5a983dSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 10757fc5a983dSmrg# 10758fc5a983dSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 10759fc5a983dSmrg# absolute PATH. The drawback is that using absolute paths prevent a 10760fc5a983dSmrg# configured tree to be moved without reconfiguration. 10761fc5a983dSmrg 10762fc5a983dSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10763fc5a983dSmrg[dnl Rely on autoconf to set up CDPATH properly. 10764fc5a983dSmrgAC_PREREQ([2.50])dnl 10765fc5a983dSmrg# expand $ac_aux_dir to an absolute path 10766fc5a983dSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 10767fc5a983dSmrg]) 10768fc5a983dSmrg 10769fc5a983dSmrg# AM_CONDITIONAL -*- Autoconf -*- 10770fc5a983dSmrg 1077171ba42d0Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 10772fc5a983dSmrg# Free Software Foundation, Inc. 10773fc5a983dSmrg# 10774fc5a983dSmrg# This file is free software; the Free Software Foundation 10775fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 10776fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 10777fc5a983dSmrg 1077871ba42d0Smrg# serial 9 10779fc5a983dSmrg 10780fc5a983dSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 10781fc5a983dSmrg# ------------------------------------- 10782fc5a983dSmrg# Define a conditional. 10783fc5a983dSmrgAC_DEFUN([AM_CONDITIONAL], 10784fc5a983dSmrg[AC_PREREQ(2.52)dnl 10785fc5a983dSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 10786fc5a983dSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 10787fc5a983dSmrgAC_SUBST([$1_TRUE])dnl 10788fc5a983dSmrgAC_SUBST([$1_FALSE])dnl 10789fc5a983dSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 10790fc5a983dSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1079171ba42d0Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 10792fc5a983dSmrgif $2; then 10793fc5a983dSmrg $1_TRUE= 10794fc5a983dSmrg $1_FALSE='#' 10795fc5a983dSmrgelse 10796fc5a983dSmrg $1_TRUE='#' 10797fc5a983dSmrg $1_FALSE= 10798fc5a983dSmrgfi 10799fc5a983dSmrgAC_CONFIG_COMMANDS_PRE( 10800fc5a983dSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 10801fc5a983dSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 10802fc5a983dSmrgUsually this means the macro was only invoked conditionally.]]) 10803fc5a983dSmrgfi])]) 10804fc5a983dSmrg 10805bd304fc0Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 10806bd304fc0Smrg# 2010, 2011 Free Software Foundation, Inc. 10807fc5a983dSmrg# 10808fc5a983dSmrg# This file is free software; the Free Software Foundation 10809fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 10810fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 10811fc5a983dSmrg 10812bd304fc0Smrg# serial 12 10813fc5a983dSmrg 10814fc5a983dSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 10815fc5a983dSmrg# written in clear, in which case automake, when reading aclocal.m4, 10816fc5a983dSmrg# will think it sees a *use*, and therefore will trigger all it's 10817fc5a983dSmrg# C support machinery. Also note that it means that autoscan, seeing 10818fc5a983dSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 10819fc5a983dSmrg 10820fc5a983dSmrg 10821fc5a983dSmrg# _AM_DEPENDENCIES(NAME) 10822fc5a983dSmrg# ---------------------- 10823fc5a983dSmrg# See how the compiler implements dependency checking. 10824fc5a983dSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 10825fc5a983dSmrg# We try a few techniques and use that to set a single cache variable. 10826fc5a983dSmrg# 10827fc5a983dSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 10828fc5a983dSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 10829fc5a983dSmrg# dependency, and given that the user is not expected to run this macro, 10830fc5a983dSmrg# just rely on AC_PROG_CC. 10831fc5a983dSmrgAC_DEFUN([_AM_DEPENDENCIES], 10832fc5a983dSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 10833fc5a983dSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 10834fc5a983dSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 10835fc5a983dSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 10836fc5a983dSmrg 10837fc5a983dSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 10838fc5a983dSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 10839fc5a983dSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 10840fc5a983dSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 10841fc5a983dSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 10842fc5a983dSmrg [depcc="$$1" am_compiler_list=]) 10843fc5a983dSmrg 10844fc5a983dSmrgAC_CACHE_CHECK([dependency style of $depcc], 10845fc5a983dSmrg [am_cv_$1_dependencies_compiler_type], 10846fc5a983dSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 10847fc5a983dSmrg # We make a subdir and do the tests there. Otherwise we can end up 10848fc5a983dSmrg # making bogus files that we don't know about and never remove. For 10849fc5a983dSmrg # instance it was reported that on HP-UX the gcc test will end up 10850fc5a983dSmrg # making a dummy file named `D' -- because `-MD' means `put the output 10851fc5a983dSmrg # in D'. 10852bd304fc0Smrg rm -rf conftest.dir 10853fc5a983dSmrg mkdir conftest.dir 10854fc5a983dSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 10855fc5a983dSmrg # using a relative directory. 10856fc5a983dSmrg cp "$am_depcomp" conftest.dir 10857fc5a983dSmrg cd conftest.dir 10858fc5a983dSmrg # We will build objects and dependencies in a subdirectory because 10859fc5a983dSmrg # it helps to detect inapplicable dependency modes. For instance 10860fc5a983dSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 10861fc5a983dSmrg # side effect of compilation, but ICC will put the dependencies in 10862fc5a983dSmrg # the current directory while Tru64 will put them in the object 10863fc5a983dSmrg # directory. 10864fc5a983dSmrg mkdir sub 10865fc5a983dSmrg 10866fc5a983dSmrg am_cv_$1_dependencies_compiler_type=none 10867fc5a983dSmrg if test "$am_compiler_list" = ""; then 10868fc5a983dSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 10869fc5a983dSmrg fi 1087071ba42d0Smrg am__universal=false 1087171ba42d0Smrg m4_case([$1], [CC], 1087271ba42d0Smrg [case " $depcc " in #( 1087371ba42d0Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 1087471ba42d0Smrg esac], 1087571ba42d0Smrg [CXX], 1087671ba42d0Smrg [case " $depcc " in #( 1087771ba42d0Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 1087871ba42d0Smrg esac]) 1087971ba42d0Smrg 10880fc5a983dSmrg for depmode in $am_compiler_list; do 10881fc5a983dSmrg # Setup a source with many dependencies, because some compilers 10882fc5a983dSmrg # like to wrap large dependency lists on column 80 (with \), and 10883fc5a983dSmrg # we should not choose a depcomp mode which is confused by this. 10884fc5a983dSmrg # 10885fc5a983dSmrg # We need to recreate these files for each test, as the compiler may 10886fc5a983dSmrg # overwrite some of them when testing with obscure command lines. 10887fc5a983dSmrg # This happens at least with the AIX C compiler. 10888fc5a983dSmrg : > sub/conftest.c 10889fc5a983dSmrg for i in 1 2 3 4 5 6; do 10890fc5a983dSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 10891fc5a983dSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 10892fc5a983dSmrg # Solaris 8's {/usr,}/bin/sh. 10893fc5a983dSmrg touch sub/conftst$i.h 10894fc5a983dSmrg done 10895fc5a983dSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 10896fc5a983dSmrg 1089771ba42d0Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 1089871ba42d0Smrg # mode. It turns out that the SunPro C++ compiler does not properly 1089971ba42d0Smrg # handle `-M -o', and we need to detect this. Also, some Intel 1090071ba42d0Smrg # versions had trouble with output in subdirs 1090171ba42d0Smrg am__obj=sub/conftest.${OBJEXT-o} 1090271ba42d0Smrg am__minus_obj="-o $am__obj" 10903fc5a983dSmrg case $depmode in 1090471ba42d0Smrg gcc) 1090571ba42d0Smrg # This depmode causes a compiler race in universal mode. 1090671ba42d0Smrg test "$am__universal" = false || continue 1090771ba42d0Smrg ;; 10908fc5a983dSmrg nosideeffect) 10909fc5a983dSmrg # after this tag, mechanisms are not by side-effect, so they'll 10910fc5a983dSmrg # only be used when explicitly requested 10911fc5a983dSmrg if test "x$enable_dependency_tracking" = xyes; then 10912fc5a983dSmrg continue 10913fc5a983dSmrg else 10914fc5a983dSmrg break 10915fc5a983dSmrg fi 10916fc5a983dSmrg ;; 10917bd304fc0Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 1091871ba42d0Smrg # This compiler won't grok `-c -o', but also, the minuso test has 1091971ba42d0Smrg # not run yet. These depmodes are late enough in the game, and 1092071ba42d0Smrg # so weak that their functioning should not be impacted. 1092171ba42d0Smrg am__obj=conftest.${OBJEXT-o} 1092271ba42d0Smrg am__minus_obj= 1092371ba42d0Smrg ;; 10924fc5a983dSmrg none) break ;; 10925fc5a983dSmrg esac 10926fc5a983dSmrg if depmode=$depmode \ 1092771ba42d0Smrg source=sub/conftest.c object=$am__obj \ 10928fc5a983dSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 1092971ba42d0Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 10930fc5a983dSmrg >/dev/null 2>conftest.err && 10931fc5a983dSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 10932fc5a983dSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 1093371ba42d0Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 10934fc5a983dSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 10935fc5a983dSmrg # icc doesn't choke on unknown options, it will just issue warnings 10936fc5a983dSmrg # or remarks (even with -Werror). So we grep stderr for any message 10937fc5a983dSmrg # that says an option was ignored or not supported. 10938fc5a983dSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 10939fc5a983dSmrg # icc: Command line warning: ignoring option '-M'; no argument required 10940fc5a983dSmrg # The diagnosis changed in icc 8.0: 10941fc5a983dSmrg # icc: Command line remark: option '-MP' not supported 10942fc5a983dSmrg if (grep 'ignoring option' conftest.err || 10943fc5a983dSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 10944fc5a983dSmrg am_cv_$1_dependencies_compiler_type=$depmode 10945fc5a983dSmrg break 10946fc5a983dSmrg fi 10947fc5a983dSmrg fi 10948fc5a983dSmrg done 10949fc5a983dSmrg 10950fc5a983dSmrg cd .. 10951fc5a983dSmrg rm -rf conftest.dir 10952fc5a983dSmrgelse 10953fc5a983dSmrg am_cv_$1_dependencies_compiler_type=none 10954fc5a983dSmrgfi 10955fc5a983dSmrg]) 10956fc5a983dSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 10957fc5a983dSmrgAM_CONDITIONAL([am__fastdep$1], [ 10958fc5a983dSmrg test "x$enable_dependency_tracking" != xno \ 10959fc5a983dSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 10960fc5a983dSmrg]) 10961fc5a983dSmrg 10962fc5a983dSmrg 10963fc5a983dSmrg# AM_SET_DEPDIR 10964fc5a983dSmrg# ------------- 10965fc5a983dSmrg# Choose a directory name for dependency files. 10966fc5a983dSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 10967fc5a983dSmrgAC_DEFUN([AM_SET_DEPDIR], 10968fc5a983dSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 10969fc5a983dSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 10970fc5a983dSmrg]) 10971fc5a983dSmrg 10972fc5a983dSmrg 10973fc5a983dSmrg# AM_DEP_TRACK 10974fc5a983dSmrg# ------------ 10975fc5a983dSmrgAC_DEFUN([AM_DEP_TRACK], 10976fc5a983dSmrg[AC_ARG_ENABLE(dependency-tracking, 10977fc5a983dSmrg[ --disable-dependency-tracking speeds up one-time build 10978fc5a983dSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 10979fc5a983dSmrgif test "x$enable_dependency_tracking" != xno; then 10980fc5a983dSmrg am_depcomp="$ac_aux_dir/depcomp" 10981fc5a983dSmrg AMDEPBACKSLASH='\' 10982bd304fc0Smrg am__nodep='_no' 10983fc5a983dSmrgfi 10984fc5a983dSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 10985fc5a983dSmrgAC_SUBST([AMDEPBACKSLASH])dnl 10986fc5a983dSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 10987bd304fc0SmrgAC_SUBST([am__nodep])dnl 10988bd304fc0Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 10989fc5a983dSmrg]) 10990fc5a983dSmrg 10991fc5a983dSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 10992fc5a983dSmrg 10993f3561b8bSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 10994fc5a983dSmrg# Free Software Foundation, Inc. 10995fc5a983dSmrg# 10996fc5a983dSmrg# This file is free software; the Free Software Foundation 10997fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 10998fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 10999fc5a983dSmrg 11000bd2f6fc9Smrg#serial 5 11001fc5a983dSmrg 11002fc5a983dSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 11003fc5a983dSmrg# ------------------------------ 11004fc5a983dSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11005bd2f6fc9Smrg[{ 11006bd2f6fc9Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 11007bd2f6fc9Smrg # are listed without --file. Let's play safe and only enable the eval 11008bd2f6fc9Smrg # if we detect the quoting. 11009bd2f6fc9Smrg case $CONFIG_FILES in 11010bd2f6fc9Smrg *\'*) eval set x "$CONFIG_FILES" ;; 11011bd2f6fc9Smrg *) set x $CONFIG_FILES ;; 11012bd2f6fc9Smrg esac 11013bd2f6fc9Smrg shift 11014bd2f6fc9Smrg for mf 11015bd2f6fc9Smrg do 11016bd2f6fc9Smrg # Strip MF so we end up with the name of the file. 11017bd2f6fc9Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11018bd2f6fc9Smrg # Check whether this is an Automake generated Makefile or not. 11019bd2f6fc9Smrg # We used to match only the files named `Makefile.in', but 11020bd2f6fc9Smrg # some people rename them; so instead we look at the file content. 11021bd2f6fc9Smrg # Grep'ing the first line is not enough: some people post-process 11022bd2f6fc9Smrg # each Makefile.in and add a new line on top of each file to say so. 11023bd2f6fc9Smrg # Grep'ing the whole file is not good either: AIX grep has a line 11024bd2f6fc9Smrg # limit of 2048, but all sed's we know have understand at least 4000. 11025bd2f6fc9Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11026bd2f6fc9Smrg dirpart=`AS_DIRNAME("$mf")` 11027bd2f6fc9Smrg else 11028bd2f6fc9Smrg continue 11029bd2f6fc9Smrg fi 11030bd2f6fc9Smrg # Extract the definition of DEPDIR, am__include, and am__quote 11031bd2f6fc9Smrg # from the Makefile without running `make'. 11032bd2f6fc9Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11033bd2f6fc9Smrg test -z "$DEPDIR" && continue 11034bd2f6fc9Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 11035bd2f6fc9Smrg test -z "am__include" && continue 11036bd2f6fc9Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11037bd2f6fc9Smrg # When using ansi2knr, U may be empty or an underscore; expand it 11038bd2f6fc9Smrg U=`sed -n 's/^U = //p' < "$mf"` 11039bd2f6fc9Smrg # Find all dependency output files, they are included files with 11040bd2f6fc9Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11041bd2f6fc9Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 11042bd2f6fc9Smrg # expansion. 11043bd2f6fc9Smrg for file in `sed -n " 11044bd2f6fc9Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11045bd2f6fc9Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 11046bd2f6fc9Smrg # Make sure the directory exists. 11047bd2f6fc9Smrg test -f "$dirpart/$file" && continue 11048bd2f6fc9Smrg fdir=`AS_DIRNAME(["$file"])` 11049bd2f6fc9Smrg AS_MKDIR_P([$dirpart/$fdir]) 11050bd2f6fc9Smrg # echo "creating $dirpart/$file" 11051bd2f6fc9Smrg echo '# dummy' > "$dirpart/$file" 11052bd2f6fc9Smrg done 11053fc5a983dSmrg done 11054bd2f6fc9Smrg} 11055fc5a983dSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11056fc5a983dSmrg 11057fc5a983dSmrg 11058fc5a983dSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 11059fc5a983dSmrg# ----------------------------- 11060fc5a983dSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 11061fc5a983dSmrg# 11062fc5a983dSmrg# This code is only required when automatic dependency tracking 11063fc5a983dSmrg# is enabled. FIXME. This creates each `.P' file that we will 11064fc5a983dSmrg# need in order to bootstrap the dependency handling code. 11065fc5a983dSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11066fc5a983dSmrg[AC_CONFIG_COMMANDS([depfiles], 11067fc5a983dSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11068fc5a983dSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 11069fc5a983dSmrg]) 11070fc5a983dSmrg 11071fc5a983dSmrg# Do all the work for Automake. -*- Autoconf -*- 11072fc5a983dSmrg 11073fc5a983dSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 1107471ba42d0Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 11075fc5a983dSmrg# 11076fc5a983dSmrg# This file is free software; the Free Software Foundation 11077fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 11078fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 11079fc5a983dSmrg 1108071ba42d0Smrg# serial 16 11081fc5a983dSmrg 11082fc5a983dSmrg# This macro actually does too much. Some checks are only needed if 11083fc5a983dSmrg# your package does certain things. But this isn't really a big deal. 11084fc5a983dSmrg 11085fc5a983dSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11086fc5a983dSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 11087fc5a983dSmrg# ----------------------------------------------- 11088fc5a983dSmrg# The call with PACKAGE and VERSION arguments is the old style 11089fc5a983dSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 11090fc5a983dSmrg# and VERSION should now be passed to AC_INIT and removed from 11091fc5a983dSmrg# the call to AM_INIT_AUTOMAKE. 11092fc5a983dSmrg# We support both call styles for the transition. After 11093fc5a983dSmrg# the next Automake release, Autoconf can make the AC_INIT 11094fc5a983dSmrg# arguments mandatory, and then we can depend on a new Autoconf 11095fc5a983dSmrg# release and drop the old call support. 11096fc5a983dSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 1109771ba42d0Smrg[AC_PREREQ([2.62])dnl 11098fc5a983dSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 11099fc5a983dSmrgdnl the ones we care about. 11100fc5a983dSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11101fc5a983dSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11102fc5a983dSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 11103fc5a983dSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 11104fc5a983dSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11105fc5a983dSmrg # is not polluted with repeated "-I." 11106fc5a983dSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11107fc5a983dSmrg # test to see if srcdir already configured 11108fc5a983dSmrg if test -f $srcdir/config.status; then 11109fc5a983dSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11110fc5a983dSmrg fi 11111fc5a983dSmrgfi 11112fc5a983dSmrg 11113fc5a983dSmrg# test whether we have cygpath 11114fc5a983dSmrgif test -z "$CYGPATH_W"; then 11115fc5a983dSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 11116fc5a983dSmrg CYGPATH_W='cygpath -w' 11117fc5a983dSmrg else 11118fc5a983dSmrg CYGPATH_W=echo 11119fc5a983dSmrg fi 11120fc5a983dSmrgfi 11121fc5a983dSmrgAC_SUBST([CYGPATH_W]) 11122fc5a983dSmrg 11123fc5a983dSmrg# Define the identity of the package. 11124fc5a983dSmrgdnl Distinguish between old-style and new-style calls. 11125fc5a983dSmrgm4_ifval([$2], 11126fc5a983dSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11127fc5a983dSmrg AC_SUBST([PACKAGE], [$1])dnl 11128fc5a983dSmrg AC_SUBST([VERSION], [$2])], 11129fc5a983dSmrg[_AM_SET_OPTIONS([$1])dnl 11130fc5a983dSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11131fc5a983dSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 11132fc5a983dSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11133fc5a983dSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11134fc5a983dSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11135fc5a983dSmrg 11136fc5a983dSmrg_AM_IF_OPTION([no-define],, 11137fc5a983dSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 11138fc5a983dSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 11139fc5a983dSmrg 11140fc5a983dSmrg# Some tools Automake needs. 11141fc5a983dSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 11142fc5a983dSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 11143fc5a983dSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 11144fc5a983dSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 11145fc5a983dSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 11146fc5a983dSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 11147fc5a983dSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 1114871ba42d0SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1114971ba42d0SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11150fc5a983dSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 11151fc5a983dSmrg# We need awk for the "check" target. The system "awk" is bad on 11152fc5a983dSmrg# some platforms. 11153fc5a983dSmrgAC_REQUIRE([AC_PROG_AWK])dnl 11154fc5a983dSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 11155fc5a983dSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 11156fc5a983dSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1115771ba42d0Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1115871ba42d0Smrg [_AM_PROG_TAR([v7])])]) 11159fc5a983dSmrg_AM_IF_OPTION([no-dependencies],, 11160fc5a983dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 1116171ba42d0Smrg [_AM_DEPENDENCIES(CC)], 1116271ba42d0Smrg [define([AC_PROG_CC], 1116371ba42d0Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 11164fc5a983dSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 1116571ba42d0Smrg [_AM_DEPENDENCIES(CXX)], 1116671ba42d0Smrg [define([AC_PROG_CXX], 1116771ba42d0Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 11168fc5a983dSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 1116971ba42d0Smrg [_AM_DEPENDENCIES(OBJC)], 1117071ba42d0Smrg [define([AC_PROG_OBJC], 1117171ba42d0Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 11172fc5a983dSmrg]) 1117371ba42d0Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 1117471ba42d0Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 1117571ba42d0Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 1117671ba42d0Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 1117771ba42d0SmrgAC_CONFIG_COMMANDS_PRE(dnl 1117871ba42d0Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 1117971ba42d0Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11180fc5a983dSmrg]) 11181fc5a983dSmrg 1118271ba42d0Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 1118371ba42d0Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 1118471ba42d0Smrgdnl mangled by Autoconf and run in a shell conditional statement. 1118571ba42d0Smrgm4_define([_AC_COMPILER_EXEEXT], 1118671ba42d0Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1118771ba42d0Smrg 11188fc5a983dSmrg 11189fc5a983dSmrg# When config.status generates a header, we must update the stamp-h file. 11190fc5a983dSmrg# This file resides in the same directory as the config header 11191fc5a983dSmrg# that is generated. The stamp files are numbered to have different names. 11192fc5a983dSmrg 11193fc5a983dSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11194fc5a983dSmrg# loop where config.status creates the headers, so we can generate 11195fc5a983dSmrg# our stamp files there. 11196fc5a983dSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11197fc5a983dSmrg[# Compute $1's index in $config_headers. 11198fc5a983dSmrg_am_arg=$1 11199fc5a983dSmrg_am_stamp_count=1 11200fc5a983dSmrgfor _am_header in $config_headers :; do 11201fc5a983dSmrg case $_am_header in 11202fc5a983dSmrg $_am_arg | $_am_arg:* ) 11203fc5a983dSmrg break ;; 11204fc5a983dSmrg * ) 11205fc5a983dSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11206fc5a983dSmrg esac 11207fc5a983dSmrgdone 11208fc5a983dSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11209fc5a983dSmrg 11210bd304fc0Smrg# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, 11211bd304fc0Smrg# Inc. 11212fc5a983dSmrg# 11213fc5a983dSmrg# This file is free software; the Free Software Foundation 11214fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 11215fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 11216fc5a983dSmrg 11217bd304fc0Smrg# serial 1 11218bd304fc0Smrg 11219fc5a983dSmrg# AM_PROG_INSTALL_SH 11220fc5a983dSmrg# ------------------ 11221fc5a983dSmrg# Define $install_sh. 11222fc5a983dSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 11223fc5a983dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1122471ba42d0Smrgif test x"${install_sh}" != xset; then 1122571ba42d0Smrg case $am_aux_dir in 1122671ba42d0Smrg *\ * | *\ *) 1122771ba42d0Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 1122871ba42d0Smrg *) 1122971ba42d0Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 1123071ba42d0Smrg esac 1123171ba42d0Smrgfi 11232fc5a983dSmrgAC_SUBST(install_sh)]) 11233fc5a983dSmrg 11234fc5a983dSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 11235fc5a983dSmrg# 11236fc5a983dSmrg# This file is free software; the Free Software Foundation 11237fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 11238fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 11239fc5a983dSmrg 11240fc5a983dSmrg# serial 2 11241fc5a983dSmrg 11242fc5a983dSmrg# Check whether the underlying file-system supports filenames 11243fc5a983dSmrg# with a leading dot. For instance MS-DOS doesn't. 11244fc5a983dSmrgAC_DEFUN([AM_SET_LEADING_DOT], 11245fc5a983dSmrg[rm -rf .tst 2>/dev/null 11246fc5a983dSmrgmkdir .tst 2>/dev/null 11247fc5a983dSmrgif test -d .tst; then 11248fc5a983dSmrg am__leading_dot=. 11249fc5a983dSmrgelse 11250fc5a983dSmrg am__leading_dot=_ 11251fc5a983dSmrgfi 11252fc5a983dSmrgrmdir .tst 2>/dev/null 11253fc5a983dSmrgAC_SUBST([am__leading_dot])]) 11254fc5a983dSmrg 11255fc5a983dSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 11256fc5a983dSmrg# From Jim Meyering 11257fc5a983dSmrg 11258bd304fc0Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 11259bd304fc0Smrg# 2011 Free Software Foundation, Inc. 11260fc5a983dSmrg# 11261fc5a983dSmrg# This file is free software; the Free Software Foundation 11262fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 11263fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 11264fc5a983dSmrg 1126571ba42d0Smrg# serial 5 11266fc5a983dSmrg 1126771ba42d0Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 1126871ba42d0Smrg# ---------------------------------- 1126971ba42d0Smrg# Control maintainer-specific portions of Makefiles. 1127071ba42d0Smrg# Default is to disable them, unless `enable' is passed literally. 1127171ba42d0Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 1127271ba42d0Smrg# can override the default with the --enable/--disable switch. 11273fc5a983dSmrgAC_DEFUN([AM_MAINTAINER_MODE], 1127471ba42d0Smrg[m4_case(m4_default([$1], [disable]), 1127571ba42d0Smrg [enable], [m4_define([am_maintainer_other], [disable])], 1127671ba42d0Smrg [disable], [m4_define([am_maintainer_other], [enable])], 1127771ba42d0Smrg [m4_define([am_maintainer_other], [enable]) 1127871ba42d0Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 11279bd304fc0SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 1128071ba42d0Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 1128171ba42d0Smrg AC_ARG_ENABLE([maintainer-mode], 1128271ba42d0Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 11283fc5a983dSmrg (and sometimes confusing) to the casual installer], 1128471ba42d0Smrg [USE_MAINTAINER_MODE=$enableval], 1128571ba42d0Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 11286fc5a983dSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 1128771ba42d0Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 11288fc5a983dSmrg MAINT=$MAINTAINER_MODE_TRUE 1128971ba42d0Smrg AC_SUBST([MAINT])dnl 11290fc5a983dSmrg] 11291fc5a983dSmrg) 11292fc5a983dSmrg 11293fc5a983dSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 11294fc5a983dSmrg 11295fc5a983dSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 11296fc5a983dSmrg 1129771ba42d0Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 11298fc5a983dSmrg# 11299fc5a983dSmrg# This file is free software; the Free Software Foundation 11300fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 11301fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 11302fc5a983dSmrg 1130371ba42d0Smrg# serial 4 11304fc5a983dSmrg 11305fc5a983dSmrg# AM_MAKE_INCLUDE() 11306fc5a983dSmrg# ----------------- 11307fc5a983dSmrg# Check to see how make treats includes. 11308fc5a983dSmrgAC_DEFUN([AM_MAKE_INCLUDE], 11309fc5a983dSmrg[am_make=${MAKE-make} 11310fc5a983dSmrgcat > confinc << 'END' 11311fc5a983dSmrgam__doit: 1131271ba42d0Smrg @echo this is the am__doit target 11313fc5a983dSmrg.PHONY: am__doit 11314fc5a983dSmrgEND 11315fc5a983dSmrg# If we don't find an include directive, just comment out the code. 11316fc5a983dSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 11317fc5a983dSmrgam__include="#" 11318fc5a983dSmrgam__quote= 11319fc5a983dSmrg_am_result=none 11320fc5a983dSmrg# First try GNU make style include. 11321fc5a983dSmrgecho "include confinc" > confmf 1132271ba42d0Smrg# Ignore all kinds of additional output from `make'. 1132371ba42d0Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 1132471ba42d0Smrg*the\ am__doit\ target*) 1132571ba42d0Smrg am__include=include 1132671ba42d0Smrg am__quote= 1132771ba42d0Smrg _am_result=GNU 1132871ba42d0Smrg ;; 1132971ba42d0Smrgesac 11330fc5a983dSmrg# Now try BSD make style include. 11331fc5a983dSmrgif test "$am__include" = "#"; then 11332fc5a983dSmrg echo '.include "confinc"' > confmf 1133371ba42d0Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 1133471ba42d0Smrg *the\ am__doit\ target*) 1133571ba42d0Smrg am__include=.include 1133671ba42d0Smrg am__quote="\"" 1133771ba42d0Smrg _am_result=BSD 1133871ba42d0Smrg ;; 1133971ba42d0Smrg esac 11340fc5a983dSmrgfi 11341fc5a983dSmrgAC_SUBST([am__include]) 11342fc5a983dSmrgAC_SUBST([am__quote]) 11343fc5a983dSmrgAC_MSG_RESULT([$_am_result]) 11344fc5a983dSmrgrm -f confinc confmf 11345fc5a983dSmrg]) 11346fc5a983dSmrg 11347fc5a983dSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11348fc5a983dSmrg 1134971ba42d0Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 11350fc5a983dSmrg# Free Software Foundation, Inc. 11351fc5a983dSmrg# 11352fc5a983dSmrg# This file is free software; the Free Software Foundation 11353fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 11354fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 11355fc5a983dSmrg 1135671ba42d0Smrg# serial 6 11357fc5a983dSmrg 11358fc5a983dSmrg# AM_MISSING_PROG(NAME, PROGRAM) 11359fc5a983dSmrg# ------------------------------ 11360fc5a983dSmrgAC_DEFUN([AM_MISSING_PROG], 11361fc5a983dSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 11362fc5a983dSmrg$1=${$1-"${am_missing_run}$2"} 11363fc5a983dSmrgAC_SUBST($1)]) 11364fc5a983dSmrg 11365fc5a983dSmrg 11366fc5a983dSmrg# AM_MISSING_HAS_RUN 11367fc5a983dSmrg# ------------------ 11368fc5a983dSmrg# Define MISSING if not defined so far and test if it supports --run. 11369fc5a983dSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 11370fc5a983dSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 11371fc5a983dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11372fc5a983dSmrgAC_REQUIRE_AUX_FILE([missing])dnl 1137371ba42d0Smrgif test x"${MISSING+set}" != xset; then 1137471ba42d0Smrg case $am_aux_dir in 1137571ba42d0Smrg *\ * | *\ *) 1137671ba42d0Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 1137771ba42d0Smrg *) 1137871ba42d0Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 1137971ba42d0Smrg esac 1138071ba42d0Smrgfi 11381fc5a983dSmrg# Use eval to expand $SHELL 11382fc5a983dSmrgif eval "$MISSING --run true"; then 11383fc5a983dSmrg am_missing_run="$MISSING --run " 11384fc5a983dSmrgelse 11385fc5a983dSmrg am_missing_run= 11386fc5a983dSmrg AC_MSG_WARN([`missing' script is too old or missing]) 11387fc5a983dSmrgfi 11388fc5a983dSmrg]) 11389fc5a983dSmrg 11390bd304fc0Smrg# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, 11391bd304fc0Smrg# Inc. 11392fc5a983dSmrg# 11393fc5a983dSmrg# This file is free software; the Free Software Foundation 11394fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 11395fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 11396fc5a983dSmrg 11397bd304fc0Smrg# serial 1 11398bd304fc0Smrg 11399fc5a983dSmrg# AM_PROG_MKDIR_P 11400fc5a983dSmrg# --------------- 11401fc5a983dSmrg# Check for `mkdir -p'. 11402fc5a983dSmrgAC_DEFUN([AM_PROG_MKDIR_P], 11403fc5a983dSmrg[AC_PREREQ([2.60])dnl 11404fc5a983dSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 11405fc5a983dSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 11406fc5a983dSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 11407fc5a983dSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 11408fc5a983dSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 11409fc5a983dSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 11410fc5a983dSmrgdnl adjustment using top_builddir (which is defined more often than 11411fc5a983dSmrgdnl MKDIR_P). 11412fc5a983dSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 11413fc5a983dSmrgcase $mkdir_p in 11414fc5a983dSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 11415fc5a983dSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 11416fc5a983dSmrgesac 11417fc5a983dSmrg]) 11418fc5a983dSmrg 11419fc5a983dSmrg# Helper functions for option handling. -*- Autoconf -*- 11420fc5a983dSmrg 11421bd304fc0Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software 11422bd304fc0Smrg# Foundation, Inc. 11423fc5a983dSmrg# 11424fc5a983dSmrg# This file is free software; the Free Software Foundation 11425fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 11426fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 11427fc5a983dSmrg 11428bd304fc0Smrg# serial 5 11429fc5a983dSmrg 11430fc5a983dSmrg# _AM_MANGLE_OPTION(NAME) 11431fc5a983dSmrg# ----------------------- 11432fc5a983dSmrgAC_DEFUN([_AM_MANGLE_OPTION], 11433fc5a983dSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 11434fc5a983dSmrg 11435fc5a983dSmrg# _AM_SET_OPTION(NAME) 11436bd304fc0Smrg# -------------------- 11437fc5a983dSmrg# Set option NAME. Presently that only means defining a flag for this option. 11438fc5a983dSmrgAC_DEFUN([_AM_SET_OPTION], 11439fc5a983dSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 11440fc5a983dSmrg 11441fc5a983dSmrg# _AM_SET_OPTIONS(OPTIONS) 11442bd304fc0Smrg# ------------------------ 11443fc5a983dSmrg# OPTIONS is a space-separated list of Automake options. 11444fc5a983dSmrgAC_DEFUN([_AM_SET_OPTIONS], 11445f3561b8bSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 11446fc5a983dSmrg 11447fc5a983dSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 11448fc5a983dSmrg# ------------------------------------------- 11449fc5a983dSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11450fc5a983dSmrgAC_DEFUN([_AM_IF_OPTION], 11451fc5a983dSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 11452fc5a983dSmrg 11453fc5a983dSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 11454fc5a983dSmrg 1145571ba42d0Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 11456fc5a983dSmrg# Free Software Foundation, Inc. 11457fc5a983dSmrg# 11458fc5a983dSmrg# This file is free software; the Free Software Foundation 11459fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 11460fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 11461fc5a983dSmrg 1146271ba42d0Smrg# serial 5 11463fc5a983dSmrg 11464fc5a983dSmrg# AM_SANITY_CHECK 11465fc5a983dSmrg# --------------- 11466fc5a983dSmrgAC_DEFUN([AM_SANITY_CHECK], 11467fc5a983dSmrg[AC_MSG_CHECKING([whether build environment is sane]) 11468fc5a983dSmrg# Just in case 11469fc5a983dSmrgsleep 1 11470fc5a983dSmrgecho timestamp > conftest.file 1147171ba42d0Smrg# Reject unsafe characters in $srcdir or the absolute working directory 1147271ba42d0Smrg# name. Accept space and tab only in the latter. 1147371ba42d0Smrgam_lf=' 1147471ba42d0Smrg' 1147571ba42d0Smrgcase `pwd` in 1147671ba42d0Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 1147771ba42d0Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 1147871ba42d0Smrgesac 1147971ba42d0Smrgcase $srcdir in 1148071ba42d0Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1148171ba42d0Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 1148271ba42d0Smrgesac 1148371ba42d0Smrg 11484fc5a983dSmrg# Do `set' in a subshell so we don't clobber the current shell's 11485fc5a983dSmrg# arguments. Must try -L first in case configure is actually a 11486fc5a983dSmrg# symlink; some systems play weird games with the mod time of symlinks 11487fc5a983dSmrg# (eg FreeBSD returns the mod time of the symlink's containing 11488fc5a983dSmrg# directory). 11489fc5a983dSmrgif ( 1149071ba42d0Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 11491fc5a983dSmrg if test "$[*]" = "X"; then 11492fc5a983dSmrg # -L didn't work. 1149371ba42d0Smrg set X `ls -t "$srcdir/configure" conftest.file` 11494fc5a983dSmrg fi 11495fc5a983dSmrg rm -f conftest.file 11496fc5a983dSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 11497fc5a983dSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 11498fc5a983dSmrg 11499fc5a983dSmrg # If neither matched, then we have a broken ls. This can happen 11500fc5a983dSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 11501fc5a983dSmrg # broken ls alias from the environment. This has actually 11502fc5a983dSmrg # happened. Such a system could not be considered "sane". 11503fc5a983dSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 11504fc5a983dSmrgalias in your environment]) 11505fc5a983dSmrg fi 11506fc5a983dSmrg 11507fc5a983dSmrg test "$[2]" = conftest.file 11508fc5a983dSmrg ) 11509fc5a983dSmrgthen 11510fc5a983dSmrg # Ok. 11511fc5a983dSmrg : 11512fc5a983dSmrgelse 11513fc5a983dSmrg AC_MSG_ERROR([newly created file is older than distributed files! 11514fc5a983dSmrgCheck your system clock]) 11515fc5a983dSmrgfi 11516fc5a983dSmrgAC_MSG_RESULT(yes)]) 11517fc5a983dSmrg 11518bd304fc0Smrg# Copyright (C) 2009, 2011 Free Software Foundation, Inc. 1151971ba42d0Smrg# 1152071ba42d0Smrg# This file is free software; the Free Software Foundation 1152171ba42d0Smrg# gives unlimited permission to copy and/or distribute it, 1152271ba42d0Smrg# with or without modifications, as long as this notice is preserved. 1152371ba42d0Smrg 11524bd304fc0Smrg# serial 2 1152571ba42d0Smrg 1152671ba42d0Smrg# AM_SILENT_RULES([DEFAULT]) 1152771ba42d0Smrg# -------------------------- 1152871ba42d0Smrg# Enable less verbose build rules; with the default set to DEFAULT 1152971ba42d0Smrg# (`yes' being less verbose, `no' or empty being verbose). 1153071ba42d0SmrgAC_DEFUN([AM_SILENT_RULES], 1153171ba42d0Smrg[AC_ARG_ENABLE([silent-rules], 1153271ba42d0Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 1153371ba42d0Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 1153471ba42d0Smrgcase $enable_silent_rules in 1153571ba42d0Smrgyes) AM_DEFAULT_VERBOSITY=0;; 1153671ba42d0Smrgno) AM_DEFAULT_VERBOSITY=1;; 1153771ba42d0Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 1153871ba42d0Smrgesac 11539bd304fc0Smrgdnl 11540bd304fc0Smrgdnl A few `make' implementations (e.g., NonStop OS and NextStep) 11541bd304fc0Smrgdnl do not support nested variable expansions. 11542bd304fc0Smrgdnl See automake bug#9928 and bug#10237. 11543bd304fc0Smrgam_make=${MAKE-make} 11544bd304fc0SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 11545bd304fc0Smrg [am_cv_make_support_nested_variables], 11546bd304fc0Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 11547bd304fc0SmrgBAR0=false 11548bd304fc0SmrgBAR1=true 11549bd304fc0SmrgV=1 11550bd304fc0Smrgam__doit: 11551bd304fc0Smrg @$(TRUE) 11552bd304fc0Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 11553bd304fc0Smrg am_cv_make_support_nested_variables=yes 11554bd304fc0Smrgelse 11555bd304fc0Smrg am_cv_make_support_nested_variables=no 11556bd304fc0Smrgfi]) 11557bd304fc0Smrgif test $am_cv_make_support_nested_variables = yes; then 11558bd304fc0Smrg dnl Using `$V' instead of `$(V)' breaks IRIX make. 11559bd304fc0Smrg AM_V='$(V)' 11560bd304fc0Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 11561bd304fc0Smrgelse 11562bd304fc0Smrg AM_V=$AM_DEFAULT_VERBOSITY 11563bd304fc0Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 11564bd304fc0Smrgfi 11565bd304fc0SmrgAC_SUBST([AM_V])dnl 11566bd304fc0SmrgAM_SUBST_NOTMAKE([AM_V])dnl 11567bd304fc0SmrgAC_SUBST([AM_DEFAULT_V])dnl 11568bd304fc0SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 1156971ba42d0SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 1157071ba42d0SmrgAM_BACKSLASH='\' 1157171ba42d0SmrgAC_SUBST([AM_BACKSLASH])dnl 1157271ba42d0Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1157371ba42d0Smrg]) 1157471ba42d0Smrg 11575bd304fc0Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 11576fc5a983dSmrg# 11577fc5a983dSmrg# This file is free software; the Free Software Foundation 11578fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 11579fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 11580fc5a983dSmrg 11581bd304fc0Smrg# serial 1 11582bd304fc0Smrg 11583fc5a983dSmrg# AM_PROG_INSTALL_STRIP 11584fc5a983dSmrg# --------------------- 11585fc5a983dSmrg# One issue with vendor `install' (even GNU) is that you can't 11586fc5a983dSmrg# specify the program used to strip binaries. This is especially 11587fc5a983dSmrg# annoying in cross-compiling environments, where the build's strip 11588fc5a983dSmrg# is unlikely to handle the host's binaries. 11589fc5a983dSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 11590fc5a983dSmrg# always use install-sh in `make install-strip', and initialize 11591fc5a983dSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 11592fc5a983dSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 11593fc5a983dSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11594fc5a983dSmrg# Installed binaries are usually stripped using `strip' when the user 11595fc5a983dSmrg# run `make install-strip'. However `strip' might not be the right 11596fc5a983dSmrg# tool to use in cross-compilation environments, therefore Automake 11597fc5a983dSmrg# will honor the `STRIP' environment variable to overrule this program. 11598fc5a983dSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 11599fc5a983dSmrgif test "$cross_compiling" != no; then 11600fc5a983dSmrg AC_CHECK_TOOL([STRIP], [strip], :) 11601fc5a983dSmrgfi 11602fc5a983dSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 11603fc5a983dSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 11604fc5a983dSmrg 11605bd304fc0Smrg# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. 11606fc5a983dSmrg# 11607fc5a983dSmrg# This file is free software; the Free Software Foundation 11608fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 11609fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 11610fc5a983dSmrg 11611bd304fc0Smrg# serial 3 1161271ba42d0Smrg 11613fc5a983dSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 11614fc5a983dSmrg# --------------------------- 11615fc5a983dSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 11616fc5a983dSmrg# This macro is traced by Automake. 11617fc5a983dSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 11618fc5a983dSmrg 1161971ba42d0Smrg# AM_SUBST_NOTMAKE(VARIABLE) 11620bd304fc0Smrg# -------------------------- 1162171ba42d0Smrg# Public sister of _AM_SUBST_NOTMAKE. 1162271ba42d0SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1162371ba42d0Smrg 11624fc5a983dSmrg# Check how to create a tarball. -*- Autoconf -*- 11625fc5a983dSmrg 11626bd304fc0Smrg# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. 11627fc5a983dSmrg# 11628fc5a983dSmrg# This file is free software; the Free Software Foundation 11629fc5a983dSmrg# gives unlimited permission to copy and/or distribute it, 11630fc5a983dSmrg# with or without modifications, as long as this notice is preserved. 11631fc5a983dSmrg 11632fc5a983dSmrg# serial 2 11633fc5a983dSmrg 11634fc5a983dSmrg# _AM_PROG_TAR(FORMAT) 11635fc5a983dSmrg# -------------------- 11636fc5a983dSmrg# Check how to create a tarball in format FORMAT. 11637fc5a983dSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 11638fc5a983dSmrg# 11639fc5a983dSmrg# Substitute a variable $(am__tar) that is a command 11640fc5a983dSmrg# writing to stdout a FORMAT-tarball containing the directory 11641fc5a983dSmrg# $tardir. 11642fc5a983dSmrg# tardir=directory && $(am__tar) > result.tar 11643fc5a983dSmrg# 11644fc5a983dSmrg# Substitute a variable $(am__untar) that extract such 11645fc5a983dSmrg# a tarball read from stdin. 11646fc5a983dSmrg# $(am__untar) < result.tar 11647fc5a983dSmrgAC_DEFUN([_AM_PROG_TAR], 11648bd304fc0Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 11649bd304fc0Smrg# in the wild :-( We should find a proper way to deprecate it ... 11650bd304fc0SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 11651fc5a983dSmrgm4_if([$1], [v7], 11652bd304fc0Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 11653fc5a983dSmrg [m4_case([$1], [ustar],, [pax],, 11654fc5a983dSmrg [m4_fatal([Unknown tar format])]) 11655fc5a983dSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 11656fc5a983dSmrg# Loop over all known methods to create a tar archive until one works. 11657fc5a983dSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 11658fc5a983dSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 11659fc5a983dSmrg# Do not fold the above two line into one, because Tru64 sh and 11660fc5a983dSmrg# Solaris sh will not grok spaces in the rhs of `-'. 11661fc5a983dSmrgfor _am_tool in $_am_tools 11662fc5a983dSmrgdo 11663fc5a983dSmrg case $_am_tool in 11664fc5a983dSmrg gnutar) 11665fc5a983dSmrg for _am_tar in tar gnutar gtar; 11666fc5a983dSmrg do 11667fc5a983dSmrg AM_RUN_LOG([$_am_tar --version]) && break 11668fc5a983dSmrg done 11669fc5a983dSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 11670fc5a983dSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 11671fc5a983dSmrg am__untar="$_am_tar -xf -" 11672fc5a983dSmrg ;; 11673fc5a983dSmrg plaintar) 11674fc5a983dSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 11675fc5a983dSmrg # ustar tarball either. 11676fc5a983dSmrg (tar --version) >/dev/null 2>&1 && continue 11677fc5a983dSmrg am__tar='tar chf - "$$tardir"' 11678fc5a983dSmrg am__tar_='tar chf - "$tardir"' 11679fc5a983dSmrg am__untar='tar xf -' 11680fc5a983dSmrg ;; 11681fc5a983dSmrg pax) 11682fc5a983dSmrg am__tar='pax -L -x $1 -w "$$tardir"' 11683fc5a983dSmrg am__tar_='pax -L -x $1 -w "$tardir"' 11684fc5a983dSmrg am__untar='pax -r' 11685fc5a983dSmrg ;; 11686fc5a983dSmrg cpio) 11687fc5a983dSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11688fc5a983dSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11689fc5a983dSmrg am__untar='cpio -i -H $1 -d' 11690fc5a983dSmrg ;; 11691fc5a983dSmrg none) 11692fc5a983dSmrg am__tar=false 11693fc5a983dSmrg am__tar_=false 11694fc5a983dSmrg am__untar=false 11695fc5a983dSmrg ;; 11696fc5a983dSmrg esac 11697fc5a983dSmrg 11698fc5a983dSmrg # If the value was cached, stop now. We just wanted to have am__tar 11699fc5a983dSmrg # and am__untar set. 11700fc5a983dSmrg test -n "${am_cv_prog_tar_$1}" && break 11701fc5a983dSmrg 11702fc5a983dSmrg # tar/untar a dummy directory, and stop if the command works 11703fc5a983dSmrg rm -rf conftest.dir 11704fc5a983dSmrg mkdir conftest.dir 11705fc5a983dSmrg echo GrepMe > conftest.dir/file 11706fc5a983dSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11707fc5a983dSmrg rm -rf conftest.dir 11708fc5a983dSmrg if test -s conftest.tar; then 11709fc5a983dSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 11710fc5a983dSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11711fc5a983dSmrg fi 11712fc5a983dSmrgdone 11713fc5a983dSmrgrm -rf conftest.dir 11714fc5a983dSmrg 11715fc5a983dSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11716fc5a983dSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11717fc5a983dSmrgAC_SUBST([am__tar]) 11718fc5a983dSmrgAC_SUBST([am__untar]) 11719fc5a983dSmrg]) # _AM_PROG_TAR 11720fc5a983dSmrg 11721