aclocal.m4 revision e96acad6
1e96acad6Smrg# generated automatically by aclocal 1.12.6 -*- Autoconf -*- 2e96acad6Smrg 3e96acad6Smrg# Copyright (C) 1996-2012 Free Software Foundation, Inc. 4dbbd9e4bSmacallan 5dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 6dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 7dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 8dbbd9e4bSmacallan 9dbbd9e4bSmacallan# This program is distributed in the hope that it will be useful, 10dbbd9e4bSmacallan# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11dbbd9e4bSmacallan# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12dbbd9e4bSmacallan# PARTICULAR PURPOSE. 13dbbd9e4bSmacallan 14dbbd9e4bSmacallanm4_ifndef([AC_AUTOCONF_VERSION], 15dbbd9e4bSmacallan [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16e96acad6Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 17e96acad6Smrg[m4_warning([this file was generated for autoconf 2.69. 18dbbd9e4bSmacallanYou have another version of autoconf. It may work, but is not guaranteed to. 19dbbd9e4bSmacallanIf you have problems, you may need to regenerate the build system entirely. 20e96acad6SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 21dbbd9e4bSmacallan 22dbbd9e4bSmacallan# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23e96acad6Smrg# 24e96acad6Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 25e96acad6Smrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 26e96acad6Smrg# Inc. 27e96acad6Smrg# Written by Gordon Matzigkeit, 1996 28e96acad6Smrg# 29e96acad6Smrg# This file is free software; the Free Software Foundation gives 30e96acad6Smrg# unlimited permission to copy and/or distribute it, with or without 31e96acad6Smrg# modifications, as long as this notice is preserved. 32e96acad6Smrg 33e96acad6Smrgm4_define([_LT_COPYING], [dnl 34e96acad6Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 35e96acad6Smrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 36e96acad6Smrg# Inc. 37e96acad6Smrg# Written by Gordon Matzigkeit, 1996 38e96acad6Smrg# 39e96acad6Smrg# This file is part of GNU Libtool. 40e96acad6Smrg# 41e96acad6Smrg# GNU Libtool is free software; you can redistribute it and/or 42e96acad6Smrg# modify it under the terms of the GNU General Public License as 43e96acad6Smrg# published by the Free Software Foundation; either version 2 of 44e96acad6Smrg# the License, or (at your option) any later version. 45e96acad6Smrg# 46e96acad6Smrg# As a special exception to the GNU General Public License, 47e96acad6Smrg# if you distribute this file as part of a program or library that 48e96acad6Smrg# is built using GNU Libtool, you may include this file under the 49e96acad6Smrg# same distribution terms that you use for the rest of that program. 50e96acad6Smrg# 51e96acad6Smrg# GNU Libtool is distributed in the hope that it will be useful, 52e96acad6Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 53e96acad6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 54e96acad6Smrg# GNU General Public License for more details. 55e96acad6Smrg# 56e96acad6Smrg# You should have received a copy of the GNU General Public License 57e96acad6Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 58e96acad6Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 59e96acad6Smrg# obtained by writing to the Free Software Foundation, Inc., 60e96acad6Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 61e96acad6Smrg]) 62dbbd9e4bSmacallan 63e96acad6Smrg# serial 57 LT_INIT 64dbbd9e4bSmacallan 65dbbd9e4bSmacallan 66e96acad6Smrg# LT_PREREQ(VERSION) 67e96acad6Smrg# ------------------ 68e96acad6Smrg# Complain and exit if this libtool version is less that VERSION. 69e96acad6Smrgm4_defun([LT_PREREQ], 70e96acad6Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 71e96acad6Smrg [m4_default([$3], 72e96acad6Smrg [m4_fatal([Libtool version $1 or higher is required], 73e96acad6Smrg 63)])], 74e96acad6Smrg [$2])]) 75dbbd9e4bSmacallan 76dbbd9e4bSmacallan 77e96acad6Smrg# _LT_CHECK_BUILDDIR 78e96acad6Smrg# ------------------ 79e96acad6Smrg# Complain if the absolute build directory name contains unusual characters 80e96acad6Smrgm4_defun([_LT_CHECK_BUILDDIR], 81e96acad6Smrg[case `pwd` in 82e96acad6Smrg *\ * | *\ *) 83e96acad6Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 84e96acad6Smrgesac 85e96acad6Smrg]) 86e96acad6Smrg 87e96acad6Smrg 88e96acad6Smrg# LT_INIT([OPTIONS]) 89e96acad6Smrg# ------------------ 90e96acad6SmrgAC_DEFUN([LT_INIT], 91e96acad6Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 92e96acad6SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 93e96acad6SmrgAC_BEFORE([$0], [LT_LANG])dnl 94e96acad6SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 95e96acad6SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 96e96acad6Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 97e96acad6Smrg 98e96acad6Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 99e96acad6Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 100e96acad6Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 101e96acad6Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 102e96acad6Smrgdnl unless we require an AC_DEFUNed macro: 103e96acad6SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 104e96acad6SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 105e96acad6SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 106e96acad6SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 107e96acad6Smrgm4_require([_LT_PROG_LTMAIN])dnl 108e96acad6Smrg 109e96acad6Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 110e96acad6Smrg 111e96acad6Smrgdnl Parse OPTIONS 112e96acad6Smrg_LT_SET_OPTIONS([$0], [$1]) 113dbbd9e4bSmacallan 114dbbd9e4bSmacallan# This can be used to rebuild libtool when needed 115e96acad6SmrgLIBTOOL_DEPS="$ltmain" 116dbbd9e4bSmacallan 117dbbd9e4bSmacallan# Always use our own libtool. 118dbbd9e4bSmacallanLIBTOOL='$(SHELL) $(top_builddir)/libtool' 119dbbd9e4bSmacallanAC_SUBST(LIBTOOL)dnl 120dbbd9e4bSmacallan 121e96acad6Smrg_LT_SETUP 122dbbd9e4bSmacallan 123e96acad6Smrg# Only expand once: 124e96acad6Smrgm4_define([LT_INIT]) 125e96acad6Smrg])# LT_INIT 126dbbd9e4bSmacallan 127e96acad6Smrg# Old names: 128e96acad6SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 129e96acad6SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 130e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 131e96acad6Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 132e96acad6Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 133e96acad6Smrg 134e96acad6Smrg 135e96acad6Smrg# _LT_CC_BASENAME(CC) 136e96acad6Smrg# ------------------- 137e96acad6Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 138e96acad6Smrgm4_defun([_LT_CC_BASENAME], 139e96acad6Smrg[for cc_temp in $1""; do 140e96acad6Smrg case $cc_temp in 141e96acad6Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 142e96acad6Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 143e96acad6Smrg \-*) ;; 144e96acad6Smrg *) break;; 145e96acad6Smrg esac 146e96acad6Smrgdone 147e96acad6Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 148e96acad6Smrg]) 149e96acad6Smrg 150e96acad6Smrg 151e96acad6Smrg# _LT_FILEUTILS_DEFAULTS 152e96acad6Smrg# ---------------------- 153e96acad6Smrg# It is okay to use these file commands and assume they have been set 154e96acad6Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 155e96acad6Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 156e96acad6Smrg[: ${CP="cp -f"} 157e96acad6Smrg: ${MV="mv -f"} 158e96acad6Smrg: ${RM="rm -f"} 159e96acad6Smrg])# _LT_FILEUTILS_DEFAULTS 160e96acad6Smrg 161e96acad6Smrg 162e96acad6Smrg# _LT_SETUP 163e96acad6Smrg# --------- 164e96acad6Smrgm4_defun([_LT_SETUP], 165e96acad6Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 166dbbd9e4bSmacallanAC_REQUIRE([AC_CANONICAL_BUILD])dnl 167e96acad6SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 168e96acad6SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 169dbbd9e4bSmacallan 170e96acad6Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 171e96acad6Smrg_LT_DECL([], [host], [0])dnl 172e96acad6Smrg_LT_DECL([], [host_os], [0])dnl 173e96acad6Smrgdnl 174e96acad6Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 175e96acad6Smrg_LT_DECL([], [build], [0])dnl 176e96acad6Smrg_LT_DECL([], [build_os], [0])dnl 177e96acad6Smrgdnl 178e96acad6SmrgAC_REQUIRE([AC_PROG_CC])dnl 179e96acad6SmrgAC_REQUIRE([LT_PATH_LD])dnl 180e96acad6SmrgAC_REQUIRE([LT_PATH_NM])dnl 181e96acad6Smrgdnl 182dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_LN_S])dnl 183e96acad6Smrgtest -z "$LN_S" && LN_S="ln -s" 184e96acad6Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 185dbbd9e4bSmacallandnl 186e96acad6SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 187e96acad6Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 188e96acad6Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 189e96acad6Smrgdnl 190e96acad6Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 191e96acad6Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 192e96acad6Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 193e96acad6Smrgm4_require([_LT_CMD_RELOAD])dnl 194e96acad6Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 195e96acad6Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 196e96acad6Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 197e96acad6Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 198e96acad6Smrgm4_require([_LT_WITH_SYSROOT])dnl 199e96acad6Smrg 200e96acad6Smrg_LT_CONFIG_LIBTOOL_INIT([ 201e96acad6Smrg# See if we are running on zsh, and set the options which allow our 202e96acad6Smrg# commands through without removal of \ escapes INIT. 203e96acad6Smrgif test -n "\${ZSH_VERSION+set}" ; then 204e96acad6Smrg setopt NO_GLOB_SUBST 205e96acad6Smrgfi 206e96acad6Smrg]) 207e96acad6Smrgif test -n "${ZSH_VERSION+set}" ; then 208e96acad6Smrg setopt NO_GLOB_SUBST 209e96acad6Smrgfi 210dbbd9e4bSmacallan 211e96acad6Smrg_LT_CHECK_OBJDIR 212e96acad6Smrg 213e96acad6Smrgm4_require([_LT_TAG_COMPILER])dnl 214dbbd9e4bSmacallan 215dbbd9e4bSmacallancase $host_os in 216dbbd9e4bSmacallanaix3*) 217dbbd9e4bSmacallan # AIX sometimes has problems with the GCC collect2 program. For some 218dbbd9e4bSmacallan # reason, if we set the COLLECT_NAMES environment variable, the problems 219dbbd9e4bSmacallan # vanish in a puff of smoke. 220dbbd9e4bSmacallan if test "X${COLLECT_NAMES+set}" != Xset; then 221dbbd9e4bSmacallan COLLECT_NAMES= 222dbbd9e4bSmacallan export COLLECT_NAMES 223dbbd9e4bSmacallan fi 224dbbd9e4bSmacallan ;; 225dbbd9e4bSmacallanesac 226dbbd9e4bSmacallan 227dbbd9e4bSmacallan# Global variables: 228e96acad6Smrgofile=libtool 229dbbd9e4bSmacallancan_build_shared=yes 230dbbd9e4bSmacallan 231dbbd9e4bSmacallan# All known linkers require a `.a' archive for static linking (except MSVC, 232dbbd9e4bSmacallan# which needs '.lib'). 233dbbd9e4bSmacallanlibext=a 234dbbd9e4bSmacallan 235e96acad6Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 236dbbd9e4bSmacallan 237dbbd9e4bSmacallanold_CC="$CC" 238dbbd9e4bSmacallanold_CFLAGS="$CFLAGS" 239dbbd9e4bSmacallan 240dbbd9e4bSmacallan# Set sane defaults for various variables 241dbbd9e4bSmacallantest -z "$CC" && CC=cc 242dbbd9e4bSmacallantest -z "$LTCC" && LTCC=$CC 243dbbd9e4bSmacallantest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 244dbbd9e4bSmacallantest -z "$LD" && LD=ld 245dbbd9e4bSmacallantest -z "$ac_objext" && ac_objext=o 246dbbd9e4bSmacallan 247dbbd9e4bSmacallan_LT_CC_BASENAME([$compiler]) 248dbbd9e4bSmacallan 249dbbd9e4bSmacallan# Only perform the check for file, if the check method requires it 250e96acad6Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 251dbbd9e4bSmacallancase $deplibs_check_method in 252dbbd9e4bSmacallanfile_magic*) 253dbbd9e4bSmacallan if test "$file_magic_cmd" = '$MAGIC_CMD'; then 254e96acad6Smrg _LT_PATH_MAGIC 255dbbd9e4bSmacallan fi 256dbbd9e4bSmacallan ;; 257dbbd9e4bSmacallanesac 258dbbd9e4bSmacallan 259e96acad6Smrg# Use C for the default configuration in the libtool script 260e96acad6SmrgLT_SUPPORTED_TAG([CC]) 261e96acad6Smrg_LT_LANG_C_CONFIG 262e96acad6Smrg_LT_LANG_DEFAULT_CONFIG 263e96acad6Smrg_LT_CONFIG_COMMANDS 264e96acad6Smrg])# _LT_SETUP 265dbbd9e4bSmacallan 266dbbd9e4bSmacallan 267e96acad6Smrg# _LT_PREPARE_SED_QUOTE_VARS 268e96acad6Smrg# -------------------------- 269e96acad6Smrg# Define a few sed substitution that help us do robust quoting. 270e96acad6Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 271e96acad6Smrg[# Backslashify metacharacters that are still active within 272e96acad6Smrg# double-quoted strings. 273e96acad6Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 274dbbd9e4bSmacallan 275e96acad6Smrg# Same as above, but do not quote variable references. 276e96acad6Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 277dbbd9e4bSmacallan 278e96acad6Smrg# Sed substitution to delay expansion of an escaped shell variable in a 279e96acad6Smrg# double_quote_subst'ed string. 280e96acad6Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 281dbbd9e4bSmacallan 282e96acad6Smrg# Sed substitution to delay expansion of an escaped single quote. 283e96acad6Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 284dbbd9e4bSmacallan 285e96acad6Smrg# Sed substitution to avoid accidental globbing in evaled expressions 286e96acad6Smrgno_glob_subst='s/\*/\\\*/g' 287e96acad6Smrg]) 288dbbd9e4bSmacallan 289e96acad6Smrg# _LT_PROG_LTMAIN 290e96acad6Smrg# --------------- 291e96acad6Smrg# Note that this code is called both from `configure', and `config.status' 292e96acad6Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 293e96acad6Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 294e96acad6Smrg# so we pass a copy along to make sure it has a sensible value anyway. 295e96acad6Smrgm4_defun([_LT_PROG_LTMAIN], 296e96acad6Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 297e96acad6Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 298e96acad6Smrgltmain="$ac_aux_dir/ltmain.sh" 299e96acad6Smrg])# _LT_PROG_LTMAIN 300dbbd9e4bSmacallan 301dbbd9e4bSmacallan 302dbbd9e4bSmacallan 303e96acad6Smrg# So that we can recreate a full libtool script including additional 304e96acad6Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 305e96acad6Smrg# in macros and then make a single call at the end using the `libtool' 306e96acad6Smrg# label. 307dbbd9e4bSmacallan 308dbbd9e4bSmacallan 309e96acad6Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 310e96acad6Smrg# ---------------------------------------- 311e96acad6Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 312e96acad6Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 313e96acad6Smrg[m4_ifval([$1], 314e96acad6Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 315e96acad6Smrg [$1 316e96acad6Smrg])])]) 317dbbd9e4bSmacallan 318e96acad6Smrg# Initialize. 319e96acad6Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 320dbbd9e4bSmacallan 321dbbd9e4bSmacallan 322e96acad6Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 323e96acad6Smrg# ------------------------------ 324e96acad6Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 325e96acad6Smrgm4_define([_LT_CONFIG_LIBTOOL], 326e96acad6Smrg[m4_ifval([$1], 327e96acad6Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 328e96acad6Smrg [$1 329e96acad6Smrg])])]) 330e96acad6Smrg 331e96acad6Smrg# Initialize. 332e96acad6Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 333e96acad6Smrg 334e96acad6Smrg 335e96acad6Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 336e96acad6Smrg# ----------------------------------------------------- 337e96acad6Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 338e96acad6Smrg[_LT_CONFIG_LIBTOOL([$1]) 339e96acad6Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 340e96acad6Smrg]) 341dbbd9e4bSmacallan 342dbbd9e4bSmacallan 343e96acad6Smrg# _LT_FORMAT_COMMENT([COMMENT]) 344e96acad6Smrg# ----------------------------- 345e96acad6Smrg# Add leading comment marks to the start of each line, and a trailing 346e96acad6Smrg# full-stop to the whole comment if one is not present already. 347e96acad6Smrgm4_define([_LT_FORMAT_COMMENT], 348e96acad6Smrg[m4_ifval([$1], [ 349e96acad6Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 350e96acad6Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 351e96acad6Smrg)]) 352e96acad6Smrg 353e96acad6Smrg 354e96acad6Smrg 355e96acad6Smrg 356e96acad6Smrg 357e96acad6Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 358e96acad6Smrg# ------------------------------------------------------------------- 359e96acad6Smrg# CONFIGNAME is the name given to the value in the libtool script. 360e96acad6Smrg# VARNAME is the (base) name used in the configure script. 361e96acad6Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 362e96acad6Smrg# VARNAME. Any other value will be used directly. 363e96acad6Smrgm4_define([_LT_DECL], 364e96acad6Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 365e96acad6Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 366e96acad6Smrg [m4_ifval([$1], [$1], [$2])]) 367e96acad6Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 368e96acad6Smrg m4_ifval([$4], 369e96acad6Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 370e96acad6Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 371e96acad6Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 372dbbd9e4bSmacallan]) 373dbbd9e4bSmacallan 374dbbd9e4bSmacallan 375e96acad6Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 376e96acad6Smrg# -------------------------------------------------------- 377e96acad6Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 378dbbd9e4bSmacallan 379dbbd9e4bSmacallan 380e96acad6Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 381e96acad6Smrg# ------------------------------------------------ 382e96acad6Smrgm4_define([lt_decl_tag_varnames], 383e96acad6Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 384dbbd9e4bSmacallan 385dbbd9e4bSmacallan 386e96acad6Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 387e96acad6Smrg# --------------------------------------------------------- 388e96acad6Smrgm4_define([_lt_decl_filter], 389e96acad6Smrg[m4_case([$#], 390e96acad6Smrg [0], [m4_fatal([$0: too few arguments: $#])], 391e96acad6Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 392e96acad6Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 393e96acad6Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 394e96acad6Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 395e96acad6Smrg]) 396dbbd9e4bSmacallan 397dbbd9e4bSmacallan 398e96acad6Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 399e96acad6Smrg# -------------------------------------------------- 400e96acad6Smrgm4_define([lt_decl_quote_varnames], 401e96acad6Smrg[_lt_decl_filter([value], [1], $@)]) 402dbbd9e4bSmacallan 403dbbd9e4bSmacallan 404e96acad6Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 405e96acad6Smrg# --------------------------------------------------- 406e96acad6Smrgm4_define([lt_decl_dquote_varnames], 407e96acad6Smrg[_lt_decl_filter([value], [2], $@)]) 408dbbd9e4bSmacallan 409dbbd9e4bSmacallan 410e96acad6Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 411e96acad6Smrg# --------------------------------------------------- 412e96acad6Smrgm4_define([lt_decl_varnames_tagged], 413e96acad6Smrg[m4_assert([$# <= 2])dnl 414e96acad6Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 415e96acad6Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 416e96acad6Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 417e96acad6Smrgm4_define([_lt_decl_varnames_tagged], 418e96acad6Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 419dbbd9e4bSmacallan 420dbbd9e4bSmacallan 421e96acad6Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 422e96acad6Smrg# ------------------------------------------------ 423e96acad6Smrgm4_define([lt_decl_all_varnames], 424e96acad6Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 425e96acad6Smrg m4_if([$2], [], 426e96acad6Smrg m4_quote(lt_decl_varnames), 427e96acad6Smrg m4_quote(m4_shift($@))))[]dnl 428e96acad6Smrg]) 429e96acad6Smrgm4_define([_lt_decl_all_varnames], 430e96acad6Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 431e96acad6Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 432e96acad6Smrg]) 433dbbd9e4bSmacallan 434dbbd9e4bSmacallan 435e96acad6Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 436e96acad6Smrg# ------------------------------------ 437e96acad6Smrg# Quote a variable value, and forward it to `config.status' so that its 438e96acad6Smrg# declaration there will have the same value as in `configure'. VARNAME 439e96acad6Smrg# must have a single quote delimited value for this to work. 440e96acad6Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 441e96acad6Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 442dbbd9e4bSmacallan 443dbbd9e4bSmacallan 444e96acad6Smrg# _LT_CONFIG_STATUS_DECLARATIONS 445e96acad6Smrg# ------------------------------ 446e96acad6Smrg# We delimit libtool config variables with single quotes, so when 447e96acad6Smrg# we write them to config.status, we have to be sure to quote all 448e96acad6Smrg# embedded single quotes properly. In configure, this macro expands 449e96acad6Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 450e96acad6Smrg# 451e96acad6Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 452e96acad6Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 453e96acad6Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 454e96acad6Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 455dbbd9e4bSmacallan 456e96acad6Smrg 457e96acad6Smrg# _LT_LIBTOOL_TAGS 458e96acad6Smrg# ---------------- 459e96acad6Smrg# Output comment and list of tags supported by the script 460e96acad6Smrgm4_defun([_LT_LIBTOOL_TAGS], 461e96acad6Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 462e96acad6Smrgavailable_tags="_LT_TAGS"dnl 463e96acad6Smrg]) 464e96acad6Smrg 465e96acad6Smrg 466e96acad6Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 467e96acad6Smrg# ----------------------------------- 468e96acad6Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 469e96acad6Smrg# expand to a commented shell variable setting: 470e96acad6Smrg# 471e96acad6Smrg# # Some comment about what VAR is for. 472e96acad6Smrg# visible_name=$lt_internal_name 473e96acad6Smrgm4_define([_LT_LIBTOOL_DECLARE], 474e96acad6Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 475e96acad6Smrg [description])))[]dnl 476e96acad6Smrgm4_pushdef([_libtool_name], 477e96acad6Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 478e96acad6Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 479e96acad6Smrg [0], [_libtool_name=[$]$1], 480e96acad6Smrg [1], [_libtool_name=$lt_[]$1], 481e96acad6Smrg [2], [_libtool_name=$lt_[]$1], 482e96acad6Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 483e96acad6Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 484e96acad6Smrg]) 485e96acad6Smrg 486e96acad6Smrg 487e96acad6Smrg# _LT_LIBTOOL_CONFIG_VARS 488e96acad6Smrg# ----------------------- 489e96acad6Smrg# Produce commented declarations of non-tagged libtool config variables 490e96acad6Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 491e96acad6Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 492e96acad6Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 493e96acad6Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 494e96acad6Smrg[m4_foreach([_lt_var], 495e96acad6Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 496e96acad6Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 497e96acad6Smrg 498e96acad6Smrg 499e96acad6Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 500e96acad6Smrg# ------------------------- 501e96acad6Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 502e96acad6Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 503e96acad6Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 504e96acad6Smrg 505e96acad6Smrg 506e96acad6Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 507e96acad6Smrg# ------------------------------ 508e96acad6Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 509e96acad6Smrg 510e96acad6Smrg 511e96acad6Smrg# _LT_CONFIG_COMMANDS 512e96acad6Smrg# ------------------- 513e96acad6Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 514e96acad6Smrg# variables for single and double quote escaping we saved from calls 515e96acad6Smrg# to _LT_DECL, we can put quote escaped variables declarations 516e96acad6Smrg# into `config.status', and then the shell code to quote escape them in 517e96acad6Smrg# for loops in `config.status'. Finally, any additional code accumulated 518e96acad6Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 519e96acad6Smrgm4_defun([_LT_CONFIG_COMMANDS], 520e96acad6Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 521e96acad6Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 522e96acad6Smrg dnl instead of duplicating it all over again into config.status, 523e96acad6Smrg dnl then we will have config.status run $CONFIG_LT later, so it 524e96acad6Smrg dnl needs to know what name is stored there: 525e96acad6Smrg [AC_CONFIG_COMMANDS([libtool], 526e96acad6Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 527e96acad6Smrg dnl If the libtool generation code is destined for config.status, 528e96acad6Smrg dnl expand the accumulated commands and init code now: 529e96acad6Smrg [AC_CONFIG_COMMANDS([libtool], 530e96acad6Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 531e96acad6Smrg])#_LT_CONFIG_COMMANDS 532e96acad6Smrg 533e96acad6Smrg 534e96acad6Smrg# Initialize. 535e96acad6Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 536e96acad6Smrg[ 537e96acad6Smrg 538e96acad6Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 539e96acad6Smrg# if CDPATH is set. 540e96acad6Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 541e96acad6Smrg 542e96acad6Smrgsed_quote_subst='$sed_quote_subst' 543e96acad6Smrgdouble_quote_subst='$double_quote_subst' 544e96acad6Smrgdelay_variable_subst='$delay_variable_subst' 545e96acad6Smrg_LT_CONFIG_STATUS_DECLARATIONS 546e96acad6SmrgLTCC='$LTCC' 547e96acad6SmrgLTCFLAGS='$LTCFLAGS' 548e96acad6Smrgcompiler='$compiler_DEFAULT' 549e96acad6Smrg 550e96acad6Smrg# A function that is used when there is no print builtin or printf. 551e96acad6Smrgfunc_fallback_echo () 552e96acad6Smrg{ 553e96acad6Smrg eval 'cat <<_LTECHO_EOF 554e96acad6Smrg\$[]1 555e96acad6Smrg_LTECHO_EOF' 556e96acad6Smrg} 557e96acad6Smrg 558e96acad6Smrg# Quote evaled strings. 559e96acad6Smrgfor var in lt_decl_all_varnames([[ \ 560e96acad6Smrg]], lt_decl_quote_varnames); do 561e96acad6Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 562e96acad6Smrg *[[\\\\\\\`\\"\\\$]]*) 563e96acad6Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 564dbbd9e4bSmacallan ;; 565e96acad6Smrg *) 566e96acad6Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 567dbbd9e4bSmacallan ;; 568dbbd9e4bSmacallan esac 569e96acad6Smrgdone 570dbbd9e4bSmacallan 571e96acad6Smrg# Double-quote double-evaled strings. 572e96acad6Smrgfor var in lt_decl_all_varnames([[ \ 573e96acad6Smrg]], lt_decl_dquote_varnames); do 574e96acad6Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 575e96acad6Smrg *[[\\\\\\\`\\"\\\$]]*) 576e96acad6Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 577dbbd9e4bSmacallan ;; 578e96acad6Smrg *) 579e96acad6Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 580dbbd9e4bSmacallan ;; 581dbbd9e4bSmacallan esac 582e96acad6Smrgdone 583dbbd9e4bSmacallan 584e96acad6Smrg_LT_OUTPUT_LIBTOOL_INIT 585e96acad6Smrg]) 586dbbd9e4bSmacallan 587e96acad6Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 588e96acad6Smrg# ------------------------------------ 589e96acad6Smrg# Generate a child script FILE with all initialization necessary to 590e96acad6Smrg# reuse the environment learned by the parent script, and make the 591e96acad6Smrg# file executable. If COMMENT is supplied, it is inserted after the 592e96acad6Smrg# `#!' sequence but before initialization text begins. After this 593e96acad6Smrg# macro, additional text can be appended to FILE to form the body of 594e96acad6Smrg# the child script. The macro ends with non-zero status if the 595e96acad6Smrg# file could not be fully written (such as if the disk is full). 596e96acad6Smrgm4_ifdef([AS_INIT_GENERATED], 597e96acad6Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 598e96acad6Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 599e96acad6Smrg[m4_require([AS_PREPARE])]dnl 600e96acad6Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 601e96acad6Smrg[lt_write_fail=0 602e96acad6Smrgcat >$1 <<_ASEOF || lt_write_fail=1 603e96acad6Smrg#! $SHELL 604e96acad6Smrg# Generated by $as_me. 605e96acad6Smrg$2 606e96acad6SmrgSHELL=\${CONFIG_SHELL-$SHELL} 607e96acad6Smrgexport SHELL 608e96acad6Smrg_ASEOF 609e96acad6Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 610e96acad6SmrgAS_SHELL_SANITIZE 611e96acad6Smrg_AS_PREPARE 612e96acad6Smrgexec AS_MESSAGE_FD>&1 613e96acad6Smrg_ASEOF 614e96acad6Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 615e96acad6Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 616e96acad6Smrg 617e96acad6Smrg# LT_OUTPUT 618e96acad6Smrg# --------- 619e96acad6Smrg# This macro allows early generation of the libtool script (before 620e96acad6Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 621e96acad6Smrg# tests. 622e96acad6SmrgAC_DEFUN([LT_OUTPUT], 623e96acad6Smrg[: ${CONFIG_LT=./config.lt} 624e96acad6SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 625e96acad6Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 626e96acad6Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 627e96acad6Smrg 628e96acad6Smrgcat >>"$CONFIG_LT" <<\_LTEOF 629e96acad6Smrglt_cl_silent=false 630e96acad6Smrgexec AS_MESSAGE_LOG_FD>>config.log 631e96acad6Smrg{ 632e96acad6Smrg echo 633e96acad6Smrg AS_BOX([Running $as_me.]) 634e96acad6Smrg} >&AS_MESSAGE_LOG_FD 635dbbd9e4bSmacallan 636e96acad6Smrglt_cl_help="\ 637e96acad6Smrg\`$as_me' creates a local libtool stub from the current configuration, 638e96acad6Smrgfor use in further configure time tests before the real libtool is 639e96acad6Smrggenerated. 640dbbd9e4bSmacallan 641e96acad6SmrgUsage: $[0] [[OPTIONS]] 642dbbd9e4bSmacallan 643e96acad6Smrg -h, --help print this help, then exit 644e96acad6Smrg -V, --version print version number, then exit 645e96acad6Smrg -q, --quiet do not print progress messages 646e96acad6Smrg -d, --debug don't remove temporary files 647dbbd9e4bSmacallan 648e96acad6SmrgReport bugs to <bug-libtool@gnu.org>." 649dbbd9e4bSmacallan 650e96acad6Smrglt_cl_version="\ 651e96acad6Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 652e96acad6Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 653e96acad6Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 654dbbd9e4bSmacallan 655e96acad6SmrgCopyright (C) 2010 Free Software Foundation, Inc. 656e96acad6SmrgThis config.lt script is free software; the Free Software Foundation 657e96acad6Smrggives unlimited permision to copy, distribute and modify it." 658dbbd9e4bSmacallan 659e96acad6Smrgwhile test $[#] != 0 660e96acad6Smrgdo 661e96acad6Smrg case $[1] in 662e96acad6Smrg --version | --v* | -V ) 663e96acad6Smrg echo "$lt_cl_version"; exit 0 ;; 664e96acad6Smrg --help | --h* | -h ) 665e96acad6Smrg echo "$lt_cl_help"; exit 0 ;; 666e96acad6Smrg --debug | --d* | -d ) 667e96acad6Smrg debug=: ;; 668e96acad6Smrg --quiet | --q* | --silent | --s* | -q ) 669e96acad6Smrg lt_cl_silent=: ;; 670e96acad6Smrg 671e96acad6Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 672e96acad6SmrgTry \`$[0] --help' for more information.]) ;; 673e96acad6Smrg 674e96acad6Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 675e96acad6SmrgTry \`$[0] --help' for more information.]) ;; 676e96acad6Smrg esac 677e96acad6Smrg shift 678e96acad6Smrgdone 679dbbd9e4bSmacallan 680e96acad6Smrgif $lt_cl_silent; then 681e96acad6Smrg exec AS_MESSAGE_FD>/dev/null 682dbbd9e4bSmacallanfi 683e96acad6Smrg_LTEOF 684e96acad6Smrg 685e96acad6Smrgcat >>"$CONFIG_LT" <<_LTEOF 686e96acad6Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 687e96acad6Smrg_LTEOF 688e96acad6Smrg 689e96acad6Smrgcat >>"$CONFIG_LT" <<\_LTEOF 690e96acad6SmrgAC_MSG_NOTICE([creating $ofile]) 691e96acad6Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 692e96acad6SmrgAS_EXIT(0) 693e96acad6Smrg_LTEOF 694e96acad6Smrgchmod +x "$CONFIG_LT" 695e96acad6Smrg 696e96acad6Smrg# configure is writing to config.log, but config.lt does its own redirection, 697e96acad6Smrg# appending to config.log, which fails on DOS, as config.log is still kept 698e96acad6Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 699e96acad6Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 700e96acad6Smrglt_cl_success=: 701e96acad6Smrgtest "$silent" = yes && 702e96acad6Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 703e96acad6Smrgexec AS_MESSAGE_LOG_FD>/dev/null 704e96acad6Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 705e96acad6Smrgexec AS_MESSAGE_LOG_FD>>config.log 706e96acad6Smrg$lt_cl_success || AS_EXIT(1) 707e96acad6Smrg])# LT_OUTPUT 708e96acad6Smrg 709e96acad6Smrg 710e96acad6Smrg# _LT_CONFIG(TAG) 711e96acad6Smrg# --------------- 712e96acad6Smrg# If TAG is the built-in tag, create an initial libtool script with a 713e96acad6Smrg# default configuration from the untagged config vars. Otherwise add code 714e96acad6Smrg# to config.status for appending the configuration named by TAG from the 715e96acad6Smrg# matching tagged config vars. 716e96acad6Smrgm4_defun([_LT_CONFIG], 717e96acad6Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 718e96acad6Smrg_LT_CONFIG_SAVE_COMMANDS([ 719e96acad6Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 720e96acad6Smrg m4_if(_LT_TAG, [C], [ 721e96acad6Smrg # See if we are running on zsh, and set the options which allow our 722e96acad6Smrg # commands through without removal of \ escapes. 723e96acad6Smrg if test -n "${ZSH_VERSION+set}" ; then 724e96acad6Smrg setopt NO_GLOB_SUBST 725e96acad6Smrg fi 726dbbd9e4bSmacallan 727e96acad6Smrg cfgfile="${ofile}T" 728e96acad6Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 729e96acad6Smrg $RM "$cfgfile" 730dbbd9e4bSmacallan 731e96acad6Smrg cat <<_LT_EOF >> "$cfgfile" 732e96acad6Smrg#! $SHELL 733dbbd9e4bSmacallan 734e96acad6Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 735e96acad6Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 736e96acad6Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 737e96acad6Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 738e96acad6Smrg# 739e96acad6Smrg_LT_COPYING 740e96acad6Smrg_LT_LIBTOOL_TAGS 741dbbd9e4bSmacallan 742e96acad6Smrg# ### BEGIN LIBTOOL CONFIG 743e96acad6Smrg_LT_LIBTOOL_CONFIG_VARS 744e96acad6Smrg_LT_LIBTOOL_TAG_VARS 745e96acad6Smrg# ### END LIBTOOL CONFIG 746dbbd9e4bSmacallan 747e96acad6Smrg_LT_EOF 748dbbd9e4bSmacallan 749e96acad6Smrg case $host_os in 750e96acad6Smrg aix3*) 751e96acad6Smrg cat <<\_LT_EOF >> "$cfgfile" 752e96acad6Smrg# AIX sometimes has problems with the GCC collect2 program. For some 753e96acad6Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 754e96acad6Smrg# vanish in a puff of smoke. 755e96acad6Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 756e96acad6Smrg COLLECT_NAMES= 757e96acad6Smrg export COLLECT_NAMES 758e96acad6Smrgfi 759e96acad6Smrg_LT_EOF 760dbbd9e4bSmacallan ;; 761e96acad6Smrg esac 762dbbd9e4bSmacallan 763e96acad6Smrg _LT_PROG_LTMAIN 764dbbd9e4bSmacallan 765e96acad6Smrg # We use sed instead of cat because bash on DJGPP gets confused if 766e96acad6Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 767e96acad6Smrg # text mode, it properly converts lines to CR/LF. This bash problem 768e96acad6Smrg # is reportedly fixed, but why not run on old versions too? 769e96acad6Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 770e96acad6Smrg || (rm -f "$cfgfile"; exit 1) 771dbbd9e4bSmacallan 772e96acad6Smrg _LT_PROG_REPLACE_SHELLFNS 773e96acad6Smrg 774e96acad6Smrg mv -f "$cfgfile" "$ofile" || 775e96acad6Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 776e96acad6Smrg chmod +x "$ofile" 777e96acad6Smrg], 778e96acad6Smrg[cat <<_LT_EOF >> "$ofile" 779e96acad6Smrg 780e96acad6Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 781e96acad6Smrgdnl in a comment (ie after a #). 782e96acad6Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 783e96acad6Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 784e96acad6Smrg# ### END LIBTOOL TAG CONFIG: $1 785e96acad6Smrg_LT_EOF 786e96acad6Smrg])dnl /m4_if 787e96acad6Smrg], 788e96acad6Smrg[m4_if([$1], [], [ 789e96acad6Smrg PACKAGE='$PACKAGE' 790e96acad6Smrg VERSION='$VERSION' 791e96acad6Smrg TIMESTAMP='$TIMESTAMP' 792e96acad6Smrg RM='$RM' 793e96acad6Smrg ofile='$ofile'], []) 794e96acad6Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 795e96acad6Smrg])# _LT_CONFIG 796e96acad6Smrg 797e96acad6Smrg 798e96acad6Smrg# LT_SUPPORTED_TAG(TAG) 799e96acad6Smrg# --------------------- 800e96acad6Smrg# Trace this macro to discover what tags are supported by the libtool 801e96acad6Smrg# --tag option, using: 802e96acad6Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 803e96acad6SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 804e96acad6Smrg 805e96acad6Smrg 806e96acad6Smrg# C support is built-in for now 807e96acad6Smrgm4_define([_LT_LANG_C_enabled], []) 808e96acad6Smrgm4_define([_LT_TAGS], []) 809e96acad6Smrg 810e96acad6Smrg 811e96acad6Smrg# LT_LANG(LANG) 812e96acad6Smrg# ------------- 813e96acad6Smrg# Enable libtool support for the given language if not already enabled. 814e96acad6SmrgAC_DEFUN([LT_LANG], 815e96acad6Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 816e96acad6Smrgm4_case([$1], 817e96acad6Smrg [C], [_LT_LANG(C)], 818e96acad6Smrg [C++], [_LT_LANG(CXX)], 819e96acad6Smrg [Java], [_LT_LANG(GCJ)], 820e96acad6Smrg [Fortran 77], [_LT_LANG(F77)], 821e96acad6Smrg [Fortran], [_LT_LANG(FC)], 822e96acad6Smrg [Windows Resource], [_LT_LANG(RC)], 823e96acad6Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 824e96acad6Smrg [_LT_LANG($1)], 825e96acad6Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 826e96acad6Smrg])# LT_LANG 827e96acad6Smrg 828e96acad6Smrg 829e96acad6Smrg# _LT_LANG(LANGNAME) 830e96acad6Smrg# ------------------ 831e96acad6Smrgm4_defun([_LT_LANG], 832e96acad6Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 833e96acad6Smrg [LT_SUPPORTED_TAG([$1])dnl 834e96acad6Smrg m4_append([_LT_TAGS], [$1 ])dnl 835e96acad6Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 836e96acad6Smrg _LT_LANG_$1_CONFIG($1)])dnl 837e96acad6Smrg])# _LT_LANG 838e96acad6Smrg 839e96acad6Smrg 840e96acad6Smrg# _LT_LANG_DEFAULT_CONFIG 841e96acad6Smrg# ----------------------- 842e96acad6Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 843e96acad6Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 844e96acad6Smrg [LT_LANG(CXX)], 845e96acad6Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 846e96acad6Smrg 847e96acad6SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 848e96acad6Smrg [LT_LANG(F77)], 849e96acad6Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 850e96acad6Smrg 851e96acad6SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 852e96acad6Smrg [LT_LANG(FC)], 853e96acad6Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 854e96acad6Smrg 855e96acad6Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 856e96acad6Smrgdnl pulling things in needlessly. 857e96acad6SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 858e96acad6Smrg [LT_LANG(GCJ)], 859e96acad6Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 860e96acad6Smrg [LT_LANG(GCJ)], 861e96acad6Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 862e96acad6Smrg [LT_LANG(GCJ)], 863e96acad6Smrg [m4_ifdef([AC_PROG_GCJ], 864e96acad6Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 865e96acad6Smrg m4_ifdef([A][M_PROG_GCJ], 866e96acad6Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 867e96acad6Smrg m4_ifdef([LT_PROG_GCJ], 868e96acad6Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 869e96acad6Smrg 870e96acad6SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 871e96acad6Smrg [LT_LANG(RC)], 872e96acad6Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 873e96acad6Smrg])# _LT_LANG_DEFAULT_CONFIG 874e96acad6Smrg 875e96acad6Smrg# Obsolete macros: 876e96acad6SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 877e96acad6SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 878e96acad6SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 879e96acad6SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 880e96acad6SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 881e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 882e96acad6Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 883e96acad6Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 884e96acad6Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 885e96acad6Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 886e96acad6Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 887e96acad6Smrg 888e96acad6Smrg 889e96acad6Smrg# _LT_TAG_COMPILER 890e96acad6Smrg# ---------------- 891e96acad6Smrgm4_defun([_LT_TAG_COMPILER], 892e96acad6Smrg[AC_REQUIRE([AC_PROG_CC])dnl 893e96acad6Smrg 894e96acad6Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 895e96acad6Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 896e96acad6Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 897e96acad6Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 898e96acad6Smrg 899e96acad6Smrg# If no C compiler was specified, use CC. 900e96acad6SmrgLTCC=${LTCC-"$CC"} 901e96acad6Smrg 902e96acad6Smrg# If no C compiler flags were specified, use CFLAGS. 903e96acad6SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 904e96acad6Smrg 905e96acad6Smrg# Allow CC to be a program name with arguments. 906e96acad6Smrgcompiler=$CC 907e96acad6Smrg])# _LT_TAG_COMPILER 908e96acad6Smrg 909e96acad6Smrg 910e96acad6Smrg# _LT_COMPILER_BOILERPLATE 911e96acad6Smrg# ------------------------ 912e96acad6Smrg# Check for compiler boilerplate output or warnings with 913e96acad6Smrg# the simple compiler test code. 914e96acad6Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 915e96acad6Smrg[m4_require([_LT_DECL_SED])dnl 916e96acad6Smrgac_outfile=conftest.$ac_objext 917e96acad6Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 918e96acad6Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 919e96acad6Smrg_lt_compiler_boilerplate=`cat conftest.err` 920e96acad6Smrg$RM conftest* 921e96acad6Smrg])# _LT_COMPILER_BOILERPLATE 922e96acad6Smrg 923e96acad6Smrg 924e96acad6Smrg# _LT_LINKER_BOILERPLATE 925e96acad6Smrg# ---------------------- 926e96acad6Smrg# Check for linker boilerplate output or warnings with 927e96acad6Smrg# the simple link test code. 928e96acad6Smrgm4_defun([_LT_LINKER_BOILERPLATE], 929e96acad6Smrg[m4_require([_LT_DECL_SED])dnl 930e96acad6Smrgac_outfile=conftest.$ac_objext 931e96acad6Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 932e96acad6Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 933e96acad6Smrg_lt_linker_boilerplate=`cat conftest.err` 934e96acad6Smrg$RM -r conftest* 935e96acad6Smrg])# _LT_LINKER_BOILERPLATE 936e96acad6Smrg 937e96acad6Smrg# _LT_REQUIRED_DARWIN_CHECKS 938e96acad6Smrg# ------------------------- 939e96acad6Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 940e96acad6Smrg case $host_os in 941e96acad6Smrg rhapsody* | darwin*) 942e96acad6Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 943e96acad6Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 944e96acad6Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 945e96acad6Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 946e96acad6Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 947e96acad6Smrg _LT_DECL([], [DSYMUTIL], [1], 948e96acad6Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 949e96acad6Smrg _LT_DECL([], [NMEDIT], [1], 950e96acad6Smrg [Tool to change global to local symbols on Mac OS X]) 951e96acad6Smrg _LT_DECL([], [LIPO], [1], 952e96acad6Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 953e96acad6Smrg _LT_DECL([], [OTOOL], [1], 954e96acad6Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 955e96acad6Smrg _LT_DECL([], [OTOOL64], [1], 956e96acad6Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 957e96acad6Smrg 958e96acad6Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 959e96acad6Smrg [lt_cv_apple_cc_single_mod=no 960e96acad6Smrg if test -z "${LT_MULTI_MODULE}"; then 961e96acad6Smrg # By default we will add the -single_module flag. You can override 962e96acad6Smrg # by either setting the environment variable LT_MULTI_MODULE 963e96acad6Smrg # non-empty at configure time, or by adding -multi_module to the 964e96acad6Smrg # link flags. 965e96acad6Smrg rm -rf libconftest.dylib* 966e96acad6Smrg echo "int foo(void){return 1;}" > conftest.c 967e96acad6Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 968e96acad6Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 969e96acad6Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 970e96acad6Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 971e96acad6Smrg _lt_result=$? 972e96acad6Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 973e96acad6Smrg lt_cv_apple_cc_single_mod=yes 974e96acad6Smrg else 975e96acad6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 976e96acad6Smrg fi 977e96acad6Smrg rm -rf libconftest.dylib* 978e96acad6Smrg rm -f conftest.* 979e96acad6Smrg fi]) 980e96acad6Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 981e96acad6Smrg [lt_cv_ld_exported_symbols_list], 982e96acad6Smrg [lt_cv_ld_exported_symbols_list=no 983e96acad6Smrg save_LDFLAGS=$LDFLAGS 984e96acad6Smrg echo "_main" > conftest.sym 985e96acad6Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 986e96acad6Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 987e96acad6Smrg [lt_cv_ld_exported_symbols_list=yes], 988e96acad6Smrg [lt_cv_ld_exported_symbols_list=no]) 989e96acad6Smrg LDFLAGS="$save_LDFLAGS" 990e96acad6Smrg ]) 991e96acad6Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 992e96acad6Smrg [lt_cv_ld_force_load=no 993e96acad6Smrg cat > conftest.c << _LT_EOF 994e96acad6Smrgint forced_loaded() { return 2;} 995e96acad6Smrg_LT_EOF 996e96acad6Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 997e96acad6Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 998e96acad6Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 999e96acad6Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1000e96acad6Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1001e96acad6Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1002e96acad6Smrg cat > conftest.c << _LT_EOF 1003e96acad6Smrgint main() { return 0;} 1004e96acad6Smrg_LT_EOF 1005e96acad6Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1006e96acad6Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1007e96acad6Smrg _lt_result=$? 1008e96acad6Smrg if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 1009e96acad6Smrg lt_cv_ld_force_load=yes 1010e96acad6Smrg else 1011e96acad6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1012e96acad6Smrg fi 1013e96acad6Smrg rm -f conftest.err libconftest.a conftest conftest.c 1014e96acad6Smrg rm -rf conftest.dSYM 1015e96acad6Smrg ]) 1016e96acad6Smrg case $host_os in 1017e96acad6Smrg rhapsody* | darwin1.[[012]]) 1018e96acad6Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 1019e96acad6Smrg darwin1.*) 1020e96acad6Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1021e96acad6Smrg darwin*) # darwin 5.x on 1022e96acad6Smrg # if running on 10.5 or later, the deployment target defaults 1023e96acad6Smrg # to the OS version, if on x86, and 10.4, the deployment 1024e96acad6Smrg # target defaults to 10.4. Don't you love it? 1025e96acad6Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1026e96acad6Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1027e96acad6Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1028e96acad6Smrg 10.[[012]]*) 1029e96acad6Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1030e96acad6Smrg 10.*) 1031e96acad6Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1032e96acad6Smrg esac 1033dbbd9e4bSmacallan ;; 1034e96acad6Smrg esac 1035e96acad6Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 1036e96acad6Smrg _lt_dar_single_mod='$single_module' 1037e96acad6Smrg fi 1038e96acad6Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 1039e96acad6Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 1040dbbd9e4bSmacallan else 1041e96acad6Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 1042dbbd9e4bSmacallan fi 1043e96acad6Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1044e96acad6Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1045dbbd9e4bSmacallan else 1046e96acad6Smrg _lt_dsymutil= 1047dbbd9e4bSmacallan fi 1048dbbd9e4bSmacallan ;; 1049dbbd9e4bSmacallan esac 1050dbbd9e4bSmacallan]) 1051dbbd9e4bSmacallan 1052dbbd9e4bSmacallan 1053e96acad6Smrg# _LT_DARWIN_LINKER_FEATURES 1054e96acad6Smrg# -------------------------- 1055e96acad6Smrg# Checks for linker and compiler features on darwin 1056e96acad6Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1057e96acad6Smrg[ 1058e96acad6Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1059e96acad6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1060e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1061e96acad6Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1062e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1063e96acad6Smrg if test "$lt_cv_ld_force_load" = "yes"; then 1064e96acad6Smrg _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\"`' 1065e96acad6Smrg else 1066e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1067e96acad6Smrg fi 1068e96acad6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1069e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1070e96acad6Smrg case $cc_basename in 1071e96acad6Smrg ifort*) _lt_dar_can_shared=yes ;; 1072e96acad6Smrg *) _lt_dar_can_shared=$GCC ;; 1073e96acad6Smrg esac 1074e96acad6Smrg if test "$_lt_dar_can_shared" = "yes"; then 1075e96acad6Smrg output_verbose_link_cmd=func_echo_all 1076e96acad6Smrg _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}" 1077e96acad6Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1078e96acad6Smrg _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}" 1079e96acad6Smrg _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}" 1080e96acad6Smrg m4_if([$1], [CXX], 1081e96acad6Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1082e96acad6Smrg _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}" 1083e96acad6Smrg _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}" 1084e96acad6Smrg fi 1085e96acad6Smrg],[]) 1086e96acad6Smrg else 1087e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1088e96acad6Smrg fi 1089e96acad6Smrg]) 1090dbbd9e4bSmacallan 1091e96acad6Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1092e96acad6Smrg# ---------------------------------- 1093e96acad6Smrg# Links a minimal program and checks the executable 1094e96acad6Smrg# for the system default hardcoded library path. In most cases, 1095e96acad6Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 1096e96acad6Smrg# the location of the communication and MPI libs are included too. 1097e96acad6Smrg# If we don't find anything, use the default library path according 1098e96acad6Smrg# to the aix ld manual. 1099e96acad6Smrg# Store the results from the different compilers for each TAGNAME. 1100e96acad6Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 1101e96acad6Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1102e96acad6Smrg[m4_require([_LT_DECL_SED])dnl 1103e96acad6Smrgif test "${lt_cv_aix_libpath+set}" = set; then 1104e96acad6Smrg aix_libpath=$lt_cv_aix_libpath 1105dbbd9e4bSmacallanelse 1106e96acad6Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1107e96acad6Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1108e96acad6Smrg lt_aix_libpath_sed='[ 1109e96acad6Smrg /Import File Strings/,/^$/ { 1110e96acad6Smrg /^0/ { 1111e96acad6Smrg s/^0 *\([^ ]*\) *$/\1/ 1112e96acad6Smrg p 1113e96acad6Smrg } 1114e96acad6Smrg }]' 1115e96acad6Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1116e96acad6Smrg # Check for a 64-bit object if we didn't find anything. 1117e96acad6Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1118e96acad6Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1119e96acad6Smrg fi],[]) 1120e96acad6Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1121e96acad6Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1122e96acad6Smrg fi 1123e96acad6Smrg ]) 1124e96acad6Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1125e96acad6Smrgfi 1126e96acad6Smrg])# _LT_SYS_MODULE_PATH_AIX 1127dbbd9e4bSmacallan 1128dbbd9e4bSmacallan 1129e96acad6Smrg# _LT_SHELL_INIT(ARG) 1130e96acad6Smrg# ------------------- 1131e96acad6Smrgm4_define([_LT_SHELL_INIT], 1132e96acad6Smrg[m4_divert_text([M4SH-INIT], [$1 1133e96acad6Smrg])])# _LT_SHELL_INIT 1134dbbd9e4bSmacallan 1135dbbd9e4bSmacallan 1136dbbd9e4bSmacallan 1137e96acad6Smrg# _LT_PROG_ECHO_BACKSLASH 1138e96acad6Smrg# ----------------------- 1139e96acad6Smrg# Find how we can fake an echo command that does not interpret backslash. 1140e96acad6Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 1141e96acad6Smrg# of the generated configure script which will find a shell with a builtin 1142e96acad6Smrg# printf (which we can use as an echo command). 1143e96acad6Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1144e96acad6Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1145e96acad6SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1146e96acad6SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1147e96acad6Smrg 1148e96acad6SmrgAC_MSG_CHECKING([how to print strings]) 1149e96acad6Smrg# Test print first, because it will be a builtin if present. 1150e96acad6Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1151e96acad6Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1152e96acad6Smrg ECHO='print -r --' 1153e96acad6Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1154e96acad6Smrg ECHO='printf %s\n' 1155e96acad6Smrgelse 1156e96acad6Smrg # Use this function as a fallback that always works. 1157e96acad6Smrg func_fallback_echo () 1158e96acad6Smrg { 1159e96acad6Smrg eval 'cat <<_LTECHO_EOF 1160e96acad6Smrg$[]1 1161e96acad6Smrg_LTECHO_EOF' 1162e96acad6Smrg } 1163e96acad6Smrg ECHO='func_fallback_echo' 1164e96acad6Smrgfi 1165dbbd9e4bSmacallan 1166e96acad6Smrg# func_echo_all arg... 1167e96acad6Smrg# Invoke $ECHO with all args, space-separated. 1168e96acad6Smrgfunc_echo_all () 1169dbbd9e4bSmacallan{ 1170e96acad6Smrg $ECHO "$*" 1171e96acad6Smrg} 1172dbbd9e4bSmacallan 1173e96acad6Smrgcase "$ECHO" in 1174e96acad6Smrg printf*) AC_MSG_RESULT([printf]) ;; 1175e96acad6Smrg print*) AC_MSG_RESULT([print -r]) ;; 1176e96acad6Smrg *) AC_MSG_RESULT([cat]) ;; 1177e96acad6Smrgesac 1178dbbd9e4bSmacallan 1179e96acad6Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 1180e96acad6Smrg[_AS_DETECT_SUGGESTED([ 1181e96acad6Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1182e96acad6Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1183e96acad6Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1184e96acad6Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1185e96acad6Smrg PATH=/empty FPATH=/empty; export PATH FPATH 1186e96acad6Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1187e96acad6Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1188dbbd9e4bSmacallan 1189e96acad6Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1190e96acad6Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1191e96acad6Smrg])# _LT_PROG_ECHO_BACKSLASH 1192dbbd9e4bSmacallan 1193dbbd9e4bSmacallan 1194e96acad6Smrg# _LT_WITH_SYSROOT 1195e96acad6Smrg# ---------------- 1196e96acad6SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1197e96acad6Smrg[AC_MSG_CHECKING([for sysroot]) 1198e96acad6SmrgAC_ARG_WITH([sysroot], 1199e96acad6Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1200e96acad6Smrg (or the compiler's sysroot if not specified).], 1201e96acad6Smrg[], [with_sysroot=no]) 1202e96acad6Smrg 1203e96acad6Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 1204e96acad6Smrgdnl in case the user passed a directory name. 1205e96acad6Smrglt_sysroot= 1206e96acad6Smrgcase ${with_sysroot} in #( 1207e96acad6Smrg yes) 1208e96acad6Smrg if test "$GCC" = yes; then 1209e96acad6Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1210e96acad6Smrg fi 1211e96acad6Smrg ;; #( 1212e96acad6Smrg /*) 1213e96acad6Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1214e96acad6Smrg ;; #( 1215e96acad6Smrg no|'') 1216e96acad6Smrg ;; #( 1217e96acad6Smrg *) 1218e96acad6Smrg AC_MSG_RESULT([${with_sysroot}]) 1219e96acad6Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1220dbbd9e4bSmacallan ;; 1221e96acad6Smrgesac 1222dbbd9e4bSmacallan 1223e96acad6Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1224e96acad6Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1225e96acad6Smrg[dependent libraries, and in which our libraries should be installed.])]) 1226dbbd9e4bSmacallan 1227e96acad6Smrg# _LT_ENABLE_LOCK 1228e96acad6Smrg# --------------- 1229e96acad6Smrgm4_defun([_LT_ENABLE_LOCK], 1230e96acad6Smrg[AC_ARG_ENABLE([libtool-lock], 1231e96acad6Smrg [AS_HELP_STRING([--disable-libtool-lock], 1232e96acad6Smrg [avoid locking (might break parallel builds)])]) 1233e96acad6Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1234dbbd9e4bSmacallan 1235e96acad6Smrg# Some flags need to be propagated to the compiler or linker for good 1236e96acad6Smrg# libtool support. 1237e96acad6Smrgcase $host in 1238e96acad6Smrgia64-*-hpux*) 1239e96acad6Smrg # Find out which ABI we are using. 1240e96acad6Smrg echo 'int i;' > conftest.$ac_ext 1241e96acad6Smrg if AC_TRY_EVAL(ac_compile); then 1242e96acad6Smrg case `/usr/bin/file conftest.$ac_objext` in 1243e96acad6Smrg *ELF-32*) 1244e96acad6Smrg HPUX_IA64_MODE="32" 1245e96acad6Smrg ;; 1246e96acad6Smrg *ELF-64*) 1247e96acad6Smrg HPUX_IA64_MODE="64" 1248e96acad6Smrg ;; 1249e96acad6Smrg esac 1250e96acad6Smrg fi 1251e96acad6Smrg rm -rf conftest* 1252e96acad6Smrg ;; 1253e96acad6Smrg*-*-irix6*) 1254e96acad6Smrg # Find out which ABI we are using. 1255e96acad6Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1256e96acad6Smrg if AC_TRY_EVAL(ac_compile); then 1257e96acad6Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 1258e96acad6Smrg case `/usr/bin/file conftest.$ac_objext` in 1259e96acad6Smrg *32-bit*) 1260e96acad6Smrg LD="${LD-ld} -melf32bsmip" 1261e96acad6Smrg ;; 1262e96acad6Smrg *N32*) 1263e96acad6Smrg LD="${LD-ld} -melf32bmipn32" 1264e96acad6Smrg ;; 1265e96acad6Smrg *64-bit*) 1266e96acad6Smrg LD="${LD-ld} -melf64bmip" 1267e96acad6Smrg ;; 1268e96acad6Smrg esac 1269e96acad6Smrg else 1270e96acad6Smrg case `/usr/bin/file conftest.$ac_objext` in 1271e96acad6Smrg *32-bit*) 1272e96acad6Smrg LD="${LD-ld} -32" 1273e96acad6Smrg ;; 1274e96acad6Smrg *N32*) 1275e96acad6Smrg LD="${LD-ld} -n32" 1276e96acad6Smrg ;; 1277e96acad6Smrg *64-bit*) 1278e96acad6Smrg LD="${LD-ld} -64" 1279e96acad6Smrg ;; 1280e96acad6Smrg esac 1281e96acad6Smrg fi 1282e96acad6Smrg fi 1283e96acad6Smrg rm -rf conftest* 1284e96acad6Smrg ;; 1285dbbd9e4bSmacallan 1286e96acad6Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1287e96acad6Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1288e96acad6Smrg # Find out which ABI we are using. 1289e96acad6Smrg echo 'int i;' > conftest.$ac_ext 1290e96acad6Smrg if AC_TRY_EVAL(ac_compile); then 1291e96acad6Smrg case `/usr/bin/file conftest.o` in 1292e96acad6Smrg *32-bit*) 1293e96acad6Smrg case $host in 1294e96acad6Smrg x86_64-*kfreebsd*-gnu) 1295e96acad6Smrg LD="${LD-ld} -m elf_i386_fbsd" 1296e96acad6Smrg ;; 1297e96acad6Smrg x86_64-*linux*) 1298e96acad6Smrg LD="${LD-ld} -m elf_i386" 1299e96acad6Smrg ;; 1300e96acad6Smrg ppc64-*linux*|powerpc64-*linux*) 1301e96acad6Smrg LD="${LD-ld} -m elf32ppclinux" 1302e96acad6Smrg ;; 1303e96acad6Smrg s390x-*linux*) 1304e96acad6Smrg LD="${LD-ld} -m elf_s390" 1305e96acad6Smrg ;; 1306e96acad6Smrg sparc64-*linux*) 1307e96acad6Smrg LD="${LD-ld} -m elf32_sparc" 1308e96acad6Smrg ;; 1309e96acad6Smrg esac 1310e96acad6Smrg ;; 1311e96acad6Smrg *64-bit*) 1312e96acad6Smrg case $host in 1313e96acad6Smrg x86_64-*kfreebsd*-gnu) 1314e96acad6Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1315e96acad6Smrg ;; 1316e96acad6Smrg x86_64-*linux*) 1317e96acad6Smrg LD="${LD-ld} -m elf_x86_64" 1318e96acad6Smrg ;; 1319e96acad6Smrg ppc*-*linux*|powerpc*-*linux*) 1320e96acad6Smrg LD="${LD-ld} -m elf64ppc" 1321e96acad6Smrg ;; 1322e96acad6Smrg s390*-*linux*|s390*-*tpf*) 1323e96acad6Smrg LD="${LD-ld} -m elf64_s390" 1324e96acad6Smrg ;; 1325e96acad6Smrg sparc*-*linux*) 1326e96acad6Smrg LD="${LD-ld} -m elf64_sparc" 1327e96acad6Smrg ;; 1328e96acad6Smrg esac 1329e96acad6Smrg ;; 1330e96acad6Smrg esac 1331dbbd9e4bSmacallan fi 1332e96acad6Smrg rm -rf conftest* 1333e96acad6Smrg ;; 1334dbbd9e4bSmacallan 1335e96acad6Smrg*-*-sco3.2v5*) 1336e96acad6Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1337e96acad6Smrg SAVE_CFLAGS="$CFLAGS" 1338e96acad6Smrg CFLAGS="$CFLAGS -belf" 1339e96acad6Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1340e96acad6Smrg [AC_LANG_PUSH(C) 1341e96acad6Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1342e96acad6Smrg AC_LANG_POP]) 1343e96acad6Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1344e96acad6Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1345e96acad6Smrg CFLAGS="$SAVE_CFLAGS" 1346e96acad6Smrg fi 1347e96acad6Smrg ;; 1348e96acad6Smrgsparc*-*solaris*) 1349e96acad6Smrg # Find out which ABI we are using. 1350e96acad6Smrg echo 'int i;' > conftest.$ac_ext 1351e96acad6Smrg if AC_TRY_EVAL(ac_compile); then 1352e96acad6Smrg case `/usr/bin/file conftest.o` in 1353e96acad6Smrg *64-bit*) 1354e96acad6Smrg case $lt_cv_prog_gnu_ld in 1355e96acad6Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 1356e96acad6Smrg *) 1357e96acad6Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1358e96acad6Smrg LD="${LD-ld} -64" 1359e96acad6Smrg fi 1360e96acad6Smrg ;; 1361e96acad6Smrg esac 1362e96acad6Smrg ;; 1363e96acad6Smrg esac 1364e96acad6Smrg fi 1365e96acad6Smrg rm -rf conftest* 1366e96acad6Smrg ;; 1367e96acad6Smrgesac 1368dbbd9e4bSmacallan 1369e96acad6Smrgneed_locks="$enable_libtool_lock" 1370e96acad6Smrg])# _LT_ENABLE_LOCK 1371dbbd9e4bSmacallan 1372dbbd9e4bSmacallan 1373e96acad6Smrg# _LT_PROG_AR 1374e96acad6Smrg# ----------- 1375e96acad6Smrgm4_defun([_LT_PROG_AR], 1376e96acad6Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1377e96acad6Smrg: ${AR=ar} 1378e96acad6Smrg: ${AR_FLAGS=cru} 1379e96acad6Smrg_LT_DECL([], [AR], [1], [The archiver]) 1380e96acad6Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1381e96acad6Smrg 1382e96acad6SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1383e96acad6Smrg [lt_cv_ar_at_file=no 1384e96acad6Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1385e96acad6Smrg [echo conftest.$ac_objext > conftest.lst 1386e96acad6Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1387e96acad6Smrg AC_TRY_EVAL([lt_ar_try]) 1388e96acad6Smrg if test "$ac_status" -eq 0; then 1389e96acad6Smrg # Ensure the archiver fails upon bogus file names. 1390e96acad6Smrg rm -f conftest.$ac_objext libconftest.a 1391e96acad6Smrg AC_TRY_EVAL([lt_ar_try]) 1392e96acad6Smrg if test "$ac_status" -ne 0; then 1393e96acad6Smrg lt_cv_ar_at_file=@ 1394e96acad6Smrg fi 1395e96acad6Smrg fi 1396e96acad6Smrg rm -f conftest.* libconftest.a 1397e96acad6Smrg ]) 1398e96acad6Smrg ]) 1399dbbd9e4bSmacallan 1400e96acad6Smrgif test "x$lt_cv_ar_at_file" = xno; then 1401e96acad6Smrg archiver_list_spec= 1402e96acad6Smrgelse 1403e96acad6Smrg archiver_list_spec=$lt_cv_ar_at_file 1404e96acad6Smrgfi 1405e96acad6Smrg_LT_DECL([], [archiver_list_spec], [1], 1406e96acad6Smrg [How to feed a file listing to the archiver]) 1407e96acad6Smrg])# _LT_PROG_AR 1408dbbd9e4bSmacallan 1409dbbd9e4bSmacallan 1410e96acad6Smrg# _LT_CMD_OLD_ARCHIVE 1411e96acad6Smrg# ------------------- 1412e96acad6Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1413e96acad6Smrg[_LT_PROG_AR 1414dbbd9e4bSmacallan 1415e96acad6SmrgAC_CHECK_TOOL(STRIP, strip, :) 1416e96acad6Smrgtest -z "$STRIP" && STRIP=: 1417e96acad6Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1418e96acad6Smrg 1419e96acad6SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1420e96acad6Smrgtest -z "$RANLIB" && RANLIB=: 1421e96acad6Smrg_LT_DECL([], [RANLIB], [1], 1422e96acad6Smrg [Commands used to install an old-style archive]) 1423e96acad6Smrg 1424e96acad6Smrg# Determine commands to create old-style static archives. 1425e96acad6Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1426e96acad6Smrgold_postinstall_cmds='chmod 644 $oldlib' 1427e96acad6Smrgold_postuninstall_cmds= 1428e96acad6Smrg 1429e96acad6Smrgif test -n "$RANLIB"; then 1430e96acad6Smrg case $host_os in 1431e96acad6Smrg openbsd*) 1432e96acad6Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1433e96acad6Smrg ;; 1434e96acad6Smrg *) 1435e96acad6Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1436e96acad6Smrg ;; 1437dbbd9e4bSmacallan esac 1438e96acad6Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1439dbbd9e4bSmacallanfi 1440dbbd9e4bSmacallan 1441e96acad6Smrgcase $host_os in 1442e96acad6Smrg darwin*) 1443e96acad6Smrg lock_old_archive_extraction=yes ;; 1444e96acad6Smrg *) 1445e96acad6Smrg lock_old_archive_extraction=no ;; 1446e96acad6Smrgesac 1447e96acad6Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1448e96acad6Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1449e96acad6Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1450e96acad6Smrg [Commands used to build an old-style archive]) 1451e96acad6Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 1452e96acad6Smrg [Whether to use a lock for old archive extraction]) 1453e96acad6Smrg])# _LT_CMD_OLD_ARCHIVE 1454dbbd9e4bSmacallan 1455dbbd9e4bSmacallan 1456e96acad6Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1457e96acad6Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1458e96acad6Smrg# ---------------------------------------------------------------- 1459e96acad6Smrg# Check whether the given compiler option works 1460e96acad6SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1461e96acad6Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1462e96acad6Smrgm4_require([_LT_DECL_SED])dnl 1463e96acad6SmrgAC_CACHE_CHECK([$1], [$2], 1464e96acad6Smrg [$2=no 1465e96acad6Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1466e96acad6Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1467e96acad6Smrg lt_compiler_flag="$3" 1468dbbd9e4bSmacallan # Insert the option either (1) after the last *FLAGS variable, or 1469dbbd9e4bSmacallan # (2) before a word containing "conftest.", or (3) at the end. 1470dbbd9e4bSmacallan # Note that $ac_compile itself does not contain backslashes and begins 1471dbbd9e4bSmacallan # with a dollar sign (not a hyphen), so the echo should work correctly. 1472e96acad6Smrg # The option is referenced via a variable to avoid confusing sed. 1473dbbd9e4bSmacallan lt_compile=`echo "$ac_compile" | $SED \ 1474dbbd9e4bSmacallan -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1475dbbd9e4bSmacallan -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1476dbbd9e4bSmacallan -e 's:$: $lt_compiler_flag:'` 1477e96acad6Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1478e96acad6Smrg (eval "$lt_compile" 2>conftest.err) 1479dbbd9e4bSmacallan ac_status=$? 1480e96acad6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1481e96acad6Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1482e96acad6Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 1483dbbd9e4bSmacallan # The compiler can only warn and ignore the option if not recognized 1484e96acad6Smrg # So say no if there are warnings other than the usual output. 1485e96acad6Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1486e96acad6Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1487e96acad6Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1488e96acad6Smrg $2=yes 1489dbbd9e4bSmacallan fi 1490dbbd9e4bSmacallan fi 1491e96acad6Smrg $RM conftest* 1492dbbd9e4bSmacallan]) 1493dbbd9e4bSmacallan 1494e96acad6Smrgif test x"[$]$2" = xyes; then 1495e96acad6Smrg m4_if([$5], , :, [$5]) 1496dbbd9e4bSmacallanelse 1497e96acad6Smrg m4_if([$6], , :, [$6]) 1498dbbd9e4bSmacallanfi 1499e96acad6Smrg])# _LT_COMPILER_OPTION 1500dbbd9e4bSmacallan 1501e96acad6Smrg# Old name: 1502e96acad6SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1503e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 1504e96acad6Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1505dbbd9e4bSmacallan 1506e96acad6Smrg 1507e96acad6Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1508e96acad6Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1509e96acad6Smrg# ---------------------------------------------------- 1510e96acad6Smrg# Check whether the given linker option works 1511e96acad6SmrgAC_DEFUN([_LT_LINKER_OPTION], 1512e96acad6Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1513e96acad6Smrgm4_require([_LT_DECL_SED])dnl 1514e96acad6SmrgAC_CACHE_CHECK([$1], [$2], 1515e96acad6Smrg [$2=no 1516e96acad6Smrg save_LDFLAGS="$LDFLAGS" 1517e96acad6Smrg LDFLAGS="$LDFLAGS $3" 1518e96acad6Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1519e96acad6Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1520e96acad6Smrg # The linker can only warn and ignore the option if not recognized 1521e96acad6Smrg # So say no if there are warnings 1522e96acad6Smrg if test -s conftest.err; then 1523e96acad6Smrg # Append any errors to the config.log. 1524e96acad6Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1525e96acad6Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1526e96acad6Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1527e96acad6Smrg if diff conftest.exp conftest.er2 >/dev/null; then 1528e96acad6Smrg $2=yes 1529e96acad6Smrg fi 1530e96acad6Smrg else 1531e96acad6Smrg $2=yes 1532e96acad6Smrg fi 1533e96acad6Smrg fi 1534e96acad6Smrg $RM -r conftest* 1535e96acad6Smrg LDFLAGS="$save_LDFLAGS" 1536e96acad6Smrg]) 1537e96acad6Smrg 1538e96acad6Smrgif test x"[$]$2" = xyes; then 1539e96acad6Smrg m4_if([$4], , :, [$4]) 1540dbbd9e4bSmacallanelse 1541e96acad6Smrg m4_if([$5], , :, [$5]) 1542dbbd9e4bSmacallanfi 1543e96acad6Smrg])# _LT_LINKER_OPTION 1544dbbd9e4bSmacallan 1545e96acad6Smrg# Old name: 1546e96acad6SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1547e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 1548e96acad6Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1549dbbd9e4bSmacallan 1550dbbd9e4bSmacallan 1551e96acad6Smrg# LT_CMD_MAX_LEN 1552e96acad6Smrg#--------------- 1553e96acad6SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1554e96acad6Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1555e96acad6Smrg# find the maximum length of command line arguments 1556e96acad6SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1557e96acad6SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1558e96acad6Smrg i=0 1559e96acad6Smrg teststring="ABCD" 1560dbbd9e4bSmacallan 1561e96acad6Smrg case $build_os in 1562e96acad6Smrg msdosdjgpp*) 1563e96acad6Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1564e96acad6Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1565e96acad6Smrg # during glob expansion). Even if it were fixed, the result of this 1566e96acad6Smrg # check would be larger than it should be. 1567e96acad6Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1568e96acad6Smrg ;; 1569dbbd9e4bSmacallan 1570e96acad6Smrg gnu*) 1571e96acad6Smrg # Under GNU Hurd, this test is not required because there is 1572e96acad6Smrg # no limit to the length of command line arguments. 1573e96acad6Smrg # Libtool will interpret -1 as no limit whatsoever 1574e96acad6Smrg lt_cv_sys_max_cmd_len=-1; 1575e96acad6Smrg ;; 1576dbbd9e4bSmacallan 1577e96acad6Smrg cygwin* | mingw* | cegcc*) 1578e96acad6Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1579e96acad6Smrg # about 5 minutes as the teststring grows exponentially. 1580e96acad6Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 1581e96acad6Smrg # you end up with a "frozen" computer, even though with patience 1582e96acad6Smrg # the test eventually succeeds (with a max line length of 256k). 1583e96acad6Smrg # Instead, let's just punt: use the minimum linelength reported by 1584e96acad6Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 1585e96acad6Smrg lt_cv_sys_max_cmd_len=8192; 1586e96acad6Smrg ;; 1587e96acad6Smrg 1588e96acad6Smrg mint*) 1589e96acad6Smrg # On MiNT this can take a long time and run out of memory. 1590e96acad6Smrg lt_cv_sys_max_cmd_len=8192; 1591dbbd9e4bSmacallan ;; 1592dbbd9e4bSmacallan 1593e96acad6Smrg amigaos*) 1594e96acad6Smrg # On AmigaOS with pdksh, this test takes hours, literally. 1595e96acad6Smrg # So we just punt and use a minimum line length of 8192. 1596e96acad6Smrg lt_cv_sys_max_cmd_len=8192; 1597e96acad6Smrg ;; 1598dbbd9e4bSmacallan 1599e96acad6Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1600e96acad6Smrg # This has been around since 386BSD, at least. Likely further. 1601e96acad6Smrg if test -x /sbin/sysctl; then 1602e96acad6Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1603e96acad6Smrg elif test -x /usr/sbin/sysctl; then 1604e96acad6Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1605dbbd9e4bSmacallan else 1606e96acad6Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1607dbbd9e4bSmacallan fi 1608e96acad6Smrg # And add a safety zone 1609e96acad6Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1610e96acad6Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1611e96acad6Smrg ;; 1612dbbd9e4bSmacallan 1613e96acad6Smrg interix*) 1614e96acad6Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1615e96acad6Smrg lt_cv_sys_max_cmd_len=196608 1616e96acad6Smrg ;; 1617dbbd9e4bSmacallan 1618e96acad6Smrg osf*) 1619e96acad6Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1620e96acad6Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1621e96acad6Smrg # nice to cause kernel panics so lets avoid the loop below. 1622e96acad6Smrg # First set a reasonable default. 1623e96acad6Smrg lt_cv_sys_max_cmd_len=16384 1624e96acad6Smrg # 1625e96acad6Smrg if test -x /sbin/sysconfig; then 1626e96acad6Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1627e96acad6Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1628e96acad6Smrg esac 1629e96acad6Smrg fi 1630e96acad6Smrg ;; 1631e96acad6Smrg sco3.2v5*) 1632e96acad6Smrg lt_cv_sys_max_cmd_len=102400 1633e96acad6Smrg ;; 1634e96acad6Smrg sysv5* | sco5v6* | sysv4.2uw2*) 1635e96acad6Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1636e96acad6Smrg if test -n "$kargmax"; then 1637e96acad6Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1638dbbd9e4bSmacallan else 1639e96acad6Smrg lt_cv_sys_max_cmd_len=32768 1640dbbd9e4bSmacallan fi 1641e96acad6Smrg ;; 1642e96acad6Smrg *) 1643e96acad6Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1644e96acad6Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 1645e96acad6Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1646e96acad6Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1647e96acad6Smrg else 1648e96acad6Smrg # Make teststring a little bigger before we do anything with it. 1649e96acad6Smrg # a 1K string should be a reasonable start. 1650e96acad6Smrg for i in 1 2 3 4 5 6 7 8 ; do 1651e96acad6Smrg teststring=$teststring$teststring 1652e96acad6Smrg done 1653e96acad6Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1654e96acad6Smrg # If test is not a shell built-in, we'll probably end up computing a 1655e96acad6Smrg # maximum length that is only half of the actual maximum length, but 1656e96acad6Smrg # we can't tell. 1657e96acad6Smrg while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 1658e96acad6Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1659e96acad6Smrg test $i != 17 # 1/2 MB should be enough 1660e96acad6Smrg do 1661e96acad6Smrg i=`expr $i + 1` 1662e96acad6Smrg teststring=$teststring$teststring 1663e96acad6Smrg done 1664e96acad6Smrg # Only check the string length outside the loop. 1665e96acad6Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1666e96acad6Smrg teststring= 1667e96acad6Smrg # Add a significant safety factor because C++ compilers can tack on 1668e96acad6Smrg # massive amounts of additional arguments before passing them to the 1669e96acad6Smrg # linker. It appears as though 1/2 is a usable value. 1670e96acad6Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1671e96acad6Smrg fi 1672e96acad6Smrg ;; 1673e96acad6Smrg esac 1674e96acad6Smrg]) 1675e96acad6Smrgif test -n $lt_cv_sys_max_cmd_len ; then 1676e96acad6Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1677e96acad6Smrgelse 1678e96acad6Smrg AC_MSG_RESULT(none) 1679e96acad6Smrgfi 1680e96acad6Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1681e96acad6Smrg_LT_DECL([], [max_cmd_len], [0], 1682e96acad6Smrg [What is the maximum length of a command?]) 1683e96acad6Smrg])# LT_CMD_MAX_LEN 1684dbbd9e4bSmacallan 1685e96acad6Smrg# Old name: 1686e96acad6SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1687e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 1688e96acad6Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1689dbbd9e4bSmacallan 1690dbbd9e4bSmacallan 1691e96acad6Smrg# _LT_HEADER_DLFCN 1692e96acad6Smrg# ---------------- 1693e96acad6Smrgm4_defun([_LT_HEADER_DLFCN], 1694e96acad6Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1695e96acad6Smrg])# _LT_HEADER_DLFCN 1696dbbd9e4bSmacallan 1697dbbd9e4bSmacallan 1698e96acad6Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1699e96acad6Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1700e96acad6Smrg# ---------------------------------------------------------------- 1701e96acad6Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1702e96acad6Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1703e96acad6Smrgif test "$cross_compiling" = yes; then : 1704e96acad6Smrg [$4] 1705e96acad6Smrgelse 1706e96acad6Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1707e96acad6Smrg lt_status=$lt_dlunknown 1708e96acad6Smrg cat > conftest.$ac_ext <<_LT_EOF 1709e96acad6Smrg[#line $LINENO "configure" 1710e96acad6Smrg#include "confdefs.h" 1711dbbd9e4bSmacallan 1712e96acad6Smrg#if HAVE_DLFCN_H 1713e96acad6Smrg#include <dlfcn.h> 1714e96acad6Smrg#endif 1715dbbd9e4bSmacallan 1716e96acad6Smrg#include <stdio.h> 1717dbbd9e4bSmacallan 1718e96acad6Smrg#ifdef RTLD_GLOBAL 1719e96acad6Smrg# define LT_DLGLOBAL RTLD_GLOBAL 1720e96acad6Smrg#else 1721e96acad6Smrg# ifdef DL_GLOBAL 1722e96acad6Smrg# define LT_DLGLOBAL DL_GLOBAL 1723e96acad6Smrg# else 1724e96acad6Smrg# define LT_DLGLOBAL 0 1725e96acad6Smrg# endif 1726e96acad6Smrg#endif 1727dbbd9e4bSmacallan 1728e96acad6Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1729e96acad6Smrg find out it does not work in some platform. */ 1730e96acad6Smrg#ifndef LT_DLLAZY_OR_NOW 1731e96acad6Smrg# ifdef RTLD_LAZY 1732e96acad6Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1733e96acad6Smrg# else 1734e96acad6Smrg# ifdef DL_LAZY 1735e96acad6Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 1736e96acad6Smrg# else 1737e96acad6Smrg# ifdef RTLD_NOW 1738e96acad6Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1739e96acad6Smrg# else 1740e96acad6Smrg# ifdef DL_NOW 1741e96acad6Smrg# define LT_DLLAZY_OR_NOW DL_NOW 1742e96acad6Smrg# else 1743e96acad6Smrg# define LT_DLLAZY_OR_NOW 0 1744e96acad6Smrg# endif 1745e96acad6Smrg# endif 1746e96acad6Smrg# endif 1747e96acad6Smrg# endif 1748e96acad6Smrg#endif 1749dbbd9e4bSmacallan 1750e96acad6Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 1751e96acad6Smrg correspondingly for the symbols needed. */ 1752e96acad6Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1753e96acad6Smrgint fnord () __attribute__((visibility("default"))); 1754e96acad6Smrg#endif 1755dbbd9e4bSmacallan 1756e96acad6Smrgint fnord () { return 42; } 1757e96acad6Smrgint main () 1758e96acad6Smrg{ 1759e96acad6Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1760e96acad6Smrg int status = $lt_dlunknown; 1761e96acad6Smrg 1762e96acad6Smrg if (self) 1763e96acad6Smrg { 1764e96acad6Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1765e96acad6Smrg else 1766e96acad6Smrg { 1767e96acad6Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1768e96acad6Smrg else puts (dlerror ()); 1769e96acad6Smrg } 1770e96acad6Smrg /* dlclose (self); */ 1771e96acad6Smrg } 1772dbbd9e4bSmacallan else 1773e96acad6Smrg puts (dlerror ()); 1774e96acad6Smrg 1775e96acad6Smrg return status; 1776e96acad6Smrg}] 1777e96acad6Smrg_LT_EOF 1778e96acad6Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1779e96acad6Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1780e96acad6Smrg lt_status=$? 1781e96acad6Smrg case x$lt_status in 1782e96acad6Smrg x$lt_dlno_uscore) $1 ;; 1783e96acad6Smrg x$lt_dlneed_uscore) $2 ;; 1784e96acad6Smrg x$lt_dlunknown|x*) $3 ;; 1785dbbd9e4bSmacallan esac 1786e96acad6Smrg else : 1787e96acad6Smrg # compilation failed 1788e96acad6Smrg $3 1789dbbd9e4bSmacallan fi 1790e96acad6Smrgfi 1791e96acad6Smrgrm -fr conftest* 1792e96acad6Smrg])# _LT_TRY_DLOPEN_SELF 1793e96acad6Smrg 1794e96acad6Smrg 1795e96acad6Smrg# LT_SYS_DLOPEN_SELF 1796e96acad6Smrg# ------------------ 1797e96acad6SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1798e96acad6Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1799e96acad6Smrgif test "x$enable_dlopen" != xyes; then 1800e96acad6Smrg enable_dlopen=unknown 1801e96acad6Smrg enable_dlopen_self=unknown 1802e96acad6Smrg enable_dlopen_self_static=unknown 1803e96acad6Smrgelse 1804e96acad6Smrg lt_cv_dlopen=no 1805e96acad6Smrg lt_cv_dlopen_libs= 1806e96acad6Smrg 1807dbbd9e4bSmacallan case $host_os in 1808e96acad6Smrg beos*) 1809e96acad6Smrg lt_cv_dlopen="load_add_on" 1810e96acad6Smrg lt_cv_dlopen_libs= 1811e96acad6Smrg lt_cv_dlopen_self=yes 1812dbbd9e4bSmacallan ;; 1813e96acad6Smrg 1814e96acad6Smrg mingw* | pw32* | cegcc*) 1815e96acad6Smrg lt_cv_dlopen="LoadLibrary" 1816e96acad6Smrg lt_cv_dlopen_libs= 1817dbbd9e4bSmacallan ;; 1818e96acad6Smrg 1819e96acad6Smrg cygwin*) 1820e96acad6Smrg lt_cv_dlopen="dlopen" 1821e96acad6Smrg lt_cv_dlopen_libs= 1822dbbd9e4bSmacallan ;; 1823e96acad6Smrg 1824e96acad6Smrg darwin*) 1825e96acad6Smrg # if libdl is installed we need to link against it 1826e96acad6Smrg AC_CHECK_LIB([dl], [dlopen], 1827e96acad6Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1828e96acad6Smrg lt_cv_dlopen="dyld" 1829e96acad6Smrg lt_cv_dlopen_libs= 1830e96acad6Smrg lt_cv_dlopen_self=yes 1831e96acad6Smrg ]) 1832e96acad6Smrg ;; 1833e96acad6Smrg 1834e96acad6Smrg *) 1835e96acad6Smrg AC_CHECK_FUNC([shl_load], 1836e96acad6Smrg [lt_cv_dlopen="shl_load"], 1837e96acad6Smrg [AC_CHECK_LIB([dld], [shl_load], 1838e96acad6Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1839e96acad6Smrg [AC_CHECK_FUNC([dlopen], 1840e96acad6Smrg [lt_cv_dlopen="dlopen"], 1841e96acad6Smrg [AC_CHECK_LIB([dl], [dlopen], 1842e96acad6Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1843e96acad6Smrg [AC_CHECK_LIB([svld], [dlopen], 1844e96acad6Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1845e96acad6Smrg [AC_CHECK_LIB([dld], [dld_link], 1846e96acad6Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1847e96acad6Smrg ]) 1848e96acad6Smrg ]) 1849e96acad6Smrg ]) 1850e96acad6Smrg ]) 1851e96acad6Smrg ]) 1852dbbd9e4bSmacallan ;; 1853dbbd9e4bSmacallan esac 1854dbbd9e4bSmacallan 1855e96acad6Smrg if test "x$lt_cv_dlopen" != xno; then 1856e96acad6Smrg enable_dlopen=yes 1857e96acad6Smrg else 1858e96acad6Smrg enable_dlopen=no 1859e96acad6Smrg fi 1860dbbd9e4bSmacallan 1861e96acad6Smrg case $lt_cv_dlopen in 1862e96acad6Smrg dlopen) 1863e96acad6Smrg save_CPPFLAGS="$CPPFLAGS" 1864e96acad6Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1865e96acad6Smrg 1866e96acad6Smrg save_LDFLAGS="$LDFLAGS" 1867e96acad6Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1868e96acad6Smrg 1869e96acad6Smrg save_LIBS="$LIBS" 1870e96acad6Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 1871e96acad6Smrg 1872e96acad6Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 1873e96acad6Smrg lt_cv_dlopen_self, [dnl 1874e96acad6Smrg _LT_TRY_DLOPEN_SELF( 1875e96acad6Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1876e96acad6Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1877e96acad6Smrg ]) 1878e96acad6Smrg 1879e96acad6Smrg if test "x$lt_cv_dlopen_self" = xyes; then 1880e96acad6Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1881e96acad6Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1882e96acad6Smrg lt_cv_dlopen_self_static, [dnl 1883e96acad6Smrg _LT_TRY_DLOPEN_SELF( 1884e96acad6Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1885e96acad6Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1886e96acad6Smrg ]) 1887dbbd9e4bSmacallan fi 1888e96acad6Smrg 1889e96acad6Smrg CPPFLAGS="$save_CPPFLAGS" 1890e96acad6Smrg LDFLAGS="$save_LDFLAGS" 1891e96acad6Smrg LIBS="$save_LIBS" 1892dbbd9e4bSmacallan ;; 1893dbbd9e4bSmacallan esac 1894dbbd9e4bSmacallan 1895e96acad6Smrg case $lt_cv_dlopen_self in 1896e96acad6Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1897e96acad6Smrg *) enable_dlopen_self=unknown ;; 1898dbbd9e4bSmacallan esac 1899e96acad6Smrg 1900e96acad6Smrg case $lt_cv_dlopen_self_static in 1901e96acad6Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1902e96acad6Smrg *) enable_dlopen_self_static=unknown ;; 1903dbbd9e4bSmacallan esac 1904e96acad6Smrgfi 1905e96acad6Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1906e96acad6Smrg [Whether dlopen is supported]) 1907e96acad6Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1908e96acad6Smrg [Whether dlopen of programs is supported]) 1909e96acad6Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1910e96acad6Smrg [Whether dlopen of statically linked programs is supported]) 1911e96acad6Smrg])# LT_SYS_DLOPEN_SELF 1912dbbd9e4bSmacallan 1913e96acad6Smrg# Old name: 1914e96acad6SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1915e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 1916e96acad6Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1917dbbd9e4bSmacallan 1918dbbd9e4bSmacallan 1919e96acad6Smrg# _LT_COMPILER_C_O([TAGNAME]) 1920e96acad6Smrg# --------------------------- 1921e96acad6Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 1922e96acad6Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1923e96acad6Smrgm4_defun([_LT_COMPILER_C_O], 1924e96acad6Smrg[m4_require([_LT_DECL_SED])dnl 1925e96acad6Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1926e96acad6Smrgm4_require([_LT_TAG_COMPILER])dnl 1927e96acad6SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1928e96acad6Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1929e96acad6Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1930e96acad6Smrg $RM -r conftest 2>/dev/null 1931e96acad6Smrg mkdir conftest 1932e96acad6Smrg cd conftest 1933e96acad6Smrg mkdir out 1934e96acad6Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1935e96acad6Smrg 1936e96acad6Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1937e96acad6Smrg # Insert the option either (1) after the last *FLAGS variable, or 1938e96acad6Smrg # (2) before a word containing "conftest.", or (3) at the end. 1939e96acad6Smrg # Note that $ac_compile itself does not contain backslashes and begins 1940e96acad6Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1941e96acad6Smrg lt_compile=`echo "$ac_compile" | $SED \ 1942e96acad6Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1943e96acad6Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1944e96acad6Smrg -e 's:$: $lt_compiler_flag:'` 1945e96acad6Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1946e96acad6Smrg (eval "$lt_compile" 2>out/conftest.err) 1947e96acad6Smrg ac_status=$? 1948e96acad6Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 1949e96acad6Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1950e96acad6Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 1951e96acad6Smrg then 1952e96acad6Smrg # The compiler can only warn and ignore the option if not recognized 1953e96acad6Smrg # So say no if there are warnings 1954e96acad6Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 1955e96acad6Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1956e96acad6Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1957e96acad6Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1958e96acad6Smrg fi 1959e96acad6Smrg fi 1960e96acad6Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1961e96acad6Smrg $RM conftest* 1962e96acad6Smrg # SGI C++ compiler will create directory out/ii_files/ for 1963e96acad6Smrg # template instantiation 1964e96acad6Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 1965e96acad6Smrg $RM out/* && rmdir out 1966e96acad6Smrg cd .. 1967e96acad6Smrg $RM -r conftest 1968e96acad6Smrg $RM conftest* 1969e96acad6Smrg]) 1970e96acad6Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 1971e96acad6Smrg [Does compiler simultaneously support -c and -o options?]) 1972e96acad6Smrg])# _LT_COMPILER_C_O 1973e96acad6Smrg 1974e96acad6Smrg 1975e96acad6Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 1976e96acad6Smrg# ---------------------------------- 1977e96acad6Smrg# Check to see if we can do hard links to lock some files if needed 1978e96acad6Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 1979e96acad6Smrg[m4_require([_LT_ENABLE_LOCK])dnl 1980e96acad6Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1981e96acad6Smrg_LT_COMPILER_C_O([$1]) 1982e96acad6Smrg 1983e96acad6Smrghard_links="nottested" 1984e96acad6Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1985e96acad6Smrg # do not overwrite the value of need_locks provided by the user 1986e96acad6Smrg AC_MSG_CHECKING([if we can lock with hard links]) 1987e96acad6Smrg hard_links=yes 1988e96acad6Smrg $RM conftest* 1989e96acad6Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1990e96acad6Smrg touch conftest.a 1991e96acad6Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 1992e96acad6Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1993e96acad6Smrg AC_MSG_RESULT([$hard_links]) 1994e96acad6Smrg if test "$hard_links" = no; then 1995e96acad6Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1996e96acad6Smrg need_locks=warn 1997dbbd9e4bSmacallan fi 1998e96acad6Smrgelse 1999e96acad6Smrg need_locks=no 2000e96acad6Smrgfi 2001e96acad6Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2002e96acad6Smrg])# _LT_COMPILER_FILE_LOCKS 2003dbbd9e4bSmacallan 2004dbbd9e4bSmacallan 2005e96acad6Smrg# _LT_CHECK_OBJDIR 2006e96acad6Smrg# ---------------- 2007e96acad6Smrgm4_defun([_LT_CHECK_OBJDIR], 2008e96acad6Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2009e96acad6Smrg[rm -f .libs 2>/dev/null 2010e96acad6Smrgmkdir .libs 2>/dev/null 2011e96acad6Smrgif test -d .libs; then 2012e96acad6Smrg lt_cv_objdir=.libs 2013e96acad6Smrgelse 2014e96acad6Smrg # MS-DOS does not allow filenames that begin with a dot. 2015e96acad6Smrg lt_cv_objdir=_libs 2016e96acad6Smrgfi 2017e96acad6Smrgrmdir .libs 2>/dev/null]) 2018e96acad6Smrgobjdir=$lt_cv_objdir 2019e96acad6Smrg_LT_DECL([], [objdir], [0], 2020e96acad6Smrg [The name of the directory that contains temporary libtool files])dnl 2021e96acad6Smrgm4_pattern_allow([LT_OBJDIR])dnl 2022e96acad6SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2023e96acad6Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2024e96acad6Smrg])# _LT_CHECK_OBJDIR 2025e96acad6Smrg 2026e96acad6Smrg 2027e96acad6Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2028e96acad6Smrg# -------------------------------------- 2029e96acad6Smrg# Check hardcoding attributes. 2030e96acad6Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2031e96acad6Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2032e96acad6Smrg_LT_TAGVAR(hardcode_action, $1)= 2033e96acad6Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2034e96acad6Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2035e96acad6Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2036e96acad6Smrg 2037e96acad6Smrg # We can hardcode non-existent directories. 2038e96acad6Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 2039e96acad6Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2040e96acad6Smrg # have to relink, otherwise we might link with an installed library 2041e96acad6Smrg # when we should be linking with a yet-to-be-installed one 2042e96acad6Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2043e96acad6Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 2044e96acad6Smrg # Linking always hardcodes the temporary library directory. 2045e96acad6Smrg _LT_TAGVAR(hardcode_action, $1)=relink 2046dbbd9e4bSmacallan else 2047e96acad6Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2048e96acad6Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 2049dbbd9e4bSmacallan fi 2050e96acad6Smrgelse 2051e96acad6Smrg # We cannot hardcode anything, or else we can only hardcode existing 2052e96acad6Smrg # directories. 2053e96acad6Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2054e96acad6Smrgfi 2055e96acad6SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2056dbbd9e4bSmacallan 2057e96acad6Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2058e96acad6Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2059e96acad6Smrg # Fast installation is not supported 2060e96acad6Smrg enable_fast_install=no 2061e96acad6Smrgelif test "$shlibpath_overrides_runpath" = yes || 2062e96acad6Smrg test "$enable_shared" = no; then 2063e96acad6Smrg # Fast installation is not necessary 2064e96acad6Smrg enable_fast_install=needless 2065e96acad6Smrgfi 2066e96acad6Smrg_LT_TAGDECL([], [hardcode_action], [0], 2067e96acad6Smrg [How to hardcode a shared library path into an executable]) 2068e96acad6Smrg])# _LT_LINKER_HARDCODE_LIBPATH 2069dbbd9e4bSmacallan 2070dbbd9e4bSmacallan 2071e96acad6Smrg# _LT_CMD_STRIPLIB 2072e96acad6Smrg# ---------------- 2073e96acad6Smrgm4_defun([_LT_CMD_STRIPLIB], 2074e96acad6Smrg[m4_require([_LT_DECL_EGREP]) 2075e96acad6Smrgstriplib= 2076e96acad6Smrgold_striplib= 2077e96acad6SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2078e96acad6Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2079e96acad6Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2080e96acad6Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2081e96acad6Smrg AC_MSG_RESULT([yes]) 2082e96acad6Smrgelse 2083e96acad6Smrg# FIXME - insert some real tests, host_os isn't really good enough 2084dbbd9e4bSmacallan case $host_os in 2085e96acad6Smrg darwin*) 2086e96acad6Smrg if test -n "$STRIP" ; then 2087e96acad6Smrg striplib="$STRIP -x" 2088e96acad6Smrg old_striplib="$STRIP -S" 2089e96acad6Smrg AC_MSG_RESULT([yes]) 2090e96acad6Smrg else 2091e96acad6Smrg AC_MSG_RESULT([no]) 2092e96acad6Smrg fi 2093e96acad6Smrg ;; 2094e96acad6Smrg *) 2095e96acad6Smrg AC_MSG_RESULT([no]) 2096e96acad6Smrg ;; 2097dbbd9e4bSmacallan esac 2098e96acad6Smrgfi 2099e96acad6Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2100e96acad6Smrg_LT_DECL([], [striplib], [1]) 2101e96acad6Smrg])# _LT_CMD_STRIPLIB 2102dbbd9e4bSmacallan 2103dbbd9e4bSmacallan 2104e96acad6Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2105e96acad6Smrg# ----------------------------- 2106e96acad6Smrg# PORTME Fill in your ld.so characteristics 2107e96acad6Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2108e96acad6Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2109e96acad6Smrgm4_require([_LT_DECL_EGREP])dnl 2110e96acad6Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2111e96acad6Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2112e96acad6Smrgm4_require([_LT_DECL_SED])dnl 2113e96acad6Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2114e96acad6SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2115e96acad6Smrgm4_if([$1], 2116e96acad6Smrg [], [ 2117e96acad6Smrgif test "$GCC" = yes; then 2118e96acad6Smrg case $host_os in 2119e96acad6Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2120e96acad6Smrg *) lt_awk_arg="/^libraries:/" ;; 2121e96acad6Smrg esac 2122e96acad6Smrg case $host_os in 2123e96acad6Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2124e96acad6Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 2125e96acad6Smrg esac 2126e96acad6Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2127e96acad6Smrg case $lt_search_path_spec in 2128e96acad6Smrg *\;*) 2129e96acad6Smrg # if the path contains ";" then we assume it to be the separator 2130e96acad6Smrg # otherwise default to the standard path separator (i.e. ":") - it is 2131e96acad6Smrg # assumed that no part of a normal pathname contains ";" but that should 2132e96acad6Smrg # okay in the real world where ";" in dirpaths is itself problematic. 2133e96acad6Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2134e96acad6Smrg ;; 2135e96acad6Smrg *) 2136e96acad6Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2137e96acad6Smrg ;; 2138e96acad6Smrg esac 2139e96acad6Smrg # Ok, now we have the path, separated by spaces, we can step through it 2140e96acad6Smrg # and add multilib dir if necessary. 2141e96acad6Smrg lt_tmp_lt_search_path_spec= 2142e96acad6Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2143e96acad6Smrg for lt_sys_path in $lt_search_path_spec; do 2144e96acad6Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2145e96acad6Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2146e96acad6Smrg else 2147e96acad6Smrg test -d "$lt_sys_path" && \ 2148e96acad6Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2149e96acad6Smrg fi 2150e96acad6Smrg done 2151e96acad6Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2152e96acad6SmrgBEGIN {RS=" "; FS="/|\n";} { 2153e96acad6Smrg lt_foo=""; 2154e96acad6Smrg lt_count=0; 2155e96acad6Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 2156e96acad6Smrg if ($lt_i != "" && $lt_i != ".") { 2157e96acad6Smrg if ($lt_i == "..") { 2158e96acad6Smrg lt_count++; 2159e96acad6Smrg } else { 2160e96acad6Smrg if (lt_count == 0) { 2161e96acad6Smrg lt_foo="/" $lt_i lt_foo; 2162e96acad6Smrg } else { 2163e96acad6Smrg lt_count--; 2164e96acad6Smrg } 2165e96acad6Smrg } 2166e96acad6Smrg } 2167e96acad6Smrg } 2168e96acad6Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2169e96acad6Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2170e96acad6Smrg}'` 2171e96acad6Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 2172e96acad6Smrg # for these hosts. 2173e96acad6Smrg case $host_os in 2174e96acad6Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2175e96acad6Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2176e96acad6Smrg esac 2177e96acad6Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2178e96acad6Smrgelse 2179e96acad6Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2180e96acad6Smrgfi]) 2181e96acad6Smrglibrary_names_spec= 2182e96acad6Smrglibname_spec='lib$name' 2183e96acad6Smrgsoname_spec= 2184e96acad6Smrgshrext_cmds=".so" 2185e96acad6Smrgpostinstall_cmds= 2186e96acad6Smrgpostuninstall_cmds= 2187e96acad6Smrgfinish_cmds= 2188e96acad6Smrgfinish_eval= 2189e96acad6Smrgshlibpath_var= 2190e96acad6Smrgshlibpath_overrides_runpath=unknown 2191e96acad6Smrgversion_type=none 2192e96acad6Smrgdynamic_linker="$host_os ld.so" 2193e96acad6Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2194e96acad6Smrgneed_lib_prefix=unknown 2195e96acad6Smrghardcode_into_libs=no 2196dbbd9e4bSmacallan 2197e96acad6Smrg# when you set need_version to no, make sure it does not cause -set_version 2198e96acad6Smrg# flags to be left without arguments 2199e96acad6Smrgneed_version=unknown 2200dbbd9e4bSmacallan 2201e96acad6Smrgcase $host_os in 2202e96acad6Smrgaix3*) 2203dbbd9e4bSmacallan version_type=linux 2204e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2205e96acad6Smrg shlibpath_var=LIBPATH 2206dbbd9e4bSmacallan 2207e96acad6Smrg # AIX 3 has no versioning support, so we append a major version to the name. 2208dbbd9e4bSmacallan soname_spec='${libname}${release}${shared_ext}$major' 2209dbbd9e4bSmacallan ;; 2210dbbd9e4bSmacallan 2211e96acad6Smrgaix[[4-9]]*) 2212e96acad6Smrg version_type=linux 2213dbbd9e4bSmacallan need_lib_prefix=no 2214dbbd9e4bSmacallan need_version=no 2215dbbd9e4bSmacallan hardcode_into_libs=yes 2216e96acad6Smrg if test "$host_cpu" = ia64; then 2217e96acad6Smrg # AIX 5 supports IA64 2218e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2219e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2220dbbd9e4bSmacallan else 2221e96acad6Smrg # With GCC up to 2.95.x, collect2 would create an import file 2222e96acad6Smrg # for dependence libraries. The import file would start with 2223e96acad6Smrg # the line `#! .'. This would cause the generated library to 2224e96acad6Smrg # depend on `.', always an invalid library. This was fixed in 2225e96acad6Smrg # development snapshots of GCC prior to 3.0. 2226dbbd9e4bSmacallan case $host_os in 2227e96acad6Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2228e96acad6Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2229e96acad6Smrg echo ' yes ' 2230e96acad6Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2231e96acad6Smrg : 2232e96acad6Smrg else 2233e96acad6Smrg can_build_shared=no 2234e96acad6Smrg fi 2235e96acad6Smrg ;; 2236dbbd9e4bSmacallan esac 2237e96acad6Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2238e96acad6Smrg # soname into executable. Probably we can add versioning support to 2239e96acad6Smrg # collect2, so additional links can be useful in future. 2240e96acad6Smrg if test "$aix_use_runtimelinking" = yes; then 2241e96acad6Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2242e96acad6Smrg # instead of lib<name>.a to let people know that these are not 2243e96acad6Smrg # typical AIX shared libraries. 2244e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2245e96acad6Smrg else 2246e96acad6Smrg # We preserve .a as extension for shared libraries through AIX4.2 2247e96acad6Smrg # and later when we are not doing run time linking. 2248e96acad6Smrg library_names_spec='${libname}${release}.a $libname.a' 2249e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2250e96acad6Smrg fi 2251e96acad6Smrg shlibpath_var=LIBPATH 2252dbbd9e4bSmacallan fi 2253dbbd9e4bSmacallan ;; 2254dbbd9e4bSmacallan 2255e96acad6Smrgamigaos*) 2256e96acad6Smrg case $host_cpu in 2257e96acad6Smrg powerpc) 2258e96acad6Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2259e96acad6Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2260e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2261e96acad6Smrg ;; 2262e96acad6Smrg m68k) 2263e96acad6Smrg library_names_spec='$libname.ixlibrary $libname.a' 2264e96acad6Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2265e96acad6Smrg 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' 2266e96acad6Smrg ;; 2267e96acad6Smrg esac 2268e96acad6Smrg ;; 2269e96acad6Smrg 2270e96acad6Smrgbeos*) 2271e96acad6Smrg library_names_spec='${libname}${shared_ext}' 2272e96acad6Smrg dynamic_linker="$host_os ld.so" 2273e96acad6Smrg shlibpath_var=LIBRARY_PATH 2274e96acad6Smrg ;; 2275e96acad6Smrg 2276e96acad6Smrgbsdi[[45]]*) 2277dbbd9e4bSmacallan version_type=linux 2278e96acad6Smrg need_version=no 2279dbbd9e4bSmacallan library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2280dbbd9e4bSmacallan soname_spec='${libname}${release}${shared_ext}$major' 2281e96acad6Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2282dbbd9e4bSmacallan shlibpath_var=LD_LIBRARY_PATH 2283e96acad6Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2284e96acad6Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2285e96acad6Smrg # the default ld.so.conf also contains /usr/contrib/lib and 2286e96acad6Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2287e96acad6Smrg # libtool to hard-code these into programs 2288dbbd9e4bSmacallan ;; 2289dbbd9e4bSmacallan 2290e96acad6Smrgcygwin* | mingw* | pw32* | cegcc*) 2291e96acad6Smrg version_type=windows 2292e96acad6Smrg shrext_cmds=".dll" 2293e96acad6Smrg need_version=no 2294e96acad6Smrg need_lib_prefix=no 2295dbbd9e4bSmacallan 2296e96acad6Smrg case $GCC,$cc_basename in 2297e96acad6Smrg yes,*) 2298e96acad6Smrg # gcc 2299e96acad6Smrg library_names_spec='$libname.dll.a' 2300e96acad6Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2301e96acad6Smrg postinstall_cmds='base_file=`basename \${file}`~ 2302e96acad6Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2303e96acad6Smrg dldir=$destdir/`dirname \$dlpath`~ 2304e96acad6Smrg test -d \$dldir || mkdir -p \$dldir~ 2305e96acad6Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2306e96acad6Smrg chmod a+x \$dldir/$dlname~ 2307e96acad6Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2308e96acad6Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2309e96acad6Smrg fi' 2310e96acad6Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2311e96acad6Smrg dlpath=$dir/\$dldll~ 2312e96acad6Smrg $RM \$dlpath' 2313e96acad6Smrg shlibpath_overrides_runpath=yes 2314dbbd9e4bSmacallan 2315e96acad6Smrg case $host_os in 2316e96acad6Smrg cygwin*) 2317e96acad6Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2318e96acad6Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2319e96acad6Smrgm4_if([$1], [],[ 2320e96acad6Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2321e96acad6Smrg ;; 2322e96acad6Smrg mingw* | cegcc*) 2323e96acad6Smrg # MinGW DLLs use traditional 'lib' prefix 2324e96acad6Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2325e96acad6Smrg ;; 2326e96acad6Smrg pw32*) 2327e96acad6Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2328e96acad6Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2329e96acad6Smrg ;; 2330dbbd9e4bSmacallan esac 2331e96acad6Smrg dynamic_linker='Win32 ld.exe' 2332e96acad6Smrg ;; 2333dbbd9e4bSmacallan 2334e96acad6Smrg *,cl*) 2335e96acad6Smrg # Native MSVC 2336e96acad6Smrg libname_spec='$name' 2337e96acad6Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2338e96acad6Smrg library_names_spec='${libname}.dll.lib' 2339dbbd9e4bSmacallan 2340e96acad6Smrg case $build_os in 2341e96acad6Smrg mingw*) 2342e96acad6Smrg sys_lib_search_path_spec= 2343e96acad6Smrg lt_save_ifs=$IFS 2344e96acad6Smrg IFS=';' 2345e96acad6Smrg for lt_path in $LIB 2346e96acad6Smrg do 2347e96acad6Smrg IFS=$lt_save_ifs 2348e96acad6Smrg # Let DOS variable expansion print the short 8.3 style file name. 2349e96acad6Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2350e96acad6Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2351dbbd9e4bSmacallan done 2352e96acad6Smrg IFS=$lt_save_ifs 2353e96acad6Smrg # Convert to MSYS style. 2354e96acad6Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2355dbbd9e4bSmacallan ;; 2356e96acad6Smrg cygwin*) 2357e96acad6Smrg # Convert to unix form, then to dos form, then back to unix form 2358e96acad6Smrg # but this time dos style (no spaces!) so that the unix form looks 2359e96acad6Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2360e96acad6Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2361e96acad6Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2362e96acad6Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2363dbbd9e4bSmacallan ;; 2364dbbd9e4bSmacallan *) 2365e96acad6Smrg sys_lib_search_path_spec="$LIB" 2366e96acad6Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2367e96acad6Smrg # It is most probably a Windows format PATH. 2368e96acad6Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2369e96acad6Smrg else 2370e96acad6Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2371e96acad6Smrg fi 2372e96acad6Smrg # FIXME: find the short name or the path components, as spaces are 2373e96acad6Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2374dbbd9e4bSmacallan ;; 2375e96acad6Smrg esac 2376dbbd9e4bSmacallan 2377e96acad6Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2378e96acad6Smrg postinstall_cmds='base_file=`basename \${file}`~ 2379e96acad6Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2380e96acad6Smrg dldir=$destdir/`dirname \$dlpath`~ 2381e96acad6Smrg test -d \$dldir || mkdir -p \$dldir~ 2382e96acad6Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2383e96acad6Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2384e96acad6Smrg dlpath=$dir/\$dldll~ 2385e96acad6Smrg $RM \$dlpath' 2386e96acad6Smrg shlibpath_overrides_runpath=yes 2387e96acad6Smrg dynamic_linker='Win32 link.exe' 2388e96acad6Smrg ;; 2389dbbd9e4bSmacallan 2390e96acad6Smrg *) 2391e96acad6Smrg # Assume MSVC wrapper 2392e96acad6Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2393e96acad6Smrg dynamic_linker='Win32 ld.exe' 2394e96acad6Smrg ;; 2395e96acad6Smrg esac 2396e96acad6Smrg # FIXME: first we should search . and the directory the executable is in 2397e96acad6Smrg shlibpath_var=PATH 2398dbbd9e4bSmacallan ;; 2399dbbd9e4bSmacallan 2400e96acad6Smrgdarwin* | rhapsody*) 2401e96acad6Smrg dynamic_linker="$host_os dyld" 2402e96acad6Smrg version_type=darwin 2403e96acad6Smrg need_lib_prefix=no 2404e96acad6Smrg need_version=no 2405e96acad6Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2406e96acad6Smrg soname_spec='${libname}${release}${major}$shared_ext' 2407e96acad6Smrg shlibpath_overrides_runpath=yes 2408e96acad6Smrg shlibpath_var=DYLD_LIBRARY_PATH 2409e96acad6Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2410e96acad6Smrgm4_if([$1], [],[ 2411e96acad6Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2412e96acad6Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2413e96acad6Smrg ;; 2414dbbd9e4bSmacallan 2415e96acad6Smrgdgux*) 2416e96acad6Smrg version_type=linux 2417e96acad6Smrg need_lib_prefix=no 2418e96acad6Smrg need_version=no 2419e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2420e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2421e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2422dbbd9e4bSmacallan ;; 2423dbbd9e4bSmacallan 2424e96acad6Smrgfreebsd1*) 2425e96acad6Smrg dynamic_linker=no 2426e96acad6Smrg ;; 2427dbbd9e4bSmacallan 2428e96acad6Smrgfreebsd* | dragonfly*) 2429e96acad6Smrg # DragonFly does not have aout. When/if they implement a new 2430e96acad6Smrg # versioning mechanism, adjust this. 2431e96acad6Smrg if test -x /usr/bin/objformat; then 2432e96acad6Smrg objformat=`/usr/bin/objformat` 2433dbbd9e4bSmacallan else 2434e96acad6Smrg case $host_os in 2435e96acad6Smrg freebsd[[123]]*) objformat=aout ;; 2436e96acad6Smrg *) objformat=elf ;; 2437e96acad6Smrg esac 2438dbbd9e4bSmacallan fi 2439e96acad6Smrg # Handle Gentoo/FreeBSD as it was Linux 2440e96acad6Smrg case $host_vendor in 2441e96acad6Smrg gentoo) 2442e96acad6Smrg version_type=linux ;; 2443e96acad6Smrg *) 2444e96acad6Smrg version_type=freebsd-$objformat ;; 2445e96acad6Smrg esac 2446dbbd9e4bSmacallan 2447e96acad6Smrg case $version_type in 2448e96acad6Smrg freebsd-elf*) 2449e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2450e96acad6Smrg need_version=no 2451e96acad6Smrg need_lib_prefix=no 2452dbbd9e4bSmacallan ;; 2453e96acad6Smrg freebsd-*) 2454e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2455e96acad6Smrg need_version=yes 2456e96acad6Smrg ;; 2457e96acad6Smrg linux) 2458e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2459e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2460e96acad6Smrg need_lib_prefix=no 2461e96acad6Smrg need_version=no 2462e96acad6Smrg ;; 2463e96acad6Smrg esac 2464e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2465e96acad6Smrg case $host_os in 2466e96acad6Smrg freebsd2*) 2467e96acad6Smrg shlibpath_overrides_runpath=yes 2468dbbd9e4bSmacallan ;; 2469e96acad6Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2470e96acad6Smrg shlibpath_overrides_runpath=yes 2471e96acad6Smrg hardcode_into_libs=yes 2472dbbd9e4bSmacallan ;; 2473e96acad6Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2474e96acad6Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2475e96acad6Smrg shlibpath_overrides_runpath=no 2476e96acad6Smrg hardcode_into_libs=yes 2477dbbd9e4bSmacallan ;; 2478e96acad6Smrg *) # from 4.6 on, and DragonFly 2479e96acad6Smrg shlibpath_overrides_runpath=yes 2480e96acad6Smrg hardcode_into_libs=yes 2481e96acad6Smrg ;; 2482e96acad6Smrg esac 2483dbbd9e4bSmacallan ;; 2484dbbd9e4bSmacallan 2485e96acad6Smrggnu*) 2486e96acad6Smrg version_type=linux 2487e96acad6Smrg need_lib_prefix=no 2488e96acad6Smrg need_version=no 2489e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2490e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2491e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2492e96acad6Smrg hardcode_into_libs=yes 2493dbbd9e4bSmacallan ;; 2494dbbd9e4bSmacallan 2495e96acad6Smrghaiku*) 2496e96acad6Smrg version_type=linux 2497e96acad6Smrg need_lib_prefix=no 2498e96acad6Smrg need_version=no 2499e96acad6Smrg dynamic_linker="$host_os runtime_loader" 2500e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2501e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2502e96acad6Smrg shlibpath_var=LIBRARY_PATH 2503e96acad6Smrg shlibpath_overrides_runpath=yes 2504e96acad6Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2505e96acad6Smrg hardcode_into_libs=yes 2506dbbd9e4bSmacallan ;; 2507dbbd9e4bSmacallan 2508e96acad6Smrghpux9* | hpux10* | hpux11*) 2509e96acad6Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 2510e96acad6Smrg # link against other versions. 2511e96acad6Smrg version_type=sunos 2512e96acad6Smrg need_lib_prefix=no 2513e96acad6Smrg need_version=no 2514dbbd9e4bSmacallan case $host_cpu in 2515dbbd9e4bSmacallan ia64*) 2516e96acad6Smrg shrext_cmds='.so' 2517e96acad6Smrg hardcode_into_libs=yes 2518e96acad6Smrg dynamic_linker="$host_os dld.so" 2519e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2520e96acad6Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2521e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2522e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2523e96acad6Smrg if test "X$HPUX_IA64_MODE" = X32; then 2524e96acad6Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2525e96acad6Smrg else 2526e96acad6Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2527e96acad6Smrg fi 2528e96acad6Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2529dbbd9e4bSmacallan ;; 2530dbbd9e4bSmacallan hppa*64*) 2531e96acad6Smrg shrext_cmds='.sl' 2532e96acad6Smrg hardcode_into_libs=yes 2533e96acad6Smrg dynamic_linker="$host_os dld.sl" 2534e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2535e96acad6Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2536e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2537e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2538e96acad6Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2539e96acad6Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2540dbbd9e4bSmacallan ;; 2541dbbd9e4bSmacallan *) 2542e96acad6Smrg shrext_cmds='.sl' 2543e96acad6Smrg dynamic_linker="$host_os dld.sl" 2544e96acad6Smrg shlibpath_var=SHLIB_PATH 2545e96acad6Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2546e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2547e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2548dbbd9e4bSmacallan ;; 2549dbbd9e4bSmacallan esac 2550e96acad6Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2551e96acad6Smrg postinstall_cmds='chmod 555 $lib' 2552e96acad6Smrg # or fails outright, so override atomically: 2553e96acad6Smrg install_override_mode=555 2554dbbd9e4bSmacallan ;; 2555dbbd9e4bSmacallan 2556dbbd9e4bSmacallaninterix[[3-9]]*) 2557e96acad6Smrg version_type=linux 2558e96acad6Smrg need_lib_prefix=no 2559e96acad6Smrg need_version=no 2560e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2561e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2562e96acad6Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2563e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2564e96acad6Smrg shlibpath_overrides_runpath=no 2565e96acad6Smrg hardcode_into_libs=yes 2566dbbd9e4bSmacallan ;; 2567dbbd9e4bSmacallan 2568dbbd9e4bSmacallanirix5* | irix6* | nonstopux*) 2569e96acad6Smrg case $host_os in 2570e96acad6Smrg nonstopux*) version_type=nonstopux ;; 2571e96acad6Smrg *) 2572e96acad6Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 2573e96acad6Smrg version_type=linux 2574e96acad6Smrg else 2575e96acad6Smrg version_type=irix 2576e96acad6Smrg fi ;; 2577dbbd9e4bSmacallan esac 2578e96acad6Smrg need_lib_prefix=no 2579e96acad6Smrg need_version=no 2580e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2581e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2582e96acad6Smrg case $host_os in 2583e96acad6Smrg irix5* | nonstopux*) 2584e96acad6Smrg libsuff= shlibsuff= 2585e96acad6Smrg ;; 2586e96acad6Smrg *) 2587e96acad6Smrg case $LD in # libtool.m4 will add one of these switches to LD 2588e96acad6Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2589e96acad6Smrg libsuff= shlibsuff= libmagic=32-bit;; 2590e96acad6Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2591e96acad6Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2592e96acad6Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2593e96acad6Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2594e96acad6Smrg *) libsuff= shlibsuff= libmagic=never-match;; 2595e96acad6Smrg esac 2596e96acad6Smrg ;; 2597e96acad6Smrg esac 2598e96acad6Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2599e96acad6Smrg shlibpath_overrides_runpath=no 2600e96acad6Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2601e96acad6Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2602e96acad6Smrg hardcode_into_libs=yes 2603e96acad6Smrg ;; 2604e96acad6Smrg 2605e96acad6Smrg# No shared lib support for Linux oldld, aout, or coff. 2606e96acad6Smrglinux*oldld* | linux*aout* | linux*coff*) 2607e96acad6Smrg dynamic_linker=no 2608dbbd9e4bSmacallan ;; 2609dbbd9e4bSmacallan 2610dbbd9e4bSmacallan# This must be Linux ELF. 2611e96acad6Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 2612e96acad6Smrg version_type=linux 2613e96acad6Smrg need_lib_prefix=no 2614e96acad6Smrg need_version=no 2615e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2616e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2617e96acad6Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2618e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2619e96acad6Smrg shlibpath_overrides_runpath=no 2620e96acad6Smrg 2621e96acad6Smrg # Some binutils ld are patched to set DT_RUNPATH 2622e96acad6Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2623e96acad6Smrg [lt_cv_shlibpath_overrides_runpath=no 2624e96acad6Smrg save_LDFLAGS=$LDFLAGS 2625e96acad6Smrg save_libdir=$libdir 2626e96acad6Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2627e96acad6Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2628e96acad6Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2629e96acad6Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2630e96acad6Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2631e96acad6Smrg LDFLAGS=$save_LDFLAGS 2632e96acad6Smrg libdir=$save_libdir 2633e96acad6Smrg ]) 2634e96acad6Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2635e96acad6Smrg 2636e96acad6Smrg # This implies no fast_install, which is unacceptable. 2637e96acad6Smrg # Some rework will be needed to allow for fast_install 2638e96acad6Smrg # before this can be enabled. 2639e96acad6Smrg hardcode_into_libs=yes 2640e96acad6Smrg 2641e96acad6Smrg # Append ld.so.conf contents to the search path 2642e96acad6Smrg if test -f /etc/ld.so.conf; then 2643e96acad6Smrg 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' ' '` 2644e96acad6Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2645e96acad6Smrg fi 2646e96acad6Smrg 2647e96acad6Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2648e96acad6Smrg # powerpc, because MkLinux only supported shared libraries with the 2649e96acad6Smrg # GNU dynamic linker. Since this was broken with cross compilers, 2650e96acad6Smrg # most powerpc-linux boxes support dynamic linking these days and 2651e96acad6Smrg # people can always --disable-shared, the test was removed, and we 2652e96acad6Smrg # assume the GNU/Linux dynamic linker is in use. 2653e96acad6Smrg dynamic_linker='GNU/Linux ld.so' 2654dbbd9e4bSmacallan ;; 2655dbbd9e4bSmacallan 2656dbbd9e4bSmacallannetbsd*) 2657e96acad6Smrg version_type=sunos 2658e96acad6Smrg need_lib_prefix=no 2659e96acad6Smrg need_version=no 2660e96acad6Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2661e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2662e96acad6Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2663e96acad6Smrg dynamic_linker='NetBSD (a.out) ld.so' 2664dbbd9e4bSmacallan else 2665e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2666e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2667e96acad6Smrg dynamic_linker='NetBSD ld.elf_so' 2668dbbd9e4bSmacallan fi 2669e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2670e96acad6Smrg shlibpath_overrides_runpath=yes 2671e96acad6Smrg hardcode_into_libs=yes 2672dbbd9e4bSmacallan ;; 2673dbbd9e4bSmacallan 2674e96acad6Smrgnewsos6) 2675e96acad6Smrg version_type=linux 2676e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2677e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2678e96acad6Smrg shlibpath_overrides_runpath=yes 2679dbbd9e4bSmacallan ;; 2680dbbd9e4bSmacallan 2681e96acad6Smrg*nto* | *qnx*) 2682e96acad6Smrg version_type=qnx 2683e96acad6Smrg need_lib_prefix=no 2684e96acad6Smrg need_version=no 2685e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2686e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2687e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2688e96acad6Smrg shlibpath_overrides_runpath=no 2689e96acad6Smrg hardcode_into_libs=yes 2690e96acad6Smrg dynamic_linker='ldqnx.so' 2691dbbd9e4bSmacallan ;; 2692dbbd9e4bSmacallan 2693dbbd9e4bSmacallanopenbsd*) 2694e96acad6Smrg version_type=sunos 2695e96acad6Smrg sys_lib_dlsearch_path_spec="/usr/lib" 2696e96acad6Smrg need_lib_prefix=no 2697e96acad6Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2698e96acad6Smrg case $host_os in 2699e96acad6Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2700e96acad6Smrg *) need_version=no ;; 2701e96acad6Smrg esac 2702e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2703e96acad6Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2704e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2705e96acad6Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2706e96acad6Smrg case $host_os in 2707e96acad6Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 2708e96acad6Smrg shlibpath_overrides_runpath=no 2709e96acad6Smrg ;; 2710e96acad6Smrg *) 2711e96acad6Smrg shlibpath_overrides_runpath=yes 2712e96acad6Smrg ;; 2713e96acad6Smrg esac 2714dbbd9e4bSmacallan else 2715e96acad6Smrg shlibpath_overrides_runpath=yes 2716dbbd9e4bSmacallan fi 2717dbbd9e4bSmacallan ;; 2718dbbd9e4bSmacallan 2719e96acad6Smrgos2*) 2720e96acad6Smrg libname_spec='$name' 2721e96acad6Smrg shrext_cmds=".dll" 2722e96acad6Smrg need_lib_prefix=no 2723e96acad6Smrg library_names_spec='$libname${shared_ext} $libname.a' 2724e96acad6Smrg dynamic_linker='OS/2 ld.exe' 2725e96acad6Smrg shlibpath_var=LIBPATH 2726e96acad6Smrg ;; 2727e96acad6Smrg 2728dbbd9e4bSmacallanosf3* | osf4* | osf5*) 2729e96acad6Smrg version_type=osf 2730e96acad6Smrg need_lib_prefix=no 2731e96acad6Smrg need_version=no 2732e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2733e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2734e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2735e96acad6Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2736e96acad6Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2737dbbd9e4bSmacallan ;; 2738dbbd9e4bSmacallan 2739dbbd9e4bSmacallanrdos*) 2740e96acad6Smrg dynamic_linker=no 2741dbbd9e4bSmacallan ;; 2742dbbd9e4bSmacallan 2743dbbd9e4bSmacallansolaris*) 2744e96acad6Smrg version_type=linux 2745e96acad6Smrg need_lib_prefix=no 2746e96acad6Smrg need_version=no 2747e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2748e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2749e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2750e96acad6Smrg shlibpath_overrides_runpath=yes 2751e96acad6Smrg hardcode_into_libs=yes 2752e96acad6Smrg # ldd complains unless libraries are executable 2753e96acad6Smrg postinstall_cmds='chmod +x $lib' 2754e96acad6Smrg ;; 2755e96acad6Smrg 2756e96acad6Smrgsunos4*) 2757e96acad6Smrg version_type=sunos 2758e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2759e96acad6Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2760e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2761e96acad6Smrg shlibpath_overrides_runpath=yes 2762e96acad6Smrg if test "$with_gnu_ld" = yes; then 2763e96acad6Smrg need_lib_prefix=no 2764e96acad6Smrg fi 2765e96acad6Smrg need_version=yes 2766dbbd9e4bSmacallan ;; 2767dbbd9e4bSmacallan 2768dbbd9e4bSmacallansysv4 | sysv4.3*) 2769e96acad6Smrg version_type=linux 2770e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2771e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2772e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2773dbbd9e4bSmacallan case $host_vendor in 2774e96acad6Smrg sni) 2775e96acad6Smrg shlibpath_overrides_runpath=no 2776e96acad6Smrg need_lib_prefix=no 2777e96acad6Smrg runpath_var=LD_RUN_PATH 2778e96acad6Smrg ;; 2779e96acad6Smrg siemens) 2780e96acad6Smrg need_lib_prefix=no 2781e96acad6Smrg ;; 2782e96acad6Smrg motorola) 2783e96acad6Smrg need_lib_prefix=no 2784e96acad6Smrg need_version=no 2785e96acad6Smrg shlibpath_overrides_runpath=no 2786e96acad6Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2787e96acad6Smrg ;; 2788dbbd9e4bSmacallan esac 2789dbbd9e4bSmacallan ;; 2790dbbd9e4bSmacallan 2791e96acad6Smrgsysv4*MP*) 2792e96acad6Smrg if test -d /usr/nec ;then 2793e96acad6Smrg version_type=linux 2794e96acad6Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2795e96acad6Smrg soname_spec='$libname${shared_ext}.$major' 2796e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2797e96acad6Smrg fi 2798dbbd9e4bSmacallan ;; 2799dbbd9e4bSmacallan 2800e96acad6Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2801e96acad6Smrg version_type=freebsd-elf 2802e96acad6Smrg need_lib_prefix=no 2803e96acad6Smrg need_version=no 2804e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2805e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2806e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2807e96acad6Smrg shlibpath_overrides_runpath=yes 2808e96acad6Smrg hardcode_into_libs=yes 2809e96acad6Smrg if test "$with_gnu_ld" = yes; then 2810e96acad6Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2811e96acad6Smrg else 2812e96acad6Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2813e96acad6Smrg case $host_os in 2814e96acad6Smrg sco3.2v5*) 2815e96acad6Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2816e96acad6Smrg ;; 2817e96acad6Smrg esac 2818e96acad6Smrg fi 2819e96acad6Smrg sys_lib_dlsearch_path_spec='/usr/lib' 2820e96acad6Smrg ;; 2821dbbd9e4bSmacallan 2822e96acad6Smrgtpf*) 2823e96acad6Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2824e96acad6Smrg version_type=linux 2825e96acad6Smrg need_lib_prefix=no 2826e96acad6Smrg need_version=no 2827e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2828e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2829e96acad6Smrg shlibpath_overrides_runpath=no 2830e96acad6Smrg hardcode_into_libs=yes 2831dbbd9e4bSmacallan ;; 2832e96acad6Smrg 2833e96acad6Smrguts4*) 2834e96acad6Smrg version_type=linux 2835e96acad6Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2836e96acad6Smrg soname_spec='${libname}${release}${shared_ext}$major' 2837e96acad6Smrg shlibpath_var=LD_LIBRARY_PATH 2838dbbd9e4bSmacallan ;; 2839e96acad6Smrg 2840dbbd9e4bSmacallan*) 2841e96acad6Smrg dynamic_linker=no 2842dbbd9e4bSmacallan ;; 2843dbbd9e4bSmacallanesac 2844e96acad6SmrgAC_MSG_RESULT([$dynamic_linker]) 2845e96acad6Smrgtest "$dynamic_linker" = no && can_build_shared=no 2846dbbd9e4bSmacallan 2847e96acad6Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2848e96acad6Smrgif test "$GCC" = yes; then 2849e96acad6Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2850e96acad6Smrgfi 2851dbbd9e4bSmacallan 2852e96acad6Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2853e96acad6Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2854e96acad6Smrgfi 2855e96acad6Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2856e96acad6Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2857e96acad6Smrgfi 2858dbbd9e4bSmacallan 2859e96acad6Smrg_LT_DECL([], [variables_saved_for_relink], [1], 2860e96acad6Smrg [Variables whose values should be saved in libtool wrapper scripts and 2861e96acad6Smrg restored at link time]) 2862e96acad6Smrg_LT_DECL([], [need_lib_prefix], [0], 2863e96acad6Smrg [Do we need the "lib" prefix for modules?]) 2864e96acad6Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2865e96acad6Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2866e96acad6Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2867e96acad6Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2868e96acad6Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2869e96acad6Smrg [Is shlibpath searched before the hard-coded library search path?]) 2870e96acad6Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2871e96acad6Smrg_LT_DECL([], [library_names_spec], [1], 2872e96acad6Smrg [[List of archive names. First name is the real one, the rest are links. 2873e96acad6Smrg The last name is the one that the linker finds with -lNAME]]) 2874e96acad6Smrg_LT_DECL([], [soname_spec], [1], 2875e96acad6Smrg [[The coded name of the library, if different from the real name]]) 2876e96acad6Smrg_LT_DECL([], [install_override_mode], [1], 2877e96acad6Smrg [Permission mode override for installation of shared libraries]) 2878e96acad6Smrg_LT_DECL([], [postinstall_cmds], [2], 2879e96acad6Smrg [Command to use after installation of a shared archive]) 2880e96acad6Smrg_LT_DECL([], [postuninstall_cmds], [2], 2881e96acad6Smrg [Command to use after uninstallation of a shared archive]) 2882e96acad6Smrg_LT_DECL([], [finish_cmds], [2], 2883e96acad6Smrg [Commands used to finish a libtool library installation in a directory]) 2884e96acad6Smrg_LT_DECL([], [finish_eval], [1], 2885e96acad6Smrg [[As "finish_cmds", except a single script fragment to be evaled but 2886e96acad6Smrg not shown]]) 2887e96acad6Smrg_LT_DECL([], [hardcode_into_libs], [0], 2888e96acad6Smrg [Whether we should hardcode library paths into libraries]) 2889e96acad6Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2890e96acad6Smrg [Compile-time system search path for libraries]) 2891e96acad6Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2892e96acad6Smrg [Run-time system search path for libraries]) 2893e96acad6Smrg])# _LT_SYS_DYNAMIC_LINKER 2894e96acad6Smrg 2895e96acad6Smrg 2896e96acad6Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 2897e96acad6Smrg# -------------------------- 2898e96acad6Smrg# find a file program which can recognize shared library 2899e96acad6SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2900e96acad6Smrg[m4_require([_LT_DECL_EGREP])dnl 2901e96acad6SmrgAC_MSG_CHECKING([for $1]) 2902e96acad6SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2903e96acad6Smrg[case $MAGIC_CMD in 2904e96acad6Smrg[[\\/*] | ?:[\\/]*]) 2905e96acad6Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2906e96acad6Smrg ;; 2907e96acad6Smrg*) 2908e96acad6Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2909e96acad6Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2910e96acad6Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2911e96acad6Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2912e96acad6Smrgdnl not every word. This closes a longstanding sh security hole. 2913e96acad6Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 2914e96acad6Smrg for ac_dir in $ac_dummy; do 2915e96acad6Smrg IFS="$lt_save_ifs" 2916e96acad6Smrg test -z "$ac_dir" && ac_dir=. 2917e96acad6Smrg if test -f $ac_dir/$1; then 2918e96acad6Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2919e96acad6Smrg if test -n "$file_magic_test_file"; then 2920e96acad6Smrg case $deplibs_check_method in 2921e96acad6Smrg "file_magic "*) 2922e96acad6Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2923e96acad6Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2924e96acad6Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2925e96acad6Smrg $EGREP "$file_magic_regex" > /dev/null; then 2926e96acad6Smrg : 2927e96acad6Smrg else 2928e96acad6Smrg cat <<_LT_EOF 1>&2 2929dbbd9e4bSmacallan 2930e96acad6Smrg*** Warning: the command libtool uses to detect shared libraries, 2931e96acad6Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2932e96acad6Smrg*** The result is that libtool may fail to recognize shared libraries 2933e96acad6Smrg*** as such. This will affect the creation of libtool libraries that 2934e96acad6Smrg*** depend on shared libraries, but programs linked with such libtool 2935e96acad6Smrg*** libraries will work regardless of this problem. Nevertheless, you 2936e96acad6Smrg*** may want to report the problem to your system manager and/or to 2937e96acad6Smrg*** bug-libtool@gnu.org 2938dbbd9e4bSmacallan 2939e96acad6Smrg_LT_EOF 2940e96acad6Smrg fi ;; 2941e96acad6Smrg esac 2942e96acad6Smrg fi 2943e96acad6Smrg break 2944e96acad6Smrg fi 2945e96acad6Smrg done 2946e96acad6Smrg IFS="$lt_save_ifs" 2947e96acad6Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 2948e96acad6Smrg ;; 2949e96acad6Smrgesac]) 2950e96acad6SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2951e96acad6Smrgif test -n "$MAGIC_CMD"; then 2952e96acad6Smrg AC_MSG_RESULT($MAGIC_CMD) 2953e96acad6Smrgelse 2954e96acad6Smrg AC_MSG_RESULT(no) 2955dbbd9e4bSmacallanfi 2956e96acad6Smrg_LT_DECL([], [MAGIC_CMD], [0], 2957e96acad6Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2958e96acad6Smrg])# _LT_PATH_TOOL_PREFIX 2959dbbd9e4bSmacallan 2960e96acad6Smrg# Old name: 2961e96acad6SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2962e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 2963e96acad6Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 2964dbbd9e4bSmacallan 2965dbbd9e4bSmacallan 2966e96acad6Smrg# _LT_PATH_MAGIC 2967dbbd9e4bSmacallan# -------------- 2968e96acad6Smrg# find a file program which can recognize a shared library 2969e96acad6Smrgm4_defun([_LT_PATH_MAGIC], 2970e96acad6Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2971e96acad6Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 2972e96acad6Smrg if test -n "$ac_tool_prefix"; then 2973e96acad6Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2974e96acad6Smrg else 2975e96acad6Smrg MAGIC_CMD=: 2976e96acad6Smrg fi 2977e96acad6Smrgfi 2978e96acad6Smrg])# _LT_PATH_MAGIC 2979dbbd9e4bSmacallan 2980dbbd9e4bSmacallan 2981e96acad6Smrg# LT_PATH_LD 2982e96acad6Smrg# ---------- 2983e96acad6Smrg# find the pathname to the GNU or non-GNU linker 2984e96acad6SmrgAC_DEFUN([LT_PATH_LD], 2985e96acad6Smrg[AC_REQUIRE([AC_PROG_CC])dnl 2986e96acad6SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2987e96acad6SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2988e96acad6Smrgm4_require([_LT_DECL_SED])dnl 2989e96acad6Smrgm4_require([_LT_DECL_EGREP])dnl 2990e96acad6Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 2991dbbd9e4bSmacallan 2992e96acad6SmrgAC_ARG_WITH([gnu-ld], 2993e96acad6Smrg [AS_HELP_STRING([--with-gnu-ld], 2994e96acad6Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2995e96acad6Smrg [test "$withval" = no || with_gnu_ld=yes], 2996e96acad6Smrg [with_gnu_ld=no])dnl 2997dbbd9e4bSmacallan 2998e96acad6Smrgac_prog=ld 2999e96acad6Smrgif test "$GCC" = yes; then 3000e96acad6Smrg # Check if gcc -print-prog-name=ld gives a path. 3001e96acad6Smrg AC_MSG_CHECKING([for ld used by $CC]) 3002e96acad6Smrg case $host in 3003e96acad6Smrg *-*-mingw*) 3004e96acad6Smrg # gcc leaves a trailing carriage return which upsets mingw 3005e96acad6Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3006e96acad6Smrg *) 3007e96acad6Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3008e96acad6Smrg esac 3009e96acad6Smrg case $ac_prog in 3010e96acad6Smrg # Accept absolute paths. 3011e96acad6Smrg [[\\/]]* | ?:[[\\/]]*) 3012e96acad6Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 3013e96acad6Smrg # Canonicalize the pathname of ld 3014e96acad6Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3015e96acad6Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3016e96acad6Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3017e96acad6Smrg done 3018e96acad6Smrg test -z "$LD" && LD="$ac_prog" 3019e96acad6Smrg ;; 3020e96acad6Smrg "") 3021e96acad6Smrg # If it fails, then pretend we aren't using GCC. 3022e96acad6Smrg ac_prog=ld 3023e96acad6Smrg ;; 3024e96acad6Smrg *) 3025e96acad6Smrg # If it is relative, then search for the first ld in PATH. 3026e96acad6Smrg with_gnu_ld=unknown 3027e96acad6Smrg ;; 3028e96acad6Smrg esac 3029e96acad6Smrgelif test "$with_gnu_ld" = yes; then 3030e96acad6Smrg AC_MSG_CHECKING([for GNU ld]) 3031e96acad6Smrgelse 3032e96acad6Smrg AC_MSG_CHECKING([for non-GNU ld]) 3033e96acad6Smrgfi 3034e96acad6SmrgAC_CACHE_VAL(lt_cv_path_LD, 3035e96acad6Smrg[if test -z "$LD"; then 3036e96acad6Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3037e96acad6Smrg for ac_dir in $PATH; do 3038e96acad6Smrg IFS="$lt_save_ifs" 3039e96acad6Smrg test -z "$ac_dir" && ac_dir=. 3040e96acad6Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3041e96acad6Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 3042e96acad6Smrg # Check to see if the program is GNU ld. I'd rather use --version, 3043e96acad6Smrg # but apparently some variants of GNU ld only accept -v. 3044e96acad6Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 3045e96acad6Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3046e96acad6Smrg *GNU* | *'with BFD'*) 3047e96acad6Smrg test "$with_gnu_ld" != no && break 3048e96acad6Smrg ;; 3049e96acad6Smrg *) 3050e96acad6Smrg test "$with_gnu_ld" != yes && break 3051e96acad6Smrg ;; 3052e96acad6Smrg esac 3053e96acad6Smrg fi 3054e96acad6Smrg done 3055e96acad6Smrg IFS="$lt_save_ifs" 3056e96acad6Smrgelse 3057e96acad6Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 3058e96acad6Smrgfi]) 3059e96acad6SmrgLD="$lt_cv_path_LD" 3060e96acad6Smrgif test -n "$LD"; then 3061e96acad6Smrg AC_MSG_RESULT($LD) 3062e96acad6Smrgelse 3063e96acad6Smrg AC_MSG_RESULT(no) 3064e96acad6Smrgfi 3065e96acad6Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3066e96acad6Smrg_LT_PATH_LD_GNU 3067e96acad6SmrgAC_SUBST([LD]) 3068dbbd9e4bSmacallan 3069e96acad6Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3070e96acad6Smrg])# LT_PATH_LD 3071dbbd9e4bSmacallan 3072e96acad6Smrg# Old names: 3073e96acad6SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3074e96acad6SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3075e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 3076e96acad6Smrgdnl AC_DEFUN([AM_PROG_LD], []) 3077e96acad6Smrgdnl AC_DEFUN([AC_PROG_LD], []) 3078dbbd9e4bSmacallan 3079dbbd9e4bSmacallan 3080e96acad6Smrg# _LT_PATH_LD_GNU 3081e96acad6Smrg#- -------------- 3082e96acad6Smrgm4_defun([_LT_PATH_LD_GNU], 3083e96acad6Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3084e96acad6Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3085e96acad6Smrgcase `$LD -v 2>&1 </dev/null` in 3086e96acad6Smrg*GNU* | *'with BFD'*) 3087e96acad6Smrg lt_cv_prog_gnu_ld=yes 3088e96acad6Smrg ;; 3089e96acad6Smrg*) 3090e96acad6Smrg lt_cv_prog_gnu_ld=no 3091e96acad6Smrg ;; 3092e96acad6Smrgesac]) 3093e96acad6Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3094e96acad6Smrg])# _LT_PATH_LD_GNU 3095dbbd9e4bSmacallan 3096dbbd9e4bSmacallan 3097e96acad6Smrg# _LT_CMD_RELOAD 3098e96acad6Smrg# -------------- 3099e96acad6Smrg# find reload flag for linker 3100e96acad6Smrg# -- PORTME Some linkers may need a different reload flag. 3101e96acad6Smrgm4_defun([_LT_CMD_RELOAD], 3102e96acad6Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 3103e96acad6Smrg lt_cv_ld_reload_flag, 3104e96acad6Smrg [lt_cv_ld_reload_flag='-r']) 3105e96acad6Smrgreload_flag=$lt_cv_ld_reload_flag 3106e96acad6Smrgcase $reload_flag in 3107e96acad6Smrg"" | " "*) ;; 3108e96acad6Smrg*) reload_flag=" $reload_flag" ;; 3109e96acad6Smrgesac 3110e96acad6Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3111e96acad6Smrgcase $host_os in 3112e96acad6Smrg cygwin* | mingw* | pw32* | cegcc*) 3113e96acad6Smrg if test "$GCC" != yes; then 3114e96acad6Smrg reload_cmds=false 3115e96acad6Smrg fi 3116e96acad6Smrg ;; 3117e96acad6Smrg darwin*) 3118e96acad6Smrg if test "$GCC" = yes; then 3119e96acad6Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3120e96acad6Smrg else 3121e96acad6Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3122e96acad6Smrg fi 3123dbbd9e4bSmacallan ;; 3124dbbd9e4bSmacallanesac 3125e96acad6Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3126e96acad6Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3127e96acad6Smrg])# _LT_CMD_RELOAD 3128dbbd9e4bSmacallan 3129dbbd9e4bSmacallan 3130e96acad6Smrg# _LT_CHECK_MAGIC_METHOD 3131e96acad6Smrg# ---------------------- 3132e96acad6Smrg# how to check for library dependencies 3133e96acad6Smrg# -- PORTME fill in with the dynamic library characteristics 3134e96acad6Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3135e96acad6Smrg[m4_require([_LT_DECL_EGREP]) 3136e96acad6Smrgm4_require([_LT_DECL_OBJDUMP]) 3137e96acad6SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3138e96acad6Smrglt_cv_deplibs_check_method, 3139e96acad6Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3140e96acad6Smrglt_cv_file_magic_test_file= 3141e96acad6Smrglt_cv_deplibs_check_method='unknown' 3142e96acad6Smrg# Need to set the preceding variable on all platforms that support 3143e96acad6Smrg# interlibrary dependencies. 3144e96acad6Smrg# 'none' -- dependencies not supported. 3145e96acad6Smrg# `unknown' -- same as none, but documents that we really don't know. 3146e96acad6Smrg# 'pass_all' -- all dependencies passed with no checks. 3147e96acad6Smrg# 'test_compile' -- check by making test program. 3148e96acad6Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 3149e96acad6Smrg# which responds to the $file_magic_cmd with a given extended regex. 3150e96acad6Smrg# If you have `file' or equivalent on your system and you're not sure 3151e96acad6Smrg# whether `pass_all' will *always* work, you probably want this one. 3152dbbd9e4bSmacallan 3153e96acad6Smrgcase $host_os in 3154e96acad6Smrgaix[[4-9]]*) 3155e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3156e96acad6Smrg ;; 3157dbbd9e4bSmacallan 3158e96acad6Smrgbeos*) 3159e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3160e96acad6Smrg ;; 3161dbbd9e4bSmacallan 3162e96acad6Smrgbsdi[[45]]*) 3163e96acad6Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3164e96acad6Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3165e96acad6Smrg lt_cv_file_magic_test_file=/shlib/libc.so 3166e96acad6Smrg ;; 3167dbbd9e4bSmacallan 3168e96acad6Smrgcygwin*) 3169e96acad6Smrg # func_win32_libid is a shell function defined in ltmain.sh 3170e96acad6Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3171e96acad6Smrg lt_cv_file_magic_cmd='func_win32_libid' 3172e96acad6Smrg ;; 3173dbbd9e4bSmacallan 3174e96acad6Smrgmingw* | pw32*) 3175e96acad6Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 3176e96acad6Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3177e96acad6Smrg # unless we find 'file', for example because we are cross-compiling. 3178e96acad6Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3179e96acad6Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3180e96acad6Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3181e96acad6Smrg lt_cv_file_magic_cmd='func_win32_libid' 3182e96acad6Smrg else 3183e96acad6Smrg # Keep this pattern in sync with the one in func_win32_libid. 3184e96acad6Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3185e96acad6Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3186e96acad6Smrg fi 3187e96acad6Smrg ;; 3188dbbd9e4bSmacallan 3189e96acad6Smrgcegcc*) 3190e96acad6Smrg # use the weaker test based on 'objdump'. See mingw*. 3191e96acad6Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3192e96acad6Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3193e96acad6Smrg ;; 3194dbbd9e4bSmacallan 3195e96acad6Smrgdarwin* | rhapsody*) 3196e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3197e96acad6Smrg ;; 3198dbbd9e4bSmacallan 3199e96acad6Smrgfreebsd* | dragonfly*) 3200e96acad6Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3201e96acad6Smrg case $host_cpu in 3202e96acad6Smrg i*86 ) 3203e96acad6Smrg # Not sure whether the presence of OpenBSD here was a mistake. 3204e96acad6Smrg # Let's accept both of them until this is cleared up. 3205e96acad6Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3206e96acad6Smrg lt_cv_file_magic_cmd=/usr/bin/file 3207e96acad6Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3208e96acad6Smrg ;; 3209e96acad6Smrg esac 3210e96acad6Smrg else 3211e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3212e96acad6Smrg fi 3213e96acad6Smrg ;; 3214dbbd9e4bSmacallan 3215e96acad6Smrggnu*) 3216e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3217e96acad6Smrg ;; 3218dbbd9e4bSmacallan 3219e96acad6Smrghaiku*) 3220e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3221e96acad6Smrg ;; 3222dbbd9e4bSmacallan 3223e96acad6Smrghpux10.20* | hpux11*) 3224e96acad6Smrg lt_cv_file_magic_cmd=/usr/bin/file 3225e96acad6Smrg case $host_cpu in 3226e96acad6Smrg ia64*) 3227e96acad6Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3228e96acad6Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3229e96acad6Smrg ;; 3230e96acad6Smrg hppa*64*) 3231e96acad6Smrg [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]'] 3232e96acad6Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3233e96acad6Smrg ;; 3234e96acad6Smrg *) 3235e96acad6Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3236e96acad6Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3237e96acad6Smrg ;; 3238e96acad6Smrg esac 3239e96acad6Smrg ;; 3240dbbd9e4bSmacallan 3241e96acad6Smrginterix[[3-9]]*) 3242e96acad6Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3243e96acad6Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3244e96acad6Smrg ;; 3245dbbd9e4bSmacallan 3246e96acad6Smrgirix5* | irix6* | nonstopux*) 3247e96acad6Smrg case $LD in 3248e96acad6Smrg *-32|*"-32 ") libmagic=32-bit;; 3249e96acad6Smrg *-n32|*"-n32 ") libmagic=N32;; 3250e96acad6Smrg *-64|*"-64 ") libmagic=64-bit;; 3251e96acad6Smrg *) libmagic=never-match;; 3252e96acad6Smrg esac 3253e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3254e96acad6Smrg ;; 3255dbbd9e4bSmacallan 3256e96acad6Smrg# This must be Linux ELF. 3257e96acad6Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 3258e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3259e96acad6Smrg ;; 3260dbbd9e4bSmacallan 3261e96acad6Smrgnetbsd*) 3262e96acad6Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3263e96acad6Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3264e96acad6Smrg else 3265e96acad6Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3266e96acad6Smrg fi 3267e96acad6Smrg ;; 3268dbbd9e4bSmacallan 3269e96acad6Smrgnewos6*) 3270e96acad6Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3271e96acad6Smrg lt_cv_file_magic_cmd=/usr/bin/file 3272e96acad6Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3273e96acad6Smrg ;; 3274dbbd9e4bSmacallan 3275e96acad6Smrg*nto* | *qnx*) 3276e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3277e96acad6Smrg ;; 3278dbbd9e4bSmacallan 3279e96acad6Smrgopenbsd*) 3280e96acad6Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3281e96acad6Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3282dbbd9e4bSmacallan else 3283e96acad6Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3284dbbd9e4bSmacallan fi 3285e96acad6Smrg ;; 3286dbbd9e4bSmacallan 3287e96acad6Smrgosf3* | osf4* | osf5*) 3288e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3289e96acad6Smrg ;; 3290dbbd9e4bSmacallan 3291e96acad6Smrgrdos*) 3292e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3293e96acad6Smrg ;; 3294dbbd9e4bSmacallan 3295e96acad6Smrgsolaris*) 3296e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3297e96acad6Smrg ;; 3298e96acad6Smrg 3299e96acad6Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3300e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3301e96acad6Smrg ;; 3302e96acad6Smrg 3303e96acad6Smrgsysv4 | sysv4.3*) 3304e96acad6Smrg case $host_vendor in 3305e96acad6Smrg motorola) 3306e96acad6Smrg 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]]' 3307e96acad6Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3308dbbd9e4bSmacallan ;; 3309e96acad6Smrg ncr) 3310e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3311e96acad6Smrg ;; 3312e96acad6Smrg sequent) 3313e96acad6Smrg lt_cv_file_magic_cmd='/bin/file' 3314e96acad6Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3315e96acad6Smrg ;; 3316e96acad6Smrg sni) 3317e96acad6Smrg lt_cv_file_magic_cmd='/bin/file' 3318e96acad6Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3319e96acad6Smrg lt_cv_file_magic_test_file=/lib/libc.so 3320e96acad6Smrg ;; 3321e96acad6Smrg siemens) 3322e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3323e96acad6Smrg ;; 3324e96acad6Smrg pc) 3325e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3326e96acad6Smrg ;; 3327e96acad6Smrg esac 3328e96acad6Smrg ;; 3329e96acad6Smrg 3330e96acad6Smrgtpf*) 3331e96acad6Smrg lt_cv_deplibs_check_method=pass_all 3332e96acad6Smrg ;; 3333e96acad6Smrgesac 3334e96acad6Smrg]) 3335dbbd9e4bSmacallan 3336e96acad6Smrgfile_magic_glob= 3337e96acad6Smrgwant_nocaseglob=no 3338e96acad6Smrgif test "$build" = "$host"; then 3339e96acad6Smrg case $host_os in 3340e96acad6Smrg mingw* | pw32*) 3341e96acad6Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3342e96acad6Smrg want_nocaseglob=yes 3343e96acad6Smrg else 3344e96acad6Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3345dbbd9e4bSmacallan fi 3346e96acad6Smrg ;; 3347e96acad6Smrg esac 3348e96acad6Smrgfi 3349dbbd9e4bSmacallan 3350e96acad6Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 3351e96acad6Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 3352e96acad6Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3353dbbd9e4bSmacallan 3354e96acad6Smrg_LT_DECL([], [deplibs_check_method], [1], 3355e96acad6Smrg [Method to check whether dependent libraries are shared objects]) 3356e96acad6Smrg_LT_DECL([], [file_magic_cmd], [1], 3357e96acad6Smrg [Command to use when deplibs_check_method = "file_magic"]) 3358e96acad6Smrg_LT_DECL([], [file_magic_glob], [1], 3359e96acad6Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3360e96acad6Smrg_LT_DECL([], [want_nocaseglob], [1], 3361e96acad6Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3362e96acad6Smrg])# _LT_CHECK_MAGIC_METHOD 3363dbbd9e4bSmacallan 3364dbbd9e4bSmacallan 3365e96acad6Smrg# LT_PATH_NM 3366e96acad6Smrg# ---------- 3367e96acad6Smrg# find the pathname to a BSD- or MS-compatible name lister 3368e96acad6SmrgAC_DEFUN([LT_PATH_NM], 3369e96acad6Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3370e96acad6SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3371e96acad6Smrg[if test -n "$NM"; then 3372e96acad6Smrg # Let the user override the test. 3373e96acad6Smrg lt_cv_path_NM="$NM" 3374e96acad6Smrgelse 3375e96acad6Smrg lt_nm_to_check="${ac_tool_prefix}nm" 3376e96acad6Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3377e96acad6Smrg lt_nm_to_check="$lt_nm_to_check nm" 3378e96acad6Smrg fi 3379e96acad6Smrg for lt_tmp_nm in $lt_nm_to_check; do 3380e96acad6Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3381e96acad6Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3382e96acad6Smrg IFS="$lt_save_ifs" 3383e96acad6Smrg test -z "$ac_dir" && ac_dir=. 3384e96acad6Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 3385e96acad6Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3386e96acad6Smrg # Check to see if the nm accepts a BSD-compat flag. 3387e96acad6Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3388e96acad6Smrg # nm: unknown option "B" ignored 3389e96acad6Smrg # Tru64's nm complains that /dev/null is an invalid object file 3390e96acad6Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3391e96acad6Smrg */dev/null* | *'Invalid file or object type'*) 3392e96acad6Smrg lt_cv_path_NM="$tmp_nm -B" 3393e96acad6Smrg break 3394e96acad6Smrg ;; 3395e96acad6Smrg *) 3396e96acad6Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3397e96acad6Smrg */dev/null*) 3398e96acad6Smrg lt_cv_path_NM="$tmp_nm -p" 3399e96acad6Smrg break 3400e96acad6Smrg ;; 3401e96acad6Smrg *) 3402e96acad6Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3403e96acad6Smrg continue # so that we can try to find one that supports BSD flags 3404e96acad6Smrg ;; 3405e96acad6Smrg esac 3406e96acad6Smrg ;; 3407e96acad6Smrg esac 3408dbbd9e4bSmacallan fi 3409e96acad6Smrg done 3410e96acad6Smrg IFS="$lt_save_ifs" 3411e96acad6Smrg done 3412e96acad6Smrg : ${lt_cv_path_NM=no} 3413e96acad6Smrgfi]) 3414e96acad6Smrgif test "$lt_cv_path_NM" != "no"; then 3415e96acad6Smrg NM="$lt_cv_path_NM" 3416e96acad6Smrgelse 3417e96acad6Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3418e96acad6Smrg if test -n "$DUMPBIN"; then : 3419e96acad6Smrg # Let the user override the test. 3420e96acad6Smrg else 3421e96acad6Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3422e96acad6Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3423e96acad6Smrg *COFF*) 3424e96acad6Smrg DUMPBIN="$DUMPBIN -symbols" 3425dbbd9e4bSmacallan ;; 3426dbbd9e4bSmacallan *) 3427e96acad6Smrg DUMPBIN=: 3428dbbd9e4bSmacallan ;; 3429dbbd9e4bSmacallan esac 3430e96acad6Smrg fi 3431e96acad6Smrg AC_SUBST([DUMPBIN]) 3432e96acad6Smrg if test "$DUMPBIN" != ":"; then 3433e96acad6Smrg NM="$DUMPBIN" 3434e96acad6Smrg fi 3435e96acad6Smrgfi 3436e96acad6Smrgtest -z "$NM" && NM=nm 3437e96acad6SmrgAC_SUBST([NM]) 3438e96acad6Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3439e96acad6Smrg 3440e96acad6SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3441e96acad6Smrg [lt_cv_nm_interface="BSD nm" 3442e96acad6Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3443e96acad6Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3444e96acad6Smrg (eval "$ac_compile" 2>conftest.err) 3445e96acad6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3446e96acad6Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3447e96acad6Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3448e96acad6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3449e96acad6Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3450e96acad6Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3451e96acad6Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3452e96acad6Smrg lt_cv_nm_interface="MS dumpbin" 3453e96acad6Smrg fi 3454e96acad6Smrg rm -f conftest*]) 3455e96acad6Smrg])# LT_PATH_NM 3456e96acad6Smrg 3457e96acad6Smrg# Old names: 3458e96acad6SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3459e96acad6SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3460e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 3461e96acad6Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3462e96acad6Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3463e96acad6Smrg 3464e96acad6Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3465e96acad6Smrg# -------------------------------- 3466e96acad6Smrg# how to determine the name of the shared library 3467e96acad6Smrg# associated with a specific link library. 3468e96acad6Smrg# -- PORTME fill in with the dynamic library characteristics 3469e96acad6Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3470e96acad6Smrg[m4_require([_LT_DECL_EGREP]) 3471e96acad6Smrgm4_require([_LT_DECL_OBJDUMP]) 3472e96acad6Smrgm4_require([_LT_DECL_DLLTOOL]) 3473e96acad6SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3474e96acad6Smrglt_cv_sharedlib_from_linklib_cmd, 3475e96acad6Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3476dbbd9e4bSmacallan 3477e96acad6Smrgcase $host_os in 3478e96acad6Smrgcygwin* | mingw* | pw32* | cegcc*) 3479e96acad6Smrg # two different shell functions defined in ltmain.sh 3480e96acad6Smrg # decide which to use based on capabilities of $DLLTOOL 3481e96acad6Smrg case `$DLLTOOL --help 2>&1` in 3482e96acad6Smrg *--identify-strict*) 3483e96acad6Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3484dbbd9e4bSmacallan ;; 3485e96acad6Smrg *) 3486e96acad6Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3487dbbd9e4bSmacallan ;; 3488e96acad6Smrg esac 3489e96acad6Smrg ;; 3490e96acad6Smrg*) 3491e96acad6Smrg # fallback: assume linklib IS sharedlib 3492e96acad6Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3493e96acad6Smrg ;; 3494e96acad6Smrgesac 3495e96acad6Smrg]) 3496e96acad6Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3497e96acad6Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3498dbbd9e4bSmacallan 3499e96acad6Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3500e96acad6Smrg [Command to associate shared and link libraries]) 3501e96acad6Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3502dbbd9e4bSmacallan 3503dbbd9e4bSmacallan 3504e96acad6Smrg# _LT_PATH_MANIFEST_TOOL 3505e96acad6Smrg# ---------------------- 3506e96acad6Smrg# locate the manifest tool 3507e96acad6Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3508e96acad6Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3509e96acad6Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3510e96acad6SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3511e96acad6Smrg [lt_cv_path_mainfest_tool=no 3512e96acad6Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3513e96acad6Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3514e96acad6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3515e96acad6Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3516e96acad6Smrg lt_cv_path_mainfest_tool=yes 3517e96acad6Smrg fi 3518e96acad6Smrg rm -f conftest*]) 3519e96acad6Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 3520e96acad6Smrg MANIFEST_TOOL=: 3521e96acad6Smrgfi 3522e96acad6Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3523e96acad6Smrg])# _LT_PATH_MANIFEST_TOOL 3524dbbd9e4bSmacallan 3525dbbd9e4bSmacallan 3526e96acad6Smrg# LT_LIB_M 3527e96acad6Smrg# -------- 3528e96acad6Smrg# check for math library 3529e96acad6SmrgAC_DEFUN([LT_LIB_M], 3530e96acad6Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3531e96acad6SmrgLIBM= 3532e96acad6Smrgcase $host in 3533e96acad6Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3534e96acad6Smrg # These system don't have libm, or don't need it 3535e96acad6Smrg ;; 3536e96acad6Smrg*-ncr-sysv4.3*) 3537e96acad6Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3538e96acad6Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3539e96acad6Smrg ;; 3540e96acad6Smrg*) 3541e96acad6Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3542e96acad6Smrg ;; 3543e96acad6Smrgesac 3544e96acad6SmrgAC_SUBST([LIBM]) 3545e96acad6Smrg])# LT_LIB_M 3546dbbd9e4bSmacallan 3547e96acad6Smrg# Old name: 3548e96acad6SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3549e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 3550e96acad6Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3551dbbd9e4bSmacallan 3552dbbd9e4bSmacallan 3553e96acad6Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3554e96acad6Smrg# ------------------------------- 3555e96acad6Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3556e96acad6Smrg[m4_require([_LT_TAG_COMPILER])dnl 3557dbbd9e4bSmacallan 3558e96acad6Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3559dbbd9e4bSmacallan 3560e96acad6Smrgif test "$GCC" = yes; then 3561e96acad6Smrg case $cc_basename in 3562e96acad6Smrg nvcc*) 3563e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3564e96acad6Smrg *) 3565e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3566e96acad6Smrg esac 3567dbbd9e4bSmacallan 3568e96acad6Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3569e96acad6Smrg lt_cv_prog_compiler_rtti_exceptions, 3570e96acad6Smrg [-fno-rtti -fno-exceptions], [], 3571e96acad6Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3572e96acad6Smrgfi 3573e96acad6Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3574e96acad6Smrg [Compiler flag to turn off builtin functions]) 3575e96acad6Smrg])# _LT_COMPILER_NO_RTTI 3576dbbd9e4bSmacallan 3577dbbd9e4bSmacallan 3578e96acad6Smrg# _LT_CMD_GLOBAL_SYMBOLS 3579e96acad6Smrg# ---------------------- 3580e96acad6Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3581e96acad6Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3582e96acad6SmrgAC_REQUIRE([AC_PROG_CC])dnl 3583e96acad6SmrgAC_REQUIRE([AC_PROG_AWK])dnl 3584e96acad6SmrgAC_REQUIRE([LT_PATH_NM])dnl 3585e96acad6SmrgAC_REQUIRE([LT_PATH_LD])dnl 3586e96acad6Smrgm4_require([_LT_DECL_SED])dnl 3587e96acad6Smrgm4_require([_LT_DECL_EGREP])dnl 3588e96acad6Smrgm4_require([_LT_TAG_COMPILER])dnl 3589dbbd9e4bSmacallan 3590e96acad6Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3591e96acad6SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3592e96acad6SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3593e96acad6Smrg[ 3594e96acad6Smrg# These are sane defaults that work on at least a few old systems. 3595e96acad6Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3596dbbd9e4bSmacallan 3597e96acad6Smrg# Character class describing NM global symbol codes. 3598e96acad6Smrgsymcode='[[BCDEGRST]]' 3599dbbd9e4bSmacallan 3600e96acad6Smrg# Regexp to match symbols that can be accessed directly from C. 3601e96acad6Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3602dbbd9e4bSmacallan 3603e96acad6Smrg# Define system-specific variables. 3604e96acad6Smrgcase $host_os in 3605e96acad6Smrgaix*) 3606e96acad6Smrg symcode='[[BCDT]]' 3607e96acad6Smrg ;; 3608e96acad6Smrgcygwin* | mingw* | pw32* | cegcc*) 3609e96acad6Smrg symcode='[[ABCDGISTW]]' 3610e96acad6Smrg ;; 3611e96acad6Smrghpux*) 3612e96acad6Smrg if test "$host_cpu" = ia64; then 3613e96acad6Smrg symcode='[[ABCDEGRST]]' 3614e96acad6Smrg fi 3615e96acad6Smrg ;; 3616e96acad6Smrgirix* | nonstopux*) 3617e96acad6Smrg symcode='[[BCDEGRST]]' 3618e96acad6Smrg ;; 3619e96acad6Smrgosf*) 3620e96acad6Smrg symcode='[[BCDEGQRST]]' 3621e96acad6Smrg ;; 3622e96acad6Smrgsolaris*) 3623e96acad6Smrg symcode='[[BDRT]]' 3624e96acad6Smrg ;; 3625e96acad6Smrgsco3.2v5*) 3626e96acad6Smrg symcode='[[DT]]' 3627e96acad6Smrg ;; 3628e96acad6Smrgsysv4.2uw2*) 3629e96acad6Smrg symcode='[[DT]]' 3630e96acad6Smrg ;; 3631e96acad6Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3632e96acad6Smrg symcode='[[ABDT]]' 3633e96acad6Smrg ;; 3634e96acad6Smrgsysv4) 3635e96acad6Smrg symcode='[[DFNSTU]]' 3636e96acad6Smrg ;; 3637dbbd9e4bSmacallanesac 3638dbbd9e4bSmacallan 3639e96acad6Smrg# If we're using GNU nm, then use its standard symbol codes. 3640e96acad6Smrgcase `$NM -V 2>&1` in 3641e96acad6Smrg*GNU* | *'with BFD'*) 3642e96acad6Smrg symcode='[[ABCDGIRSTW]]' ;; 3643e96acad6Smrgesac 3644dbbd9e4bSmacallan 3645e96acad6Smrg# Transform an extracted symbol line into a proper C declaration. 3646e96acad6Smrg# Some systems (esp. on ia64) link data and code symbols differently, 3647e96acad6Smrg# so use this general approach. 3648e96acad6Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3649dbbd9e4bSmacallan 3650e96acad6Smrg# Transform an extracted symbol line into symbol name and symbol address 3651e96acad6Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3652e96acad6Smrglt_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'" 3653dbbd9e4bSmacallan 3654e96acad6Smrg# Handle CRLF in mingw tool chain 3655e96acad6Smrgopt_cr= 3656e96acad6Smrgcase $build_os in 3657e96acad6Smrgmingw*) 3658e96acad6Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3659e96acad6Smrg ;; 3660e96acad6Smrgesac 3661dbbd9e4bSmacallan 3662e96acad6Smrg# Try without a prefix underscore, then with it. 3663e96acad6Smrgfor ac_symprfx in "" "_"; do 3664dbbd9e4bSmacallan 3665e96acad6Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3666e96acad6Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3667dbbd9e4bSmacallan 3668e96acad6Smrg # Write the raw and C identifiers. 3669e96acad6Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3670e96acad6Smrg # Fake it for dumpbin and say T for any non-static function 3671e96acad6Smrg # and D for any global variable. 3672e96acad6Smrg # Also find C++ and __fastcall symbols from MSVC++, 3673e96acad6Smrg # which start with @ or ?. 3674e96acad6Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3675e96acad6Smrg" {last_section=section; section=\$ 3};"\ 3676e96acad6Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3677e96acad6Smrg" \$ 0!~/External *\|/{next};"\ 3678e96acad6Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3679e96acad6Smrg" {if(hide[section]) next};"\ 3680e96acad6Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3681e96acad6Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3682e96acad6Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3683e96acad6Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3684e96acad6Smrg" ' prfx=^$ac_symprfx]" 3685e96acad6Smrg else 3686e96acad6Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3687e96acad6Smrg fi 3688e96acad6Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3689dbbd9e4bSmacallan 3690e96acad6Smrg # Check to see that the pipe works correctly. 3691e96acad6Smrg pipe_works=no 3692dbbd9e4bSmacallan 3693e96acad6Smrg rm -f conftest* 3694e96acad6Smrg cat > conftest.$ac_ext <<_LT_EOF 3695e96acad6Smrg#ifdef __cplusplus 3696e96acad6Smrgextern "C" { 3697e96acad6Smrg#endif 3698e96acad6Smrgchar nm_test_var; 3699e96acad6Smrgvoid nm_test_func(void); 3700e96acad6Smrgvoid nm_test_func(void){} 3701e96acad6Smrg#ifdef __cplusplus 3702e96acad6Smrg} 3703e96acad6Smrg#endif 3704e96acad6Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 3705e96acad6Smrg_LT_EOF 3706dbbd9e4bSmacallan 3707e96acad6Smrg if AC_TRY_EVAL(ac_compile); then 3708e96acad6Smrg # Now try to grab the symbols. 3709e96acad6Smrg nlist=conftest.nm 3710e96acad6Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3711e96acad6Smrg # Try sorting and uniquifying the output. 3712e96acad6Smrg if sort "$nlist" | uniq > "$nlist"T; then 3713e96acad6Smrg mv -f "$nlist"T "$nlist" 3714e96acad6Smrg else 3715e96acad6Smrg rm -f "$nlist"T 3716e96acad6Smrg fi 3717dbbd9e4bSmacallan 3718e96acad6Smrg # Make sure that we snagged all the symbols we need. 3719e96acad6Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3720e96acad6Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3721e96acad6Smrg cat <<_LT_EOF > conftest.$ac_ext 3722e96acad6Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3723e96acad6Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3724e96acad6Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 3725e96acad6Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 3726e96acad6Smrg# define LT@&t@_DLSYM_CONST 3727e96acad6Smrg#elif defined(__osf__) 3728e96acad6Smrg/* This system does not cope well with relocations in const data. */ 3729e96acad6Smrg# define LT@&t@_DLSYM_CONST 3730e96acad6Smrg#else 3731e96acad6Smrg# define LT@&t@_DLSYM_CONST const 3732e96acad6Smrg#endif 3733dbbd9e4bSmacallan 3734e96acad6Smrg#ifdef __cplusplus 3735e96acad6Smrgextern "C" { 3736e96acad6Smrg#endif 3737dbbd9e4bSmacallan 3738e96acad6Smrg_LT_EOF 3739e96acad6Smrg # Now generate the symbol file. 3740e96acad6Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3741dbbd9e4bSmacallan 3742e96acad6Smrg cat <<_LT_EOF >> conftest.$ac_ext 3743dbbd9e4bSmacallan 3744e96acad6Smrg/* The mapping between symbol names and symbols. */ 3745e96acad6SmrgLT@&t@_DLSYM_CONST struct { 3746e96acad6Smrg const char *name; 3747e96acad6Smrg void *address; 3748e96acad6Smrg} 3749e96acad6Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3750e96acad6Smrg{ 3751e96acad6Smrg { "@PROGRAM@", (void *) 0 }, 3752e96acad6Smrg_LT_EOF 3753e96acad6Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3754e96acad6Smrg cat <<\_LT_EOF >> conftest.$ac_ext 3755e96acad6Smrg {0, (void *) 0} 3756e96acad6Smrg}; 3757dbbd9e4bSmacallan 3758e96acad6Smrg/* This works around a problem in FreeBSD linker */ 3759e96acad6Smrg#ifdef FREEBSD_WORKAROUND 3760e96acad6Smrgstatic const void *lt_preloaded_setup() { 3761e96acad6Smrg return lt__PROGRAM__LTX_preloaded_symbols; 3762e96acad6Smrg} 3763e96acad6Smrg#endif 3764dbbd9e4bSmacallan 3765e96acad6Smrg#ifdef __cplusplus 3766e96acad6Smrg} 3767e96acad6Smrg#endif 3768e96acad6Smrg_LT_EOF 3769e96acad6Smrg # Now try linking the two files. 3770e96acad6Smrg mv conftest.$ac_objext conftstm.$ac_objext 3771e96acad6Smrg lt_globsym_save_LIBS=$LIBS 3772e96acad6Smrg lt_globsym_save_CFLAGS=$CFLAGS 3773e96acad6Smrg LIBS="conftstm.$ac_objext" 3774e96acad6Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3775e96acad6Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3776e96acad6Smrg pipe_works=yes 3777e96acad6Smrg fi 3778e96acad6Smrg LIBS=$lt_globsym_save_LIBS 3779e96acad6Smrg CFLAGS=$lt_globsym_save_CFLAGS 3780e96acad6Smrg else 3781e96acad6Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3782e96acad6Smrg fi 3783e96acad6Smrg else 3784e96acad6Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3785e96acad6Smrg fi 3786e96acad6Smrg else 3787e96acad6Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3788dbbd9e4bSmacallan fi 3789e96acad6Smrg else 3790e96acad6Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3791e96acad6Smrg cat conftest.$ac_ext >&5 3792dbbd9e4bSmacallan fi 3793e96acad6Smrg rm -rf conftest* conftst* 3794dbbd9e4bSmacallan 3795e96acad6Smrg # Do not use the global_symbol_pipe unless it works. 3796e96acad6Smrg if test "$pipe_works" = yes; then 3797e96acad6Smrg break 3798e96acad6Smrg else 3799e96acad6Smrg lt_cv_sys_global_symbol_pipe= 3800e96acad6Smrg fi 3801e96acad6Smrgdone 3802e96acad6Smrg]) 3803e96acad6Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3804e96acad6Smrg lt_cv_sys_global_symbol_to_cdecl= 3805e96acad6Smrgfi 3806e96acad6Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3807e96acad6Smrg AC_MSG_RESULT(failed) 3808e96acad6Smrgelse 3809e96acad6Smrg AC_MSG_RESULT(ok) 3810e96acad6Smrgfi 3811dbbd9e4bSmacallan 3812e96acad6Smrg# Response file support. 3813e96acad6Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3814e96acad6Smrg nm_file_list_spec='@' 3815e96acad6Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3816e96acad6Smrg nm_file_list_spec='@' 3817e96acad6Smrgfi 3818dbbd9e4bSmacallan 3819e96acad6Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3820e96acad6Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 3821e96acad6Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3822e96acad6Smrg [Transform the output of nm in a proper C declaration]) 3823e96acad6Smrg_LT_DECL([global_symbol_to_c_name_address], 3824e96acad6Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3825e96acad6Smrg [Transform the output of nm in a C name address pair]) 3826e96acad6Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3827e96acad6Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3828e96acad6Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3829e96acad6Smrg_LT_DECL([], [nm_file_list_spec], [1], 3830e96acad6Smrg [Specify filename containing input files for $NM]) 3831e96acad6Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 3832e96acad6Smrg 3833e96acad6Smrg 3834e96acad6Smrg# _LT_COMPILER_PIC([TAGNAME]) 3835e96acad6Smrg# --------------------------- 3836e96acad6Smrgm4_defun([_LT_COMPILER_PIC], 3837e96acad6Smrg[m4_require([_LT_TAG_COMPILER])dnl 3838e96acad6Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3839e96acad6Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3840e96acad6Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3841dbbd9e4bSmacallan 3842e96acad6Smrgm4_if([$1], [CXX], [ 3843e96acad6Smrg # C++ specific cases for pic, static, wl, etc. 3844e96acad6Smrg if test "$GXX" = yes; then 3845e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3846e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3847dbbd9e4bSmacallan 3848e96acad6Smrg case $host_os in 3849e96acad6Smrg aix*) 3850e96acad6Smrg # All AIX code is PIC. 3851e96acad6Smrg if test "$host_cpu" = ia64; then 3852e96acad6Smrg # AIX 5 now supports IA64 processor 3853e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3854e96acad6Smrg fi 3855e96acad6Smrg ;; 3856dbbd9e4bSmacallan 3857e96acad6Smrg amigaos*) 3858e96acad6Smrg case $host_cpu in 3859e96acad6Smrg powerpc) 3860e96acad6Smrg # see comment about AmigaOS4 .so support 3861e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3862e96acad6Smrg ;; 3863e96acad6Smrg m68k) 3864e96acad6Smrg # FIXME: we need at least 68020 code to build shared libraries, but 3865e96acad6Smrg # adding the `-m68020' flag to GCC prevents building anything better, 3866e96acad6Smrg # like `-m68040'. 3867e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3868e96acad6Smrg ;; 3869e96acad6Smrg esac 3870e96acad6Smrg ;; 3871dbbd9e4bSmacallan 3872e96acad6Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3873e96acad6Smrg # PIC is the default for these OSes. 3874e96acad6Smrg ;; 3875e96acad6Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3876e96acad6Smrg # This hack is so that the source file can tell whether it is being 3877e96acad6Smrg # built for inclusion in a dll (and should export symbols for example). 3878e96acad6Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3879e96acad6Smrg # (--disable-auto-import) libraries 3880e96acad6Smrg m4_if([$1], [GCJ], [], 3881e96acad6Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3882e96acad6Smrg ;; 3883e96acad6Smrg darwin* | rhapsody*) 3884e96acad6Smrg # PIC is the default on this platform 3885e96acad6Smrg # Common symbols not allowed in MH_DYLIB files 3886e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3887e96acad6Smrg ;; 3888e96acad6Smrg *djgpp*) 3889e96acad6Smrg # DJGPP does not support shared libraries at all 3890e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3891e96acad6Smrg ;; 3892e96acad6Smrg haiku*) 3893e96acad6Smrg # PIC is the default for Haiku. 3894e96acad6Smrg # The "-static" flag exists, but is broken. 3895e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 3896e96acad6Smrg ;; 3897e96acad6Smrg interix[[3-9]]*) 3898e96acad6Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3899e96acad6Smrg # Instead, we relocate shared libraries at runtime. 3900e96acad6Smrg ;; 3901e96acad6Smrg sysv4*MP*) 3902e96acad6Smrg if test -d /usr/nec; then 3903e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3904e96acad6Smrg fi 3905e96acad6Smrg ;; 3906e96acad6Smrg hpux*) 3907e96acad6Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3908e96acad6Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3909e96acad6Smrg # sets the default TLS model and affects inlining. 3910e96acad6Smrg case $host_cpu in 3911e96acad6Smrg hppa*64*) 3912e96acad6Smrg ;; 3913e96acad6Smrg *) 3914e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3915e96acad6Smrg ;; 3916e96acad6Smrg esac 3917e96acad6Smrg ;; 3918e96acad6Smrg *qnx* | *nto*) 3919e96acad6Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3920e96acad6Smrg # it will coredump. 3921e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3922dbbd9e4bSmacallan ;; 3923dbbd9e4bSmacallan *) 3924e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3925dbbd9e4bSmacallan ;; 3926dbbd9e4bSmacallan esac 3927e96acad6Smrg else 3928e96acad6Smrg case $host_os in 3929e96acad6Smrg aix[[4-9]]*) 3930e96acad6Smrg # All AIX code is PIC. 3931e96acad6Smrg if test "$host_cpu" = ia64; then 3932e96acad6Smrg # AIX 5 now supports IA64 processor 3933e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3934e96acad6Smrg else 3935e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3936e96acad6Smrg fi 3937e96acad6Smrg ;; 3938e96acad6Smrg chorus*) 3939e96acad6Smrg case $cc_basename in 3940e96acad6Smrg cxch68*) 3941e96acad6Smrg # Green Hills C++ Compiler 3942e96acad6Smrg # _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" 3943e96acad6Smrg ;; 3944e96acad6Smrg esac 3945e96acad6Smrg ;; 3946e96acad6Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3947e96acad6Smrg # This hack is so that the source file can tell whether it is being 3948e96acad6Smrg # built for inclusion in a dll (and should export symbols for example). 3949e96acad6Smrg m4_if([$1], [GCJ], [], 3950e96acad6Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3951e96acad6Smrg ;; 3952e96acad6Smrg dgux*) 3953e96acad6Smrg case $cc_basename in 3954e96acad6Smrg ec++*) 3955e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3956e96acad6Smrg ;; 3957e96acad6Smrg ghcx*) 3958e96acad6Smrg # Green Hills C++ Compiler 3959e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3960e96acad6Smrg ;; 3961e96acad6Smrg *) 3962e96acad6Smrg ;; 3963e96acad6Smrg esac 3964e96acad6Smrg ;; 3965e96acad6Smrg freebsd* | dragonfly*) 3966e96acad6Smrg # FreeBSD uses GNU C++ 3967e96acad6Smrg ;; 3968e96acad6Smrg hpux9* | hpux10* | hpux11*) 3969e96acad6Smrg case $cc_basename in 3970e96acad6Smrg CC*) 3971e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3972e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3973e96acad6Smrg if test "$host_cpu" != ia64; then 3974e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3975e96acad6Smrg fi 3976e96acad6Smrg ;; 3977e96acad6Smrg aCC*) 3978e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3979e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3980e96acad6Smrg case $host_cpu in 3981e96acad6Smrg hppa*64*|ia64*) 3982e96acad6Smrg # +Z the default 3983e96acad6Smrg ;; 3984e96acad6Smrg *) 3985e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3986e96acad6Smrg ;; 3987e96acad6Smrg esac 3988e96acad6Smrg ;; 3989e96acad6Smrg *) 3990e96acad6Smrg ;; 3991e96acad6Smrg esac 3992e96acad6Smrg ;; 3993e96acad6Smrg interix*) 3994e96acad6Smrg # This is c89, which is MS Visual C++ (no shared libs) 3995e96acad6Smrg # Anyone wants to do a port? 3996e96acad6Smrg ;; 3997e96acad6Smrg irix5* | irix6* | nonstopux*) 3998e96acad6Smrg case $cc_basename in 3999e96acad6Smrg CC*) 4000e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4001e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4002e96acad6Smrg # CC pic flag -KPIC is the default. 4003e96acad6Smrg ;; 4004e96acad6Smrg *) 4005e96acad6Smrg ;; 4006e96acad6Smrg esac 4007e96acad6Smrg ;; 4008e96acad6Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4009e96acad6Smrg case $cc_basename in 4010e96acad6Smrg KCC*) 4011e96acad6Smrg # KAI C++ Compiler 4012e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4013e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4014e96acad6Smrg ;; 4015e96acad6Smrg ecpc* ) 4016e96acad6Smrg # old Intel C++ for x86_64 which still supported -KPIC. 4017e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4018e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4019e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4020e96acad6Smrg ;; 4021e96acad6Smrg icpc* ) 4022e96acad6Smrg # Intel C++, used to be incompatible with GCC. 4023e96acad6Smrg # ICC 10 doesn't accept -KPIC any more. 4024e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4025e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4026e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4027e96acad6Smrg ;; 4028e96acad6Smrg pgCC* | pgcpp*) 4029e96acad6Smrg # Portland Group C++ compiler 4030e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4031e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4032e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4033e96acad6Smrg ;; 4034e96acad6Smrg cxx*) 4035e96acad6Smrg # Compaq C++ 4036e96acad6Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4037e96acad6Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4038e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4039e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4040e96acad6Smrg ;; 4041e96acad6Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4042e96acad6Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4043e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4044e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4045e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4046e96acad6Smrg ;; 4047e96acad6Smrg *) 4048e96acad6Smrg case `$CC -V 2>&1 | sed 5q` in 4049e96acad6Smrg *Sun\ C*) 4050e96acad6Smrg # Sun C++ 5.9 4051e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4052e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4053e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4054e96acad6Smrg ;; 4055e96acad6Smrg esac 4056e96acad6Smrg ;; 4057e96acad6Smrg esac 4058e96acad6Smrg ;; 4059e96acad6Smrg lynxos*) 4060e96acad6Smrg ;; 4061e96acad6Smrg m88k*) 4062e96acad6Smrg ;; 4063e96acad6Smrg mvs*) 4064e96acad6Smrg case $cc_basename in 4065e96acad6Smrg cxx*) 4066e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4067e96acad6Smrg ;; 4068e96acad6Smrg *) 4069e96acad6Smrg ;; 4070e96acad6Smrg esac 4071e96acad6Smrg ;; 4072e96acad6Smrg netbsd*) 4073e96acad6Smrg ;; 4074e96acad6Smrg *qnx* | *nto*) 4075e96acad6Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4076e96acad6Smrg # it will coredump. 4077e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4078e96acad6Smrg ;; 4079e96acad6Smrg osf3* | osf4* | osf5*) 4080e96acad6Smrg case $cc_basename in 4081e96acad6Smrg KCC*) 4082e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4083e96acad6Smrg ;; 4084e96acad6Smrg RCC*) 4085e96acad6Smrg # Rational C++ 2.4.1 4086e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4087e96acad6Smrg ;; 4088e96acad6Smrg cxx*) 4089e96acad6Smrg # Digital/Compaq C++ 4090e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4091e96acad6Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4092e96acad6Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4093e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4094e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4095e96acad6Smrg ;; 4096e96acad6Smrg *) 4097e96acad6Smrg ;; 4098e96acad6Smrg esac 4099e96acad6Smrg ;; 4100e96acad6Smrg psos*) 4101e96acad6Smrg ;; 4102e96acad6Smrg solaris*) 4103e96acad6Smrg case $cc_basename in 4104e96acad6Smrg CC* | sunCC*) 4105e96acad6Smrg # Sun C++ 4.2, 5.x and Centerline C++ 4106e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4107e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4108e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4109e96acad6Smrg ;; 4110e96acad6Smrg gcx*) 4111e96acad6Smrg # Green Hills C++ Compiler 4112e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4113e96acad6Smrg ;; 4114e96acad6Smrg *) 4115e96acad6Smrg ;; 4116e96acad6Smrg esac 4117e96acad6Smrg ;; 4118e96acad6Smrg sunos4*) 4119e96acad6Smrg case $cc_basename in 4120e96acad6Smrg CC*) 4121e96acad6Smrg # Sun C++ 4.x 4122e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4123e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4124e96acad6Smrg ;; 4125e96acad6Smrg lcc*) 4126e96acad6Smrg # Lucid 4127e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4128e96acad6Smrg ;; 4129e96acad6Smrg *) 4130e96acad6Smrg ;; 4131e96acad6Smrg esac 4132e96acad6Smrg ;; 4133e96acad6Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4134e96acad6Smrg case $cc_basename in 4135e96acad6Smrg CC*) 4136e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4137e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4138e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4139e96acad6Smrg ;; 4140e96acad6Smrg esac 4141e96acad6Smrg ;; 4142e96acad6Smrg tandem*) 4143e96acad6Smrg case $cc_basename in 4144e96acad6Smrg NCC*) 4145e96acad6Smrg # NonStop-UX NCC 3.20 4146e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4147e96acad6Smrg ;; 4148e96acad6Smrg *) 4149e96acad6Smrg ;; 4150e96acad6Smrg esac 4151e96acad6Smrg ;; 4152e96acad6Smrg vxworks*) 4153e96acad6Smrg ;; 4154e96acad6Smrg *) 4155e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4156e96acad6Smrg ;; 4157e96acad6Smrg esac 4158e96acad6Smrg fi 4159e96acad6Smrg], 4160e96acad6Smrg[ 4161e96acad6Smrg if test "$GCC" = yes; then 4162e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4163e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4164dbbd9e4bSmacallan 4165e96acad6Smrg case $host_os in 4166e96acad6Smrg aix*) 4167e96acad6Smrg # All AIX code is PIC. 4168e96acad6Smrg if test "$host_cpu" = ia64; then 4169e96acad6Smrg # AIX 5 now supports IA64 processor 4170e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4171e96acad6Smrg fi 4172e96acad6Smrg ;; 4173dbbd9e4bSmacallan 4174e96acad6Smrg amigaos*) 4175e96acad6Smrg case $host_cpu in 4176e96acad6Smrg powerpc) 4177e96acad6Smrg # see comment about AmigaOS4 .so support 4178e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4179e96acad6Smrg ;; 4180e96acad6Smrg m68k) 4181e96acad6Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4182e96acad6Smrg # adding the `-m68020' flag to GCC prevents building anything better, 4183e96acad6Smrg # like `-m68040'. 4184e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4185e96acad6Smrg ;; 4186e96acad6Smrg esac 4187e96acad6Smrg ;; 4188dbbd9e4bSmacallan 4189e96acad6Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4190e96acad6Smrg # PIC is the default for these OSes. 4191e96acad6Smrg ;; 4192dbbd9e4bSmacallan 4193e96acad6Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4194e96acad6Smrg # This hack is so that the source file can tell whether it is being 4195e96acad6Smrg # built for inclusion in a dll (and should export symbols for example). 4196e96acad6Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4197e96acad6Smrg # (--disable-auto-import) libraries 4198e96acad6Smrg m4_if([$1], [GCJ], [], 4199e96acad6Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4200e96acad6Smrg ;; 4201dbbd9e4bSmacallan 4202e96acad6Smrg darwin* | rhapsody*) 4203e96acad6Smrg # PIC is the default on this platform 4204e96acad6Smrg # Common symbols not allowed in MH_DYLIB files 4205e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4206e96acad6Smrg ;; 4207dbbd9e4bSmacallan 4208e96acad6Smrg haiku*) 4209e96acad6Smrg # PIC is the default for Haiku. 4210e96acad6Smrg # The "-static" flag exists, but is broken. 4211e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4212e96acad6Smrg ;; 4213dbbd9e4bSmacallan 4214e96acad6Smrg hpux*) 4215e96acad6Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4216e96acad6Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4217e96acad6Smrg # sets the default TLS model and affects inlining. 4218e96acad6Smrg case $host_cpu in 4219e96acad6Smrg hppa*64*) 4220e96acad6Smrg # +Z the default 4221e96acad6Smrg ;; 4222e96acad6Smrg *) 4223e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4224e96acad6Smrg ;; 4225e96acad6Smrg esac 4226e96acad6Smrg ;; 4227dbbd9e4bSmacallan 4228e96acad6Smrg interix[[3-9]]*) 4229e96acad6Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4230e96acad6Smrg # Instead, we relocate shared libraries at runtime. 4231e96acad6Smrg ;; 4232dbbd9e4bSmacallan 4233e96acad6Smrg msdosdjgpp*) 4234e96acad6Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4235e96acad6Smrg # on systems that don't support them. 4236e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4237e96acad6Smrg enable_shared=no 4238e96acad6Smrg ;; 4239dbbd9e4bSmacallan 4240e96acad6Smrg *nto* | *qnx*) 4241e96acad6Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4242e96acad6Smrg # it will coredump. 4243e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4244e96acad6Smrg ;; 4245dbbd9e4bSmacallan 4246e96acad6Smrg sysv4*MP*) 4247e96acad6Smrg if test -d /usr/nec; then 4248e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4249e96acad6Smrg fi 4250e96acad6Smrg ;; 4251dbbd9e4bSmacallan 4252e96acad6Smrg *) 4253e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4254e96acad6Smrg ;; 4255e96acad6Smrg esac 4256dbbd9e4bSmacallan 4257e96acad6Smrg case $cc_basename in 4258e96acad6Smrg nvcc*) # Cuda Compiler Driver 2.2 4259e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4260e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 4261e96acad6Smrg ;; 4262e96acad6Smrg esac 4263e96acad6Smrg else 4264e96acad6Smrg # PORTME Check for flag to pass linker flags through the system compiler. 4265e96acad6Smrg case $host_os in 4266e96acad6Smrg aix*) 4267e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4268e96acad6Smrg if test "$host_cpu" = ia64; then 4269e96acad6Smrg # AIX 5 now supports IA64 processor 4270e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4271e96acad6Smrg else 4272e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4273e96acad6Smrg fi 4274e96acad6Smrg ;; 4275dbbd9e4bSmacallan 4276e96acad6Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4277e96acad6Smrg # This hack is so that the source file can tell whether it is being 4278e96acad6Smrg # built for inclusion in a dll (and should export symbols for example). 4279e96acad6Smrg m4_if([$1], [GCJ], [], 4280e96acad6Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4281e96acad6Smrg ;; 4282dbbd9e4bSmacallan 4283e96acad6Smrg hpux9* | hpux10* | hpux11*) 4284e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4285e96acad6Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4286e96acad6Smrg # not for PA HP-UX. 4287e96acad6Smrg case $host_cpu in 4288e96acad6Smrg hppa*64*|ia64*) 4289e96acad6Smrg # +Z the default 4290e96acad6Smrg ;; 4291e96acad6Smrg *) 4292e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4293e96acad6Smrg ;; 4294e96acad6Smrg esac 4295e96acad6Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4296e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4297e96acad6Smrg ;; 4298dbbd9e4bSmacallan 4299e96acad6Smrg irix5* | irix6* | nonstopux*) 4300e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4301e96acad6Smrg # PIC (with -KPIC) is the default. 4302e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4303e96acad6Smrg ;; 4304dbbd9e4bSmacallan 4305e96acad6Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4306e96acad6Smrg case $cc_basename in 4307e96acad6Smrg # old Intel for x86_64 which still supported -KPIC. 4308e96acad6Smrg ecc*) 4309e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4310e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4311e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4312e96acad6Smrg ;; 4313e96acad6Smrg # icc used to be incompatible with GCC. 4314e96acad6Smrg # ICC 10 doesn't accept -KPIC any more. 4315e96acad6Smrg icc* | ifort*) 4316e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4317e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4318e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4319e96acad6Smrg ;; 4320e96acad6Smrg # Lahey Fortran 8.1. 4321e96acad6Smrg lf95*) 4322e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4323e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4324e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4325e96acad6Smrg ;; 4326e96acad6Smrg nagfor*) 4327e96acad6Smrg # NAG Fortran compiler 4328e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4329e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4330e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4331e96acad6Smrg ;; 4332e96acad6Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4333e96acad6Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4334e96acad6Smrg # which looks to be a dead project) 4335e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4336e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4337e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4338e96acad6Smrg ;; 4339e96acad6Smrg ccc*) 4340e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4341e96acad6Smrg # All Alpha code is PIC. 4342e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4343e96acad6Smrg ;; 4344e96acad6Smrg xl* | bgxl* | bgf* | mpixl*) 4345e96acad6Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4346e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4347e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4348e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4349e96acad6Smrg ;; 4350e96acad6Smrg *) 4351e96acad6Smrg case `$CC -V 2>&1 | sed 5q` in 4352e96acad6Smrg *Sun\ F* | *Sun*Fortran*) 4353e96acad6Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4354e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4355e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4356e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4357e96acad6Smrg ;; 4358e96acad6Smrg *Sun\ C*) 4359e96acad6Smrg # Sun C 5.9 4360e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4361e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4362e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4363e96acad6Smrg ;; 4364e96acad6Smrg esac 4365e96acad6Smrg ;; 4366e96acad6Smrg esac 4367e96acad6Smrg ;; 4368dbbd9e4bSmacallan 4369e96acad6Smrg newsos6) 4370e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4371e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4372e96acad6Smrg ;; 4373dbbd9e4bSmacallan 4374e96acad6Smrg *nto* | *qnx*) 4375e96acad6Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4376e96acad6Smrg # it will coredump. 4377e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4378e96acad6Smrg ;; 4379dbbd9e4bSmacallan 4380e96acad6Smrg osf3* | osf4* | osf5*) 4381e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4382e96acad6Smrg # All OSF/1 code is PIC. 4383e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4384e96acad6Smrg ;; 4385dbbd9e4bSmacallan 4386e96acad6Smrg rdos*) 4387e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4388e96acad6Smrg ;; 4389dbbd9e4bSmacallan 4390e96acad6Smrg solaris*) 4391e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4392e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4393e96acad6Smrg case $cc_basename in 4394e96acad6Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4395e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4396e96acad6Smrg *) 4397e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4398e96acad6Smrg esac 4399e96acad6Smrg ;; 4400dbbd9e4bSmacallan 4401e96acad6Smrg sunos4*) 4402e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4403e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4404e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4405e96acad6Smrg ;; 4406dbbd9e4bSmacallan 4407e96acad6Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4408e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4409e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4410e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4411e96acad6Smrg ;; 4412dbbd9e4bSmacallan 4413e96acad6Smrg sysv4*MP*) 4414e96acad6Smrg if test -d /usr/nec ;then 4415e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4416e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4417e96acad6Smrg fi 4418e96acad6Smrg ;; 4419dbbd9e4bSmacallan 4420e96acad6Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4421e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4422e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4423e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4424e96acad6Smrg ;; 4425dbbd9e4bSmacallan 4426e96acad6Smrg unicos*) 4427e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4428e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4429e96acad6Smrg ;; 4430dbbd9e4bSmacallan 4431e96acad6Smrg uts4*) 4432e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4433e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4434e96acad6Smrg ;; 4435dbbd9e4bSmacallan 4436e96acad6Smrg *) 4437e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4438e96acad6Smrg ;; 4439e96acad6Smrg esac 4440e96acad6Smrg fi 4441e96acad6Smrg]) 4442e96acad6Smrgcase $host_os in 4443e96acad6Smrg # For platforms which do not support PIC, -DPIC is meaningless: 4444e96acad6Smrg *djgpp*) 4445e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4446e96acad6Smrg ;; 4447e96acad6Smrg *) 4448e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4449e96acad6Smrg ;; 4450e96acad6Smrgesac 4451dbbd9e4bSmacallan 4452e96acad6SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4453e96acad6Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4454e96acad6Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4455e96acad6Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4456dbbd9e4bSmacallan 4457e96acad6Smrg# 4458e96acad6Smrg# Check to make sure the PIC flag actually works. 4459e96acad6Smrg# 4460e96acad6Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4461e96acad6Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4462e96acad6Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4463e96acad6Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4464e96acad6Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4465e96acad6Smrg "" | " "*) ;; 4466e96acad6Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4467e96acad6Smrg esac], 4468e96acad6Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4469e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4470e96acad6Smrgfi 4471e96acad6Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4472e96acad6Smrg [Additional compiler flags for building library objects]) 4473dbbd9e4bSmacallan 4474e96acad6Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4475e96acad6Smrg [How to pass a linker flag through the compiler]) 4476e96acad6Smrg# 4477e96acad6Smrg# Check to make sure the static flag actually works. 4478e96acad6Smrg# 4479e96acad6Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4480e96acad6Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4481e96acad6Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4482e96acad6Smrg $lt_tmp_static_flag, 4483e96acad6Smrg [], 4484e96acad6Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4485e96acad6Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4486e96acad6Smrg [Compiler flag to prevent dynamic linking]) 4487e96acad6Smrg])# _LT_COMPILER_PIC 4488dbbd9e4bSmacallan 4489dbbd9e4bSmacallan 4490e96acad6Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 4491e96acad6Smrg# ---------------------------- 4492e96acad6Smrg# See if the linker supports building shared libraries. 4493e96acad6Smrgm4_defun([_LT_LINKER_SHLIBS], 4494e96acad6Smrg[AC_REQUIRE([LT_PATH_LD])dnl 4495e96acad6SmrgAC_REQUIRE([LT_PATH_NM])dnl 4496e96acad6Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4497e96acad6Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4498e96acad6Smrgm4_require([_LT_DECL_EGREP])dnl 4499e96acad6Smrgm4_require([_LT_DECL_SED])dnl 4500e96acad6Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4501e96acad6Smrgm4_require([_LT_TAG_COMPILER])dnl 4502e96acad6SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4503e96acad6Smrgm4_if([$1], [CXX], [ 4504e96acad6Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4505e96acad6Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4506e96acad6Smrg case $host_os in 4507e96acad6Smrg aix[[4-9]]*) 4508e96acad6Smrg # If we're using GNU nm, then we don't want the "-C" option. 4509e96acad6Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4510e96acad6Smrg # Also, AIX nm treats weak defined symbols like other global defined 4511e96acad6Smrg # symbols, whereas GNU nm marks them as "W". 4512e96acad6Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4513e96acad6Smrg _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' 4514e96acad6Smrg else 4515e96acad6Smrg _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' 4516e96acad6Smrg fi 4517e96acad6Smrg ;; 4518e96acad6Smrg pw32*) 4519e96acad6Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4520e96acad6Smrg ;; 4521e96acad6Smrg cygwin* | mingw* | cegcc*) 4522e96acad6Smrg case $cc_basename in 4523e96acad6Smrg cl*) ;; 4524e96acad6Smrg *) 4525e96acad6Smrg _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' 4526e96acad6Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4527e96acad6Smrg ;; 4528e96acad6Smrg esac 4529e96acad6Smrg ;; 4530e96acad6Smrg *) 4531e96acad6Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4532e96acad6Smrg ;; 4533e96acad6Smrg esac 4534e96acad6Smrg], [ 4535e96acad6Smrg runpath_var= 4536e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 4537e96acad6Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4538e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)= 4539e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4540e96acad6Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 4541e96acad6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4542e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4543e96acad6Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4544e96acad6Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 4545e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4546e96acad6Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4547e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4548e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4549e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4550e96acad6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4551e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4552e96acad6Smrg _LT_TAGVAR(inherit_rpath, $1)=no 4553e96acad6Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4554e96acad6Smrg _LT_TAGVAR(module_cmds, $1)= 4555e96acad6Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 4556e96acad6Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4557e96acad6Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4558e96acad6Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4559e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4560e96acad6Smrg # include_expsyms should be a list of space-separated symbols to be *always* 4561e96acad6Smrg # included in the symbol list 4562e96acad6Smrg _LT_TAGVAR(include_expsyms, $1)= 4563e96acad6Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 4564e96acad6Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4565e96acad6Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4566e96acad6Smrg # as well as any symbol that contains `d'. 4567e96acad6Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4568e96acad6Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4569e96acad6Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 4570e96acad6Smrg # the symbol is explicitly referenced. Since portable code cannot 4571e96acad6Smrg # rely on this symbol name, it's probably fine to never include it in 4572e96acad6Smrg # preloaded symbol tables. 4573e96acad6Smrg # Exclude shared library initialization/finalization symbols. 4574e96acad6Smrgdnl Note also adjust exclude_expsyms for C++ above. 4575e96acad6Smrg extract_expsyms_cmds= 4576dbbd9e4bSmacallan 4577e96acad6Smrg case $host_os in 4578e96acad6Smrg cygwin* | mingw* | pw32* | cegcc*) 4579e96acad6Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4580e96acad6Smrg # When not using gcc, we currently assume that we are using 4581e96acad6Smrg # Microsoft Visual C++. 4582e96acad6Smrg if test "$GCC" != yes; then 4583e96acad6Smrg with_gnu_ld=no 4584e96acad6Smrg fi 4585e96acad6Smrg ;; 4586e96acad6Smrg interix*) 4587e96acad6Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4588e96acad6Smrg with_gnu_ld=yes 4589e96acad6Smrg ;; 4590e96acad6Smrg openbsd*) 4591e96acad6Smrg with_gnu_ld=no 4592e96acad6Smrg ;; 4593e96acad6Smrg esac 4594dbbd9e4bSmacallan 4595e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 4596dbbd9e4bSmacallan 4597e96acad6Smrg # On some targets, GNU ld is compatible enough with the native linker 4598e96acad6Smrg # that we're better off using the native interface for both. 4599e96acad6Smrg lt_use_gnu_ld_interface=no 4600e96acad6Smrg if test "$with_gnu_ld" = yes; then 4601e96acad6Smrg case $host_os in 4602e96acad6Smrg aix*) 4603e96acad6Smrg # The AIX port of GNU ld has always aspired to compatibility 4604e96acad6Smrg # with the native linker. However, as the warning in the GNU ld 4605e96acad6Smrg # block says, versions before 2.19.5* couldn't really create working 4606e96acad6Smrg # shared libraries, regardless of the interface used. 4607e96acad6Smrg case `$LD -v 2>&1` in 4608e96acad6Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4609e96acad6Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4610e96acad6Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4611e96acad6Smrg *) 4612e96acad6Smrg lt_use_gnu_ld_interface=yes 4613e96acad6Smrg ;; 4614e96acad6Smrg esac 4615e96acad6Smrg ;; 4616e96acad6Smrg *) 4617e96acad6Smrg lt_use_gnu_ld_interface=yes 4618e96acad6Smrg ;; 4619e96acad6Smrg esac 4620e96acad6Smrg fi 4621dbbd9e4bSmacallan 4622e96acad6Smrg if test "$lt_use_gnu_ld_interface" = yes; then 4623e96acad6Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 4624e96acad6Smrg wlarc='${wl}' 4625dbbd9e4bSmacallan 4626e96acad6Smrg # Set some defaults for GNU ld with shared library support. These 4627e96acad6Smrg # are reset later if shared libraries are not supported. Putting them 4628e96acad6Smrg # here allows them to be overridden if necessary. 4629e96acad6Smrg runpath_var=LD_RUN_PATH 4630e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4631e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4632e96acad6Smrg # ancient GNU ld didn't support --whole-archive et. al. 4633e96acad6Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4634e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4635e96acad6Smrg else 4636e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4637e96acad6Smrg fi 4638e96acad6Smrg supports_anon_versioning=no 4639e96acad6Smrg case `$LD -v 2>&1` in 4640e96acad6Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 4641e96acad6Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4642e96acad6Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4643e96acad6Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4644e96acad6Smrg *\ 2.11.*) ;; # other 2.11 versions 4645e96acad6Smrg *) supports_anon_versioning=yes ;; 4646e96acad6Smrg esac 4647dbbd9e4bSmacallan 4648e96acad6Smrg # See if GNU ld supports shared libraries. 4649e96acad6Smrg case $host_os in 4650e96acad6Smrg aix[[3-9]]*) 4651e96acad6Smrg # On AIX/PPC, the GNU linker is very broken 4652e96acad6Smrg if test "$host_cpu" != ia64; then 4653e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4654e96acad6Smrg cat <<_LT_EOF 1>&2 4655dbbd9e4bSmacallan 4656e96acad6Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 4657e96acad6Smrg*** to be unable to reliably create shared libraries on AIX. 4658e96acad6Smrg*** Therefore, libtool is disabling shared libraries support. If you 4659e96acad6Smrg*** really care for shared libraries, you may want to install binutils 4660e96acad6Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4661e96acad6Smrg*** You will then need to restart the configuration process. 4662dbbd9e4bSmacallan 4663e96acad6Smrg_LT_EOF 4664e96acad6Smrg fi 4665e96acad6Smrg ;; 4666dbbd9e4bSmacallan 4667e96acad6Smrg amigaos*) 4668e96acad6Smrg case $host_cpu in 4669e96acad6Smrg powerpc) 4670e96acad6Smrg # see comment about AmigaOS4 .so support 4671e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4672e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4673e96acad6Smrg ;; 4674e96acad6Smrg m68k) 4675e96acad6Smrg _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)' 4676e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4677e96acad6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4678e96acad6Smrg ;; 4679e96acad6Smrg esac 4680e96acad6Smrg ;; 4681dbbd9e4bSmacallan 4682e96acad6Smrg beos*) 4683e96acad6Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4684e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4685e96acad6Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4686e96acad6Smrg # support --undefined. This deserves some investigation. FIXME 4687e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4688e96acad6Smrg else 4689e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4690e96acad6Smrg fi 4691e96acad6Smrg ;; 4692dbbd9e4bSmacallan 4693e96acad6Smrg cygwin* | mingw* | pw32* | cegcc*) 4694e96acad6Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4695e96acad6Smrg # as there is no search path for DLLs. 4696e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4697e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4698e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4699e96acad6Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4700e96acad6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4701e96acad6Smrg _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' 4702e96acad6Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4703e96acad6Smrg 4704e96acad6Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4705e96acad6Smrg _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' 4706e96acad6Smrg # If the export-symbols file already is a .def file (1st line 4707e96acad6Smrg # is EXPORTS), use it as is; otherwise, prepend... 4708e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4709e96acad6Smrg cp $export_symbols $output_objdir/$soname.def; 4710e96acad6Smrg else 4711e96acad6Smrg echo EXPORTS > $output_objdir/$soname.def; 4712e96acad6Smrg cat $export_symbols >> $output_objdir/$soname.def; 4713e96acad6Smrg fi~ 4714e96acad6Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4715e96acad6Smrg else 4716e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4717e96acad6Smrg fi 4718e96acad6Smrg ;; 4719dbbd9e4bSmacallan 4720e96acad6Smrg haiku*) 4721e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4722e96acad6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4723e96acad6Smrg ;; 4724dbbd9e4bSmacallan 4725e96acad6Smrg interix[[3-9]]*) 4726e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4727e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4728e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4729e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4730e96acad6Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4731e96acad6Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4732e96acad6Smrg # default) and relocated if they conflict, which is a slow very memory 4733e96acad6Smrg # consuming and fragmenting process. To avoid this, we pick a random, 4734e96acad6Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4735e96acad6Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4736e96acad6Smrg _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' 4737e96acad6Smrg _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' 4738e96acad6Smrg ;; 4739dbbd9e4bSmacallan 4740e96acad6Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4741e96acad6Smrg tmp_diet=no 4742e96acad6Smrg if test "$host_os" = linux-dietlibc; then 4743e96acad6Smrg case $cc_basename in 4744e96acad6Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4745e96acad6Smrg esac 4746e96acad6Smrg fi 4747e96acad6Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4748e96acad6Smrg && test "$tmp_diet" = no 4749e96acad6Smrg then 4750e96acad6Smrg tmp_addflag=' $pic_flag' 4751e96acad6Smrg tmp_sharedflag='-shared' 4752e96acad6Smrg case $cc_basename,$host_cpu in 4753e96acad6Smrg pgcc*) # Portland Group C compiler 4754e96acad6Smrg _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' 4755e96acad6Smrg tmp_addflag=' $pic_flag' 4756e96acad6Smrg ;; 4757e96acad6Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 4758e96acad6Smrg # Portland Group f77 and f90 compilers 4759e96acad6Smrg _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' 4760e96acad6Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 4761e96acad6Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4762e96acad6Smrg tmp_addflag=' -i_dynamic' ;; 4763e96acad6Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4764e96acad6Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4765e96acad6Smrg ifc* | ifort*) # Intel Fortran compiler 4766e96acad6Smrg tmp_addflag=' -nofor_main' ;; 4767e96acad6Smrg lf95*) # Lahey Fortran 8.1 4768e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4769e96acad6Smrg tmp_sharedflag='--shared' ;; 4770e96acad6Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4771e96acad6Smrg tmp_sharedflag='-qmkshrobj' 4772e96acad6Smrg tmp_addflag= ;; 4773e96acad6Smrg nvcc*) # Cuda Compiler Driver 2.2 4774e96acad6Smrg _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' 4775e96acad6Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4776e96acad6Smrg ;; 4777e96acad6Smrg esac 4778e96acad6Smrg case `$CC -V 2>&1 | sed 5q` in 4779e96acad6Smrg *Sun\ C*) # Sun C 5.9 4780e96acad6Smrg _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' 4781e96acad6Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4782e96acad6Smrg tmp_sharedflag='-G' ;; 4783e96acad6Smrg *Sun\ F*) # Sun Fortran 8.3 4784e96acad6Smrg tmp_sharedflag='-G' ;; 4785e96acad6Smrg esac 4786e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4787dbbd9e4bSmacallan 4788e96acad6Smrg if test "x$supports_anon_versioning" = xyes; then 4789e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4790e96acad6Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4791e96acad6Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4792e96acad6Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4793e96acad6Smrg fi 4794dbbd9e4bSmacallan 4795e96acad6Smrg case $cc_basename in 4796e96acad6Smrg xlf* | bgf* | bgxlf* | mpixlf*) 4797e96acad6Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4798e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4799e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4800e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 4801e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4802e96acad6Smrg if test "x$supports_anon_versioning" = xyes; then 4803e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4804e96acad6Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4805e96acad6Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4806e96acad6Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4807e96acad6Smrg fi 4808e96acad6Smrg ;; 4809e96acad6Smrg esac 4810e96acad6Smrg else 4811e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4812e96acad6Smrg fi 4813e96acad6Smrg ;; 4814dbbd9e4bSmacallan 4815e96acad6Smrg netbsd*) 4816e96acad6Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4817e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4818e96acad6Smrg wlarc= 4819e96acad6Smrg else 4820e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4821e96acad6Smrg _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' 4822e96acad6Smrg fi 4823e96acad6Smrg ;; 4824dbbd9e4bSmacallan 4825e96acad6Smrg solaris*) 4826e96acad6Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4827e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4828e96acad6Smrg cat <<_LT_EOF 1>&2 4829dbbd9e4bSmacallan 4830e96acad6Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4831e96acad6Smrg*** create shared libraries on Solaris systems. Therefore, libtool 4832e96acad6Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4833e96acad6Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 4834e96acad6Smrg*** your PATH or compiler configuration so that the native linker is 4835e96acad6Smrg*** used, and then restart. 4836dbbd9e4bSmacallan 4837e96acad6Smrg_LT_EOF 4838e96acad6Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4839e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4840e96acad6Smrg _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' 4841e96acad6Smrg else 4842e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4843e96acad6Smrg fi 4844e96acad6Smrg ;; 4845dbbd9e4bSmacallan 4846e96acad6Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4847e96acad6Smrg case `$LD -v 2>&1` in 4848e96acad6Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4849e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4850e96acad6Smrg cat <<_LT_EOF 1>&2 4851dbbd9e4bSmacallan 4852e96acad6Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4853e96acad6Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4854e96acad6Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4855e96acad6Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4856e96acad6Smrg*** your PATH or compiler configuration so that the native linker is 4857e96acad6Smrg*** used, and then restart. 4858dbbd9e4bSmacallan 4859e96acad6Smrg_LT_EOF 4860e96acad6Smrg ;; 4861e96acad6Smrg *) 4862e96acad6Smrg # For security reasons, it is highly recommended that you always 4863e96acad6Smrg # use absolute paths for naming shared libraries, and exclude the 4864e96acad6Smrg # DT_RUNPATH tag from executables and libraries. But doing so 4865e96acad6Smrg # requires that you compile everything twice, which is a pain. 4866e96acad6Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4867e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4868e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4869e96acad6Smrg _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' 4870e96acad6Smrg else 4871e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4872e96acad6Smrg fi 4873e96acad6Smrg ;; 4874e96acad6Smrg esac 4875e96acad6Smrg ;; 4876dbbd9e4bSmacallan 4877e96acad6Smrg sunos4*) 4878e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4879e96acad6Smrg wlarc= 4880e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4881e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4882e96acad6Smrg ;; 4883dbbd9e4bSmacallan 4884e96acad6Smrg *) 4885e96acad6Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4886e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4887e96acad6Smrg _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' 4888e96acad6Smrg else 4889e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4890e96acad6Smrg fi 4891e96acad6Smrg ;; 4892e96acad6Smrg esac 4893dbbd9e4bSmacallan 4894e96acad6Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4895e96acad6Smrg runpath_var= 4896e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4897e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4898e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4899e96acad6Smrg fi 4900e96acad6Smrg else 4901e96acad6Smrg # PORTME fill in a description of your system's linker (not GNU ld) 4902e96acad6Smrg case $host_os in 4903e96acad6Smrg aix3*) 4904e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4905e96acad6Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 4906e96acad6Smrg _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' 4907e96acad6Smrg # Note: this linker hardcodes the directories in LIBPATH if there 4908e96acad6Smrg # are no directories specified by -L. 4909e96acad6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4910e96acad6Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4911e96acad6Smrg # Neither direct hardcoding nor static linking is supported with a 4912e96acad6Smrg # broken collect2. 4913e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4914e96acad6Smrg fi 4915e96acad6Smrg ;; 4916dbbd9e4bSmacallan 4917e96acad6Smrg aix[[4-9]]*) 4918e96acad6Smrg if test "$host_cpu" = ia64; then 4919e96acad6Smrg # On IA64, the linker does run time linking by default, so we don't 4920e96acad6Smrg # have to do anything special. 4921e96acad6Smrg aix_use_runtimelinking=no 4922e96acad6Smrg exp_sym_flag='-Bexport' 4923e96acad6Smrg no_entry_flag="" 4924e96acad6Smrg else 4925e96acad6Smrg # If we're using GNU nm, then we don't want the "-C" option. 4926e96acad6Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4927e96acad6Smrg # Also, AIX nm treats weak defined symbols like other global 4928e96acad6Smrg # defined symbols, whereas GNU nm marks them as "W". 4929e96acad6Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4930e96acad6Smrg _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' 4931e96acad6Smrg else 4932e96acad6Smrg _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' 4933e96acad6Smrg fi 4934e96acad6Smrg aix_use_runtimelinking=no 4935dbbd9e4bSmacallan 4936e96acad6Smrg # Test if we are trying to use run time linking or normal 4937e96acad6Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4938e96acad6Smrg # need to do runtime linking. 4939e96acad6Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4940e96acad6Smrg for ld_flag in $LDFLAGS; do 4941e96acad6Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4942e96acad6Smrg aix_use_runtimelinking=yes 4943e96acad6Smrg break 4944e96acad6Smrg fi 4945e96acad6Smrg done 4946e96acad6Smrg ;; 4947e96acad6Smrg esac 4948dbbd9e4bSmacallan 4949e96acad6Smrg exp_sym_flag='-bexport' 4950e96acad6Smrg no_entry_flag='-bnoentry' 4951e96acad6Smrg fi 4952dbbd9e4bSmacallan 4953e96acad6Smrg # When large executables or shared objects are built, AIX ld can 4954e96acad6Smrg # have problems creating the table of contents. If linking a library 4955e96acad6Smrg # or program results in "error TOC overflow" add -mminimal-toc to 4956e96acad6Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4957e96acad6Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4958dbbd9e4bSmacallan 4959e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='' 4960e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4961e96acad6Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4962e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 4963e96acad6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4964e96acad6Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 4965dbbd9e4bSmacallan 4966e96acad6Smrg if test "$GCC" = yes; then 4967e96acad6Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 4968e96acad6Smrg # We only want to do this on AIX 4.2 and lower, the check 4969e96acad6Smrg # below for broken collect2 doesn't work under 4.3+ 4970e96acad6Smrg collect2name=`${CC} -print-prog-name=collect2` 4971e96acad6Smrg if test -f "$collect2name" && 4972e96acad6Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 4973e96acad6Smrg then 4974e96acad6Smrg # We have reworked collect2 4975e96acad6Smrg : 4976e96acad6Smrg else 4977e96acad6Smrg # We have old collect2 4978e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4979e96acad6Smrg # It fails to find uninstalled libraries when the uninstalled 4980e96acad6Smrg # path is not listed in the libpath. Setting hardcode_minus_L 4981e96acad6Smrg # to unsupported forces relinking 4982e96acad6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4983e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4984e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4985e96acad6Smrg fi 4986e96acad6Smrg ;; 4987e96acad6Smrg esac 4988e96acad6Smrg shared_flag='-shared' 4989e96acad6Smrg if test "$aix_use_runtimelinking" = yes; then 4990e96acad6Smrg shared_flag="$shared_flag "'${wl}-G' 4991e96acad6Smrg fi 4992e96acad6Smrg else 4993e96acad6Smrg # not using gcc 4994e96acad6Smrg if test "$host_cpu" = ia64; then 4995e96acad6Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4996e96acad6Smrg # chokes on -Wl,-G. The following line is correct: 4997e96acad6Smrg shared_flag='-G' 4998e96acad6Smrg else 4999e96acad6Smrg if test "$aix_use_runtimelinking" = yes; then 5000e96acad6Smrg shared_flag='${wl}-G' 5001e96acad6Smrg else 5002e96acad6Smrg shared_flag='${wl}-bM:SRE' 5003e96acad6Smrg fi 5004e96acad6Smrg fi 5005e96acad6Smrg fi 5006dbbd9e4bSmacallan 5007e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5008e96acad6Smrg # It seems that -bexpall does not export symbols beginning with 5009e96acad6Smrg # underscore (_), so it is better to generate a list of symbols to export. 5010e96acad6Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5011e96acad6Smrg if test "$aix_use_runtimelinking" = yes; then 5012e96acad6Smrg # Warning - without using the other runtime loading flags (-brtl), 5013e96acad6Smrg # -berok will link without error, but may produce a broken library. 5014e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5015e96acad6Smrg # Determine the default libpath from the value encoded in an 5016e96acad6Smrg # empty executable. 5017e96acad6Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5018e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5019e96acad6Smrg _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" 5020e96acad6Smrg else 5021e96acad6Smrg if test "$host_cpu" = ia64; then 5022e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5023e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5024e96acad6Smrg _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" 5025e96acad6Smrg else 5026e96acad6Smrg # Determine the default libpath from the value encoded in an 5027e96acad6Smrg # empty executable. 5028e96acad6Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5029e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5030e96acad6Smrg # Warning - without using the other run time loading flags, 5031e96acad6Smrg # -berok will link without error, but may produce a broken library. 5032e96acad6Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5033e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5034e96acad6Smrg if test "$with_gnu_ld" = yes; then 5035e96acad6Smrg # We only use this code for GNU lds that support --whole-archive. 5036e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5037e96acad6Smrg else 5038e96acad6Smrg # Exported symbols can be pulled into shared objects from archives 5039e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5040e96acad6Smrg fi 5041e96acad6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5042e96acad6Smrg # This is similar to how AIX traditionally builds its shared libraries. 5043e96acad6Smrg _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' 5044e96acad6Smrg fi 5045e96acad6Smrg fi 5046e96acad6Smrg ;; 5047dbbd9e4bSmacallan 5048e96acad6Smrg amigaos*) 5049e96acad6Smrg case $host_cpu in 5050e96acad6Smrg powerpc) 5051e96acad6Smrg # see comment about AmigaOS4 .so support 5052e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5053e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5054e96acad6Smrg ;; 5055e96acad6Smrg m68k) 5056e96acad6Smrg _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)' 5057e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5058e96acad6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5059e96acad6Smrg ;; 5060e96acad6Smrg esac 5061e96acad6Smrg ;; 5062dbbd9e4bSmacallan 5063e96acad6Smrg bsdi[[45]]*) 5064e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5065e96acad6Smrg ;; 5066dbbd9e4bSmacallan 5067e96acad6Smrg cygwin* | mingw* | pw32* | cegcc*) 5068e96acad6Smrg # When not using gcc, we currently assume that we are using 5069e96acad6Smrg # Microsoft Visual C++. 5070e96acad6Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5071e96acad6Smrg # no search path for DLLs. 5072e96acad6Smrg case $cc_basename in 5073e96acad6Smrg cl*) 5074e96acad6Smrg # Native MSVC 5075e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5076e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5077e96acad6Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5078e96acad6Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5079e96acad6Smrg # Tell ltmain to make .lib files, not .a files. 5080e96acad6Smrg libext=lib 5081e96acad6Smrg # Tell ltmain to make .dll files, not .so files. 5082e96acad6Smrg shrext_cmds=".dll" 5083e96acad6Smrg # FIXME: Setting linknames here is a bad hack. 5084e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5085e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5086e96acad6Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5087e96acad6Smrg else 5088e96acad6Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5089e96acad6Smrg fi~ 5090e96acad6Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5091e96acad6Smrg linknames=' 5092e96acad6Smrg # The linker will not automatically build a static lib if we build a DLL. 5093e96acad6Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5094e96acad6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5095e96acad6Smrg _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' 5096e96acad6Smrg # Don't use ranlib 5097e96acad6Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5098e96acad6Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5099e96acad6Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5100e96acad6Smrg case $lt_outputfile in 5101e96acad6Smrg *.exe|*.EXE) ;; 5102e96acad6Smrg *) 5103e96acad6Smrg lt_outputfile="$lt_outputfile.exe" 5104e96acad6Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 5105e96acad6Smrg ;; 5106e96acad6Smrg esac~ 5107e96acad6Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5108e96acad6Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5109e96acad6Smrg $RM "$lt_outputfile.manifest"; 5110e96acad6Smrg fi' 5111e96acad6Smrg ;; 5112e96acad6Smrg *) 5113e96acad6Smrg # Assume MSVC wrapper 5114e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5115e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5116e96acad6Smrg # Tell ltmain to make .lib files, not .a files. 5117e96acad6Smrg libext=lib 5118e96acad6Smrg # Tell ltmain to make .dll files, not .so files. 5119e96acad6Smrg shrext_cmds=".dll" 5120e96acad6Smrg # FIXME: Setting linknames here is a bad hack. 5121e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5122e96acad6Smrg # The linker will automatically build a .lib file if we build a DLL. 5123e96acad6Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5124e96acad6Smrg # FIXME: Should let the user specify the lib program. 5125e96acad6Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5126e96acad6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5127e96acad6Smrg ;; 5128e96acad6Smrg esac 5129e96acad6Smrg ;; 5130dbbd9e4bSmacallan 5131e96acad6Smrg darwin* | rhapsody*) 5132e96acad6Smrg _LT_DARWIN_LINKER_FEATURES($1) 5133e96acad6Smrg ;; 5134dbbd9e4bSmacallan 5135e96acad6Smrg dgux*) 5136e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5137e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5138e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5139e96acad6Smrg ;; 5140dbbd9e4bSmacallan 5141e96acad6Smrg freebsd1*) 5142e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5143e96acad6Smrg ;; 5144dbbd9e4bSmacallan 5145e96acad6Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5146e96acad6Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 5147e96acad6Smrg # does not break anything, and helps significantly (at the cost of a little 5148e96acad6Smrg # extra space). 5149e96acad6Smrg freebsd2.2*) 5150e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5151e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5152e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5153e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5154e96acad6Smrg ;; 5155dbbd9e4bSmacallan 5156e96acad6Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5157e96acad6Smrg freebsd2*) 5158e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5159e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5160e96acad6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5161e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5162e96acad6Smrg ;; 5163dbbd9e4bSmacallan 5164e96acad6Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5165e96acad6Smrg freebsd* | dragonfly*) 5166e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5167e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5168e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5169e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5170e96acad6Smrg ;; 5171dbbd9e4bSmacallan 5172e96acad6Smrg hpux9*) 5173e96acad6Smrg if test "$GCC" = yes; then 5174e96acad6Smrg _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' 5175e96acad6Smrg else 5176e96acad6Smrg _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' 5177e96acad6Smrg fi 5178e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5179e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5180e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5181dbbd9e4bSmacallan 5182e96acad6Smrg # hardcode_minus_L: Not really in the search PATH, 5183e96acad6Smrg # but as the default location of the library. 5184e96acad6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5185e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5186e96acad6Smrg ;; 5187dbbd9e4bSmacallan 5188e96acad6Smrg hpux10*) 5189e96acad6Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5190e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5191e96acad6Smrg else 5192e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5193e96acad6Smrg fi 5194e96acad6Smrg if test "$with_gnu_ld" = no; then 5195e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5196e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 5197e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5198e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5199e96acad6Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5200e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5201e96acad6Smrg # hardcode_minus_L: Not really in the search PATH, 5202e96acad6Smrg # but as the default location of the library. 5203e96acad6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5204e96acad6Smrg fi 5205e96acad6Smrg ;; 5206dbbd9e4bSmacallan 5207e96acad6Smrg hpux11*) 5208e96acad6Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5209e96acad6Smrg case $host_cpu in 5210e96acad6Smrg hppa*64*) 5211e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5212e96acad6Smrg ;; 5213e96acad6Smrg ia64*) 5214e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5215e96acad6Smrg ;; 5216e96acad6Smrg *) 5217e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5218e96acad6Smrg ;; 5219e96acad6Smrg esac 5220e96acad6Smrg else 5221e96acad6Smrg case $host_cpu in 5222e96acad6Smrg hppa*64*) 5223e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5224e96acad6Smrg ;; 5225e96acad6Smrg ia64*) 5226e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5227e96acad6Smrg ;; 5228e96acad6Smrg *) 5229e96acad6Smrg m4_if($1, [], [ 5230e96acad6Smrg # Older versions of the 11.00 compiler do not understand -b yet 5231e96acad6Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5232e96acad6Smrg _LT_LINKER_OPTION([if $CC understands -b], 5233e96acad6Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5234e96acad6Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5235e96acad6Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5236e96acad6Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5237e96acad6Smrg ;; 5238e96acad6Smrg esac 5239e96acad6Smrg fi 5240e96acad6Smrg if test "$with_gnu_ld" = no; then 5241e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5242e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5243dbbd9e4bSmacallan 5244e96acad6Smrg case $host_cpu in 5245e96acad6Smrg hppa*64*|ia64*) 5246e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5247e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5248e96acad6Smrg ;; 5249e96acad6Smrg *) 5250e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5251e96acad6Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5252e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5253dbbd9e4bSmacallan 5254e96acad6Smrg # hardcode_minus_L: Not really in the search PATH, 5255e96acad6Smrg # but as the default location of the library. 5256e96acad6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5257e96acad6Smrg ;; 5258e96acad6Smrg esac 5259e96acad6Smrg fi 5260e96acad6Smrg ;; 5261dbbd9e4bSmacallan 5262e96acad6Smrg irix5* | irix6* | nonstopux*) 5263e96acad6Smrg if test "$GCC" = yes; then 5264e96acad6Smrg _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' 5265e96acad6Smrg # Try to use the -exported_symbol ld option, if it does not 5266e96acad6Smrg # work, assume that -exports_file does not work either and 5267e96acad6Smrg # implicitly export all symbols. 5268e96acad6Smrg # This should be the same for all languages, so no per-tag cache variable. 5269e96acad6Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5270e96acad6Smrg [lt_cv_irix_exported_symbol], 5271e96acad6Smrg [save_LDFLAGS="$LDFLAGS" 5272e96acad6Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5273e96acad6Smrg AC_LINK_IFELSE( 5274e96acad6Smrg [AC_LANG_SOURCE( 5275e96acad6Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5276e96acad6Smrg [C++], [[int foo (void) { return 0; }]], 5277e96acad6Smrg [Fortran 77], [[ 5278e96acad6Smrg subroutine foo 5279e96acad6Smrg end]], 5280e96acad6Smrg [Fortran], [[ 5281e96acad6Smrg subroutine foo 5282e96acad6Smrg end]])])], 5283e96acad6Smrg [lt_cv_irix_exported_symbol=yes], 5284e96acad6Smrg [lt_cv_irix_exported_symbol=no]) 5285e96acad6Smrg LDFLAGS="$save_LDFLAGS"]) 5286e96acad6Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 5287e96acad6Smrg _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' 5288e96acad6Smrg fi 5289e96acad6Smrg else 5290e96acad6Smrg _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' 5291e96acad6Smrg _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' 5292e96acad6Smrg fi 5293e96acad6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5294e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5295e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5296e96acad6Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5297e96acad6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5298e96acad6Smrg ;; 5299dbbd9e4bSmacallan 5300e96acad6Smrg netbsd*) 5301e96acad6Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5302e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5303e96acad6Smrg else 5304e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5305e96acad6Smrg fi 5306e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5307e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5308e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5309e96acad6Smrg ;; 5310dbbd9e4bSmacallan 5311e96acad6Smrg newsos6) 5312e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5313e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5314e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5315e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5316e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5317e96acad6Smrg ;; 5318dbbd9e4bSmacallan 5319e96acad6Smrg *nto* | *qnx*) 5320e96acad6Smrg ;; 5321dbbd9e4bSmacallan 5322e96acad6Smrg openbsd*) 5323e96acad6Smrg if test -f /usr/libexec/ld.so; then 5324e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5325e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5326e96acad6Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5327e96acad6Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5328e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5329e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5330e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5331e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5332e96acad6Smrg else 5333e96acad6Smrg case $host_os in 5334e96acad6Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5335e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5336e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5337e96acad6Smrg ;; 5338e96acad6Smrg *) 5339e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5340e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5341e96acad6Smrg ;; 5342e96acad6Smrg esac 5343e96acad6Smrg fi 5344e96acad6Smrg else 5345e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5346e96acad6Smrg fi 5347e96acad6Smrg ;; 5348dbbd9e4bSmacallan 5349e96acad6Smrg os2*) 5350e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5351e96acad6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5352e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5353e96acad6Smrg _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' 5354e96acad6Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5355e96acad6Smrg ;; 5356dbbd9e4bSmacallan 5357e96acad6Smrg osf3*) 5358e96acad6Smrg if test "$GCC" = yes; then 5359e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5360e96acad6Smrg _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' 5361e96acad6Smrg else 5362e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5363e96acad6Smrg _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' 5364e96acad6Smrg fi 5365e96acad6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5366e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5367e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5368e96acad6Smrg ;; 5369dbbd9e4bSmacallan 5370e96acad6Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5371e96acad6Smrg if test "$GCC" = yes; then 5372e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5373e96acad6Smrg _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' 5374e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5375e96acad6Smrg else 5376e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5377e96acad6Smrg _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' 5378e96acad6Smrg _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~ 5379e96acad6Smrg $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' 5380dbbd9e4bSmacallan 5381e96acad6Smrg # Both c and cxx compiler support -rpath directly 5382e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5383e96acad6Smrg fi 5384e96acad6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5385e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5386e96acad6Smrg ;; 5387dbbd9e4bSmacallan 5388e96acad6Smrg solaris*) 5389e96acad6Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5390e96acad6Smrg if test "$GCC" = yes; then 5391e96acad6Smrg wlarc='${wl}' 5392e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5393e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5394e96acad6Smrg $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' 5395e96acad6Smrg else 5396e96acad6Smrg case `$CC -V 2>&1` in 5397e96acad6Smrg *"Compilers 5.0"*) 5398e96acad6Smrg wlarc='' 5399e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5400e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5401e96acad6Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5402e96acad6Smrg ;; 5403e96acad6Smrg *) 5404e96acad6Smrg wlarc='${wl}' 5405e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5406e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5407e96acad6Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5408e96acad6Smrg ;; 5409e96acad6Smrg esac 5410e96acad6Smrg fi 5411e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5412e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5413e96acad6Smrg case $host_os in 5414e96acad6Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5415e96acad6Smrg *) 5416e96acad6Smrg # The compiler driver will combine and reorder linker options, 5417e96acad6Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 5418e96acad6Smrg # but is careful enough not to reorder. 5419e96acad6Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5420e96acad6Smrg if test "$GCC" = yes; then 5421e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5422e96acad6Smrg else 5423e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5424e96acad6Smrg fi 5425e96acad6Smrg ;; 5426e96acad6Smrg esac 5427e96acad6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5428e96acad6Smrg ;; 5429dbbd9e4bSmacallan 5430e96acad6Smrg sunos4*) 5431e96acad6Smrg if test "x$host_vendor" = xsequent; then 5432e96acad6Smrg # Use $CC to link under sequent, because it throws in some extra .o 5433e96acad6Smrg # files that make .init and .fini sections work. 5434e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5435e96acad6Smrg else 5436e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5437e96acad6Smrg fi 5438e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5439e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5440e96acad6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5441e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5442e96acad6Smrg ;; 5443dbbd9e4bSmacallan 5444e96acad6Smrg sysv4) 5445e96acad6Smrg case $host_vendor in 5446e96acad6Smrg sni) 5447e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5448e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5449e96acad6Smrg ;; 5450e96acad6Smrg siemens) 5451e96acad6Smrg ## LD is ld it makes a PLAMLIB 5452e96acad6Smrg ## CC just makes a GrossModule. 5453e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5454e96acad6Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5455e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5456e96acad6Smrg ;; 5457e96acad6Smrg motorola) 5458e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5459e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5460e96acad6Smrg ;; 5461e96acad6Smrg esac 5462e96acad6Smrg runpath_var='LD_RUN_PATH' 5463e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5464e96acad6Smrg ;; 5465dbbd9e4bSmacallan 5466e96acad6Smrg sysv4.3*) 5467e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5468e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5469e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5470e96acad6Smrg ;; 5471dbbd9e4bSmacallan 5472e96acad6Smrg sysv4*MP*) 5473e96acad6Smrg if test -d /usr/nec; then 5474e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5475e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5476e96acad6Smrg runpath_var=LD_RUN_PATH 5477e96acad6Smrg hardcode_runpath_var=yes 5478e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5479e96acad6Smrg fi 5480e96acad6Smrg ;; 5481dbbd9e4bSmacallan 5482e96acad6Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5483e96acad6Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5484e96acad6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5485e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5486e96acad6Smrg runpath_var='LD_RUN_PATH' 5487dbbd9e4bSmacallan 5488e96acad6Smrg if test "$GCC" = yes; then 5489e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5490e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5491e96acad6Smrg else 5492e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5493e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5494e96acad6Smrg fi 5495e96acad6Smrg ;; 5496dbbd9e4bSmacallan 5497e96acad6Smrg sysv5* | sco3.2v5* | sco5v6*) 5498e96acad6Smrg # Note: We can NOT use -z defs as we might desire, because we do not 5499e96acad6Smrg # link with -lc, and that would cause any symbols used from libc to 5500e96acad6Smrg # always be unresolved, which means just about no library would 5501e96acad6Smrg # ever link correctly. If we're not using GNU ld we use -z text 5502e96acad6Smrg # though, which does catch some bad symbols but isn't as heavy-handed 5503e96acad6Smrg # as -z defs. 5504e96acad6Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5505e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5506e96acad6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5507e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5508e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5509e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5510e96acad6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5511e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5512e96acad6Smrg runpath_var='LD_RUN_PATH' 5513dbbd9e4bSmacallan 5514e96acad6Smrg if test "$GCC" = yes; then 5515e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5516e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5517e96acad6Smrg else 5518e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5519e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5520e96acad6Smrg fi 5521e96acad6Smrg ;; 5522dbbd9e4bSmacallan 5523e96acad6Smrg uts4*) 5524e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5525e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5526e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5527e96acad6Smrg ;; 5528dbbd9e4bSmacallan 5529e96acad6Smrg *) 5530e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5531e96acad6Smrg ;; 5532e96acad6Smrg esac 5533dbbd9e4bSmacallan 5534e96acad6Smrg if test x$host_vendor = xsni; then 5535e96acad6Smrg case $host in 5536e96acad6Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5537e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5538e96acad6Smrg ;; 5539e96acad6Smrg esac 5540e96acad6Smrg fi 5541e96acad6Smrg fi 5542e96acad6Smrg]) 5543e96acad6SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5544e96acad6Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5545dbbd9e4bSmacallan 5546e96acad6Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5547dbbd9e4bSmacallan 5548e96acad6Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5549e96acad6Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5550e96acad6Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 5551e96acad6Smrg [The commands to extract the exported symbol list from a shared archive]) 5552dbbd9e4bSmacallan 5553e96acad6Smrg# 5554e96acad6Smrg# Do we need to explicitly link libc? 5555e96acad6Smrg# 5556e96acad6Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5557e96acad6Smrgx|xyes) 5558e96acad6Smrg # Assume -lc should be added 5559e96acad6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5560dbbd9e4bSmacallan 5561e96acad6Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5562e96acad6Smrg case $_LT_TAGVAR(archive_cmds, $1) in 5563e96acad6Smrg *'~'*) 5564e96acad6Smrg # FIXME: we may have to deal with multi-command sequences. 5565e96acad6Smrg ;; 5566e96acad6Smrg '$CC '*) 5567e96acad6Smrg # Test whether the compiler implicitly links with -lc since on some 5568e96acad6Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5569e96acad6Smrg # to ld, don't add -lc before -lgcc. 5570e96acad6Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5571e96acad6Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5572e96acad6Smrg [$RM conftest* 5573e96acad6Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5574e96acad6Smrg 5575e96acad6Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5576e96acad6Smrg soname=conftest 5577e96acad6Smrg lib=conftest 5578e96acad6Smrg libobjs=conftest.$ac_objext 5579e96acad6Smrg deplibs= 5580e96acad6Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5581e96acad6Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5582e96acad6Smrg compiler_flags=-v 5583e96acad6Smrg linker_flags=-v 5584e96acad6Smrg verstring= 5585e96acad6Smrg output_objdir=. 5586e96acad6Smrg libname=conftest 5587e96acad6Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5588e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 5589e96acad6Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5590e96acad6Smrg then 5591e96acad6Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5592e96acad6Smrg else 5593e96acad6Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5594e96acad6Smrg fi 5595e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5596e96acad6Smrg else 5597e96acad6Smrg cat conftest.err 1>&5 5598e96acad6Smrg fi 5599e96acad6Smrg $RM conftest* 5600e96acad6Smrg ]) 5601e96acad6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5602e96acad6Smrg ;; 5603e96acad6Smrg esac 5604dbbd9e4bSmacallan fi 5605dbbd9e4bSmacallan ;; 5606dbbd9e4bSmacallanesac 5607dbbd9e4bSmacallan 5608e96acad6Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5609e96acad6Smrg [Whether or not to add -lc for building shared libraries]) 5610e96acad6Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5611e96acad6Smrg [enable_shared_with_static_runtimes], [0], 5612e96acad6Smrg [Whether or not to disallow shared libs when runtime libs are static]) 5613e96acad6Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5614e96acad6Smrg [Compiler flag to allow reflexive dlopens]) 5615e96acad6Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5616e96acad6Smrg [Compiler flag to generate shared objects directly from archives]) 5617e96acad6Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 5618e96acad6Smrg [Whether the compiler copes with passing no objects directly]) 5619e96acad6Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5620e96acad6Smrg [Create an old-style archive from a shared archive]) 5621e96acad6Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5622e96acad6Smrg [Create a temporary old-style archive to link instead of a shared archive]) 5623e96acad6Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5624e96acad6Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5625e96acad6Smrg_LT_TAGDECL([], [module_cmds], [2], 5626e96acad6Smrg [Commands used to build a loadable module if different from building 5627e96acad6Smrg a shared archive.]) 5628e96acad6Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5629e96acad6Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 5630e96acad6Smrg [Whether we are building with GNU ld or not]) 5631e96acad6Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5632e96acad6Smrg [Flag that allows shared libraries with undefined symbols to be built]) 5633e96acad6Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 5634e96acad6Smrg [Flag that enforces no undefined symbols]) 5635e96acad6Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5636e96acad6Smrg [Flag to hardcode $libdir into a binary during linking. 5637e96acad6Smrg This must work even if $libdir does not exist]) 5638e96acad6Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 5639e96acad6Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 5640e96acad6Smrg during linking. This must work even if $libdir does not exist]]) 5641e96acad6Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5642e96acad6Smrg [Whether we need a single "-rpath" flag with a separated argument]) 5643e96acad6Smrg_LT_TAGDECL([], [hardcode_direct], [0], 5644e96acad6Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5645e96acad6Smrg DIR into the resulting binary]) 5646e96acad6Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5647e96acad6Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5648e96acad6Smrg DIR into the resulting binary and the resulting library dependency is 5649e96acad6Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5650e96acad6Smrg library is relocated]) 5651e96acad6Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5652e96acad6Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5653e96acad6Smrg into the resulting binary]) 5654e96acad6Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5655e96acad6Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5656e96acad6Smrg into the resulting binary]) 5657e96acad6Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 5658e96acad6Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 5659e96acad6Smrg into the library and all subsequent libraries and executables linked 5660e96acad6Smrg against it]) 5661e96acad6Smrg_LT_TAGDECL([], [inherit_rpath], [0], 5662e96acad6Smrg [Set to yes if linker adds runtime paths of dependent libraries 5663e96acad6Smrg to runtime path list]) 5664e96acad6Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 5665e96acad6Smrg [Whether libtool must link a program against all its dependency libraries]) 5666e96acad6Smrg_LT_TAGDECL([], [always_export_symbols], [0], 5667e96acad6Smrg [Set to "yes" if exported symbols are required]) 5668e96acad6Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5669e96acad6Smrg [The commands to list exported symbols]) 5670e96acad6Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 5671e96acad6Smrg [Symbols that should not be listed in the preloaded symbols]) 5672e96acad6Smrg_LT_TAGDECL([], [include_expsyms], [1], 5673e96acad6Smrg [Symbols that must always be exported]) 5674e96acad6Smrg_LT_TAGDECL([], [prelink_cmds], [2], 5675e96acad6Smrg [Commands necessary for linking programs (against libraries) with templates]) 5676e96acad6Smrg_LT_TAGDECL([], [postlink_cmds], [2], 5677e96acad6Smrg [Commands necessary for finishing linking programs]) 5678e96acad6Smrg_LT_TAGDECL([], [file_list_spec], [1], 5679e96acad6Smrg [Specify filename containing input files]) 5680e96acad6Smrgdnl FIXME: Not yet implemented 5681e96acad6Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5682e96acad6Smrgdnl [Compiler flag to generate thread safe objects]) 5683e96acad6Smrg])# _LT_LINKER_SHLIBS 5684e96acad6Smrg 5685e96acad6Smrg 5686e96acad6Smrg# _LT_LANG_C_CONFIG([TAG]) 5687e96acad6Smrg# ------------------------ 5688e96acad6Smrg# Ensure that the configuration variables for a C compiler are suitably 5689e96acad6Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5690e96acad6Smrg# the compiler configuration to `libtool'. 5691e96acad6Smrgm4_defun([_LT_LANG_C_CONFIG], 5692e96acad6Smrg[m4_require([_LT_DECL_EGREP])dnl 5693e96acad6Smrglt_save_CC="$CC" 5694e96acad6SmrgAC_LANG_PUSH(C) 5695e96acad6Smrg 5696e96acad6Smrg# Source file extension for C test sources. 5697e96acad6Smrgac_ext=c 5698e96acad6Smrg 5699e96acad6Smrg# Object file extension for compiled C test sources. 5700e96acad6Smrgobjext=o 5701e96acad6Smrg_LT_TAGVAR(objext, $1)=$objext 5702dbbd9e4bSmacallan 5703e96acad6Smrg# Code to be used in simple compile tests 5704e96acad6Smrglt_simple_compile_test_code="int some_variable = 0;" 5705dbbd9e4bSmacallan 5706e96acad6Smrg# Code to be used in simple link tests 5707e96acad6Smrglt_simple_link_test_code='int main(){return(0);}' 5708dbbd9e4bSmacallan 5709e96acad6Smrg_LT_TAG_COMPILER 5710e96acad6Smrg# Save the default compiler, since it gets overwritten when the other 5711e96acad6Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5712e96acad6Smrgcompiler_DEFAULT=$CC 5713dbbd9e4bSmacallan 5714e96acad6Smrg# save warnings/boilerplate of simple test code 5715e96acad6Smrg_LT_COMPILER_BOILERPLATE 5716e96acad6Smrg_LT_LINKER_BOILERPLATE 5717dbbd9e4bSmacallan 5718e96acad6Smrgif test -n "$compiler"; then 5719e96acad6Smrg _LT_COMPILER_NO_RTTI($1) 5720e96acad6Smrg _LT_COMPILER_PIC($1) 5721e96acad6Smrg _LT_COMPILER_C_O($1) 5722e96acad6Smrg _LT_COMPILER_FILE_LOCKS($1) 5723e96acad6Smrg _LT_LINKER_SHLIBS($1) 5724e96acad6Smrg _LT_SYS_DYNAMIC_LINKER($1) 5725e96acad6Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 5726e96acad6Smrg LT_SYS_DLOPEN_SELF 5727e96acad6Smrg _LT_CMD_STRIPLIB 5728e96acad6Smrg 5729e96acad6Smrg # Report which library types will actually be built 5730e96acad6Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5731e96acad6Smrg AC_MSG_RESULT([$can_build_shared]) 5732e96acad6Smrg 5733e96acad6Smrg AC_MSG_CHECKING([whether to build shared libraries]) 5734e96acad6Smrg test "$can_build_shared" = "no" && enable_shared=no 5735e96acad6Smrg 5736e96acad6Smrg # On AIX, shared libraries and static libraries use the same namespace, and 5737e96acad6Smrg # are all built from PIC. 5738e96acad6Smrg case $host_os in 5739e96acad6Smrg aix3*) 5740e96acad6Smrg test "$enable_shared" = yes && enable_static=no 5741e96acad6Smrg if test -n "$RANLIB"; then 5742e96acad6Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5743e96acad6Smrg postinstall_cmds='$RANLIB $lib' 5744e96acad6Smrg fi 5745e96acad6Smrg ;; 5746dbbd9e4bSmacallan 5747e96acad6Smrg aix[[4-9]]*) 5748e96acad6Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5749e96acad6Smrg test "$enable_shared" = yes && enable_static=no 5750e96acad6Smrg fi 5751e96acad6Smrg ;; 5752e96acad6Smrg esac 5753e96acad6Smrg AC_MSG_RESULT([$enable_shared]) 5754dbbd9e4bSmacallan 5755e96acad6Smrg AC_MSG_CHECKING([whether to build static libraries]) 5756e96acad6Smrg # Make sure either enable_shared or enable_static is yes. 5757e96acad6Smrg test "$enable_shared" = yes || enable_static=yes 5758e96acad6Smrg AC_MSG_RESULT([$enable_static]) 5759dbbd9e4bSmacallan 5760e96acad6Smrg _LT_CONFIG($1) 5761e96acad6Smrgfi 5762e96acad6SmrgAC_LANG_POP 5763e96acad6SmrgCC="$lt_save_CC" 5764e96acad6Smrg])# _LT_LANG_C_CONFIG 5765dbbd9e4bSmacallan 5766dbbd9e4bSmacallan 5767e96acad6Smrg# _LT_LANG_CXX_CONFIG([TAG]) 5768e96acad6Smrg# -------------------------- 5769e96acad6Smrg# Ensure that the configuration variables for a C++ compiler are suitably 5770e96acad6Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5771e96acad6Smrg# the compiler configuration to `libtool'. 5772e96acad6Smrgm4_defun([_LT_LANG_CXX_CONFIG], 5773e96acad6Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5774e96acad6Smrgm4_require([_LT_DECL_EGREP])dnl 5775e96acad6Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5776e96acad6Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5777e96acad6Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5778e96acad6Smrg (test "X$CXX" != "Xg++"))) ; then 5779e96acad6Smrg AC_PROG_CXXCPP 5780e96acad6Smrgelse 5781e96acad6Smrg _lt_caught_CXX_error=yes 5782e96acad6Smrgfi 5783dbbd9e4bSmacallan 5784e96acad6SmrgAC_LANG_PUSH(C++) 5785e96acad6Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5786e96acad6Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 5787e96acad6Smrg_LT_TAGVAR(always_export_symbols, $1)=no 5788e96acad6Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5789e96acad6Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 5790e96acad6Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5791e96acad6Smrg_LT_TAGVAR(hardcode_direct, $1)=no 5792e96acad6Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5793e96acad6Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5794e96acad6Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5795e96acad6Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5796e96acad6Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5797e96acad6Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5798e96acad6Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 5799e96acad6Smrg_LT_TAGVAR(inherit_rpath, $1)=no 5800e96acad6Smrg_LT_TAGVAR(module_cmds, $1)= 5801e96acad6Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 5802e96acad6Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5803e96acad6Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5804e96acad6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 5805e96acad6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5806e96acad6Smrg_LT_TAGVAR(no_undefined_flag, $1)= 5807e96acad6Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5808e96acad6Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5809dbbd9e4bSmacallan 5810e96acad6Smrg# Source file extension for C++ test sources. 5811e96acad6Smrgac_ext=cpp 5812e96acad6Smrg 5813e96acad6Smrg# Object file extension for compiled C++ test sources. 5814e96acad6Smrgobjext=o 5815e96acad6Smrg_LT_TAGVAR(objext, $1)=$objext 5816e96acad6Smrg 5817e96acad6Smrg# No sense in running all these tests if we already determined that 5818e96acad6Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 5819e96acad6Smrg# are currently assumed to apply to all compilers on this platform, 5820e96acad6Smrg# and will be corrupted by setting them based on a non-working compiler. 5821e96acad6Smrgif test "$_lt_caught_CXX_error" != yes; then 5822e96acad6Smrg # Code to be used in simple compile tests 5823e96acad6Smrg lt_simple_compile_test_code="int some_variable = 0;" 5824e96acad6Smrg 5825e96acad6Smrg # Code to be used in simple link tests 5826e96acad6Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5827e96acad6Smrg 5828e96acad6Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5829e96acad6Smrg _LT_TAG_COMPILER 5830e96acad6Smrg 5831e96acad6Smrg # save warnings/boilerplate of simple test code 5832e96acad6Smrg _LT_COMPILER_BOILERPLATE 5833e96acad6Smrg _LT_LINKER_BOILERPLATE 5834e96acad6Smrg 5835e96acad6Smrg # Allow CC to be a program name with arguments. 5836e96acad6Smrg lt_save_CC=$CC 5837e96acad6Smrg lt_save_CFLAGS=$CFLAGS 5838e96acad6Smrg lt_save_LD=$LD 5839e96acad6Smrg lt_save_GCC=$GCC 5840e96acad6Smrg GCC=$GXX 5841e96acad6Smrg lt_save_with_gnu_ld=$with_gnu_ld 5842e96acad6Smrg lt_save_path_LD=$lt_cv_path_LD 5843e96acad6Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5844e96acad6Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5845dbbd9e4bSmacallan else 5846e96acad6Smrg $as_unset lt_cv_prog_gnu_ld 5847dbbd9e4bSmacallan fi 5848e96acad6Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 5849e96acad6Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 5850dbbd9e4bSmacallan else 5851e96acad6Smrg $as_unset lt_cv_path_LD 5852dbbd9e4bSmacallan fi 5853e96acad6Smrg test -z "${LDCXX+set}" || LD=$LDCXX 5854e96acad6Smrg CC=${CXX-"c++"} 5855e96acad6Smrg CFLAGS=$CXXFLAGS 5856e96acad6Smrg compiler=$CC 5857e96acad6Smrg _LT_TAGVAR(compiler, $1)=$CC 5858e96acad6Smrg _LT_CC_BASENAME([$compiler]) 5859dbbd9e4bSmacallan 5860e96acad6Smrg if test -n "$compiler"; then 5861e96acad6Smrg # We don't want -fno-exception when compiling C++ code, so set the 5862e96acad6Smrg # no_builtin_flag separately 5863e96acad6Smrg if test "$GXX" = yes; then 5864e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5865e96acad6Smrg else 5866e96acad6Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5867e96acad6Smrg fi 5868dbbd9e4bSmacallan 5869e96acad6Smrg if test "$GXX" = yes; then 5870e96acad6Smrg # Set up default GNU C++ configuration 5871dbbd9e4bSmacallan 5872e96acad6Smrg LT_PATH_LD 5873dbbd9e4bSmacallan 5874e96acad6Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5875e96acad6Smrg # archiving commands below assume that GNU ld is being used. 5876e96acad6Smrg if test "$with_gnu_ld" = yes; then 5877e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5878e96acad6Smrg _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' 5879e96acad6Smrg 5880e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5881e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5882e96acad6Smrg 5883e96acad6Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5884e96acad6Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5885e96acad6Smrg # investigate it a little bit more. (MM) 5886e96acad6Smrg wlarc='${wl}' 5887e96acad6Smrg 5888e96acad6Smrg # ancient GNU ld didn't support --whole-archive et. al. 5889e96acad6Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5890e96acad6Smrg $GREP 'no-whole-archive' > /dev/null; then 5891e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5892e96acad6Smrg else 5893e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5894e96acad6Smrg fi 5895e96acad6Smrg else 5896e96acad6Smrg with_gnu_ld=no 5897e96acad6Smrg wlarc= 5898e96acad6Smrg 5899e96acad6Smrg # A generic and very simple default shared library creation 5900e96acad6Smrg # command for GNU C++ for the case where it uses the native 5901e96acad6Smrg # linker, instead of GNU ld. If possible, this setting should 5902e96acad6Smrg # overridden to take advantage of the native linker features on 5903e96acad6Smrg # the platform it is being used on. 5904e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5905dbbd9e4bSmacallan fi 5906e96acad6Smrg 5907e96acad6Smrg # Commands to make compiler produce verbose output that lists 5908e96acad6Smrg # what "hidden" libraries, object files and flags are used when 5909e96acad6Smrg # linking a shared library. 5910e96acad6Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5911e96acad6Smrg 5912e96acad6Smrg else 5913e96acad6Smrg GXX=no 5914e96acad6Smrg with_gnu_ld=no 5915e96acad6Smrg wlarc= 5916e96acad6Smrg fi 5917e96acad6Smrg 5918e96acad6Smrg # PORTME: fill in a description of your system's C++ link characteristics 5919e96acad6Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5920e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5921dbbd9e4bSmacallan case $host_os in 5922e96acad6Smrg aix3*) 5923e96acad6Smrg # FIXME: insert proper C++ library support 5924e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5925e96acad6Smrg ;; 5926dbbd9e4bSmacallan aix[[4-9]]*) 5927e96acad6Smrg if test "$host_cpu" = ia64; then 5928e96acad6Smrg # On IA64, the linker does run time linking by default, so we don't 5929e96acad6Smrg # have to do anything special. 5930e96acad6Smrg aix_use_runtimelinking=no 5931e96acad6Smrg exp_sym_flag='-Bexport' 5932e96acad6Smrg no_entry_flag="" 5933e96acad6Smrg else 5934e96acad6Smrg aix_use_runtimelinking=no 5935e96acad6Smrg 5936e96acad6Smrg # Test if we are trying to use run time linking or normal 5937e96acad6Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5938e96acad6Smrg # need to do runtime linking. 5939e96acad6Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5940e96acad6Smrg for ld_flag in $LDFLAGS; do 5941e96acad6Smrg case $ld_flag in 5942e96acad6Smrg *-brtl*) 5943e96acad6Smrg aix_use_runtimelinking=yes 5944e96acad6Smrg break 5945e96acad6Smrg ;; 5946e96acad6Smrg esac 5947e96acad6Smrg done 5948e96acad6Smrg ;; 5949e96acad6Smrg esac 5950e96acad6Smrg 5951e96acad6Smrg exp_sym_flag='-bexport' 5952e96acad6Smrg no_entry_flag='-bnoentry' 5953e96acad6Smrg fi 5954e96acad6Smrg 5955e96acad6Smrg # When large executables or shared objects are built, AIX ld can 5956e96acad6Smrg # have problems creating the table of contents. If linking a library 5957e96acad6Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5958e96acad6Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5959e96acad6Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5960e96acad6Smrg 5961e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='' 5962e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5963e96acad6Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5964e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5965e96acad6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5966e96acad6Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5967e96acad6Smrg 5968e96acad6Smrg if test "$GXX" = yes; then 5969e96acad6Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5970e96acad6Smrg # We only want to do this on AIX 4.2 and lower, the check 5971e96acad6Smrg # below for broken collect2 doesn't work under 4.3+ 5972e96acad6Smrg collect2name=`${CC} -print-prog-name=collect2` 5973e96acad6Smrg if test -f "$collect2name" && 5974e96acad6Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5975e96acad6Smrg then 5976e96acad6Smrg # We have reworked collect2 5977e96acad6Smrg : 5978e96acad6Smrg else 5979e96acad6Smrg # We have old collect2 5980e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5981e96acad6Smrg # It fails to find uninstalled libraries when the uninstalled 5982e96acad6Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5983e96acad6Smrg # to unsupported forces relinking 5984e96acad6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5985e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5986e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5987e96acad6Smrg fi 5988e96acad6Smrg esac 5989e96acad6Smrg shared_flag='-shared' 5990e96acad6Smrg if test "$aix_use_runtimelinking" = yes; then 5991e96acad6Smrg shared_flag="$shared_flag "'${wl}-G' 5992e96acad6Smrg fi 5993e96acad6Smrg else 5994e96acad6Smrg # not using gcc 5995e96acad6Smrg if test "$host_cpu" = ia64; then 5996e96acad6Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5997e96acad6Smrg # chokes on -Wl,-G. The following line is correct: 5998e96acad6Smrg shared_flag='-G' 5999e96acad6Smrg else 6000e96acad6Smrg if test "$aix_use_runtimelinking" = yes; then 6001e96acad6Smrg shared_flag='${wl}-G' 6002e96acad6Smrg else 6003e96acad6Smrg shared_flag='${wl}-bM:SRE' 6004e96acad6Smrg fi 6005e96acad6Smrg fi 6006e96acad6Smrg fi 6007e96acad6Smrg 6008e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6009e96acad6Smrg # It seems that -bexpall does not export symbols beginning with 6010e96acad6Smrg # underscore (_), so it is better to generate a list of symbols to 6011e96acad6Smrg # export. 6012e96acad6Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6013e96acad6Smrg if test "$aix_use_runtimelinking" = yes; then 6014e96acad6Smrg # Warning - without using the other runtime loading flags (-brtl), 6015e96acad6Smrg # -berok will link without error, but may produce a broken library. 6016e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6017e96acad6Smrg # Determine the default libpath from the value encoded in an empty 6018e96acad6Smrg # executable. 6019e96acad6Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6020e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6021e96acad6Smrg 6022e96acad6Smrg _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" 6023e96acad6Smrg else 6024e96acad6Smrg if test "$host_cpu" = ia64; then 6025e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6026e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6027e96acad6Smrg _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" 6028e96acad6Smrg else 6029e96acad6Smrg # Determine the default libpath from the value encoded in an 6030e96acad6Smrg # empty executable. 6031e96acad6Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6032e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6033e96acad6Smrg # Warning - without using the other run time loading flags, 6034e96acad6Smrg # -berok will link without error, but may produce a broken library. 6035e96acad6Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6036e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6037e96acad6Smrg if test "$with_gnu_ld" = yes; then 6038e96acad6Smrg # We only use this code for GNU lds that support --whole-archive. 6039e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6040e96acad6Smrg else 6041e96acad6Smrg # Exported symbols can be pulled into shared objects from archives 6042e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6043e96acad6Smrg fi 6044e96acad6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6045e96acad6Smrg # This is similar to how AIX traditionally builds its shared 6046e96acad6Smrg # libraries. 6047e96acad6Smrg _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' 6048e96acad6Smrg fi 6049e96acad6Smrg fi 6050e96acad6Smrg ;; 6051e96acad6Smrg 6052e96acad6Smrg beos*) 6053e96acad6Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6054e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6055e96acad6Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6056e96acad6Smrg # support --undefined. This deserves some investigation. FIXME 6057e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6058dbbd9e4bSmacallan else 6059e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6060dbbd9e4bSmacallan fi 6061dbbd9e4bSmacallan ;; 6062e96acad6Smrg 6063dbbd9e4bSmacallan chorus*) 6064e96acad6Smrg case $cc_basename in 6065e96acad6Smrg *) 6066e96acad6Smrg # FIXME: insert proper C++ library support 6067e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6068e96acad6Smrg ;; 6069e96acad6Smrg esac 6070e96acad6Smrg ;; 6071e96acad6Smrg 6072e96acad6Smrg cygwin* | mingw* | pw32* | cegcc*) 6073e96acad6Smrg case $GXX,$cc_basename in 6074e96acad6Smrg ,cl* | no,cl*) 6075e96acad6Smrg # Native MSVC 6076e96acad6Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6077e96acad6Smrg # no search path for DLLs. 6078e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6079e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6080e96acad6Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6081e96acad6Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6082e96acad6Smrg # Tell ltmain to make .lib files, not .a files. 6083e96acad6Smrg libext=lib 6084e96acad6Smrg # Tell ltmain to make .dll files, not .so files. 6085e96acad6Smrg shrext_cmds=".dll" 6086e96acad6Smrg # FIXME: Setting linknames here is a bad hack. 6087e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6088e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6089e96acad6Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6090e96acad6Smrg else 6091e96acad6Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6092e96acad6Smrg fi~ 6093e96acad6Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6094e96acad6Smrg linknames=' 6095e96acad6Smrg # The linker will not automatically build a static lib if we build a DLL. 6096e96acad6Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6097e96acad6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6098e96acad6Smrg # Don't use ranlib 6099e96acad6Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6100e96acad6Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6101e96acad6Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6102e96acad6Smrg case $lt_outputfile in 6103e96acad6Smrg *.exe|*.EXE) ;; 6104e96acad6Smrg *) 6105e96acad6Smrg lt_outputfile="$lt_outputfile.exe" 6106e96acad6Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6107e96acad6Smrg ;; 6108e96acad6Smrg esac~ 6109e96acad6Smrg func_to_tool_file "$lt_outputfile"~ 6110e96acad6Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6111e96acad6Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6112e96acad6Smrg $RM "$lt_outputfile.manifest"; 6113e96acad6Smrg fi' 6114e96acad6Smrg ;; 6115e96acad6Smrg *) 6116e96acad6Smrg # g++ 6117e96acad6Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6118e96acad6Smrg # as there is no search path for DLLs. 6119e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6120e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6121e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6122e96acad6Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6123e96acad6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6124e96acad6Smrg 6125e96acad6Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6126e96acad6Smrg _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' 6127e96acad6Smrg # If the export-symbols file already is a .def file (1st line 6128e96acad6Smrg # is EXPORTS), use it as is; otherwise, prepend... 6129e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6130e96acad6Smrg cp $export_symbols $output_objdir/$soname.def; 6131e96acad6Smrg else 6132e96acad6Smrg echo EXPORTS > $output_objdir/$soname.def; 6133e96acad6Smrg cat $export_symbols >> $output_objdir/$soname.def; 6134e96acad6Smrg fi~ 6135e96acad6Smrg $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' 6136e96acad6Smrg else 6137e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6138e96acad6Smrg fi 6139dbbd9e4bSmacallan ;; 6140dbbd9e4bSmacallan esac 6141dbbd9e4bSmacallan ;; 6142e96acad6Smrg darwin* | rhapsody*) 6143e96acad6Smrg _LT_DARWIN_LINKER_FEATURES($1) 6144e96acad6Smrg ;; 6145e96acad6Smrg 6146dbbd9e4bSmacallan dgux*) 6147e96acad6Smrg case $cc_basename in 6148e96acad6Smrg ec++*) 6149e96acad6Smrg # FIXME: insert proper C++ library support 6150e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6151dbbd9e4bSmacallan ;; 6152e96acad6Smrg ghcx*) 6153dbbd9e4bSmacallan # Green Hills C++ Compiler 6154e96acad6Smrg # FIXME: insert proper C++ library support 6155e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6156dbbd9e4bSmacallan ;; 6157e96acad6Smrg *) 6158e96acad6Smrg # FIXME: insert proper C++ library support 6159e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6160dbbd9e4bSmacallan ;; 6161e96acad6Smrg esac 6162e96acad6Smrg ;; 6163e96acad6Smrg 6164e96acad6Smrg freebsd[[12]]*) 6165e96acad6Smrg # C++ shared libraries reported to be fairly broken before 6166e96acad6Smrg # switch to ELF 6167e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6168e96acad6Smrg ;; 6169e96acad6Smrg 6170e96acad6Smrg freebsd-elf*) 6171e96acad6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6172e96acad6Smrg ;; 6173e96acad6Smrg 6174dbbd9e4bSmacallan freebsd* | dragonfly*) 6175e96acad6Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6176e96acad6Smrg # conventions 6177e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6178e96acad6Smrg ;; 6179e96acad6Smrg 6180e96acad6Smrg gnu*) 6181e96acad6Smrg ;; 6182e96acad6Smrg 6183e96acad6Smrg haiku*) 6184e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6185e96acad6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6186e96acad6Smrg ;; 6187e96acad6Smrg 6188e96acad6Smrg hpux9*) 6189e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6190e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6191e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6192e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6193e96acad6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6194e96acad6Smrg # but as the default 6195e96acad6Smrg # location of the library. 6196e96acad6Smrg 6197e96acad6Smrg case $cc_basename in 6198e96acad6Smrg CC*) 6199e96acad6Smrg # FIXME: insert proper C++ library support 6200e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6201e96acad6Smrg ;; 6202e96acad6Smrg aCC*) 6203e96acad6Smrg _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' 6204e96acad6Smrg # Commands to make compiler produce verbose output that lists 6205e96acad6Smrg # what "hidden" libraries, object files and flags are used when 6206e96acad6Smrg # linking a shared library. 6207e96acad6Smrg # 6208e96acad6Smrg # There doesn't appear to be a way to prevent this compiler from 6209e96acad6Smrg # explicitly linking system object files so we need to strip them 6210e96acad6Smrg # from the output so that they don't get included in the library 6211e96acad6Smrg # dependencies. 6212e96acad6Smrg 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"' 6213e96acad6Smrg ;; 6214e96acad6Smrg *) 6215e96acad6Smrg if test "$GXX" = yes; then 6216e96acad6Smrg _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' 6217e96acad6Smrg else 6218e96acad6Smrg # FIXME: insert proper C++ library support 6219e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6220e96acad6Smrg fi 6221e96acad6Smrg ;; 6222e96acad6Smrg esac 6223e96acad6Smrg ;; 6224e96acad6Smrg 6225e96acad6Smrg hpux10*|hpux11*) 6226e96acad6Smrg if test $with_gnu_ld = no; then 6227e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6228e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6229e96acad6Smrg 6230e96acad6Smrg case $host_cpu in 6231e96acad6Smrg hppa*64*|ia64*) 6232e96acad6Smrg ;; 6233e96acad6Smrg *) 6234e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6235e96acad6Smrg ;; 6236e96acad6Smrg esac 6237e96acad6Smrg fi 6238e96acad6Smrg case $host_cpu in 6239e96acad6Smrg hppa*64*|ia64*) 6240e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6241e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6242e96acad6Smrg ;; 6243e96acad6Smrg *) 6244e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6245e96acad6Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6246e96acad6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6247e96acad6Smrg # but as the default 6248e96acad6Smrg # location of the library. 6249e96acad6Smrg ;; 6250e96acad6Smrg esac 6251e96acad6Smrg 6252e96acad6Smrg case $cc_basename in 6253e96acad6Smrg CC*) 6254e96acad6Smrg # FIXME: insert proper C++ library support 6255e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6256dbbd9e4bSmacallan ;; 6257e96acad6Smrg aCC*) 6258dbbd9e4bSmacallan case $host_cpu in 6259e96acad6Smrg hppa*64*) 6260e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6261e96acad6Smrg ;; 6262e96acad6Smrg ia64*) 6263e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6264e96acad6Smrg ;; 6265e96acad6Smrg *) 6266e96acad6Smrg _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' 6267e96acad6Smrg ;; 6268dbbd9e4bSmacallan esac 6269e96acad6Smrg # Commands to make compiler produce verbose output that lists 6270e96acad6Smrg # what "hidden" libraries, object files and flags are used when 6271e96acad6Smrg # linking a shared library. 6272e96acad6Smrg # 6273e96acad6Smrg # There doesn't appear to be a way to prevent this compiler from 6274e96acad6Smrg # explicitly linking system object files so we need to strip them 6275e96acad6Smrg # from the output so that they don't get included in the library 6276e96acad6Smrg # dependencies. 6277e96acad6Smrg 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"' 6278dbbd9e4bSmacallan ;; 6279e96acad6Smrg *) 6280e96acad6Smrg if test "$GXX" = yes; then 6281e96acad6Smrg if test $with_gnu_ld = no; then 6282e96acad6Smrg case $host_cpu in 6283e96acad6Smrg hppa*64*) 6284e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6285e96acad6Smrg ;; 6286e96acad6Smrg ia64*) 6287e96acad6Smrg _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' 6288e96acad6Smrg ;; 6289e96acad6Smrg *) 6290e96acad6Smrg _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' 6291e96acad6Smrg ;; 6292e96acad6Smrg esac 6293e96acad6Smrg fi 6294e96acad6Smrg else 6295e96acad6Smrg # FIXME: insert proper C++ library support 6296e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6297e96acad6Smrg fi 6298dbbd9e4bSmacallan ;; 6299e96acad6Smrg esac 6300e96acad6Smrg ;; 6301e96acad6Smrg 6302e96acad6Smrg interix[[3-9]]*) 6303e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6304e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6305e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6306e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6307e96acad6Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6308e96acad6Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6309e96acad6Smrg # default) and relocated if they conflict, which is a slow very memory 6310e96acad6Smrg # consuming and fragmenting process. To avoid this, we pick a random, 6311e96acad6Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6312e96acad6Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6313e96acad6Smrg _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' 6314e96acad6Smrg _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' 6315dbbd9e4bSmacallan ;; 6316e96acad6Smrg irix5* | irix6*) 6317e96acad6Smrg case $cc_basename in 6318e96acad6Smrg CC*) 6319e96acad6Smrg # SGI C++ 6320e96acad6Smrg _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' 6321e96acad6Smrg 6322e96acad6Smrg # Archives containing C++ object files must be created using 6323e96acad6Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6324e96acad6Smrg # necessary to make sure instantiated templates are included 6325e96acad6Smrg # in the archive. 6326e96acad6Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6327dbbd9e4bSmacallan ;; 6328e96acad6Smrg *) 6329e96acad6Smrg if test "$GXX" = yes; then 6330e96acad6Smrg if test "$with_gnu_ld" = no; then 6331e96acad6Smrg _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' 6332e96acad6Smrg else 6333e96acad6Smrg _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' 6334e96acad6Smrg fi 6335e96acad6Smrg fi 6336e96acad6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6337dbbd9e4bSmacallan ;; 6338e96acad6Smrg esac 6339e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6340e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6341e96acad6Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 6342e96acad6Smrg ;; 6343e96acad6Smrg 6344e96acad6Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6345e96acad6Smrg case $cc_basename in 6346e96acad6Smrg KCC*) 6347e96acad6Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6348e96acad6Smrg 6349e96acad6Smrg # KCC will only create a shared library if the output file 6350e96acad6Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6351e96acad6Smrg # to its proper name (with version) after linking. 6352e96acad6Smrg _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' 6353e96acad6Smrg _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' 6354e96acad6Smrg # Commands to make compiler produce verbose output that lists 6355e96acad6Smrg # what "hidden" libraries, object files and flags are used when 6356e96acad6Smrg # linking a shared library. 6357e96acad6Smrg # 6358e96acad6Smrg # There doesn't appear to be a way to prevent this compiler from 6359e96acad6Smrg # explicitly linking system object files so we need to strip them 6360e96acad6Smrg # from the output so that they don't get included in the library 6361e96acad6Smrg # dependencies. 6362e96acad6Smrg 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"' 6363e96acad6Smrg 6364e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6365e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6366e96acad6Smrg 6367e96acad6Smrg # Archives containing C++ object files must be created using 6368e96acad6Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6369e96acad6Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6370dbbd9e4bSmacallan ;; 6371e96acad6Smrg icpc* | ecpc* ) 6372dbbd9e4bSmacallan # Intel C++ 6373e96acad6Smrg with_gnu_ld=yes 6374e96acad6Smrg # version 8.0 and above of icpc choke on multiply defined symbols 6375e96acad6Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6376e96acad6Smrg # earlier do not add the objects themselves. 6377e96acad6Smrg case `$CC -V 2>&1` in 6378e96acad6Smrg *"Version 7."*) 6379e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6380e96acad6Smrg _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' 6381e96acad6Smrg ;; 6382e96acad6Smrg *) # Version 8.0 or newer 6383e96acad6Smrg tmp_idyn= 6384e96acad6Smrg case $host_cpu in 6385e96acad6Smrg ia64*) tmp_idyn=' -i_dynamic';; 6386e96acad6Smrg esac 6387e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6388e96acad6Smrg _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' 6389e96acad6Smrg ;; 6390e96acad6Smrg esac 6391e96acad6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6392e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6393e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6394e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6395dbbd9e4bSmacallan ;; 6396e96acad6Smrg pgCC* | pgcpp*) 6397e96acad6Smrg # Portland Group C++ compiler 6398e96acad6Smrg case `$CC -V` in 6399e96acad6Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6400e96acad6Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6401e96acad6Smrg rm -rf $tpldir~ 6402e96acad6Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6403e96acad6Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6404e96acad6Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6405e96acad6Smrg rm -rf $tpldir~ 6406e96acad6Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6407e96acad6Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6408e96acad6Smrg $RANLIB $oldlib' 6409e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6410e96acad6Smrg rm -rf $tpldir~ 6411e96acad6Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6412e96acad6Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6413e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6414e96acad6Smrg rm -rf $tpldir~ 6415e96acad6Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6416e96acad6Smrg $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' 6417e96acad6Smrg ;; 6418e96acad6Smrg *) # Version 6 and above use weak symbols 6419e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6420e96acad6Smrg _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' 6421e96acad6Smrg ;; 6422e96acad6Smrg esac 6423e96acad6Smrg 6424e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6425e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6426e96acad6Smrg _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' 6427e96acad6Smrg ;; 6428dbbd9e4bSmacallan cxx*) 6429dbbd9e4bSmacallan # Compaq C++ 6430e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6431e96acad6Smrg _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' 6432e96acad6Smrg 6433e96acad6Smrg runpath_var=LD_RUN_PATH 6434e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6435e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6436e96acad6Smrg 6437e96acad6Smrg # Commands to make compiler produce verbose output that lists 6438e96acad6Smrg # what "hidden" libraries, object files and flags are used when 6439e96acad6Smrg # linking a shared library. 6440e96acad6Smrg # 6441e96acad6Smrg # There doesn't appear to be a way to prevent this compiler from 6442e96acad6Smrg # explicitly linking system object files so we need to strip them 6443e96acad6Smrg # from the output so that they don't get included in the library 6444e96acad6Smrg # dependencies. 6445e96acad6Smrg 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' 6446e96acad6Smrg ;; 6447e96acad6Smrg xl* | mpixl* | bgxl*) 6448e96acad6Smrg # IBM XL 8.0 on PPC, with GNU ld 6449e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6450e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6451e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6452e96acad6Smrg if test "x$supports_anon_versioning" = xyes; then 6453e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6454e96acad6Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6455e96acad6Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6456e96acad6Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6457e96acad6Smrg fi 6458dbbd9e4bSmacallan ;; 6459dbbd9e4bSmacallan *) 6460dbbd9e4bSmacallan case `$CC -V 2>&1 | sed 5q` in 6461dbbd9e4bSmacallan *Sun\ C*) 6462dbbd9e4bSmacallan # Sun C++ 5.9 6463e96acad6Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6464e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6465e96acad6Smrg _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' 6466e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6467e96acad6Smrg _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' 6468e96acad6Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6469e96acad6Smrg 6470e96acad6Smrg # Not sure whether something based on 6471e96acad6Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6472e96acad6Smrg # would be better. 6473e96acad6Smrg output_verbose_link_cmd='func_echo_all' 6474e96acad6Smrg 6475e96acad6Smrg # Archives containing C++ object files must be created using 6476e96acad6Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6477e96acad6Smrg # necessary to make sure instantiated templates are included 6478e96acad6Smrg # in the archive. 6479e96acad6Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6480dbbd9e4bSmacallan ;; 6481dbbd9e4bSmacallan esac 6482dbbd9e4bSmacallan ;; 6483dbbd9e4bSmacallan esac 6484dbbd9e4bSmacallan ;; 6485e96acad6Smrg 6486dbbd9e4bSmacallan lynxos*) 6487e96acad6Smrg # FIXME: insert proper C++ library support 6488e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6489dbbd9e4bSmacallan ;; 6490e96acad6Smrg 6491dbbd9e4bSmacallan m88k*) 6492e96acad6Smrg # FIXME: insert proper C++ library support 6493e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6494dbbd9e4bSmacallan ;; 6495e96acad6Smrg 6496dbbd9e4bSmacallan mvs*) 6497e96acad6Smrg case $cc_basename in 6498e96acad6Smrg cxx*) 6499e96acad6Smrg # FIXME: insert proper C++ library support 6500e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6501dbbd9e4bSmacallan ;; 6502dbbd9e4bSmacallan *) 6503e96acad6Smrg # FIXME: insert proper C++ library support 6504e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6505dbbd9e4bSmacallan ;; 6506dbbd9e4bSmacallan esac 6507dbbd9e4bSmacallan ;; 6508e96acad6Smrg 6509dbbd9e4bSmacallan netbsd*) 6510e96acad6Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6511e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6512e96acad6Smrg wlarc= 6513e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6514e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6515e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6516e96acad6Smrg fi 6517e96acad6Smrg # Workaround some broken pre-1.5 toolchains 6518e96acad6Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6519e96acad6Smrg ;; 6520e96acad6Smrg 6521e96acad6Smrg *nto* | *qnx*) 6522e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6523e96acad6Smrg ;; 6524e96acad6Smrg 6525e96acad6Smrg openbsd2*) 6526e96acad6Smrg # C++ shared libraries are fairly broken 6527e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6528e96acad6Smrg ;; 6529e96acad6Smrg 6530e96acad6Smrg openbsd*) 6531e96acad6Smrg if test -f /usr/libexec/ld.so; then 6532e96acad6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6533e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6534e96acad6Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6535e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6536e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6537e96acad6Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6538e96acad6Smrg _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' 6539e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6540e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6541e96acad6Smrg fi 6542e96acad6Smrg output_verbose_link_cmd=func_echo_all 6543e96acad6Smrg else 6544e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6545e96acad6Smrg fi 6546dbbd9e4bSmacallan ;; 6547e96acad6Smrg 6548dbbd9e4bSmacallan osf3* | osf4* | osf5*) 6549e96acad6Smrg case $cc_basename in 6550e96acad6Smrg KCC*) 6551e96acad6Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6552e96acad6Smrg 6553e96acad6Smrg # KCC will only create a shared library if the output file 6554e96acad6Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6555e96acad6Smrg # to its proper name (with version) after linking. 6556e96acad6Smrg _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' 6557e96acad6Smrg 6558e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6559e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6560e96acad6Smrg 6561e96acad6Smrg # Archives containing C++ object files must be created using 6562e96acad6Smrg # the KAI C++ compiler. 6563e96acad6Smrg case $host in 6564e96acad6Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6565e96acad6Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6566e96acad6Smrg esac 6567dbbd9e4bSmacallan ;; 6568e96acad6Smrg RCC*) 6569dbbd9e4bSmacallan # Rational C++ 2.4.1 6570e96acad6Smrg # FIXME: insert proper C++ library support 6571e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6572dbbd9e4bSmacallan ;; 6573e96acad6Smrg cxx*) 6574e96acad6Smrg case $host in 6575e96acad6Smrg osf3*) 6576e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6577e96acad6Smrg _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' 6578e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6579e96acad6Smrg ;; 6580e96acad6Smrg *) 6581e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6582e96acad6Smrg _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' 6583e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6584e96acad6Smrg echo "-hidden">> $lib.exp~ 6585e96acad6Smrg $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~ 6586e96acad6Smrg $RM $lib.exp' 6587e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6588e96acad6Smrg ;; 6589e96acad6Smrg esac 6590e96acad6Smrg 6591e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6592e96acad6Smrg 6593e96acad6Smrg # Commands to make compiler produce verbose output that lists 6594e96acad6Smrg # what "hidden" libraries, object files and flags are used when 6595e96acad6Smrg # linking a shared library. 6596e96acad6Smrg # 6597e96acad6Smrg # There doesn't appear to be a way to prevent this compiler from 6598e96acad6Smrg # explicitly linking system object files so we need to strip them 6599e96acad6Smrg # from the output so that they don't get included in the library 6600e96acad6Smrg # dependencies. 6601e96acad6Smrg 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"' 6602dbbd9e4bSmacallan ;; 6603dbbd9e4bSmacallan *) 6604e96acad6Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6605e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6606e96acad6Smrg case $host in 6607e96acad6Smrg osf3*) 6608e96acad6Smrg _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' 6609e96acad6Smrg ;; 6610e96acad6Smrg *) 6611e96acad6Smrg _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' 6612e96acad6Smrg ;; 6613e96acad6Smrg esac 6614e96acad6Smrg 6615e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6616e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6617e96acad6Smrg 6618e96acad6Smrg # Commands to make compiler produce verbose output that lists 6619e96acad6Smrg # what "hidden" libraries, object files and flags are used when 6620e96acad6Smrg # linking a shared library. 6621e96acad6Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6622e96acad6Smrg 6623e96acad6Smrg else 6624e96acad6Smrg # FIXME: insert proper C++ library support 6625e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6626e96acad6Smrg fi 6627dbbd9e4bSmacallan ;; 6628e96acad6Smrg esac 6629e96acad6Smrg ;; 6630e96acad6Smrg 6631dbbd9e4bSmacallan psos*) 6632e96acad6Smrg # FIXME: insert proper C++ library support 6633e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6634e96acad6Smrg ;; 6635e96acad6Smrg 6636dbbd9e4bSmacallan sunos4*) 6637e96acad6Smrg case $cc_basename in 6638e96acad6Smrg CC*) 6639dbbd9e4bSmacallan # Sun C++ 4.x 6640e96acad6Smrg # FIXME: insert proper C++ library support 6641e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6642dbbd9e4bSmacallan ;; 6643e96acad6Smrg lcc*) 6644dbbd9e4bSmacallan # Lucid 6645e96acad6Smrg # FIXME: insert proper C++ library support 6646e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6647dbbd9e4bSmacallan ;; 6648e96acad6Smrg *) 6649e96acad6Smrg # FIXME: insert proper C++ library support 6650e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6651dbbd9e4bSmacallan ;; 6652e96acad6Smrg esac 6653e96acad6Smrg ;; 6654dbbd9e4bSmacallan 6655e96acad6Smrg solaris*) 6656e96acad6Smrg case $cc_basename in 6657e96acad6Smrg CC* | sunCC*) 6658e96acad6Smrg # Sun C++ 4.2, 5.x and Centerline C++ 6659e96acad6Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6660e96acad6Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6661e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6662e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6663e96acad6Smrg $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' 6664e96acad6Smrg 6665e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6666e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6667e96acad6Smrg case $host_os in 6668e96acad6Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6669e96acad6Smrg *) 6670e96acad6Smrg # The compiler driver will combine and reorder linker options, 6671e96acad6Smrg # but understands `-z linker_flag'. 6672e96acad6Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6673e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6674e96acad6Smrg ;; 6675e96acad6Smrg esac 6676e96acad6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6677dbbd9e4bSmacallan 6678e96acad6Smrg output_verbose_link_cmd='func_echo_all' 6679dbbd9e4bSmacallan 6680e96acad6Smrg # Archives containing C++ object files must be created using 6681e96acad6Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6682e96acad6Smrg # necessary to make sure instantiated templates are included 6683e96acad6Smrg # in the archive. 6684e96acad6Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6685e96acad6Smrg ;; 6686e96acad6Smrg gcx*) 6687e96acad6Smrg # Green Hills C++ Compiler 6688e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6689dbbd9e4bSmacallan 6690e96acad6Smrg # The C++ compiler must be used to create the archive. 6691e96acad6Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6692e96acad6Smrg ;; 6693e96acad6Smrg *) 6694e96acad6Smrg # GNU C++ compiler with Solaris linker 6695e96acad6Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6696e96acad6Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6697e96acad6Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6698e96acad6Smrg _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' 6699e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6700e96acad6Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6701e96acad6Smrg 6702e96acad6Smrg # Commands to make compiler produce verbose output that lists 6703e96acad6Smrg # what "hidden" libraries, object files and flags are used when 6704e96acad6Smrg # linking a shared library. 6705e96acad6Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6706e96acad6Smrg else 6707e96acad6Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6708e96acad6Smrg # platform. 6709e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6710e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6711e96acad6Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6712e96acad6Smrg 6713e96acad6Smrg # Commands to make compiler produce verbose output that lists 6714e96acad6Smrg # what "hidden" libraries, object files and flags are used when 6715e96acad6Smrg # linking a shared library. 6716e96acad6Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6717e96acad6Smrg fi 6718e96acad6Smrg 6719e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6720e96acad6Smrg case $host_os in 6721e96acad6Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6722e96acad6Smrg *) 6723e96acad6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6724e96acad6Smrg ;; 6725e96acad6Smrg esac 6726e96acad6Smrg fi 6727e96acad6Smrg ;; 6728e96acad6Smrg esac 6729e96acad6Smrg ;; 6730dbbd9e4bSmacallan 6731e96acad6Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6732e96acad6Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6733e96acad6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6734e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6735e96acad6Smrg runpath_var='LD_RUN_PATH' 6736dbbd9e4bSmacallan 6737dbbd9e4bSmacallan case $cc_basename in 6738e96acad6Smrg CC*) 6739e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6740e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6741e96acad6Smrg ;; 6742e96acad6Smrg *) 6743e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6744e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6745e96acad6Smrg ;; 6746dbbd9e4bSmacallan esac 6747dbbd9e4bSmacallan ;; 6748dbbd9e4bSmacallan 6749e96acad6Smrg sysv5* | sco3.2v5* | sco5v6*) 6750e96acad6Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6751e96acad6Smrg # link with -lc, and that would cause any symbols used from libc to 6752e96acad6Smrg # always be unresolved, which means just about no library would 6753e96acad6Smrg # ever link correctly. If we're not using GNU ld we use -z text 6754e96acad6Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6755e96acad6Smrg # as -z defs. 6756e96acad6Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6757e96acad6Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6758e96acad6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6759e96acad6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6760e96acad6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6761e96acad6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6762e96acad6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6763e96acad6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6764e96acad6Smrg runpath_var='LD_RUN_PATH' 6765dbbd9e4bSmacallan 6766e96acad6Smrg case $cc_basename in 6767e96acad6Smrg CC*) 6768e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6769e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6770e96acad6Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6771e96acad6Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 6772e96acad6Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6773e96acad6Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 6774e96acad6Smrg ;; 6775e96acad6Smrg *) 6776e96acad6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6777e96acad6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6778e96acad6Smrg ;; 6779e96acad6Smrg esac 6780dbbd9e4bSmacallan ;; 6781dbbd9e4bSmacallan 6782e96acad6Smrg tandem*) 6783e96acad6Smrg case $cc_basename in 6784e96acad6Smrg NCC*) 6785e96acad6Smrg # NonStop-UX NCC 3.20 6786e96acad6Smrg # FIXME: insert proper C++ library support 6787e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6788e96acad6Smrg ;; 6789e96acad6Smrg *) 6790e96acad6Smrg # FIXME: insert proper C++ library support 6791e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6792e96acad6Smrg ;; 6793e96acad6Smrg esac 6794e96acad6Smrg ;; 6795dbbd9e4bSmacallan 6796e96acad6Smrg vxworks*) 6797e96acad6Smrg # FIXME: insert proper C++ library support 6798e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6799e96acad6Smrg ;; 6800dbbd9e4bSmacallan 6801e96acad6Smrg *) 6802e96acad6Smrg # FIXME: insert proper C++ library support 6803e96acad6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6804e96acad6Smrg ;; 6805dbbd9e4bSmacallan esac 6806dbbd9e4bSmacallan 6807e96acad6Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6808e96acad6Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6809e96acad6Smrg 6810e96acad6Smrg _LT_TAGVAR(GCC, $1)="$GXX" 6811e96acad6Smrg _LT_TAGVAR(LD, $1)="$LD" 6812e96acad6Smrg 6813e96acad6Smrg ## CAVEAT EMPTOR: 6814e96acad6Smrg ## There is no encapsulation within the following macros, do not change 6815e96acad6Smrg ## the running order or otherwise move them around unless you know exactly 6816e96acad6Smrg ## what you are doing... 6817e96acad6Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 6818e96acad6Smrg _LT_COMPILER_PIC($1) 6819e96acad6Smrg _LT_COMPILER_C_O($1) 6820e96acad6Smrg _LT_COMPILER_FILE_LOCKS($1) 6821e96acad6Smrg _LT_LINKER_SHLIBS($1) 6822e96acad6Smrg _LT_SYS_DYNAMIC_LINKER($1) 6823e96acad6Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6824e96acad6Smrg 6825e96acad6Smrg _LT_CONFIG($1) 6826e96acad6Smrg fi # test -n "$compiler" 6827e96acad6Smrg 6828e96acad6Smrg CC=$lt_save_CC 6829e96acad6Smrg CFLAGS=$lt_save_CFLAGS 6830e96acad6Smrg LDCXX=$LD 6831e96acad6Smrg LD=$lt_save_LD 6832e96acad6Smrg GCC=$lt_save_GCC 6833e96acad6Smrg with_gnu_ld=$lt_save_with_gnu_ld 6834e96acad6Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 6835e96acad6Smrg lt_cv_path_LD=$lt_save_path_LD 6836e96acad6Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6837e96acad6Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6838e96acad6Smrgfi # test "$_lt_caught_CXX_error" != yes 6839dbbd9e4bSmacallan 6840e96acad6SmrgAC_LANG_POP 6841e96acad6Smrg])# _LT_LANG_CXX_CONFIG 6842dbbd9e4bSmacallan 6843dbbd9e4bSmacallan 6844e96acad6Smrg# _LT_FUNC_STRIPNAME_CNF 6845e96acad6Smrg# ---------------------- 6846e96acad6Smrg# func_stripname_cnf prefix suffix name 6847e96acad6Smrg# strip PREFIX and SUFFIX off of NAME. 6848e96acad6Smrg# PREFIX and SUFFIX must not contain globbing or regex special 6849e96acad6Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 6850e96acad6Smrg# dot (in which case that matches only a dot). 6851e96acad6Smrg# 6852e96acad6Smrg# This function is identical to the (non-XSI) version of func_stripname, 6853e96acad6Smrg# except this one can be used by m4 code that may be executed by configure, 6854e96acad6Smrg# rather than the libtool script. 6855e96acad6Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6856e96acad6SmrgAC_REQUIRE([_LT_DECL_SED]) 6857e96acad6SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6858e96acad6Smrgfunc_stripname_cnf () 6859e96acad6Smrg{ 6860e96acad6Smrg case ${2} in 6861e96acad6Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6862e96acad6Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6863dbbd9e4bSmacallan esac 6864e96acad6Smrg} # func_stripname_cnf 6865e96acad6Smrg])# _LT_FUNC_STRIPNAME_CNF 6866dbbd9e4bSmacallan 6867e96acad6Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6868e96acad6Smrg# --------------------------------- 6869e96acad6Smrg# Figure out "hidden" library dependencies from verbose 6870e96acad6Smrg# compiler output when linking a shared library. 6871e96acad6Smrg# Parse the compiler output and extract the necessary 6872e96acad6Smrg# objects, libraries and library flags. 6873e96acad6Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6874e96acad6Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6875e96acad6SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6876e96acad6Smrg# Dependencies to place before and after the object being linked: 6877e96acad6Smrg_LT_TAGVAR(predep_objects, $1)= 6878e96acad6Smrg_LT_TAGVAR(postdep_objects, $1)= 6879e96acad6Smrg_LT_TAGVAR(predeps, $1)= 6880e96acad6Smrg_LT_TAGVAR(postdeps, $1)= 6881e96acad6Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6882dbbd9e4bSmacallan 6883e96acad6Smrgdnl we can't use the lt_simple_compile_test_code here, 6884e96acad6Smrgdnl because it contains code intended for an executable, 6885e96acad6Smrgdnl not a library. It's possible we should let each 6886e96acad6Smrgdnl tag define a new lt_????_link_test_code variable, 6887e96acad6Smrgdnl but it's only used here... 6888e96acad6Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6889e96acad6Smrgint a; 6890e96acad6Smrgvoid foo (void) { a = 0; } 6891e96acad6Smrg_LT_EOF 6892e96acad6Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6893e96acad6Smrgclass Foo 6894e96acad6Smrg{ 6895e96acad6Smrgpublic: 6896e96acad6Smrg Foo (void) { a = 0; } 6897e96acad6Smrgprivate: 6898e96acad6Smrg int a; 6899e96acad6Smrg}; 6900e96acad6Smrg_LT_EOF 6901e96acad6Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6902e96acad6Smrg subroutine foo 6903e96acad6Smrg implicit none 6904e96acad6Smrg integer*4 a 6905e96acad6Smrg a=0 6906e96acad6Smrg return 6907e96acad6Smrg end 6908e96acad6Smrg_LT_EOF 6909e96acad6Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6910e96acad6Smrg subroutine foo 6911e96acad6Smrg implicit none 6912e96acad6Smrg integer a 6913e96acad6Smrg a=0 6914e96acad6Smrg return 6915e96acad6Smrg end 6916e96acad6Smrg_LT_EOF 6917e96acad6Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6918e96acad6Smrgpublic class foo { 6919e96acad6Smrg private int a; 6920e96acad6Smrg public void bar (void) { 6921e96acad6Smrg a = 0; 6922e96acad6Smrg } 6923e96acad6Smrg}; 6924e96acad6Smrg_LT_EOF 6925e96acad6Smrg]) 6926dbbd9e4bSmacallan 6927e96acad6Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 6928e96acad6Smrgcase "$CC $CFLAGS " in #( 6929e96acad6Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6930e96acad6Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 6931e96acad6Smrgesac 6932dbbd9e4bSmacallan 6933e96acad6Smrgdnl Parse the compiler output and extract the necessary 6934e96acad6Smrgdnl objects, libraries and library flags. 6935e96acad6Smrgif AC_TRY_EVAL(ac_compile); then 6936e96acad6Smrg # Parse the compiler output and extract the necessary 6937e96acad6Smrg # objects, libraries and library flags. 6938dbbd9e4bSmacallan 6939e96acad6Smrg # Sentinel used to keep track of whether or not we are before 6940e96acad6Smrg # the conftest object file. 6941e96acad6Smrg pre_test_object_deps_done=no 6942dbbd9e4bSmacallan 6943e96acad6Smrg for p in `eval "$output_verbose_link_cmd"`; do 6944e96acad6Smrg case ${prev}${p} in 6945dbbd9e4bSmacallan 6946e96acad6Smrg -L* | -R* | -l*) 6947e96acad6Smrg # Some compilers place space between "-{L,R}" and the path. 6948e96acad6Smrg # Remove the space. 6949e96acad6Smrg if test $p = "-L" || 6950e96acad6Smrg test $p = "-R"; then 6951e96acad6Smrg prev=$p 6952e96acad6Smrg continue 6953e96acad6Smrg fi 6954dbbd9e4bSmacallan 6955e96acad6Smrg # Expand the sysroot to ease extracting the directories later. 6956e96acad6Smrg if test -z "$prev"; then 6957e96acad6Smrg case $p in 6958e96acad6Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 6959e96acad6Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 6960e96acad6Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 6961e96acad6Smrg esac 6962e96acad6Smrg fi 6963e96acad6Smrg case $p in 6964e96acad6Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 6965e96acad6Smrg esac 6966e96acad6Smrg if test "$pre_test_object_deps_done" = no; then 6967e96acad6Smrg case ${prev} in 6968e96acad6Smrg -L | -R) 6969e96acad6Smrg # Internal compiler library paths should come after those 6970e96acad6Smrg # provided the user. The postdeps already come after the 6971e96acad6Smrg # user supplied libs so there is no need to process them. 6972e96acad6Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 6973e96acad6Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 6974e96acad6Smrg else 6975e96acad6Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 6976e96acad6Smrg fi 6977e96acad6Smrg ;; 6978e96acad6Smrg # The "-l" case would never come before the object being 6979e96acad6Smrg # linked, so don't bother handling this case. 6980e96acad6Smrg esac 6981e96acad6Smrg else 6982e96acad6Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 6983e96acad6Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 6984e96acad6Smrg else 6985e96acad6Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 6986e96acad6Smrg fi 6987e96acad6Smrg fi 6988e96acad6Smrg prev= 6989e96acad6Smrg ;; 6990dbbd9e4bSmacallan 6991e96acad6Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 6992e96acad6Smrg *.$objext) 6993e96acad6Smrg # This assumes that the test object file only shows up 6994e96acad6Smrg # once in the compiler output. 6995e96acad6Smrg if test "$p" = "conftest.$objext"; then 6996e96acad6Smrg pre_test_object_deps_done=yes 6997e96acad6Smrg continue 6998e96acad6Smrg fi 6999dbbd9e4bSmacallan 7000e96acad6Smrg if test "$pre_test_object_deps_done" = no; then 7001e96acad6Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7002e96acad6Smrg _LT_TAGVAR(predep_objects, $1)="$p" 7003e96acad6Smrg else 7004e96acad6Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7005e96acad6Smrg fi 7006e96acad6Smrg else 7007e96acad6Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7008e96acad6Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 7009e96acad6Smrg else 7010e96acad6Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7011e96acad6Smrg fi 7012e96acad6Smrg fi 7013e96acad6Smrg ;; 7014dbbd9e4bSmacallan 7015e96acad6Smrg *) ;; # Ignore the rest. 7016dbbd9e4bSmacallan 7017e96acad6Smrg esac 7018e96acad6Smrg done 7019dbbd9e4bSmacallan 7020e96acad6Smrg # Clean up. 7021e96acad6Smrg rm -f a.out a.exe 7022e96acad6Smrgelse 7023e96acad6Smrg echo "libtool.m4: error: problem compiling $1 test program" 7024e96acad6Smrgfi 7025dbbd9e4bSmacallan 7026e96acad6Smrg$RM -f confest.$objext 7027e96acad6SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 7028dbbd9e4bSmacallan 7029e96acad6Smrg# PORTME: override above test on systems where it is broken 7030e96acad6Smrgm4_if([$1], [CXX], 7031e96acad6Smrg[case $host_os in 7032e96acad6Smrginterix[[3-9]]*) 7033e96acad6Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7034e96acad6Smrg # hack all around it, let's just trust "g++" to DTRT. 7035e96acad6Smrg _LT_TAGVAR(predep_objects,$1)= 7036e96acad6Smrg _LT_TAGVAR(postdep_objects,$1)= 7037e96acad6Smrg _LT_TAGVAR(postdeps,$1)= 7038e96acad6Smrg ;; 7039dbbd9e4bSmacallan 7040e96acad6Smrglinux*) 7041e96acad6Smrg case `$CC -V 2>&1 | sed 5q` in 7042e96acad6Smrg *Sun\ C*) 7043e96acad6Smrg # Sun C++ 5.9 7044dbbd9e4bSmacallan 7045e96acad6Smrg # The more standards-conforming stlport4 library is 7046e96acad6Smrg # incompatible with the Cstd library. Avoid specifying 7047e96acad6Smrg # it if it's in CXXFLAGS. Ignore libCrun as 7048e96acad6Smrg # -library=stlport4 depends on it. 7049e96acad6Smrg case " $CXX $CXXFLAGS " in 7050e96acad6Smrg *" -library=stlport4 "*) 7051e96acad6Smrg solaris_use_stlport4=yes 7052dbbd9e4bSmacallan ;; 7053e96acad6Smrg esac 7054dbbd9e4bSmacallan 7055e96acad6Smrg if test "$solaris_use_stlport4" != yes; then 7056e96acad6Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7057e96acad6Smrg fi 7058e96acad6Smrg ;; 7059e96acad6Smrg esac 7060e96acad6Smrg ;; 7061e96acad6Smrg 7062e96acad6Smrgsolaris*) 7063e96acad6Smrg case $cc_basename in 7064e96acad6Smrg CC* | sunCC*) 7065e96acad6Smrg # The more standards-conforming stlport4 library is 7066e96acad6Smrg # incompatible with the Cstd library. Avoid specifying 7067e96acad6Smrg # it if it's in CXXFLAGS. Ignore libCrun as 7068e96acad6Smrg # -library=stlport4 depends on it. 7069e96acad6Smrg case " $CXX $CXXFLAGS " in 7070e96acad6Smrg *" -library=stlport4 "*) 7071e96acad6Smrg solaris_use_stlport4=yes 7072dbbd9e4bSmacallan ;; 7073dbbd9e4bSmacallan esac 7074dbbd9e4bSmacallan 7075e96acad6Smrg # Adding this requires a known-good setup of shared libraries for 7076e96acad6Smrg # Sun compiler versions before 5.6, else PIC objects from an old 7077e96acad6Smrg # archive will be linked into the output, leading to subtle bugs. 7078e96acad6Smrg if test "$solaris_use_stlport4" != yes; then 7079e96acad6Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7080dbbd9e4bSmacallan fi 7081e96acad6Smrg ;; 7082e96acad6Smrg esac 7083e96acad6Smrg ;; 7084e96acad6Smrgesac 7085e96acad6Smrg]) 7086dbbd9e4bSmacallan 7087e96acad6Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 7088e96acad6Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7089e96acad6Smrgesac 7090e96acad6Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7091e96acad6Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7092e96acad6Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7093e96acad6Smrgfi 7094e96acad6Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7095e96acad6Smrg [The directories searched by this compiler when creating a shared library]) 7096e96acad6Smrg_LT_TAGDECL([], [predep_objects], [1], 7097e96acad6Smrg [Dependencies to place before and after the objects being linked to 7098e96acad6Smrg create a shared library]) 7099e96acad6Smrg_LT_TAGDECL([], [postdep_objects], [1]) 7100e96acad6Smrg_LT_TAGDECL([], [predeps], [1]) 7101e96acad6Smrg_LT_TAGDECL([], [postdeps], [1]) 7102e96acad6Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7103e96acad6Smrg [The library search path used internally by the compiler when linking 7104e96acad6Smrg a shared library]) 7105e96acad6Smrg])# _LT_SYS_HIDDEN_LIBDEPS 7106e96acad6Smrg 7107e96acad6Smrg 7108e96acad6Smrg# _LT_LANG_F77_CONFIG([TAG]) 7109e96acad6Smrg# -------------------------- 7110e96acad6Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 7111e96acad6Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7112e96acad6Smrg# to write the compiler configuration to `libtool'. 7113e96acad6Smrgm4_defun([_LT_LANG_F77_CONFIG], 7114e96acad6Smrg[AC_LANG_PUSH(Fortran 77) 7115e96acad6Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 7116e96acad6Smrg _lt_disable_F77=yes 7117e96acad6Smrgfi 7118dbbd9e4bSmacallan 7119e96acad6Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7120e96acad6Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7121e96acad6Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7122e96acad6Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7123e96acad6Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7124e96acad6Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7125e96acad6Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7126e96acad6Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7127e96acad6Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7128e96acad6Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7129e96acad6Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7130e96acad6Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7131e96acad6Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7132e96acad6Smrg_LT_TAGVAR(module_cmds, $1)= 7133e96acad6Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7134e96acad6Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7135e96acad6Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7136e96acad6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7137e96acad6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7138e96acad6Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7139e96acad6Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7140e96acad6Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7141dbbd9e4bSmacallan 7142e96acad6Smrg# Source file extension for f77 test sources. 7143e96acad6Smrgac_ext=f 7144dbbd9e4bSmacallan 7145e96acad6Smrg# Object file extension for compiled f77 test sources. 7146e96acad6Smrgobjext=o 7147e96acad6Smrg_LT_TAGVAR(objext, $1)=$objext 7148e96acad6Smrg 7149e96acad6Smrg# No sense in running all these tests if we already determined that 7150e96acad6Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 7151e96acad6Smrg# are currently assumed to apply to all compilers on this platform, 7152e96acad6Smrg# and will be corrupted by setting them based on a non-working compiler. 7153e96acad6Smrgif test "$_lt_disable_F77" != yes; then 7154e96acad6Smrg # Code to be used in simple compile tests 7155e96acad6Smrg lt_simple_compile_test_code="\ 7156e96acad6Smrg subroutine t 7157e96acad6Smrg return 7158e96acad6Smrg end 7159e96acad6Smrg" 7160dbbd9e4bSmacallan 7161e96acad6Smrg # Code to be used in simple link tests 7162e96acad6Smrg lt_simple_link_test_code="\ 7163e96acad6Smrg program t 7164e96acad6Smrg end 7165e96acad6Smrg" 7166dbbd9e4bSmacallan 7167e96acad6Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7168e96acad6Smrg _LT_TAG_COMPILER 7169e96acad6Smrg 7170e96acad6Smrg # save warnings/boilerplate of simple test code 7171e96acad6Smrg _LT_COMPILER_BOILERPLATE 7172e96acad6Smrg _LT_LINKER_BOILERPLATE 7173e96acad6Smrg 7174e96acad6Smrg # Allow CC to be a program name with arguments. 7175e96acad6Smrg lt_save_CC="$CC" 7176e96acad6Smrg lt_save_GCC=$GCC 7177e96acad6Smrg lt_save_CFLAGS=$CFLAGS 7178e96acad6Smrg CC=${F77-"f77"} 7179e96acad6Smrg CFLAGS=$FFLAGS 7180e96acad6Smrg compiler=$CC 7181e96acad6Smrg _LT_TAGVAR(compiler, $1)=$CC 7182e96acad6Smrg _LT_CC_BASENAME([$compiler]) 7183e96acad6Smrg GCC=$G77 7184e96acad6Smrg if test -n "$compiler"; then 7185e96acad6Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7186e96acad6Smrg AC_MSG_RESULT([$can_build_shared]) 7187dbbd9e4bSmacallan 7188e96acad6Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7189e96acad6Smrg test "$can_build_shared" = "no" && enable_shared=no 7190dbbd9e4bSmacallan 7191e96acad6Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7192e96acad6Smrg # are all built from PIC. 7193e96acad6Smrg case $host_os in 7194e96acad6Smrg aix3*) 7195e96acad6Smrg test "$enable_shared" = yes && enable_static=no 7196e96acad6Smrg if test -n "$RANLIB"; then 7197e96acad6Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7198e96acad6Smrg postinstall_cmds='$RANLIB $lib' 7199e96acad6Smrg fi 7200e96acad6Smrg ;; 7201e96acad6Smrg aix[[4-9]]*) 7202e96acad6Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7203e96acad6Smrg test "$enable_shared" = yes && enable_static=no 7204e96acad6Smrg fi 7205e96acad6Smrg ;; 7206e96acad6Smrg esac 7207e96acad6Smrg AC_MSG_RESULT([$enable_shared]) 7208e96acad6Smrg 7209e96acad6Smrg AC_MSG_CHECKING([whether to build static libraries]) 7210e96acad6Smrg # Make sure either enable_shared or enable_static is yes. 7211e96acad6Smrg test "$enable_shared" = yes || enable_static=yes 7212e96acad6Smrg AC_MSG_RESULT([$enable_static]) 7213e96acad6Smrg 7214e96acad6Smrg _LT_TAGVAR(GCC, $1)="$G77" 7215e96acad6Smrg _LT_TAGVAR(LD, $1)="$LD" 7216e96acad6Smrg 7217e96acad6Smrg ## CAVEAT EMPTOR: 7218e96acad6Smrg ## There is no encapsulation within the following macros, do not change 7219e96acad6Smrg ## the running order or otherwise move them around unless you know exactly 7220e96acad6Smrg ## what you are doing... 7221e96acad6Smrg _LT_COMPILER_PIC($1) 7222e96acad6Smrg _LT_COMPILER_C_O($1) 7223e96acad6Smrg _LT_COMPILER_FILE_LOCKS($1) 7224e96acad6Smrg _LT_LINKER_SHLIBS($1) 7225e96acad6Smrg _LT_SYS_DYNAMIC_LINKER($1) 7226e96acad6Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7227e96acad6Smrg 7228e96acad6Smrg _LT_CONFIG($1) 7229e96acad6Smrg fi # test -n "$compiler" 7230e96acad6Smrg 7231e96acad6Smrg GCC=$lt_save_GCC 7232e96acad6Smrg CC="$lt_save_CC" 7233e96acad6Smrg CFLAGS="$lt_save_CFLAGS" 7234e96acad6Smrgfi # test "$_lt_disable_F77" != yes 7235dbbd9e4bSmacallan 7236e96acad6SmrgAC_LANG_POP 7237e96acad6Smrg])# _LT_LANG_F77_CONFIG 7238dbbd9e4bSmacallan 7239dbbd9e4bSmacallan 7240e96acad6Smrg# _LT_LANG_FC_CONFIG([TAG]) 7241e96acad6Smrg# ------------------------- 7242e96acad6Smrg# Ensure that the configuration variables for a Fortran compiler are 7243e96acad6Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7244e96acad6Smrg# to write the compiler configuration to `libtool'. 7245e96acad6Smrgm4_defun([_LT_LANG_FC_CONFIG], 7246e96acad6Smrg[AC_LANG_PUSH(Fortran) 7247e96acad6Smrg 7248e96acad6Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 7249e96acad6Smrg _lt_disable_FC=yes 7250e96acad6Smrgfi 7251dbbd9e4bSmacallan 7252e96acad6Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7253e96acad6Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7254e96acad6Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7255e96acad6Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7256e96acad6Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7257e96acad6Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7258e96acad6Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7259e96acad6Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7260e96acad6Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7261e96acad6Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7262e96acad6Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7263e96acad6Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7264e96acad6Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7265e96acad6Smrg_LT_TAGVAR(module_cmds, $1)= 7266e96acad6Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7267e96acad6Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7268e96acad6Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7269e96acad6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7270e96acad6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7271e96acad6Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7272e96acad6Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7273e96acad6Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7274e96acad6Smrg 7275e96acad6Smrg# Source file extension for fc test sources. 7276e96acad6Smrgac_ext=${ac_fc_srcext-f} 7277e96acad6Smrg 7278e96acad6Smrg# Object file extension for compiled fc test sources. 7279e96acad6Smrgobjext=o 7280e96acad6Smrg_LT_TAGVAR(objext, $1)=$objext 7281e96acad6Smrg 7282e96acad6Smrg# No sense in running all these tests if we already determined that 7283e96acad6Smrg# the FC compiler isn't working. Some variables (like enable_shared) 7284e96acad6Smrg# are currently assumed to apply to all compilers on this platform, 7285e96acad6Smrg# and will be corrupted by setting them based on a non-working compiler. 7286e96acad6Smrgif test "$_lt_disable_FC" != yes; then 7287e96acad6Smrg # Code to be used in simple compile tests 7288e96acad6Smrg lt_simple_compile_test_code="\ 7289e96acad6Smrg subroutine t 7290e96acad6Smrg return 7291e96acad6Smrg end 7292e96acad6Smrg" 7293dbbd9e4bSmacallan 7294e96acad6Smrg # Code to be used in simple link tests 7295e96acad6Smrg lt_simple_link_test_code="\ 7296e96acad6Smrg program t 7297e96acad6Smrg end 7298e96acad6Smrg" 7299dbbd9e4bSmacallan 7300e96acad6Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7301e96acad6Smrg _LT_TAG_COMPILER 7302dbbd9e4bSmacallan 7303e96acad6Smrg # save warnings/boilerplate of simple test code 7304e96acad6Smrg _LT_COMPILER_BOILERPLATE 7305e96acad6Smrg _LT_LINKER_BOILERPLATE 7306dbbd9e4bSmacallan 7307e96acad6Smrg # Allow CC to be a program name with arguments. 7308e96acad6Smrg lt_save_CC="$CC" 7309e96acad6Smrg lt_save_GCC=$GCC 7310e96acad6Smrg lt_save_CFLAGS=$CFLAGS 7311e96acad6Smrg CC=${FC-"f95"} 7312e96acad6Smrg CFLAGS=$FCFLAGS 7313e96acad6Smrg compiler=$CC 7314e96acad6Smrg GCC=$ac_cv_fc_compiler_gnu 7315dbbd9e4bSmacallan 7316e96acad6Smrg _LT_TAGVAR(compiler, $1)=$CC 7317e96acad6Smrg _LT_CC_BASENAME([$compiler]) 7318dbbd9e4bSmacallan 7319e96acad6Smrg if test -n "$compiler"; then 7320e96acad6Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7321e96acad6Smrg AC_MSG_RESULT([$can_build_shared]) 7322dbbd9e4bSmacallan 7323e96acad6Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7324e96acad6Smrg test "$can_build_shared" = "no" && enable_shared=no 7325dbbd9e4bSmacallan 7326e96acad6Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7327e96acad6Smrg # are all built from PIC. 7328e96acad6Smrg case $host_os in 7329e96acad6Smrg aix3*) 7330e96acad6Smrg test "$enable_shared" = yes && enable_static=no 7331e96acad6Smrg if test -n "$RANLIB"; then 7332e96acad6Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7333e96acad6Smrg postinstall_cmds='$RANLIB $lib' 7334e96acad6Smrg fi 7335e96acad6Smrg ;; 7336e96acad6Smrg aix[[4-9]]*) 7337e96acad6Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7338e96acad6Smrg test "$enable_shared" = yes && enable_static=no 7339e96acad6Smrg fi 7340e96acad6Smrg ;; 7341e96acad6Smrg esac 7342e96acad6Smrg AC_MSG_RESULT([$enable_shared]) 7343e96acad6Smrg 7344e96acad6Smrg AC_MSG_CHECKING([whether to build static libraries]) 7345e96acad6Smrg # Make sure either enable_shared or enable_static is yes. 7346e96acad6Smrg test "$enable_shared" = yes || enable_static=yes 7347e96acad6Smrg AC_MSG_RESULT([$enable_static]) 7348e96acad6Smrg 7349e96acad6Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7350e96acad6Smrg _LT_TAGVAR(LD, $1)="$LD" 7351e96acad6Smrg 7352e96acad6Smrg ## CAVEAT EMPTOR: 7353e96acad6Smrg ## There is no encapsulation within the following macros, do not change 7354e96acad6Smrg ## the running order or otherwise move them around unless you know exactly 7355e96acad6Smrg ## what you are doing... 7356e96acad6Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7357e96acad6Smrg _LT_COMPILER_PIC($1) 7358e96acad6Smrg _LT_COMPILER_C_O($1) 7359e96acad6Smrg _LT_COMPILER_FILE_LOCKS($1) 7360e96acad6Smrg _LT_LINKER_SHLIBS($1) 7361e96acad6Smrg _LT_SYS_DYNAMIC_LINKER($1) 7362e96acad6Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7363e96acad6Smrg 7364e96acad6Smrg _LT_CONFIG($1) 7365e96acad6Smrg fi # test -n "$compiler" 7366e96acad6Smrg 7367e96acad6Smrg GCC=$lt_save_GCC 7368e96acad6Smrg CC=$lt_save_CC 7369e96acad6Smrg CFLAGS=$lt_save_CFLAGS 7370e96acad6Smrgfi # test "$_lt_disable_FC" != yes 7371dbbd9e4bSmacallan 7372e96acad6SmrgAC_LANG_POP 7373e96acad6Smrg])# _LT_LANG_FC_CONFIG 7374dbbd9e4bSmacallan 7375dbbd9e4bSmacallan 7376e96acad6Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 7377e96acad6Smrg# -------------------------- 7378e96acad6Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7379e96acad6Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7380e96acad6Smrg# to write the compiler configuration to `libtool'. 7381e96acad6Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 7382e96acad6Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7383e96acad6SmrgAC_LANG_SAVE 7384dbbd9e4bSmacallan 7385e96acad6Smrg# Source file extension for Java test sources. 7386e96acad6Smrgac_ext=java 7387dbbd9e4bSmacallan 7388e96acad6Smrg# Object file extension for compiled Java test sources. 7389e96acad6Smrgobjext=o 7390e96acad6Smrg_LT_TAGVAR(objext, $1)=$objext 7391dbbd9e4bSmacallan 7392e96acad6Smrg# Code to be used in simple compile tests 7393e96acad6Smrglt_simple_compile_test_code="class foo {}" 7394dbbd9e4bSmacallan 7395e96acad6Smrg# Code to be used in simple link tests 7396e96acad6Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7397dbbd9e4bSmacallan 7398e96acad6Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7399e96acad6Smrg_LT_TAG_COMPILER 7400dbbd9e4bSmacallan 7401e96acad6Smrg# save warnings/boilerplate of simple test code 7402e96acad6Smrg_LT_COMPILER_BOILERPLATE 7403e96acad6Smrg_LT_LINKER_BOILERPLATE 7404dbbd9e4bSmacallan 7405e96acad6Smrg# Allow CC to be a program name with arguments. 7406e96acad6Smrglt_save_CC=$CC 7407e96acad6Smrglt_save_CFLAGS=$CFLAGS 7408e96acad6Smrglt_save_GCC=$GCC 7409e96acad6SmrgGCC=yes 7410e96acad6SmrgCC=${GCJ-"gcj"} 7411e96acad6SmrgCFLAGS=$GCJFLAGS 7412e96acad6Smrgcompiler=$CC 7413e96acad6Smrg_LT_TAGVAR(compiler, $1)=$CC 7414e96acad6Smrg_LT_TAGVAR(LD, $1)="$LD" 7415e96acad6Smrg_LT_CC_BASENAME([$compiler]) 7416dbbd9e4bSmacallan 7417e96acad6Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7418e96acad6Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7419dbbd9e4bSmacallan 7420e96acad6Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7421e96acad6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7422e96acad6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7423dbbd9e4bSmacallan 7424e96acad6Smrgif test -n "$compiler"; then 7425e96acad6Smrg _LT_COMPILER_NO_RTTI($1) 7426e96acad6Smrg _LT_COMPILER_PIC($1) 7427e96acad6Smrg _LT_COMPILER_C_O($1) 7428e96acad6Smrg _LT_COMPILER_FILE_LOCKS($1) 7429e96acad6Smrg _LT_LINKER_SHLIBS($1) 7430e96acad6Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7431dbbd9e4bSmacallan 7432e96acad6Smrg _LT_CONFIG($1) 7433e96acad6Smrgfi 7434dbbd9e4bSmacallan 7435e96acad6SmrgAC_LANG_RESTORE 7436dbbd9e4bSmacallan 7437e96acad6SmrgGCC=$lt_save_GCC 7438e96acad6SmrgCC=$lt_save_CC 7439e96acad6SmrgCFLAGS=$lt_save_CFLAGS 7440e96acad6Smrg])# _LT_LANG_GCJ_CONFIG 7441dbbd9e4bSmacallan 7442dbbd9e4bSmacallan 7443e96acad6Smrg# _LT_LANG_RC_CONFIG([TAG]) 7444e96acad6Smrg# ------------------------- 7445e96acad6Smrg# Ensure that the configuration variables for the Windows resource compiler 7446e96acad6Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7447e96acad6Smrg# to write the compiler configuration to `libtool'. 7448e96acad6Smrgm4_defun([_LT_LANG_RC_CONFIG], 7449e96acad6Smrg[AC_REQUIRE([LT_PROG_RC])dnl 7450e96acad6SmrgAC_LANG_SAVE 7451dbbd9e4bSmacallan 7452e96acad6Smrg# Source file extension for RC test sources. 7453e96acad6Smrgac_ext=rc 7454dbbd9e4bSmacallan 7455e96acad6Smrg# Object file extension for compiled RC test sources. 7456e96acad6Smrgobjext=o 7457e96acad6Smrg_LT_TAGVAR(objext, $1)=$objext 7458dbbd9e4bSmacallan 7459e96acad6Smrg# Code to be used in simple compile tests 7460e96acad6Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7461dbbd9e4bSmacallan 7462e96acad6Smrg# Code to be used in simple link tests 7463e96acad6Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 7464dbbd9e4bSmacallan 7465e96acad6Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7466e96acad6Smrg_LT_TAG_COMPILER 7467dbbd9e4bSmacallan 7468e96acad6Smrg# save warnings/boilerplate of simple test code 7469e96acad6Smrg_LT_COMPILER_BOILERPLATE 7470e96acad6Smrg_LT_LINKER_BOILERPLATE 7471dbbd9e4bSmacallan 7472e96acad6Smrg# Allow CC to be a program name with arguments. 7473e96acad6Smrglt_save_CC="$CC" 7474e96acad6Smrglt_save_CFLAGS=$CFLAGS 7475e96acad6Smrglt_save_GCC=$GCC 7476e96acad6SmrgGCC= 7477e96acad6SmrgCC=${RC-"windres"} 7478e96acad6SmrgCFLAGS= 7479e96acad6Smrgcompiler=$CC 7480e96acad6Smrg_LT_TAGVAR(compiler, $1)=$CC 7481e96acad6Smrg_LT_CC_BASENAME([$compiler]) 7482e96acad6Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7483e96acad6Smrg 7484e96acad6Smrgif test -n "$compiler"; then 7485e96acad6Smrg : 7486e96acad6Smrg _LT_CONFIG($1) 7487e96acad6Smrgfi 7488dbbd9e4bSmacallan 7489e96acad6SmrgGCC=$lt_save_GCC 7490e96acad6SmrgAC_LANG_RESTORE 7491e96acad6SmrgCC=$lt_save_CC 7492e96acad6SmrgCFLAGS=$lt_save_CFLAGS 7493e96acad6Smrg])# _LT_LANG_RC_CONFIG 7494dbbd9e4bSmacallan 7495dbbd9e4bSmacallan 7496e96acad6Smrg# LT_PROG_GCJ 7497e96acad6Smrg# ----------- 7498e96acad6SmrgAC_DEFUN([LT_PROG_GCJ], 7499e96acad6Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7500e96acad6Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7501e96acad6Smrg [AC_CHECK_TOOL(GCJ, gcj,) 7502e96acad6Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7503e96acad6Smrg AC_SUBST(GCJFLAGS)])])[]dnl 7504e96acad6Smrg]) 7505dbbd9e4bSmacallan 7506e96acad6Smrg# Old name: 7507e96acad6SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7508e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 7509e96acad6Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7510dbbd9e4bSmacallan 7511dbbd9e4bSmacallan 7512e96acad6Smrg# LT_PROG_RC 7513e96acad6Smrg# ---------- 7514e96acad6SmrgAC_DEFUN([LT_PROG_RC], 7515e96acad6Smrg[AC_CHECK_TOOL(RC, windres,) 7516dbbd9e4bSmacallan]) 7517dbbd9e4bSmacallan 7518e96acad6Smrg# Old name: 7519e96acad6SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7520e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 7521e96acad6Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 7522e96acad6Smrg 7523e96acad6Smrg 7524e96acad6Smrg# _LT_DECL_EGREP 7525e96acad6Smrg# -------------- 7526e96acad6Smrg# If we don't have a new enough Autoconf to choose the best grep 7527e96acad6Smrg# available, choose the one first in the user's PATH. 7528e96acad6Smrgm4_defun([_LT_DECL_EGREP], 7529e96acad6Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7530e96acad6SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7531e96acad6Smrgtest -z "$GREP" && GREP=grep 7532e96acad6Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7533e96acad6Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7534e96acad6Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7535e96acad6Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7536e96acad6SmrgAC_SUBST([GREP]) 7537dbbd9e4bSmacallan]) 7538dbbd9e4bSmacallan 7539dbbd9e4bSmacallan 7540e96acad6Smrg# _LT_DECL_OBJDUMP 7541e96acad6Smrg# -------------- 7542e96acad6Smrg# If we don't have a new enough Autoconf to choose the best objdump 7543e96acad6Smrg# available, choose the one first in the user's PATH. 7544e96acad6Smrgm4_defun([_LT_DECL_OBJDUMP], 7545e96acad6Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7546e96acad6Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7547e96acad6Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7548e96acad6SmrgAC_SUBST([OBJDUMP]) 7549e96acad6Smrg]) 7550dbbd9e4bSmacallan 7551e96acad6Smrg# _LT_DECL_DLLTOOL 7552dbbd9e4bSmacallan# ---------------- 7553e96acad6Smrg# Ensure DLLTOOL variable is set. 7554e96acad6Smrgm4_defun([_LT_DECL_DLLTOOL], 7555e96acad6Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7556e96acad6Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7557e96acad6Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7558e96acad6SmrgAC_SUBST([DLLTOOL]) 7559e96acad6Smrg]) 7560dbbd9e4bSmacallan 7561e96acad6Smrg# _LT_DECL_SED 7562e96acad6Smrg# ------------ 7563e96acad6Smrg# Check for a fully-functional sed program, that truncates 7564e96acad6Smrg# as few characters as possible. Prefer GNU sed if found. 7565e96acad6Smrgm4_defun([_LT_DECL_SED], 7566e96acad6Smrg[AC_PROG_SED 7567e96acad6Smrgtest -z "$SED" && SED=sed 7568e96acad6SmrgXsed="$SED -e 1s/^X//" 7569e96acad6Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7570e96acad6Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7571e96acad6Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7572e96acad6Smrg])# _LT_DECL_SED 7573dbbd9e4bSmacallan 7574e96acad6Smrgm4_ifndef([AC_PROG_SED], [ 7575dbbd9e4bSmacallan# NOTE: This macro has been submitted for inclusion into # 7576dbbd9e4bSmacallan# GNU Autoconf as AC_PROG_SED. When it is available in # 7577dbbd9e4bSmacallan# a released version of Autoconf we should remove this # 7578dbbd9e4bSmacallan# macro and use it instead. # 7579e96acad6Smrg 7580e96acad6Smrgm4_defun([AC_PROG_SED], 7581dbbd9e4bSmacallan[AC_MSG_CHECKING([for a sed that does not truncate output]) 7582dbbd9e4bSmacallanAC_CACHE_VAL(lt_cv_path_SED, 7583dbbd9e4bSmacallan[# Loop through the user's path and test for sed and gsed. 7584dbbd9e4bSmacallan# Then use that list of sed's as ones to test for truncation. 7585dbbd9e4bSmacallanas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7586dbbd9e4bSmacallanfor as_dir in $PATH 7587dbbd9e4bSmacallando 7588dbbd9e4bSmacallan IFS=$as_save_IFS 7589dbbd9e4bSmacallan test -z "$as_dir" && as_dir=. 7590dbbd9e4bSmacallan for lt_ac_prog in sed gsed; do 7591dbbd9e4bSmacallan for ac_exec_ext in '' $ac_executable_extensions; do 7592e96acad6Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7593dbbd9e4bSmacallan lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7594dbbd9e4bSmacallan fi 7595dbbd9e4bSmacallan done 7596dbbd9e4bSmacallan done 7597dbbd9e4bSmacallandone 7598dbbd9e4bSmacallanIFS=$as_save_IFS 7599dbbd9e4bSmacallanlt_ac_max=0 7600dbbd9e4bSmacallanlt_ac_count=0 7601dbbd9e4bSmacallan# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7602dbbd9e4bSmacallan# along with /bin/sed that truncates output. 7603dbbd9e4bSmacallanfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7604dbbd9e4bSmacallan test ! -f $lt_ac_sed && continue 7605dbbd9e4bSmacallan cat /dev/null > conftest.in 7606dbbd9e4bSmacallan lt_ac_count=0 7607dbbd9e4bSmacallan echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7608dbbd9e4bSmacallan # Check for GNU sed and select it if it is found. 7609dbbd9e4bSmacallan if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7610dbbd9e4bSmacallan lt_cv_path_SED=$lt_ac_sed 7611dbbd9e4bSmacallan break 7612dbbd9e4bSmacallan fi 7613dbbd9e4bSmacallan while true; do 7614dbbd9e4bSmacallan cat conftest.in conftest.in >conftest.tmp 7615dbbd9e4bSmacallan mv conftest.tmp conftest.in 7616dbbd9e4bSmacallan cp conftest.in conftest.nl 7617dbbd9e4bSmacallan echo >>conftest.nl 7618dbbd9e4bSmacallan $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7619dbbd9e4bSmacallan cmp -s conftest.out conftest.nl || break 7620dbbd9e4bSmacallan # 10000 chars as input seems more than enough 7621dbbd9e4bSmacallan test $lt_ac_count -gt 10 && break 7622dbbd9e4bSmacallan lt_ac_count=`expr $lt_ac_count + 1` 7623dbbd9e4bSmacallan if test $lt_ac_count -gt $lt_ac_max; then 7624dbbd9e4bSmacallan lt_ac_max=$lt_ac_count 7625dbbd9e4bSmacallan lt_cv_path_SED=$lt_ac_sed 7626dbbd9e4bSmacallan fi 7627dbbd9e4bSmacallan done 7628dbbd9e4bSmacallandone 7629dbbd9e4bSmacallan]) 7630dbbd9e4bSmacallanSED=$lt_cv_path_SED 7631dbbd9e4bSmacallanAC_SUBST([SED]) 7632dbbd9e4bSmacallanAC_MSG_RESULT([$SED]) 7633e96acad6Smrg])#AC_PROG_SED 7634e96acad6Smrg])#m4_ifndef 7635e96acad6Smrg 7636e96acad6Smrg# Old name: 7637e96acad6SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7638e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 7639e96acad6Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7640e96acad6Smrg 7641e96acad6Smrg 7642e96acad6Smrg# _LT_CHECK_SHELL_FEATURES 7643e96acad6Smrg# ------------------------ 7644e96acad6Smrg# Find out whether the shell is Bourne or XSI compatible, 7645e96acad6Smrg# or has some other useful features. 7646e96acad6Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7647e96acad6Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7648e96acad6Smrg# Try some XSI features 7649e96acad6Smrgxsi_shell=no 7650e96acad6Smrg( _lt_dummy="a/b/c" 7651e96acad6Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7652e96acad6Smrg = c,a/b,b/c, \ 7653e96acad6Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7654e96acad6Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7655e96acad6Smrg && xsi_shell=yes 7656e96acad6SmrgAC_MSG_RESULT([$xsi_shell]) 7657e96acad6Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7658e96acad6Smrg 7659e96acad6SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7660e96acad6Smrglt_shell_append=no 7661e96acad6Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7662e96acad6Smrg >/dev/null 2>&1 \ 7663e96acad6Smrg && lt_shell_append=yes 7664e96acad6SmrgAC_MSG_RESULT([$lt_shell_append]) 7665e96acad6Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7666e96acad6Smrg 7667e96acad6Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7668e96acad6Smrg lt_unset=unset 7669e96acad6Smrgelse 7670e96acad6Smrg lt_unset=false 7671e96acad6Smrgfi 7672e96acad6Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7673e96acad6Smrg 7674e96acad6Smrg# test EBCDIC or ASCII 7675e96acad6Smrgcase `echo X|tr X '\101'` in 7676e96acad6Smrg A) # ASCII based system 7677e96acad6Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7678e96acad6Smrg lt_SP2NL='tr \040 \012' 7679e96acad6Smrg lt_NL2SP='tr \015\012 \040\040' 7680e96acad6Smrg ;; 7681e96acad6Smrg *) # EBCDIC based system 7682e96acad6Smrg lt_SP2NL='tr \100 \n' 7683e96acad6Smrg lt_NL2SP='tr \r\n \100\100' 7684e96acad6Smrg ;; 7685e96acad6Smrgesac 7686e96acad6Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7687e96acad6Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7688e96acad6Smrg])# _LT_CHECK_SHELL_FEATURES 7689e96acad6Smrg 7690e96acad6Smrg 7691e96acad6Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7692e96acad6Smrg# ------------------------------------------------------ 7693e96acad6Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7694e96acad6Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7695e96acad6Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 7696e96acad6Smrg[dnl { 7697e96acad6Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 7698e96acad6Smrg$1 ()\ 7699e96acad6Smrg{\ 7700e96acad6Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7701e96acad6Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7702e96acad6Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7703e96acad6Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7704e96acad6Smrgtest 0 -eq $? || _lt_function_replace_fail=: 7705e96acad6Smrg]) 7706e96acad6Smrg 7707e96acad6Smrg 7708e96acad6Smrg# _LT_PROG_REPLACE_SHELLFNS 7709e96acad6Smrg# ------------------------- 7710e96acad6Smrg# Replace existing portable implementations of several shell functions with 7711e96acad6Smrg# equivalent extended shell implementations where those features are available.. 7712e96acad6Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7713e96acad6Smrg[if test x"$xsi_shell" = xyes; then 7714e96acad6Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7715e96acad6Smrg case ${1} in 7716e96acad6Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7717e96acad6Smrg * ) func_dirname_result="${3}" ;; 7718e96acad6Smrg esac]) 7719e96acad6Smrg 7720e96acad6Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7721e96acad6Smrg func_basename_result="${1##*/}"]) 7722e96acad6Smrg 7723e96acad6Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7724e96acad6Smrg case ${1} in 7725e96acad6Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7726e96acad6Smrg * ) func_dirname_result="${3}" ;; 7727e96acad6Smrg esac 7728e96acad6Smrg func_basename_result="${1##*/}"]) 7729e96acad6Smrg 7730e96acad6Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7731e96acad6Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7732e96acad6Smrg # positional parameters, so assign one to ordinary parameter first. 7733e96acad6Smrg func_stripname_result=${3} 7734e96acad6Smrg func_stripname_result=${func_stripname_result#"${1}"} 7735e96acad6Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 7736e96acad6Smrg 7737e96acad6Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7738e96acad6Smrg func_split_long_opt_name=${1%%=*} 7739e96acad6Smrg func_split_long_opt_arg=${1#*=}]) 7740e96acad6Smrg 7741e96acad6Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7742e96acad6Smrg func_split_short_opt_arg=${1#??} 7743e96acad6Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 7744e96acad6Smrg 7745e96acad6Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7746e96acad6Smrg case ${1} in 7747e96acad6Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7748e96acad6Smrg *) func_lo2o_result=${1} ;; 7749e96acad6Smrg esac]) 7750e96acad6Smrg 7751e96acad6Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 7752e96acad6Smrg 7753e96acad6Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7754e96acad6Smrg 7755e96acad6Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7756e96acad6Smrgfi 7757e96acad6Smrg 7758e96acad6Smrgif test x"$lt_shell_append" = xyes; then 7759e96acad6Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7760e96acad6Smrg 7761e96acad6Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7762e96acad6Smrg func_quote_for_eval "${2}" 7763e96acad6Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7764e96acad6Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 7765e96acad6Smrg 7766e96acad6Smrg # Save a `func_append' function call where possible by direct use of '+=' 7767e96acad6Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7768e96acad6Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7769e96acad6Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7770e96acad6Smrg test 0 -eq $? || _lt_function_replace_fail=: 7771e96acad6Smrgelse 7772e96acad6Smrg # Save a `func_append' function call even when '+=' is not available 7773e96acad6Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7774e96acad6Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7775e96acad6Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7776e96acad6Smrg test 0 -eq $? || _lt_function_replace_fail=: 7777e96acad6Smrgfi 7778e96acad6Smrg 7779e96acad6Smrgif test x"$_lt_function_replace_fail" = x":"; then 7780e96acad6Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7781e96acad6Smrgfi 7782e96acad6Smrg]) 7783e96acad6Smrg 7784e96acad6Smrg# _LT_PATH_CONVERSION_FUNCTIONS 7785e96acad6Smrg# ----------------------------- 7786e96acad6Smrg# Determine which file name conversion functions should be used by 7787e96acad6Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7788e96acad6Smrg# for certain cross-compile configurations and native mingw. 7789e96acad6Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7790e96acad6Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7791e96acad6SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7792e96acad6SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 7793e96acad6SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7794e96acad6Smrg[case $host in 7795e96acad6Smrg *-*-mingw* ) 7796e96acad6Smrg case $build in 7797e96acad6Smrg *-*-mingw* ) # actually msys 7798e96acad6Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7799e96acad6Smrg ;; 7800e96acad6Smrg *-*-cygwin* ) 7801e96acad6Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7802e96acad6Smrg ;; 7803e96acad6Smrg * ) # otherwise, assume *nix 7804e96acad6Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7805e96acad6Smrg ;; 7806e96acad6Smrg esac 7807e96acad6Smrg ;; 7808e96acad6Smrg *-*-cygwin* ) 7809e96acad6Smrg case $build in 7810e96acad6Smrg *-*-mingw* ) # actually msys 7811e96acad6Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7812e96acad6Smrg ;; 7813e96acad6Smrg *-*-cygwin* ) 7814e96acad6Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7815e96acad6Smrg ;; 7816e96acad6Smrg * ) # otherwise, assume *nix 7817e96acad6Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7818e96acad6Smrg ;; 7819e96acad6Smrg esac 7820e96acad6Smrg ;; 7821e96acad6Smrg * ) # unhandled hosts (and "normal" native builds) 7822e96acad6Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7823e96acad6Smrg ;; 7824e96acad6Smrgesac 7825e96acad6Smrg]) 7826e96acad6Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 7827e96acad6SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7828e96acad6Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7829e96acad6Smrg [0], [convert $build file names to $host format])dnl 7830e96acad6Smrg 7831e96acad6SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7832e96acad6SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7833e96acad6Smrg[#assume ordinary cross tools, or native build. 7834e96acad6Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 7835e96acad6Smrgcase $host in 7836e96acad6Smrg *-*-mingw* ) 7837e96acad6Smrg case $build in 7838e96acad6Smrg *-*-mingw* ) # actually msys 7839e96acad6Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7840e96acad6Smrg ;; 7841e96acad6Smrg esac 7842e96acad6Smrg ;; 7843e96acad6Smrgesac 7844e96acad6Smrg]) 7845e96acad6Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7846e96acad6SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7847e96acad6Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7848e96acad6Smrg [0], [convert $build files to toolchain format])dnl 7849e96acad6Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 7850e96acad6Smrg 7851e96acad6Smrg# Helper functions for option handling. -*- Autoconf -*- 7852e96acad6Smrg# 7853e96acad6Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 7854e96acad6Smrg# Inc. 7855e96acad6Smrg# Written by Gary V. Vaughan, 2004 7856e96acad6Smrg# 7857e96acad6Smrg# This file is free software; the Free Software Foundation gives 7858e96acad6Smrg# unlimited permission to copy and/or distribute it, with or without 7859e96acad6Smrg# modifications, as long as this notice is preserved. 7860e96acad6Smrg 7861e96acad6Smrg# serial 7 ltoptions.m4 7862e96acad6Smrg 7863e96acad6Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7864e96acad6SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 7865e96acad6Smrg 7866e96acad6Smrg 7867e96acad6Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 7868e96acad6Smrg# ------------------------------------------ 7869e96acad6Smrgm4_define([_LT_MANGLE_OPTION], 7870e96acad6Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 7871e96acad6Smrg 7872e96acad6Smrg 7873e96acad6Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 7874e96acad6Smrg# --------------------------------------- 7875e96acad6Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 7876e96acad6Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 7877e96acad6Smrg# saved as a flag. 7878e96acad6Smrgm4_define([_LT_SET_OPTION], 7879e96acad6Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 7880e96acad6Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 7881e96acad6Smrg _LT_MANGLE_DEFUN([$1], [$2]), 7882e96acad6Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 7883e96acad6Smrg]) 7884e96acad6Smrg 7885e96acad6Smrg 7886e96acad6Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 7887e96acad6Smrg# ------------------------------------------------------------ 7888e96acad6Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7889e96acad6Smrgm4_define([_LT_IF_OPTION], 7890e96acad6Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 7891e96acad6Smrg 7892e96acad6Smrg 7893e96acad6Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 7894e96acad6Smrg# ------------------------------------------------------- 7895e96acad6Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 7896e96acad6Smrg# are set. 7897e96acad6Smrgm4_define([_LT_UNLESS_OPTIONS], 7898e96acad6Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7899e96acad6Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 7900e96acad6Smrg [m4_define([$0_found])])])[]dnl 7901e96acad6Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 7902e96acad6Smrg])[]dnl 7903e96acad6Smrg]) 7904e96acad6Smrg 7905e96acad6Smrg 7906e96acad6Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 7907e96acad6Smrg# ---------------------------------------- 7908e96acad6Smrg# OPTION-LIST is a space-separated list of Libtool options associated 7909e96acad6Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 7910e96acad6Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 7911e96acad6Smrg# the unknown option and exit. 7912e96acad6Smrgm4_defun([_LT_SET_OPTIONS], 7913e96acad6Smrg[# Set options 7914e96acad6Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7915e96acad6Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 7916e96acad6Smrg 7917e96acad6Smrgm4_if([$1],[LT_INIT],[ 7918e96acad6Smrg dnl 7919e96acad6Smrg dnl Simply set some default values (i.e off) if boolean options were not 7920e96acad6Smrg dnl specified: 7921e96acad6Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 7922e96acad6Smrg ]) 7923e96acad6Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 7924e96acad6Smrg ]) 7925e96acad6Smrg dnl 7926e96acad6Smrg dnl If no reference was made to various pairs of opposing options, then 7927e96acad6Smrg dnl we run the default mode handler for the pair. For example, if neither 7928e96acad6Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 7929e96acad6Smrg dnl archives by default: 7930e96acad6Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 7931e96acad6Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 7932e96acad6Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 7933e96acad6Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 7934e96acad6Smrg [_LT_ENABLE_FAST_INSTALL]) 7935e96acad6Smrg ]) 7936e96acad6Smrg])# _LT_SET_OPTIONS 7937e96acad6Smrg 7938e96acad6Smrg 7939e96acad6Smrg 7940e96acad6Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 7941e96acad6Smrg# ----------------------------------------- 7942e96acad6Smrgm4_define([_LT_MANGLE_DEFUN], 7943e96acad6Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 7944e96acad6Smrg 7945e96acad6Smrg 7946e96acad6Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 7947e96acad6Smrg# ----------------------------------------------- 7948e96acad6Smrgm4_define([LT_OPTION_DEFINE], 7949e96acad6Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 7950e96acad6Smrg])# LT_OPTION_DEFINE 7951e96acad6Smrg 7952e96acad6Smrg 7953e96acad6Smrg# dlopen 7954e96acad6Smrg# ------ 7955e96acad6SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 7956e96acad6Smrg]) 7957e96acad6Smrg 7958e96acad6SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 7959e96acad6Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 7960e96acad6SmrgAC_DIAGNOSE([obsolete], 7961e96acad6Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7962e96acad6Smrgput the `dlopen' option into LT_INIT's first parameter.]) 7963e96acad6Smrg]) 7964e96acad6Smrg 7965e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 7966e96acad6Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 7967e96acad6Smrg 7968e96acad6Smrg 7969e96acad6Smrg# win32-dll 7970e96acad6Smrg# --------- 7971e96acad6Smrg# Declare package support for building win32 dll's. 7972e96acad6SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 7973e96acad6Smrg[enable_win32_dll=yes 7974e96acad6Smrg 7975e96acad6Smrgcase $host in 7976e96acad6Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 7977e96acad6Smrg AC_CHECK_TOOL(AS, as, false) 7978e96acad6Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7979e96acad6Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7980e96acad6Smrg ;; 7981e96acad6Smrgesac 7982e96acad6Smrg 7983e96acad6Smrgtest -z "$AS" && AS=as 7984e96acad6Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 7985e96acad6Smrg 7986e96acad6Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7987e96acad6Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 7988e96acad6Smrg 7989e96acad6Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7990e96acad6Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 7991e96acad6Smrg])# win32-dll 7992e96acad6Smrg 7993e96acad6SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 7994e96acad6Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7995e96acad6Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 7996e96acad6SmrgAC_DIAGNOSE([obsolete], 7997e96acad6Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7998e96acad6Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 7999e96acad6Smrg]) 8000e96acad6Smrg 8001e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 8002e96acad6Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8003e96acad6Smrg 8004e96acad6Smrg 8005e96acad6Smrg# _LT_ENABLE_SHARED([DEFAULT]) 8006e96acad6Smrg# ---------------------------- 8007e96acad6Smrg# implement the --enable-shared flag, and supports the `shared' and 8008e96acad6Smrg# `disable-shared' LT_INIT options. 8009e96acad6Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8010e96acad6Smrgm4_define([_LT_ENABLE_SHARED], 8011e96acad6Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8012e96acad6SmrgAC_ARG_ENABLE([shared], 8013e96acad6Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8014e96acad6Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8015e96acad6Smrg [p=${PACKAGE-default} 8016e96acad6Smrg case $enableval in 8017e96acad6Smrg yes) enable_shared=yes ;; 8018e96acad6Smrg no) enable_shared=no ;; 8019e96acad6Smrg *) 8020e96acad6Smrg enable_shared=no 8021e96acad6Smrg # Look at the argument we got. We use all the common list separators. 8022e96acad6Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8023e96acad6Smrg for pkg in $enableval; do 8024e96acad6Smrg IFS="$lt_save_ifs" 8025e96acad6Smrg if test "X$pkg" = "X$p"; then 8026e96acad6Smrg enable_shared=yes 8027e96acad6Smrg fi 8028e96acad6Smrg done 8029e96acad6Smrg IFS="$lt_save_ifs" 8030e96acad6Smrg ;; 8031e96acad6Smrg esac], 8032e96acad6Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8033e96acad6Smrg 8034e96acad6Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8035e96acad6Smrg [Whether or not to build shared libraries]) 8036e96acad6Smrg])# _LT_ENABLE_SHARED 8037e96acad6Smrg 8038e96acad6SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8039e96acad6SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8040e96acad6Smrg 8041e96acad6Smrg# Old names: 8042e96acad6SmrgAC_DEFUN([AC_ENABLE_SHARED], 8043e96acad6Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8044e96acad6Smrg]) 8045e96acad6Smrg 8046e96acad6SmrgAC_DEFUN([AC_DISABLE_SHARED], 8047e96acad6Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8048e96acad6Smrg]) 8049e96acad6Smrg 8050e96acad6SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8051e96acad6SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8052e96acad6Smrg 8053e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 8054e96acad6Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8055e96acad6Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8056e96acad6Smrg 8057e96acad6Smrg 8058e96acad6Smrg 8059e96acad6Smrg# _LT_ENABLE_STATIC([DEFAULT]) 8060e96acad6Smrg# ---------------------------- 8061e96acad6Smrg# implement the --enable-static flag, and support the `static' and 8062e96acad6Smrg# `disable-static' LT_INIT options. 8063e96acad6Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8064e96acad6Smrgm4_define([_LT_ENABLE_STATIC], 8065e96acad6Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8066e96acad6SmrgAC_ARG_ENABLE([static], 8067e96acad6Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8068e96acad6Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8069e96acad6Smrg [p=${PACKAGE-default} 8070e96acad6Smrg case $enableval in 8071e96acad6Smrg yes) enable_static=yes ;; 8072e96acad6Smrg no) enable_static=no ;; 8073e96acad6Smrg *) 8074e96acad6Smrg enable_static=no 8075e96acad6Smrg # Look at the argument we got. We use all the common list separators. 8076e96acad6Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8077e96acad6Smrg for pkg in $enableval; do 8078e96acad6Smrg IFS="$lt_save_ifs" 8079e96acad6Smrg if test "X$pkg" = "X$p"; then 8080e96acad6Smrg enable_static=yes 8081e96acad6Smrg fi 8082e96acad6Smrg done 8083e96acad6Smrg IFS="$lt_save_ifs" 8084e96acad6Smrg ;; 8085e96acad6Smrg esac], 8086e96acad6Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8087e96acad6Smrg 8088e96acad6Smrg _LT_DECL([build_old_libs], [enable_static], [0], 8089e96acad6Smrg [Whether or not to build static libraries]) 8090e96acad6Smrg])# _LT_ENABLE_STATIC 8091e96acad6Smrg 8092e96acad6SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8093e96acad6SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8094e96acad6Smrg 8095e96acad6Smrg# Old names: 8096e96acad6SmrgAC_DEFUN([AC_ENABLE_STATIC], 8097e96acad6Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8098e96acad6Smrg]) 8099e96acad6Smrg 8100e96acad6SmrgAC_DEFUN([AC_DISABLE_STATIC], 8101e96acad6Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8102e96acad6Smrg]) 8103e96acad6Smrg 8104e96acad6SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8105e96acad6SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8106e96acad6Smrg 8107e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 8108e96acad6Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8109e96acad6Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8110e96acad6Smrg 8111e96acad6Smrg 8112e96acad6Smrg 8113e96acad6Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8114e96acad6Smrg# ---------------------------------- 8115e96acad6Smrg# implement the --enable-fast-install flag, and support the `fast-install' 8116e96acad6Smrg# and `disable-fast-install' LT_INIT options. 8117e96acad6Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8118e96acad6Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 8119e96acad6Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8120e96acad6SmrgAC_ARG_ENABLE([fast-install], 8121e96acad6Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8122e96acad6Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8123e96acad6Smrg [p=${PACKAGE-default} 8124e96acad6Smrg case $enableval in 8125e96acad6Smrg yes) enable_fast_install=yes ;; 8126e96acad6Smrg no) enable_fast_install=no ;; 8127e96acad6Smrg *) 8128e96acad6Smrg enable_fast_install=no 8129e96acad6Smrg # Look at the argument we got. We use all the common list separators. 8130e96acad6Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8131e96acad6Smrg for pkg in $enableval; do 8132e96acad6Smrg IFS="$lt_save_ifs" 8133e96acad6Smrg if test "X$pkg" = "X$p"; then 8134e96acad6Smrg enable_fast_install=yes 8135e96acad6Smrg fi 8136e96acad6Smrg done 8137e96acad6Smrg IFS="$lt_save_ifs" 8138e96acad6Smrg ;; 8139e96acad6Smrg esac], 8140e96acad6Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8141e96acad6Smrg 8142e96acad6Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 8143e96acad6Smrg [Whether or not to optimize for fast installation])dnl 8144e96acad6Smrg])# _LT_ENABLE_FAST_INSTALL 8145e96acad6Smrg 8146e96acad6SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8147e96acad6SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8148e96acad6Smrg 8149e96acad6Smrg# Old names: 8150e96acad6SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8151e96acad6Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8152e96acad6SmrgAC_DIAGNOSE([obsolete], 8153e96acad6Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8154e96acad6Smrgthe `fast-install' option into LT_INIT's first parameter.]) 8155e96acad6Smrg]) 8156e96acad6Smrg 8157e96acad6SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8158e96acad6Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8159e96acad6SmrgAC_DIAGNOSE([obsolete], 8160e96acad6Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8161e96acad6Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 8162e96acad6Smrg]) 8163e96acad6Smrg 8164e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 8165e96acad6Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8166e96acad6Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8167e96acad6Smrg 8168e96acad6Smrg 8169e96acad6Smrg# _LT_WITH_PIC([MODE]) 8170e96acad6Smrg# -------------------- 8171e96acad6Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 8172e96acad6Smrg# LT_INIT options. 8173e96acad6Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 8174e96acad6Smrgm4_define([_LT_WITH_PIC], 8175e96acad6Smrg[AC_ARG_WITH([pic], 8176e96acad6Smrg [AS_HELP_STRING([--with-pic], 8177e96acad6Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8178e96acad6Smrg [pic_mode="$withval"], 8179e96acad6Smrg [pic_mode=default]) 8180e96acad6Smrg 8181e96acad6Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 8182e96acad6Smrg 8183e96acad6Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8184e96acad6Smrg])# _LT_WITH_PIC 8185e96acad6Smrg 8186e96acad6SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8187e96acad6SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8188e96acad6Smrg 8189e96acad6Smrg# Old name: 8190e96acad6SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8191e96acad6Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8192e96acad6SmrgAC_DIAGNOSE([obsolete], 8193e96acad6Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8194e96acad6Smrgput the `pic-only' option into LT_INIT's first parameter.]) 8195e96acad6Smrg]) 8196e96acad6Smrg 8197e96acad6Smrgdnl aclocal-1.4 backwards compatibility: 8198e96acad6Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8199e96acad6Smrg 8200e96acad6Smrg 8201e96acad6Smrgm4_define([_LTDL_MODE], []) 8202e96acad6SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8203e96acad6Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8204e96acad6SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8205e96acad6Smrg [m4_define([_LTDL_MODE], [recursive])]) 8206e96acad6SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8207e96acad6Smrg [m4_define([_LTDL_MODE], [subproject])]) 8208e96acad6Smrg 8209e96acad6Smrgm4_define([_LTDL_TYPE], []) 8210e96acad6SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8211e96acad6Smrg [m4_define([_LTDL_TYPE], [installable])]) 8212e96acad6SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8213e96acad6Smrg [m4_define([_LTDL_TYPE], [convenience])]) 8214e96acad6Smrg 8215e96acad6Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8216e96acad6Smrg# 8217e96acad6Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 8218e96acad6Smrg# Written by Gary V. Vaughan, 2004 8219e96acad6Smrg# 8220e96acad6Smrg# This file is free software; the Free Software Foundation gives 8221e96acad6Smrg# unlimited permission to copy and/or distribute it, with or without 8222e96acad6Smrg# modifications, as long as this notice is preserved. 8223e96acad6Smrg 8224e96acad6Smrg# serial 6 ltsugar.m4 8225e96acad6Smrg 8226e96acad6Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8227e96acad6SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8228e96acad6Smrg 8229e96acad6Smrg 8230e96acad6Smrg# lt_join(SEP, ARG1, [ARG2...]) 8231e96acad6Smrg# ----------------------------- 8232e96acad6Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8233e96acad6Smrg# associated separator. 8234e96acad6Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8235e96acad6Smrg# versions in m4sugar had bugs. 8236e96acad6Smrgm4_define([lt_join], 8237e96acad6Smrg[m4_if([$#], [1], [], 8238e96acad6Smrg [$#], [2], [[$2]], 8239e96acad6Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8240e96acad6Smrgm4_define([_lt_join], 8241e96acad6Smrg[m4_if([$#$2], [2], [], 8242e96acad6Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8243e96acad6Smrg 8244e96acad6Smrg 8245e96acad6Smrg# lt_car(LIST) 8246e96acad6Smrg# lt_cdr(LIST) 8247e96acad6Smrg# ------------ 8248e96acad6Smrg# Manipulate m4 lists. 8249e96acad6Smrg# These macros are necessary as long as will still need to support 8250e96acad6Smrg# Autoconf-2.59 which quotes differently. 8251e96acad6Smrgm4_define([lt_car], [[$1]]) 8252e96acad6Smrgm4_define([lt_cdr], 8253e96acad6Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8254e96acad6Smrg [$#], 1, [], 8255e96acad6Smrg [m4_dquote(m4_shift($@))])]) 8256e96acad6Smrgm4_define([lt_unquote], $1) 8257e96acad6Smrg 8258e96acad6Smrg 8259e96acad6Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8260e96acad6Smrg# ------------------------------------------ 8261e96acad6Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 8262e96acad6Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8263e96acad6Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8264e96acad6Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8265e96acad6Smrg# than defined and empty). 8266e96acad6Smrg# 8267e96acad6Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8268e96acad6Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8269e96acad6Smrgm4_define([lt_append], 8270e96acad6Smrg[m4_define([$1], 8271e96acad6Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8272e96acad6Smrg 8273e96acad6Smrg 8274e96acad6Smrg 8275e96acad6Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8276e96acad6Smrg# ---------------------------------------------------------- 8277e96acad6Smrg# Produce a SEP delimited list of all paired combinations of elements of 8278e96acad6Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8279e96acad6Smrg# has the form PREFIXmINFIXSUFFIXn. 8280e96acad6Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8281e96acad6Smrgm4_define([lt_combine], 8282e96acad6Smrg[m4_if(m4_eval([$# > 3]), [1], 8283e96acad6Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8284e96acad6Smrg[[m4_foreach([_Lt_prefix], [$2], 8285e96acad6Smrg [m4_foreach([_Lt_suffix], 8286e96acad6Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8287e96acad6Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8288e96acad6Smrg 8289e96acad6Smrg 8290e96acad6Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8291e96acad6Smrg# ----------------------------------------------------------------------- 8292e96acad6Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8293e96acad6Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8294e96acad6Smrgm4_define([lt_if_append_uniq], 8295e96acad6Smrg[m4_ifdef([$1], 8296e96acad6Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8297e96acad6Smrg [lt_append([$1], [$2], [$3])$4], 8298e96acad6Smrg [$5])], 8299e96acad6Smrg [lt_append([$1], [$2], [$3])$4])]) 8300e96acad6Smrg 8301e96acad6Smrg 8302e96acad6Smrg# lt_dict_add(DICT, KEY, VALUE) 8303e96acad6Smrg# ----------------------------- 8304e96acad6Smrgm4_define([lt_dict_add], 8305e96acad6Smrg[m4_define([$1($2)], [$3])]) 8306e96acad6Smrg 8307e96acad6Smrg 8308e96acad6Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8309e96acad6Smrg# -------------------------------------------- 8310e96acad6Smrgm4_define([lt_dict_add_subkey], 8311e96acad6Smrg[m4_define([$1($2:$3)], [$4])]) 8312e96acad6Smrg 8313e96acad6Smrg 8314e96acad6Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8315e96acad6Smrg# ---------------------------------- 8316e96acad6Smrgm4_define([lt_dict_fetch], 8317e96acad6Smrg[m4_ifval([$3], 8318e96acad6Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8319e96acad6Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8320e96acad6Smrg 8321e96acad6Smrg 8322e96acad6Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8323e96acad6Smrg# ----------------------------------------------------------------- 8324e96acad6Smrgm4_define([lt_if_dict_fetch], 8325e96acad6Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8326e96acad6Smrg [$5], 8327e96acad6Smrg [$6])]) 8328e96acad6Smrg 8329e96acad6Smrg 8330e96acad6Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8331e96acad6Smrg# -------------------------------------------------------------- 8332e96acad6Smrgm4_define([lt_dict_filter], 8333e96acad6Smrg[m4_if([$5], [], [], 8334e96acad6Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8335e96acad6Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8336e96acad6Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8337e96acad6Smrg]) 8338e96acad6Smrg 8339e96acad6Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8340e96acad6Smrg# 8341e96acad6Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 8342e96acad6Smrg# Written by Scott James Remnant, 2004 8343e96acad6Smrg# 8344e96acad6Smrg# This file is free software; the Free Software Foundation gives 8345e96acad6Smrg# unlimited permission to copy and/or distribute it, with or without 8346e96acad6Smrg# modifications, as long as this notice is preserved. 8347e96acad6Smrg 8348e96acad6Smrg# @configure_input@ 8349e96acad6Smrg 8350e96acad6Smrg# serial 3293 ltversion.m4 8351e96acad6Smrg# This file is part of GNU Libtool 8352e96acad6Smrg 8353e96acad6Smrgm4_define([LT_PACKAGE_VERSION], [2.4]) 8354e96acad6Smrgm4_define([LT_PACKAGE_REVISION], [1.3293]) 8355e96acad6Smrg 8356e96acad6SmrgAC_DEFUN([LTVERSION_VERSION], 8357e96acad6Smrg[macro_version='2.4' 8358e96acad6Smrgmacro_revision='1.3293' 8359e96acad6Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8360e96acad6Smrg_LT_DECL(, macro_revision, 0) 8361dbbd9e4bSmacallan]) 8362dbbd9e4bSmacallan 8363e96acad6Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8364e96acad6Smrg# 8365e96acad6Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 8366e96acad6Smrg# Written by Scott James Remnant, 2004. 8367e96acad6Smrg# 8368e96acad6Smrg# This file is free software; the Free Software Foundation gives 8369e96acad6Smrg# unlimited permission to copy and/or distribute it, with or without 8370e96acad6Smrg# modifications, as long as this notice is preserved. 8371e96acad6Smrg 8372e96acad6Smrg# serial 5 lt~obsolete.m4 8373e96acad6Smrg 8374e96acad6Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 8375e96acad6Smrg# 8376e96acad6Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 8377e96acad6Smrg# which have later been changed to m4_define as they aren't part of the 8378e96acad6Smrg# exported API, or moved to Autoconf or Automake where they belong. 8379e96acad6Smrg# 8380e96acad6Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8381e96acad6Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8382e96acad6Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 8383e96acad6Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8384e96acad6Smrg# and doesn't know about Autoconf macros at all.) 8385e96acad6Smrg# 8386e96acad6Smrg# So we provide this file, which has a silly filename so it's always 8387e96acad6Smrg# included after everything else. This provides aclocal with the 8388e96acad6Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8389e96acad6Smrg# because those macros already exist, or will be overwritten later. 8390e96acad6Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8391e96acad6Smrg# 8392e96acad6Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8393e96acad6Smrg# Yes, that means every name once taken will need to remain here until 8394e96acad6Smrg# we give up compatibility with versions before 1.7, at which point 8395e96acad6Smrg# we need to keep only those names which we still refer to. 8396e96acad6Smrg 8397e96acad6Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8398e96acad6SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8399e96acad6Smrg 8400e96acad6Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8401e96acad6Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8402e96acad6Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8403e96acad6Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8404e96acad6Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8405e96acad6Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8406e96acad6Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8407e96acad6Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8408e96acad6Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8409e96acad6Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8410e96acad6Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8411e96acad6Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8412e96acad6Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8413e96acad6Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8414e96acad6Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8415e96acad6Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8416e96acad6Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8417e96acad6Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8418e96acad6Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8419e96acad6Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8420e96acad6Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8421e96acad6Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8422e96acad6Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8423e96acad6Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8424e96acad6Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8425e96acad6Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8426e96acad6Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8427e96acad6Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8428e96acad6Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8429e96acad6Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8430e96acad6Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8431e96acad6Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8432e96acad6Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8433e96acad6Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8434e96acad6Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8435e96acad6Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8436e96acad6Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8437e96acad6Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8438e96acad6Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8439e96acad6Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8440e96acad6Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8441e96acad6Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8442e96acad6Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8443e96acad6Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8444e96acad6Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8445e96acad6Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8446e96acad6Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8447e96acad6Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8448e96acad6Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8449e96acad6Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8450e96acad6Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8451e96acad6Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8452e96acad6Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8453e96acad6Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8454e96acad6Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8455e96acad6Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8456e96acad6Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8457e96acad6Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8458e96acad6Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8459e96acad6Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8460e96acad6Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 8461e96acad6Smrg 8462dbbd9e4bSmacallan# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 8463e96acad6Smrg# serial 1 (pkg-config-0.24) 8464dbbd9e4bSmacallan# 8465dbbd9e4bSmacallan# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 8466dbbd9e4bSmacallan# 8467dbbd9e4bSmacallan# This program is free software; you can redistribute it and/or modify 8468dbbd9e4bSmacallan# it under the terms of the GNU General Public License as published by 8469dbbd9e4bSmacallan# the Free Software Foundation; either version 2 of the License, or 8470dbbd9e4bSmacallan# (at your option) any later version. 8471dbbd9e4bSmacallan# 8472dbbd9e4bSmacallan# This program is distributed in the hope that it will be useful, but 8473dbbd9e4bSmacallan# WITHOUT ANY WARRANTY; without even the implied warranty of 8474dbbd9e4bSmacallan# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8475dbbd9e4bSmacallan# General Public License for more details. 8476dbbd9e4bSmacallan# 8477dbbd9e4bSmacallan# You should have received a copy of the GNU General Public License 8478dbbd9e4bSmacallan# along with this program; if not, write to the Free Software 8479dbbd9e4bSmacallan# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 8480dbbd9e4bSmacallan# 8481dbbd9e4bSmacallan# As a special exception to the GNU General Public License, if you 8482dbbd9e4bSmacallan# distribute this file as part of a program that contains a 8483dbbd9e4bSmacallan# configuration script generated by Autoconf, you may include it under 8484dbbd9e4bSmacallan# the same distribution terms that you use for the rest of that program. 8485dbbd9e4bSmacallan 8486dbbd9e4bSmacallan# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 8487dbbd9e4bSmacallan# ---------------------------------- 8488dbbd9e4bSmacallanAC_DEFUN([PKG_PROG_PKG_CONFIG], 8489dbbd9e4bSmacallan[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 8490e96acad6Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 8491e96acad6Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 8492e96acad6SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 8493e96acad6SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 8494e96acad6SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 8495e96acad6Smrg 8496dbbd9e4bSmacallanif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8497dbbd9e4bSmacallan AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8498dbbd9e4bSmacallanfi 8499dbbd9e4bSmacallanif test -n "$PKG_CONFIG"; then 8500dbbd9e4bSmacallan _pkg_min_version=m4_default([$1], [0.9.0]) 8501dbbd9e4bSmacallan AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8502dbbd9e4bSmacallan if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8503dbbd9e4bSmacallan AC_MSG_RESULT([yes]) 8504dbbd9e4bSmacallan else 8505dbbd9e4bSmacallan AC_MSG_RESULT([no]) 8506dbbd9e4bSmacallan PKG_CONFIG="" 8507dbbd9e4bSmacallan fi 8508dbbd9e4bSmacallanfi[]dnl 8509dbbd9e4bSmacallan])# PKG_PROG_PKG_CONFIG 8510dbbd9e4bSmacallan 8511dbbd9e4bSmacallan# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8512dbbd9e4bSmacallan# 8513dbbd9e4bSmacallan# Check to see whether a particular set of modules exists. Similar 8514dbbd9e4bSmacallan# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8515dbbd9e4bSmacallan# 8516e96acad6Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8517e96acad6Smrg# only at the first occurence in configure.ac, so if the first place 8518e96acad6Smrg# it's called might be skipped (such as if it is within an "if", you 8519e96acad6Smrg# have to call PKG_CHECK_EXISTS manually 8520dbbd9e4bSmacallan# -------------------------------------------------------------- 8521dbbd9e4bSmacallanAC_DEFUN([PKG_CHECK_EXISTS], 8522dbbd9e4bSmacallan[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8523dbbd9e4bSmacallanif test -n "$PKG_CONFIG" && \ 8524dbbd9e4bSmacallan AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8525e96acad6Smrg m4_default([$2], [:]) 8526dbbd9e4bSmacallanm4_ifvaln([$3], [else 8527dbbd9e4bSmacallan $3])dnl 8528dbbd9e4bSmacallanfi]) 8529dbbd9e4bSmacallan 8530dbbd9e4bSmacallan# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8531dbbd9e4bSmacallan# --------------------------------------------- 8532dbbd9e4bSmacallanm4_define([_PKG_CONFIG], 8533dbbd9e4bSmacallan[if test -n "$$1"; then 8534dbbd9e4bSmacallan pkg_cv_[]$1="$$1" 8535dbbd9e4bSmacallan elif test -n "$PKG_CONFIG"; then 8536dbbd9e4bSmacallan PKG_CHECK_EXISTS([$3], 8537e96acad6Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 8538e96acad6Smrg test "x$?" != "x0" && pkg_failed=yes ], 8539dbbd9e4bSmacallan [pkg_failed=yes]) 8540dbbd9e4bSmacallan else 8541dbbd9e4bSmacallan pkg_failed=untried 8542dbbd9e4bSmacallanfi[]dnl 8543dbbd9e4bSmacallan])# _PKG_CONFIG 8544dbbd9e4bSmacallan 8545dbbd9e4bSmacallan# _PKG_SHORT_ERRORS_SUPPORTED 8546dbbd9e4bSmacallan# ----------------------------- 8547dbbd9e4bSmacallanAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8548dbbd9e4bSmacallan[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8549dbbd9e4bSmacallanif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8550dbbd9e4bSmacallan _pkg_short_errors_supported=yes 8551dbbd9e4bSmacallanelse 8552dbbd9e4bSmacallan _pkg_short_errors_supported=no 8553dbbd9e4bSmacallanfi[]dnl 8554dbbd9e4bSmacallan])# _PKG_SHORT_ERRORS_SUPPORTED 8555dbbd9e4bSmacallan 8556dbbd9e4bSmacallan 8557dbbd9e4bSmacallan# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8558dbbd9e4bSmacallan# [ACTION-IF-NOT-FOUND]) 8559dbbd9e4bSmacallan# 8560dbbd9e4bSmacallan# 8561dbbd9e4bSmacallan# Note that if there is a possibility the first call to 8562dbbd9e4bSmacallan# PKG_CHECK_MODULES might not happen, you should be sure to include an 8563dbbd9e4bSmacallan# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8564dbbd9e4bSmacallan# 8565dbbd9e4bSmacallan# 8566dbbd9e4bSmacallan# -------------------------------------------------------------- 8567dbbd9e4bSmacallanAC_DEFUN([PKG_CHECK_MODULES], 8568dbbd9e4bSmacallan[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8569dbbd9e4bSmacallanAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8570dbbd9e4bSmacallanAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8571dbbd9e4bSmacallan 8572dbbd9e4bSmacallanpkg_failed=no 8573dbbd9e4bSmacallanAC_MSG_CHECKING([for $1]) 8574dbbd9e4bSmacallan 8575dbbd9e4bSmacallan_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8576dbbd9e4bSmacallan_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8577dbbd9e4bSmacallan 8578dbbd9e4bSmacallanm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8579dbbd9e4bSmacallanand $1[]_LIBS to avoid the need to call pkg-config. 8580dbbd9e4bSmacallanSee the pkg-config man page for more details.]) 8581dbbd9e4bSmacallan 8582dbbd9e4bSmacallanif test $pkg_failed = yes; then 8583e96acad6Smrg AC_MSG_RESULT([no]) 8584dbbd9e4bSmacallan _PKG_SHORT_ERRORS_SUPPORTED 8585dbbd9e4bSmacallan if test $_pkg_short_errors_supported = yes; then 8586e96acad6Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 8587dbbd9e4bSmacallan else 8588e96acad6Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 8589dbbd9e4bSmacallan fi 8590dbbd9e4bSmacallan # Put the nasty error message in config.log where it belongs 8591dbbd9e4bSmacallan echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8592dbbd9e4bSmacallan 8593e96acad6Smrg m4_default([$4], [AC_MSG_ERROR( 8594dbbd9e4bSmacallan[Package requirements ($2) were not met: 8595dbbd9e4bSmacallan 8596dbbd9e4bSmacallan$$1_PKG_ERRORS 8597dbbd9e4bSmacallan 8598dbbd9e4bSmacallanConsider adjusting the PKG_CONFIG_PATH environment variable if you 8599dbbd9e4bSmacallaninstalled software in a non-standard prefix. 8600dbbd9e4bSmacallan 8601e96acad6Smrg_PKG_TEXT])[]dnl 8602e96acad6Smrg ]) 8603dbbd9e4bSmacallanelif test $pkg_failed = untried; then 8604e96acad6Smrg AC_MSG_RESULT([no]) 8605e96acad6Smrg m4_default([$4], [AC_MSG_FAILURE( 8606dbbd9e4bSmacallan[The pkg-config script could not be found or is too old. Make sure it 8607dbbd9e4bSmacallanis in your PATH or set the PKG_CONFIG environment variable to the full 8608dbbd9e4bSmacallanpath to pkg-config. 8609dbbd9e4bSmacallan 8610dbbd9e4bSmacallan_PKG_TEXT 8611dbbd9e4bSmacallan 8612e96acad6SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 8613e96acad6Smrg ]) 8614dbbd9e4bSmacallanelse 8615dbbd9e4bSmacallan $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8616dbbd9e4bSmacallan $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8617dbbd9e4bSmacallan AC_MSG_RESULT([yes]) 8618e96acad6Smrg $3 8619dbbd9e4bSmacallanfi[]dnl 8620dbbd9e4bSmacallan])# PKG_CHECK_MODULES 8621dbbd9e4bSmacallan 8622e96acad6Smrg 8623e96acad6Smrg# PKG_INSTALLDIR(DIRECTORY) 8624e96acad6Smrg# ------------------------- 8625e96acad6Smrg# Substitutes the variable pkgconfigdir as the location where a module 8626e96acad6Smrg# should install pkg-config .pc files. By default the directory is 8627e96acad6Smrg# $libdir/pkgconfig, but the default can be changed by passing 8628e96acad6Smrg# DIRECTORY. The user can override through the --with-pkgconfigdir 8629e96acad6Smrg# parameter. 8630e96acad6SmrgAC_DEFUN([PKG_INSTALLDIR], 8631e96acad6Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 8632e96acad6Smrgm4_pushdef([pkg_description], 8633e96acad6Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 8634e96acad6SmrgAC_ARG_WITH([pkgconfigdir], 8635e96acad6Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 8636e96acad6Smrg [with_pkgconfigdir=]pkg_default) 8637e96acad6SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 8638e96acad6Smrgm4_popdef([pkg_default]) 8639e96acad6Smrgm4_popdef([pkg_description]) 8640e96acad6Smrg]) dnl PKG_INSTALLDIR 8641e96acad6Smrg 8642e96acad6Smrg 8643e96acad6Smrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 8644e96acad6Smrg# ------------------------- 8645e96acad6Smrg# Substitutes the variable noarch_pkgconfigdir as the location where a 8646e96acad6Smrg# module should install arch-independent pkg-config .pc files. By 8647e96acad6Smrg# default the directory is $datadir/pkgconfig, but the default can be 8648e96acad6Smrg# changed by passing DIRECTORY. The user can override through the 8649e96acad6Smrg# --with-noarch-pkgconfigdir parameter. 8650e96acad6SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 8651e96acad6Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 8652e96acad6Smrgm4_pushdef([pkg_description], 8653e96acad6Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 8654e96acad6SmrgAC_ARG_WITH([noarch-pkgconfigdir], 8655e96acad6Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 8656e96acad6Smrg [with_noarch_pkgconfigdir=]pkg_default) 8657e96acad6SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 8658e96acad6Smrgm4_popdef([pkg_default]) 8659e96acad6Smrgm4_popdef([pkg_description]) 8660e96acad6Smrg]) dnl PKG_NOARCH_INSTALLDIR 8661e96acad6Smrg 86621c397cbaSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 8663dbbd9e4bSmacallandnl 8664e96acad6Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 8665dbbd9e4bSmacallandnl 8666dbbd9e4bSmacallandnl Permission is hereby granted, free of charge, to any person obtaining a 8667e96acad6Smrgdnl copy of this software and associated documentation files (the "Software"), 8668e96acad6Smrgdnl to deal in the Software without restriction, including without limitation 8669e96acad6Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 8670e96acad6Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 8671e96acad6Smrgdnl Software is furnished to do so, subject to the following conditions: 8672dbbd9e4bSmacallandnl 8673e96acad6Smrgdnl The above copyright notice and this permission notice (including the next 8674e96acad6Smrgdnl paragraph) shall be included in all copies or substantial portions of the 8675e96acad6Smrgdnl Software. 8676dbbd9e4bSmacallandnl 8677e96acad6Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 8678e96acad6Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 8679e96acad6Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 8680e96acad6Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 8681e96acad6Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 8682e96acad6Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 8683e96acad6Smrgdnl DEALINGS IN THE SOFTWARE. 8684dbbd9e4bSmacallan 8685dbbd9e4bSmacallan# XORG_MACROS_VERSION(required-version) 8686dbbd9e4bSmacallan# ------------------------------------- 8687dbbd9e4bSmacallan# Minimum version: 1.1.0 8688dbbd9e4bSmacallan# 8689dbbd9e4bSmacallan# If you're using a macro added in Version 1.1 or newer, include this in 8690dbbd9e4bSmacallan# your configure.ac with the minimum required version, such as: 8691dbbd9e4bSmacallan# XORG_MACROS_VERSION(1.1) 8692dbbd9e4bSmacallan# 8693e96acad6Smrg# To ensure that this macro is defined, also add: 8694e96acad6Smrg# m4_ifndef([XORG_MACROS_VERSION], 8695e96acad6Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 8696dbbd9e4bSmacallan# 8697dbbd9e4bSmacallan# 8698dbbd9e4bSmacallan# See the "minimum version" comment for each macro you use to see what 8699dbbd9e4bSmacallan# version you require. 8700e96acad6Smrgm4_defun([XORG_MACROS_VERSION],[ 8701e96acad6Smrgm4_define([vers_have], [1.17]) 8702e96acad6Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 8703e96acad6Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 8704e96acad6Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 8705e96acad6Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 8706e96acad6Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 8707e96acad6Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 8708e96acad6Smrgm4_undefine([vers_have]) 8709e96acad6Smrgm4_undefine([maj_have]) 8710e96acad6Smrgm4_undefine([maj_needed]) 8711dbbd9e4bSmacallan]) # XORG_MACROS_VERSION 8712dbbd9e4bSmacallan 8713dbbd9e4bSmacallan# XORG_PROG_RAWCPP() 8714dbbd9e4bSmacallan# ------------------ 8715dbbd9e4bSmacallan# Minimum version: 1.0.0 8716dbbd9e4bSmacallan# 8717dbbd9e4bSmacallan# Find cpp program and necessary flags for use in pre-processing text files 8718dbbd9e4bSmacallan# such as man pages and config files 8719dbbd9e4bSmacallanAC_DEFUN([XORG_PROG_RAWCPP],[ 8720dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_CPP]) 8721dbbd9e4bSmacallanAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 8722dbbd9e4bSmacallan [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 8723dbbd9e4bSmacallan 8724dbbd9e4bSmacallan# Check for flag to avoid builtin definitions - assumes unix is predefined, 8725dbbd9e4bSmacallan# which is not the best choice for supporting other OS'es, but covers most 8726dbbd9e4bSmacallan# of the ones we need for now. 8727dbbd9e4bSmacallanAC_MSG_CHECKING([if $RAWCPP requires -undef]) 8728e96acad6SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 8729dbbd9e4bSmacallanif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8730dbbd9e4bSmacallan AC_MSG_RESULT([no]) 8731dbbd9e4bSmacallanelse 8732dbbd9e4bSmacallan if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8733dbbd9e4bSmacallan RAWCPPFLAGS=-undef 8734dbbd9e4bSmacallan AC_MSG_RESULT([yes]) 87351c397cbaSmrg # under Cygwin unix is still defined even with -undef 87361c397cbaSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 87371c397cbaSmrg RAWCPPFLAGS="-undef -ansi" 87381c397cbaSmrg AC_MSG_RESULT([yes, with -ansi]) 8739dbbd9e4bSmacallan else 8740dbbd9e4bSmacallan AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 8741dbbd9e4bSmacallan fi 8742dbbd9e4bSmacallanfi 8743dbbd9e4bSmacallanrm -f conftest.$ac_ext 8744dbbd9e4bSmacallan 8745dbbd9e4bSmacallanAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 8746e96acad6SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 8747dbbd9e4bSmacallanif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8748dbbd9e4bSmacallan AC_MSG_RESULT([no]) 8749dbbd9e4bSmacallanelse 8750dbbd9e4bSmacallan if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8751dbbd9e4bSmacallan RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 8752dbbd9e4bSmacallan AC_MSG_RESULT([yes]) 8753dbbd9e4bSmacallan else 8754dbbd9e4bSmacallan AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 8755dbbd9e4bSmacallan fi 8756dbbd9e4bSmacallanfi 8757dbbd9e4bSmacallanrm -f conftest.$ac_ext 8758dbbd9e4bSmacallanAC_SUBST(RAWCPPFLAGS) 8759dbbd9e4bSmacallan]) # XORG_PROG_RAWCPP 8760dbbd9e4bSmacallan 8761dbbd9e4bSmacallan# XORG_MANPAGE_SECTIONS() 8762dbbd9e4bSmacallan# ----------------------- 8763dbbd9e4bSmacallan# Minimum version: 1.0.0 8764dbbd9e4bSmacallan# 8765dbbd9e4bSmacallan# Determine which sections man pages go in for the different man page types 8766dbbd9e4bSmacallan# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 8767dbbd9e4bSmacallan# Not sure if there's any better way than just hardcoding by OS name. 8768dbbd9e4bSmacallan# Override default settings by setting environment variables 8769e96acad6Smrg# Added MAN_SUBSTS in version 1.8 8770e96acad6Smrg# Added AC_PROG_SED in version 1.8 8771dbbd9e4bSmacallan 8772dbbd9e4bSmacallanAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 8773dbbd9e4bSmacallanAC_REQUIRE([AC_CANONICAL_HOST]) 8774e96acad6SmrgAC_REQUIRE([AC_PROG_SED]) 8775dbbd9e4bSmacallan 8776dbbd9e4bSmacallanif test x$APP_MAN_SUFFIX = x ; then 8777dbbd9e4bSmacallan APP_MAN_SUFFIX=1 8778dbbd9e4bSmacallanfi 8779dbbd9e4bSmacallanif test x$APP_MAN_DIR = x ; then 8780dbbd9e4bSmacallan APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 8781dbbd9e4bSmacallanfi 8782dbbd9e4bSmacallan 8783dbbd9e4bSmacallanif test x$LIB_MAN_SUFFIX = x ; then 8784dbbd9e4bSmacallan LIB_MAN_SUFFIX=3 8785dbbd9e4bSmacallanfi 8786dbbd9e4bSmacallanif test x$LIB_MAN_DIR = x ; then 8787dbbd9e4bSmacallan LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 8788dbbd9e4bSmacallanfi 8789dbbd9e4bSmacallan 8790dbbd9e4bSmacallanif test x$FILE_MAN_SUFFIX = x ; then 8791dbbd9e4bSmacallan case $host_os in 8792dbbd9e4bSmacallan solaris*) FILE_MAN_SUFFIX=4 ;; 8793dbbd9e4bSmacallan *) FILE_MAN_SUFFIX=5 ;; 8794dbbd9e4bSmacallan esac 8795dbbd9e4bSmacallanfi 8796dbbd9e4bSmacallanif test x$FILE_MAN_DIR = x ; then 8797dbbd9e4bSmacallan FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 8798dbbd9e4bSmacallanfi 8799dbbd9e4bSmacallan 8800dbbd9e4bSmacallanif test x$MISC_MAN_SUFFIX = x ; then 8801dbbd9e4bSmacallan case $host_os in 8802dbbd9e4bSmacallan solaris*) MISC_MAN_SUFFIX=5 ;; 8803dbbd9e4bSmacallan *) MISC_MAN_SUFFIX=7 ;; 8804dbbd9e4bSmacallan esac 8805dbbd9e4bSmacallanfi 8806dbbd9e4bSmacallanif test x$MISC_MAN_DIR = x ; then 8807dbbd9e4bSmacallan MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 8808dbbd9e4bSmacallanfi 8809dbbd9e4bSmacallan 8810dbbd9e4bSmacallanif test x$DRIVER_MAN_SUFFIX = x ; then 8811dbbd9e4bSmacallan case $host_os in 8812dbbd9e4bSmacallan solaris*) DRIVER_MAN_SUFFIX=7 ;; 8813dbbd9e4bSmacallan *) DRIVER_MAN_SUFFIX=4 ;; 8814dbbd9e4bSmacallan esac 8815dbbd9e4bSmacallanfi 8816dbbd9e4bSmacallanif test x$DRIVER_MAN_DIR = x ; then 8817dbbd9e4bSmacallan DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 8818dbbd9e4bSmacallanfi 8819dbbd9e4bSmacallan 8820dbbd9e4bSmacallanif test x$ADMIN_MAN_SUFFIX = x ; then 8821dbbd9e4bSmacallan case $host_os in 8822dbbd9e4bSmacallan solaris*) ADMIN_MAN_SUFFIX=1m ;; 8823dbbd9e4bSmacallan *) ADMIN_MAN_SUFFIX=8 ;; 8824dbbd9e4bSmacallan esac 8825dbbd9e4bSmacallanfi 8826dbbd9e4bSmacallanif test x$ADMIN_MAN_DIR = x ; then 8827dbbd9e4bSmacallan ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 8828dbbd9e4bSmacallanfi 8829dbbd9e4bSmacallan 8830dbbd9e4bSmacallan 8831dbbd9e4bSmacallanAC_SUBST([APP_MAN_SUFFIX]) 8832dbbd9e4bSmacallanAC_SUBST([LIB_MAN_SUFFIX]) 8833dbbd9e4bSmacallanAC_SUBST([FILE_MAN_SUFFIX]) 8834dbbd9e4bSmacallanAC_SUBST([MISC_MAN_SUFFIX]) 8835dbbd9e4bSmacallanAC_SUBST([DRIVER_MAN_SUFFIX]) 8836dbbd9e4bSmacallanAC_SUBST([ADMIN_MAN_SUFFIX]) 8837dbbd9e4bSmacallanAC_SUBST([APP_MAN_DIR]) 8838dbbd9e4bSmacallanAC_SUBST([LIB_MAN_DIR]) 8839dbbd9e4bSmacallanAC_SUBST([FILE_MAN_DIR]) 8840dbbd9e4bSmacallanAC_SUBST([MISC_MAN_DIR]) 8841dbbd9e4bSmacallanAC_SUBST([DRIVER_MAN_DIR]) 8842dbbd9e4bSmacallanAC_SUBST([ADMIN_MAN_DIR]) 8843e96acad6Smrg 8844e96acad6SmrgXORG_MAN_PAGE="X Version 11" 8845e96acad6SmrgAC_SUBST([XORG_MAN_PAGE]) 8846e96acad6SmrgMAN_SUBSTS="\ 8847e96acad6Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 8848e96acad6Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 8849e96acad6Smrg -e 's|__xservername__|Xorg|g' \ 8850e96acad6Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 8851e96acad6Smrg -e 's|__projectroot__|\$(prefix)|g' \ 8852e96acad6Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 8853e96acad6Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 8854e96acad6Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 8855e96acad6Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 8856e96acad6Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 8857e96acad6Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 8858e96acad6Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 8859e96acad6SmrgAC_SUBST([MAN_SUBSTS]) 8860e96acad6Smrg 8861dbbd9e4bSmacallan]) # XORG_MANPAGE_SECTIONS 8862dbbd9e4bSmacallan 8863e96acad6Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 8864e96acad6Smrg# ------------------------ 8865e96acad6Smrg# Minimum version: 1.7.0 8866e96acad6Smrg# 8867e96acad6Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 8868e96acad6Smrg# provided by xorg-sgml-doctools, if installed. 8869e96acad6SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 8870e96acad6SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 8871e96acad6SmrgXORG_SGML_PATH= 8872e96acad6SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 8873e96acad6Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 8874e96acad6Smrg [m4_ifval([$1],[:], 8875e96acad6Smrg [if test x"$cross_compiling" != x"yes" ; then 8876e96acad6Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 8877e96acad6Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 8878e96acad6Smrg fi]) 8879e96acad6Smrg ]) 8880e96acad6Smrg 8881e96acad6Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 8882e96acad6Smrg# the path and the name of the doc stylesheet 8883e96acad6Smrgif test "x$XORG_SGML_PATH" != "x" ; then 8884e96acad6Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 8885e96acad6Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 8886e96acad6Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 8887e96acad6Smrgelse 8888e96acad6Smrg AC_MSG_RESULT([no]) 8889e96acad6Smrgfi 8890e96acad6Smrg 8891e96acad6SmrgAC_SUBST(XORG_SGML_PATH) 8892e96acad6SmrgAC_SUBST(STYLESHEET_SRCDIR) 8893e96acad6SmrgAC_SUBST(XSL_STYLESHEET) 8894e96acad6SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 8895e96acad6Smrg]) # XORG_CHECK_SGML_DOCTOOLS 8896e96acad6Smrg 8897dbbd9e4bSmacallan# XORG_CHECK_LINUXDOC 8898dbbd9e4bSmacallan# ------------------- 8899dbbd9e4bSmacallan# Minimum version: 1.0.0 8900dbbd9e4bSmacallan# 8901dbbd9e4bSmacallan# Defines the variable MAKE_TEXT if the necessary tools and 8902dbbd9e4bSmacallan# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 8903dbbd9e4bSmacallan# Whether or not the necessary tools and files are found can be checked 8904dbbd9e4bSmacallan# with the AM_CONDITIONAL "BUILD_LINUXDOC" 8905dbbd9e4bSmacallanAC_DEFUN([XORG_CHECK_LINUXDOC],[ 8906e96acad6SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 8907e96acad6SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 8908dbbd9e4bSmacallan 8909dbbd9e4bSmacallanAC_PATH_PROG(LINUXDOC, linuxdoc) 8910dbbd9e4bSmacallan 8911e96acad6SmrgAC_MSG_CHECKING([whether to build documentation]) 8912dbbd9e4bSmacallan 8913e96acad6Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 8914dbbd9e4bSmacallan BUILDDOC=yes 8915dbbd9e4bSmacallanelse 8916dbbd9e4bSmacallan BUILDDOC=no 8917dbbd9e4bSmacallanfi 8918dbbd9e4bSmacallan 8919dbbd9e4bSmacallanAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 8920dbbd9e4bSmacallan 8921dbbd9e4bSmacallanAC_MSG_RESULT([$BUILDDOC]) 8922dbbd9e4bSmacallan 8923e96acad6SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 8924dbbd9e4bSmacallan 8925e96acad6Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 8926dbbd9e4bSmacallan BUILDPDFDOC=yes 8927dbbd9e4bSmacallanelse 8928dbbd9e4bSmacallan BUILDPDFDOC=no 8929dbbd9e4bSmacallanfi 8930dbbd9e4bSmacallan 8931dbbd9e4bSmacallanAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 8932dbbd9e4bSmacallan 8933dbbd9e4bSmacallanAC_MSG_RESULT([$BUILDPDFDOC]) 8934dbbd9e4bSmacallan 8935e96acad6SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 8936dbbd9e4bSmacallanMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 8937dbbd9e4bSmacallanMAKE_PDF="$PS2PDF" 8938dbbd9e4bSmacallanMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 8939dbbd9e4bSmacallan 8940dbbd9e4bSmacallanAC_SUBST(MAKE_TEXT) 8941dbbd9e4bSmacallanAC_SUBST(MAKE_PS) 8942dbbd9e4bSmacallanAC_SUBST(MAKE_PDF) 8943dbbd9e4bSmacallanAC_SUBST(MAKE_HTML) 8944dbbd9e4bSmacallan]) # XORG_CHECK_LINUXDOC 8945dbbd9e4bSmacallan 8946dbbd9e4bSmacallan# XORG_CHECK_DOCBOOK 8947dbbd9e4bSmacallan# ------------------- 8948dbbd9e4bSmacallan# Minimum version: 1.0.0 8949dbbd9e4bSmacallan# 8950dbbd9e4bSmacallan# Checks for the ability to build output formats from SGML DocBook source. 8951dbbd9e4bSmacallan# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 8952dbbd9e4bSmacallan# indicates whether the necessary tools and files are found and, if set, 8953dbbd9e4bSmacallan# $(MAKE_XXX) blah.sgml will produce blah.xxx. 8954dbbd9e4bSmacallanAC_DEFUN([XORG_CHECK_DOCBOOK],[ 8955e96acad6SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 8956e96acad6Smrg 8957dbbd9e4bSmacallanBUILDTXTDOC=no 8958dbbd9e4bSmacallanBUILDPDFDOC=no 8959dbbd9e4bSmacallanBUILDPSDOC=no 8960dbbd9e4bSmacallanBUILDHTMLDOC=no 8961dbbd9e4bSmacallan 8962dbbd9e4bSmacallanAC_PATH_PROG(DOCBOOKPS, docbook2ps) 8963dbbd9e4bSmacallanAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 8964dbbd9e4bSmacallanAC_PATH_PROG(DOCBOOKHTML, docbook2html) 8965dbbd9e4bSmacallanAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 8966dbbd9e4bSmacallan 8967e96acad6SmrgAC_MSG_CHECKING([whether to build text documentation]) 8968e96acad6Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 8969dbbd9e4bSmacallan test x$BUILD_TXTDOC != xno; then 8970dbbd9e4bSmacallan BUILDTXTDOC=yes 8971dbbd9e4bSmacallanfi 8972dbbd9e4bSmacallanAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 8973dbbd9e4bSmacallanAC_MSG_RESULT([$BUILDTXTDOC]) 8974dbbd9e4bSmacallan 8975e96acad6SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 8976e96acad6Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 8977dbbd9e4bSmacallan test x$BUILD_PDFDOC != xno; then 8978dbbd9e4bSmacallan BUILDPDFDOC=yes 8979dbbd9e4bSmacallanfi 8980dbbd9e4bSmacallanAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 8981dbbd9e4bSmacallanAC_MSG_RESULT([$BUILDPDFDOC]) 8982dbbd9e4bSmacallan 8983e96acad6SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 8984e96acad6Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 8985dbbd9e4bSmacallan test x$BUILD_PSDOC != xno; then 8986dbbd9e4bSmacallan BUILDPSDOC=yes 8987dbbd9e4bSmacallanfi 8988dbbd9e4bSmacallanAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 8989dbbd9e4bSmacallanAC_MSG_RESULT([$BUILDPSDOC]) 8990dbbd9e4bSmacallan 8991e96acad6SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 8992e96acad6Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 8993dbbd9e4bSmacallan test x$BUILD_HTMLDOC != xno; then 8994dbbd9e4bSmacallan BUILDHTMLDOC=yes 8995dbbd9e4bSmacallanfi 8996dbbd9e4bSmacallanAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 8997dbbd9e4bSmacallanAC_MSG_RESULT([$BUILDHTMLDOC]) 8998dbbd9e4bSmacallan 8999e96acad6SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9000e96acad6SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9001e96acad6SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9002e96acad6SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9003e96acad6Smrg 9004e96acad6SmrgAC_SUBST(MAKE_TEXT) 9005e96acad6SmrgAC_SUBST(MAKE_PS) 9006e96acad6SmrgAC_SUBST(MAKE_PDF) 9007e96acad6SmrgAC_SUBST(MAKE_HTML) 9008e96acad6Smrg]) # XORG_CHECK_DOCBOOK 9009e96acad6Smrg 9010e96acad6Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9011e96acad6Smrg# ---------------- 9012e96acad6Smrg# Minimum version: 1.5.0 9013e96acad6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9014e96acad6Smrg# 9015e96acad6Smrg# Documentation tools are not always available on all platforms and sometimes 9016e96acad6Smrg# not at the appropriate level. This macro enables a module to test for the 9017e96acad6Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9018e96acad6Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9019e96acad6Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9020e96acad6Smrg# --with-xmlto assumes 'auto'. 9021e96acad6Smrg# 9022e96acad6Smrg# Interface to module: 9023e96acad6Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9024e96acad6Smrg# XMLTO: returns the path of the xmlto program found 9025e96acad6Smrg# returns the path set by the user in the environment 9026e96acad6Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9027e96acad6Smrg# 'no' user instructs the module not to use xmlto 9028e96acad6Smrg# 9029e96acad6Smrg# Added in version 1.10.0 9030e96acad6Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9031e96acad6Smrg# xmlto for text output requires either lynx, links, or w3m browsers 9032e96acad6Smrg# 9033e96acad6Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9034e96acad6Smrg# 9035e96acad6SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9036e96acad6SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9037e96acad6Smrgm4_define([_defopt], m4_default([$2], [auto])) 9038e96acad6SmrgAC_ARG_WITH(xmlto, 9039e96acad6Smrg AS_HELP_STRING([--with-xmlto], 9040e96acad6Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9041e96acad6Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9042e96acad6Smrgm4_undefine([_defopt]) 9043e96acad6Smrg 9044e96acad6Smrgif test "x$use_xmlto" = x"auto"; then 9045e96acad6Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9046e96acad6Smrg if test "x$XMLTO" = "x"; then 9047e96acad6Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9048e96acad6Smrg have_xmlto=no 9049e96acad6Smrg else 9050e96acad6Smrg have_xmlto=yes 9051e96acad6Smrg fi 9052e96acad6Smrgelif test "x$use_xmlto" = x"yes" ; then 9053e96acad6Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9054e96acad6Smrg if test "x$XMLTO" = "x"; then 9055e96acad6Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9056e96acad6Smrg fi 9057e96acad6Smrg have_xmlto=yes 9058e96acad6Smrgelif test "x$use_xmlto" = x"no" ; then 9059e96acad6Smrg if test "x$XMLTO" != "x"; then 9060e96acad6Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9061e96acad6Smrg fi 9062e96acad6Smrg have_xmlto=no 9063e96acad6Smrgelse 9064e96acad6Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9065e96acad6Smrgfi 9066e96acad6Smrg 9067e96acad6Smrg# Test for a minimum version of xmlto, if provided. 9068e96acad6Smrgm4_ifval([$1], 9069e96acad6Smrg[if test "$have_xmlto" = yes; then 9070e96acad6Smrg # scrape the xmlto version 9071e96acad6Smrg AC_MSG_CHECKING([the xmlto version]) 9072e96acad6Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9073e96acad6Smrg AC_MSG_RESULT([$xmlto_version]) 9074e96acad6Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9075e96acad6Smrg [if test "x$use_xmlto" = xauto; then 9076e96acad6Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9077e96acad6Smrg have_xmlto=no 9078e96acad6Smrg else 9079e96acad6Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9080e96acad6Smrg fi]) 9081e96acad6Smrgfi]) 9082e96acad6Smrg 9083e96acad6Smrg# Test for the ability of xmlto to generate a text target 9084e96acad6Smrghave_xmlto_text=no 9085e96acad6Smrgcat > conftest.xml << "EOF" 9086e96acad6SmrgEOF 9087e96acad6SmrgAS_IF([test "$have_xmlto" = yes], 9088e96acad6Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9089e96acad6Smrg [have_xmlto_text=yes], 9090e96acad6Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9091e96acad6Smrgrm -f conftest.xml 9092e96acad6SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9093e96acad6SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9094e96acad6Smrg]) # XORG_WITH_XMLTO 9095e96acad6Smrg 9096e96acad6Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9097e96acad6Smrg# -------------------------------------------- 9098e96acad6Smrg# Minimum version: 1.12.0 9099e96acad6Smrg# Minimum version for optional DEFAULT argument: 1.12.0 9100e96acad6Smrg# 9101e96acad6Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9102e96acad6Smrg# XML-based language used for the transformation of XML documents. 9103e96acad6Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9104e96acad6Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9105e96acad6Smrg# The XSLT processor is often used as a standalone tool for transformations. 9106e96acad6Smrg# It should not be assumed that this tool is used only to work with documnetation. 9107e96acad6Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9108e96acad6Smrg# 9109e96acad6Smrg# Interface to module: 9110e96acad6Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9111e96acad6Smrg# XSLTPROC: returns the path of the xsltproc program found 9112e96acad6Smrg# returns the path set by the user in the environment 9113e96acad6Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9114e96acad6Smrg# 'no' user instructs the module not to use xsltproc 9115e96acad6Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9116e96acad6Smrg# 9117e96acad6Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9118e96acad6Smrg# 9119e96acad6SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9120e96acad6SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9121e96acad6Smrg# Preserves the interface, should it be implemented later 9122e96acad6Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9123e96acad6Smrgm4_define([_defopt], m4_default([$2], [auto])) 9124e96acad6SmrgAC_ARG_WITH(xsltproc, 9125e96acad6Smrg AS_HELP_STRING([--with-xsltproc], 9126e96acad6Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9127e96acad6Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9128e96acad6Smrgm4_undefine([_defopt]) 9129e96acad6Smrg 9130e96acad6Smrgif test "x$use_xsltproc" = x"auto"; then 9131e96acad6Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9132e96acad6Smrg if test "x$XSLTPROC" = "x"; then 9133e96acad6Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9134e96acad6Smrg have_xsltproc=no 9135e96acad6Smrg else 9136e96acad6Smrg have_xsltproc=yes 9137e96acad6Smrg fi 9138e96acad6Smrgelif test "x$use_xsltproc" = x"yes" ; then 9139e96acad6Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9140e96acad6Smrg if test "x$XSLTPROC" = "x"; then 9141e96acad6Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9142e96acad6Smrg fi 9143e96acad6Smrg have_xsltproc=yes 9144e96acad6Smrgelif test "x$use_xsltproc" = x"no" ; then 9145e96acad6Smrg if test "x$XSLTPROC" != "x"; then 9146e96acad6Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9147e96acad6Smrg fi 9148e96acad6Smrg have_xsltproc=no 9149e96acad6Smrgelse 9150e96acad6Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9151e96acad6Smrgfi 9152e96acad6Smrg 9153e96acad6SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9154e96acad6Smrg]) # XORG_WITH_XSLTPROC 9155e96acad6Smrg 9156e96acad6Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9157e96acad6Smrg# ---------------------------------------- 9158e96acad6Smrg# Minimum version: 1.15.0 9159e96acad6Smrg# 9160e96acad6Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 9161e96acad6Smrg# scanning arbitrary text files, extracting information from those text files, 9162e96acad6Smrg# and printing reports based on that information. 9163e96acad6Smrg# 9164e96acad6Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9165e96acad6Smrg# 9166e96acad6Smrg# Interface to module: 9167e96acad6Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 9168e96acad6Smrg# PERL: returns the path of the perl program found 9169e96acad6Smrg# returns the path set by the user in the environment 9170e96acad6Smrg# --with-perl: 'yes' user instructs the module to use perl 9171e96acad6Smrg# 'no' user instructs the module not to use perl 9172e96acad6Smrg# have_perl: returns yes if perl found in PATH or no 9173e96acad6Smrg# 9174e96acad6Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9175e96acad6Smrg# 9176e96acad6SmrgAC_DEFUN([XORG_WITH_PERL],[ 9177e96acad6SmrgAC_ARG_VAR([PERL], [Path to perl command]) 9178e96acad6Smrg# Preserves the interface, should it be implemented later 9179e96acad6Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9180e96acad6Smrgm4_define([_defopt], m4_default([$2], [auto])) 9181e96acad6SmrgAC_ARG_WITH(perl, 9182e96acad6Smrg AS_HELP_STRING([--with-perl], 9183e96acad6Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 9184e96acad6Smrg [use_perl=$withval], [use_perl=]_defopt) 9185e96acad6Smrgm4_undefine([_defopt]) 9186e96acad6Smrg 9187e96acad6Smrgif test "x$use_perl" = x"auto"; then 9188e96acad6Smrg AC_PATH_PROG([PERL], [perl]) 9189e96acad6Smrg if test "x$PERL" = "x"; then 9190e96acad6Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9191e96acad6Smrg have_perl=no 9192e96acad6Smrg else 9193e96acad6Smrg have_perl=yes 9194e96acad6Smrg fi 9195e96acad6Smrgelif test "x$use_perl" = x"yes" ; then 9196e96acad6Smrg AC_PATH_PROG([PERL], [perl]) 9197e96acad6Smrg if test "x$PERL" = "x"; then 9198e96acad6Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9199e96acad6Smrg fi 9200e96acad6Smrg have_perl=yes 9201e96acad6Smrgelif test "x$use_perl" = x"no" ; then 9202e96acad6Smrg if test "x$PERL" != "x"; then 9203e96acad6Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9204e96acad6Smrg fi 9205e96acad6Smrg have_perl=no 9206e96acad6Smrgelse 9207e96acad6Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9208e96acad6Smrgfi 9209e96acad6Smrg 9210e96acad6SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9211e96acad6Smrg]) # XORG_WITH_PERL 9212e96acad6Smrg 9213e96acad6Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9214e96acad6Smrg# ---------------- 9215e96acad6Smrg# Minimum version: 1.5.0 9216e96acad6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9217e96acad6Smrg# 9218e96acad6Smrg# Documentation tools are not always available on all platforms and sometimes 9219e96acad6Smrg# not at the appropriate level. This macro enables a module to test for the 9220e96acad6Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9221e96acad6Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9222e96acad6Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9223e96acad6Smrg# --with-asciidoc assumes 'auto'. 9224e96acad6Smrg# 9225e96acad6Smrg# Interface to module: 9226e96acad6Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9227e96acad6Smrg# ASCIIDOC: returns the path of the asciidoc program found 9228e96acad6Smrg# returns the path set by the user in the environment 9229e96acad6Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9230e96acad6Smrg# 'no' user instructs the module not to use asciidoc 9231e96acad6Smrg# 9232e96acad6Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9233e96acad6Smrg# 9234e96acad6SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 9235e96acad6SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9236e96acad6Smrgm4_define([_defopt], m4_default([$2], [auto])) 9237e96acad6SmrgAC_ARG_WITH(asciidoc, 9238e96acad6Smrg AS_HELP_STRING([--with-asciidoc], 9239e96acad6Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9240e96acad6Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9241e96acad6Smrgm4_undefine([_defopt]) 9242e96acad6Smrg 9243e96acad6Smrgif test "x$use_asciidoc" = x"auto"; then 9244e96acad6Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9245e96acad6Smrg if test "x$ASCIIDOC" = "x"; then 9246e96acad6Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9247e96acad6Smrg have_asciidoc=no 9248e96acad6Smrg else 9249e96acad6Smrg have_asciidoc=yes 9250e96acad6Smrg fi 9251e96acad6Smrgelif test "x$use_asciidoc" = x"yes" ; then 9252e96acad6Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9253e96acad6Smrg if test "x$ASCIIDOC" = "x"; then 9254e96acad6Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9255e96acad6Smrg fi 9256e96acad6Smrg have_asciidoc=yes 9257e96acad6Smrgelif test "x$use_asciidoc" = x"no" ; then 9258e96acad6Smrg if test "x$ASCIIDOC" != "x"; then 9259e96acad6Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9260e96acad6Smrg fi 9261e96acad6Smrg have_asciidoc=no 9262e96acad6Smrgelse 9263e96acad6Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9264e96acad6Smrgfi 9265e96acad6Smrgm4_ifval([$1], 9266e96acad6Smrg[if test "$have_asciidoc" = yes; then 9267e96acad6Smrg # scrape the asciidoc version 9268e96acad6Smrg AC_MSG_CHECKING([the asciidoc version]) 9269e96acad6Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9270e96acad6Smrg AC_MSG_RESULT([$asciidoc_version]) 9271e96acad6Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 9272e96acad6Smrg [if test "x$use_asciidoc" = xauto; then 9273e96acad6Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9274e96acad6Smrg have_asciidoc=no 9275e96acad6Smrg else 9276e96acad6Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9277e96acad6Smrg fi]) 9278e96acad6Smrgfi]) 9279e96acad6SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9280e96acad6Smrg]) # XORG_WITH_ASCIIDOC 9281e96acad6Smrg 9282e96acad6Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 9283e96acad6Smrg# -------------------------------- 9284e96acad6Smrg# Minimum version: 1.5.0 9285e96acad6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9286e96acad6Smrg# 9287e96acad6Smrg# Documentation tools are not always available on all platforms and sometimes 9288e96acad6Smrg# not at the appropriate level. This macro enables a module to test for the 9289e96acad6Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9290e96acad6Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 9291e96acad6Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 9292e96acad6Smrg# --with-doxygen assumes 'auto'. 9293e96acad6Smrg# 9294e96acad6Smrg# Interface to module: 9295e96acad6Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9296e96acad6Smrg# DOXYGEN: returns the path of the doxygen program found 9297e96acad6Smrg# returns the path set by the user in the environment 9298e96acad6Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 9299e96acad6Smrg# 'no' user instructs the module not to use doxygen 9300e96acad6Smrg# 9301e96acad6Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9302e96acad6Smrg# 9303e96acad6SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 9304e96acad6SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 9305e96acad6Smrgm4_define([_defopt], m4_default([$2], [auto])) 9306e96acad6SmrgAC_ARG_WITH(doxygen, 9307e96acad6Smrg AS_HELP_STRING([--with-doxygen], 9308e96acad6Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 9309e96acad6Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 9310e96acad6Smrgm4_undefine([_defopt]) 9311e96acad6Smrg 9312e96acad6Smrgif test "x$use_doxygen" = x"auto"; then 9313e96acad6Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9314e96acad6Smrg if test "x$DOXYGEN" = "x"; then 9315e96acad6Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 9316e96acad6Smrg have_doxygen=no 9317e96acad6Smrg else 9318e96acad6Smrg have_doxygen=yes 9319e96acad6Smrg fi 9320e96acad6Smrgelif test "x$use_doxygen" = x"yes" ; then 9321e96acad6Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9322e96acad6Smrg if test "x$DOXYGEN" = "x"; then 9323e96acad6Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 9324e96acad6Smrg fi 9325e96acad6Smrg have_doxygen=yes 9326e96acad6Smrgelif test "x$use_doxygen" = x"no" ; then 9327e96acad6Smrg if test "x$DOXYGEN" != "x"; then 9328e96acad6Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 9329e96acad6Smrg fi 9330e96acad6Smrg have_doxygen=no 9331e96acad6Smrgelse 9332e96acad6Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 9333e96acad6Smrgfi 9334e96acad6Smrgm4_ifval([$1], 9335e96acad6Smrg[if test "$have_doxygen" = yes; then 9336e96acad6Smrg # scrape the doxygen version 9337e96acad6Smrg AC_MSG_CHECKING([the doxygen version]) 9338e96acad6Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 9339e96acad6Smrg AC_MSG_RESULT([$doxygen_version]) 9340e96acad6Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 9341e96acad6Smrg [if test "x$use_doxygen" = xauto; then 9342e96acad6Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 9343e96acad6Smrg have_doxygen=no 9344e96acad6Smrg else 9345e96acad6Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 9346e96acad6Smrg fi]) 9347e96acad6Smrgfi]) 9348e96acad6SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 9349e96acad6Smrg]) # XORG_WITH_DOXYGEN 9350e96acad6Smrg 9351e96acad6Smrg# XORG_WITH_GROFF([DEFAULT]) 9352e96acad6Smrg# ---------------- 9353e96acad6Smrg# Minimum version: 1.6.0 9354e96acad6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9355e96acad6Smrg# 9356e96acad6Smrg# Documentation tools are not always available on all platforms and sometimes 9357e96acad6Smrg# not at the appropriate level. This macro enables a module to test for the 9358e96acad6Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9359e96acad6Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 9360e96acad6Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 9361e96acad6Smrg# --with-groff assumes 'auto'. 9362e96acad6Smrg# 9363e96acad6Smrg# Interface to module: 9364e96acad6Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 9365e96acad6Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 9366e96acad6Smrg# HAVE_GROFF_MS: the -ms macros package 9367e96acad6Smrg# GROFF: returns the path of the groff program found 9368e96acad6Smrg# returns the path set by the user in the environment 9369e96acad6Smrg# --with-groff: 'yes' user instructs the module to use groff 9370e96acad6Smrg# 'no' user instructs the module not to use groff 9371e96acad6Smrg# 9372e96acad6Smrg# Added in version 1.9.0: 9373e96acad6Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 9374e96acad6Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 9375e96acad6Smrg# psselect from the psutils package. 9376e96acad6Smrg# the ghostcript package. Refer to the grohtml man pages 9377e96acad6Smrg# 9378e96acad6Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 9379e96acad6Smrg# 9380e96acad6Smrg# OS and distros often splits groff in a basic and full package, the former 9381e96acad6Smrg# having the groff program and the later having devices, fonts and macros 9382e96acad6Smrg# Checking for the groff executable is not enough. 9383e96acad6Smrg# 9384e96acad6Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 9385e96acad6Smrg# unset HAVE_GROFF or GROFF env variables. 9386e96acad6Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 9387e96acad6Smrg# 9388e96acad6SmrgAC_DEFUN([XORG_WITH_GROFF],[ 9389e96acad6SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 9390e96acad6Smrgm4_define([_defopt], m4_default([$1], [auto])) 9391e96acad6SmrgAC_ARG_WITH(groff, 9392e96acad6Smrg AS_HELP_STRING([--with-groff], 9393e96acad6Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 9394e96acad6Smrg [use_groff=$withval], [use_groff=]_defopt) 9395e96acad6Smrgm4_undefine([_defopt]) 9396e96acad6Smrg 9397e96acad6Smrgif test "x$use_groff" = x"auto"; then 9398e96acad6Smrg AC_PATH_PROG([GROFF], [groff]) 9399e96acad6Smrg if test "x$GROFF" = "x"; then 9400e96acad6Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 9401e96acad6Smrg have_groff=no 9402e96acad6Smrg else 9403e96acad6Smrg have_groff=yes 9404e96acad6Smrg fi 9405e96acad6Smrgelif test "x$use_groff" = x"yes" ; then 9406e96acad6Smrg AC_PATH_PROG([GROFF], [groff]) 9407e96acad6Smrg if test "x$GROFF" = "x"; then 9408e96acad6Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 9409e96acad6Smrg fi 9410e96acad6Smrg have_groff=yes 9411e96acad6Smrgelif test "x$use_groff" = x"no" ; then 9412e96acad6Smrg if test "x$GROFF" != "x"; then 9413e96acad6Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 9414e96acad6Smrg fi 9415e96acad6Smrg have_groff=no 9416e96acad6Smrgelse 9417e96acad6Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 9418e96acad6Smrgfi 9419e96acad6Smrg 9420e96acad6Smrg# We have groff, test for the presence of the macro packages 9421e96acad6Smrgif test "x$have_groff" = x"yes"; then 9422e96acad6Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 9423e96acad6Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 9424e96acad6Smrg groff_ms_works=yes 9425e96acad6Smrg else 9426e96acad6Smrg groff_ms_works=no 9427e96acad6Smrg fi 9428e96acad6Smrg AC_MSG_RESULT([$groff_ms_works]) 9429e96acad6Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 9430e96acad6Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 9431e96acad6Smrg groff_mm_works=yes 9432e96acad6Smrg else 9433e96acad6Smrg groff_mm_works=no 9434e96acad6Smrg fi 9435e96acad6Smrg AC_MSG_RESULT([$groff_mm_works]) 9436e96acad6Smrgfi 9437e96acad6Smrg 9438e96acad6Smrg# We have groff, test for HTML dependencies, one command per package 9439e96acad6Smrgif test "x$have_groff" = x"yes"; then 9440e96acad6Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 9441e96acad6Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 9442e96acad6Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 9443e96acad6Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 9444e96acad6Smrg have_groff_html=yes 9445e96acad6Smrg else 9446e96acad6Smrg have_groff_html=no 9447e96acad6Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 9448e96acad6Smrg fi 9449e96acad6Smrgfi 9450e96acad6Smrg 9451e96acad6Smrg# Set Automake conditionals for Makefiles 9452e96acad6SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 9453e96acad6SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 9454e96acad6SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 9455e96acad6SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 9456e96acad6Smrg]) # XORG_WITH_GROFF 9457e96acad6Smrg 9458e96acad6Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 9459e96acad6Smrg# --------------------------------------- 9460e96acad6Smrg# Minimum version: 1.6.0 9461e96acad6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9462e96acad6Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 9463e96acad6Smrg# 9464e96acad6Smrg# Documentation tools are not always available on all platforms and sometimes 9465e96acad6Smrg# not at the appropriate level. This macro enables a module to test for the 9466e96acad6Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9467e96acad6Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 9468e96acad6Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 9469e96acad6Smrg# --with-fop assumes 'auto'. 9470e96acad6Smrg# 9471e96acad6Smrg# Interface to module: 9472e96acad6Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 9473e96acad6Smrg# FOP: returns the path of the fop program found 9474e96acad6Smrg# returns the path set by the user in the environment 9475e96acad6Smrg# --with-fop: 'yes' user instructs the module to use fop 9476e96acad6Smrg# 'no' user instructs the module not to use fop 9477e96acad6Smrg# 9478e96acad6Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 9479e96acad6Smrg# 9480e96acad6SmrgAC_DEFUN([XORG_WITH_FOP],[ 9481e96acad6SmrgAC_ARG_VAR([FOP], [Path to fop command]) 9482e96acad6Smrgm4_define([_defopt], m4_default([$2], [auto])) 9483e96acad6SmrgAC_ARG_WITH(fop, 9484e96acad6Smrg AS_HELP_STRING([--with-fop], 9485e96acad6Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 9486e96acad6Smrg [use_fop=$withval], [use_fop=]_defopt) 9487e96acad6Smrgm4_undefine([_defopt]) 9488e96acad6Smrg 9489e96acad6Smrgif test "x$use_fop" = x"auto"; then 9490e96acad6Smrg AC_PATH_PROG([FOP], [fop]) 9491e96acad6Smrg if test "x$FOP" = "x"; then 9492e96acad6Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 9493e96acad6Smrg have_fop=no 9494e96acad6Smrg else 9495e96acad6Smrg have_fop=yes 9496e96acad6Smrg fi 9497e96acad6Smrgelif test "x$use_fop" = x"yes" ; then 9498e96acad6Smrg AC_PATH_PROG([FOP], [fop]) 9499e96acad6Smrg if test "x$FOP" = "x"; then 9500e96acad6Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 9501e96acad6Smrg fi 9502e96acad6Smrg have_fop=yes 9503e96acad6Smrgelif test "x$use_fop" = x"no" ; then 9504e96acad6Smrg if test "x$FOP" != "x"; then 9505e96acad6Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 9506e96acad6Smrg fi 9507e96acad6Smrg have_fop=no 9508e96acad6Smrgelse 9509e96acad6Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 9510e96acad6Smrgfi 9511e96acad6Smrg 9512e96acad6Smrg# Test for a minimum version of fop, if provided. 9513e96acad6Smrgm4_ifval([$1], 9514e96acad6Smrg[if test "$have_fop" = yes; then 9515e96acad6Smrg # scrape the fop version 9516e96acad6Smrg AC_MSG_CHECKING([for fop minimum version]) 9517e96acad6Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 9518e96acad6Smrg AC_MSG_RESULT([$fop_version]) 9519e96acad6Smrg AS_VERSION_COMPARE([$fop_version], [$1], 9520e96acad6Smrg [if test "x$use_fop" = xauto; then 9521e96acad6Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 9522e96acad6Smrg have_fop=no 9523e96acad6Smrg else 9524e96acad6Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 9525e96acad6Smrg fi]) 9526e96acad6Smrgfi]) 9527e96acad6SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 9528e96acad6Smrg]) # XORG_WITH_FOP 9529e96acad6Smrg 9530e96acad6Smrg# XORG_WITH_PS2PDF([DEFAULT]) 9531e96acad6Smrg# ---------------- 9532e96acad6Smrg# Minimum version: 1.6.0 9533e96acad6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9534e96acad6Smrg# 9535e96acad6Smrg# Documentation tools are not always available on all platforms and sometimes 9536e96acad6Smrg# not at the appropriate level. This macro enables a module to test for the 9537e96acad6Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9538e96acad6Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 9539e96acad6Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 9540e96acad6Smrg# --with-ps2pdf assumes 'auto'. 9541e96acad6Smrg# 9542e96acad6Smrg# Interface to module: 9543e96acad6Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 9544e96acad6Smrg# PS2PDF: returns the path of the ps2pdf program found 9545e96acad6Smrg# returns the path set by the user in the environment 9546e96acad6Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 9547e96acad6Smrg# 'no' user instructs the module not to use ps2pdf 9548e96acad6Smrg# 9549e96acad6Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 9550e96acad6Smrg# 9551e96acad6SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 9552e96acad6SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 9553e96acad6Smrgm4_define([_defopt], m4_default([$1], [auto])) 9554e96acad6SmrgAC_ARG_WITH(ps2pdf, 9555e96acad6Smrg AS_HELP_STRING([--with-ps2pdf], 9556e96acad6Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 9557e96acad6Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 9558e96acad6Smrgm4_undefine([_defopt]) 9559e96acad6Smrg 9560e96acad6Smrgif test "x$use_ps2pdf" = x"auto"; then 9561e96acad6Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 9562e96acad6Smrg if test "x$PS2PDF" = "x"; then 9563e96acad6Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 9564e96acad6Smrg have_ps2pdf=no 9565e96acad6Smrg else 9566e96acad6Smrg have_ps2pdf=yes 9567e96acad6Smrg fi 9568e96acad6Smrgelif test "x$use_ps2pdf" = x"yes" ; then 9569e96acad6Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 9570e96acad6Smrg if test "x$PS2PDF" = "x"; then 9571e96acad6Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 9572e96acad6Smrg fi 9573e96acad6Smrg have_ps2pdf=yes 9574e96acad6Smrgelif test "x$use_ps2pdf" = x"no" ; then 9575e96acad6Smrg if test "x$PS2PDF" != "x"; then 9576e96acad6Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 9577e96acad6Smrg fi 9578e96acad6Smrg have_ps2pdf=no 9579e96acad6Smrgelse 9580e96acad6Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 9581e96acad6Smrgfi 9582e96acad6SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 9583e96acad6Smrg]) # XORG_WITH_PS2PDF 9584e96acad6Smrg 9585e96acad6Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 9586e96acad6Smrg# ---------------- 9587e96acad6Smrg# Minimum version: 1.6.0 9588e96acad6Smrg# 9589e96acad6Smrg# Documentation tools are not always available on all platforms and sometimes 9590e96acad6Smrg# not at the appropriate level. This macro enables a builder to skip all 9591e96acad6Smrg# documentation targets except traditional man pages. 9592e96acad6Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9593e96acad6Smrg# maximum flexibilty in controlling documentation building. 9594e96acad6Smrg# Refer to: 9595e96acad6Smrg# XORG_WITH_XMLTO --with-xmlto 9596e96acad6Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 9597e96acad6Smrg# XORG_WITH_DOXYGEN --with-doxygen 9598e96acad6Smrg# XORG_WITH_FOP --with-fop 9599e96acad6Smrg# XORG_WITH_GROFF --with-groff 9600e96acad6Smrg# XORG_WITH_PS2PDF --with-ps2pdf 9601e96acad6Smrg# 9602e96acad6Smrg# Interface to module: 9603e96acad6Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 9604e96acad6Smrg# --enable-docs: 'yes' user instructs the module to generate docs 9605e96acad6Smrg# 'no' user instructs the module not to generate docs 9606e96acad6Smrg# parm1: specify the default value, yes or no. 9607e96acad6Smrg# 9608e96acad6SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 9609e96acad6Smrgm4_define([docs_default], m4_default([$1], [yes])) 9610e96acad6SmrgAC_ARG_ENABLE(docs, 9611e96acad6Smrg AS_HELP_STRING([--enable-docs], 9612e96acad6Smrg [Enable building the documentation (default: ]docs_default[)]), 9613e96acad6Smrg [build_docs=$enableval], [build_docs=]docs_default) 9614e96acad6Smrgm4_undefine([docs_default]) 9615e96acad6SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 9616e96acad6SmrgAC_MSG_CHECKING([whether to build documentation]) 9617e96acad6SmrgAC_MSG_RESULT([$build_docs]) 9618e96acad6Smrg]) # XORG_ENABLE_DOCS 9619e96acad6Smrg 9620e96acad6Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 9621e96acad6Smrg# ---------------- 9622e96acad6Smrg# Minimum version: 1.6.0 9623e96acad6Smrg# 9624e96acad6Smrg# This macro enables a builder to skip all developer documentation. 9625e96acad6Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9626e96acad6Smrg# maximum flexibilty in controlling documentation building. 9627e96acad6Smrg# Refer to: 9628e96acad6Smrg# XORG_WITH_XMLTO --with-xmlto 9629e96acad6Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 9630e96acad6Smrg# XORG_WITH_DOXYGEN --with-doxygen 9631e96acad6Smrg# XORG_WITH_FOP --with-fop 9632e96acad6Smrg# XORG_WITH_GROFF --with-groff 9633e96acad6Smrg# XORG_WITH_PS2PDF --with-ps2pdf 9634e96acad6Smrg# 9635e96acad6Smrg# Interface to module: 9636e96acad6Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 9637e96acad6Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 9638e96acad6Smrg# 'no' user instructs the module not to generate developer docs 9639e96acad6Smrg# parm1: specify the default value, yes or no. 9640e96acad6Smrg# 9641e96acad6SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 9642e96acad6Smrgm4_define([devel_default], m4_default([$1], [yes])) 9643e96acad6SmrgAC_ARG_ENABLE(devel-docs, 9644e96acad6Smrg AS_HELP_STRING([--enable-devel-docs], 9645e96acad6Smrg [Enable building the developer documentation (default: ]devel_default[)]), 9646e96acad6Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 9647e96acad6Smrgm4_undefine([devel_default]) 9648e96acad6SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 9649e96acad6SmrgAC_MSG_CHECKING([whether to build developer documentation]) 9650e96acad6SmrgAC_MSG_RESULT([$build_devel_docs]) 9651e96acad6Smrg]) # XORG_ENABLE_DEVEL_DOCS 9652e96acad6Smrg 9653e96acad6Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 9654e96acad6Smrg# ---------------- 9655e96acad6Smrg# Minimum version: 1.6.0 9656e96acad6Smrg# 9657e96acad6Smrg# This macro enables a builder to skip all functional specification targets. 9658e96acad6Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9659e96acad6Smrg# maximum flexibilty in controlling documentation building. 9660e96acad6Smrg# Refer to: 9661e96acad6Smrg# XORG_WITH_XMLTO --with-xmlto 9662e96acad6Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 9663e96acad6Smrg# XORG_WITH_DOXYGEN --with-doxygen 9664e96acad6Smrg# XORG_WITH_FOP --with-fop 9665e96acad6Smrg# XORG_WITH_GROFF --with-groff 9666e96acad6Smrg# XORG_WITH_PS2PDF --with-ps2pdf 9667e96acad6Smrg# 9668e96acad6Smrg# Interface to module: 9669e96acad6Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 9670e96acad6Smrg# --enable-specs: 'yes' user instructs the module to generate specs 9671e96acad6Smrg# 'no' user instructs the module not to generate specs 9672e96acad6Smrg# parm1: specify the default value, yes or no. 9673e96acad6Smrg# 9674e96acad6SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 9675e96acad6Smrgm4_define([spec_default], m4_default([$1], [yes])) 9676e96acad6SmrgAC_ARG_ENABLE(specs, 9677e96acad6Smrg AS_HELP_STRING([--enable-specs], 9678e96acad6Smrg [Enable building the specs (default: ]spec_default[)]), 9679e96acad6Smrg [build_specs=$enableval], [build_specs=]spec_default) 9680e96acad6Smrgm4_undefine([spec_default]) 9681e96acad6SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 9682e96acad6SmrgAC_MSG_CHECKING([whether to build functional specifications]) 9683e96acad6SmrgAC_MSG_RESULT([$build_specs]) 9684e96acad6Smrg]) # XORG_ENABLE_SPECS 9685e96acad6Smrg 9686e96acad6Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 9687e96acad6Smrg# ---------------------------------------------- 9688e96acad6Smrg# Minimum version: 1.13.0 9689e96acad6Smrg# 9690e96acad6Smrg# This macro enables a builder to enable/disable unit testing 9691e96acad6Smrg# It makes no assumption about the test cases implementation 9692e96acad6Smrg# Test cases may or may not use Automake "Support for test suites" 9693e96acad6Smrg# They may or may not use the software utility library GLib 9694e96acad6Smrg# 9695e96acad6Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 9696e96acad6Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 9697e96acad6Smrg# The variable enable_unit_tests is used by other macros in this file. 9698e96acad6Smrg# 9699e96acad6Smrg# Interface to module: 9700e96acad6Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 9701e96acad6Smrg# enable_unit_tests: used in configure.ac for additional configuration 9702e96acad6Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 9703e96acad6Smrg# 'no' user instructs the module not to build tests 9704e96acad6Smrg# parm1: specify the default value, yes or no. 9705e96acad6Smrg# 9706e96acad6SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 9707e96acad6SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 9708e96acad6SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 9709e96acad6SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9710e96acad6Smrgm4_define([_defopt], m4_default([$1], [auto])) 9711e96acad6SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 9712e96acad6Smrg [Enable building unit test cases (default: ]_defopt[)]), 9713e96acad6Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 9714e96acad6Smrgm4_undefine([_defopt]) 9715e96acad6SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 9716e96acad6SmrgAC_MSG_CHECKING([whether to build unit test cases]) 9717e96acad6SmrgAC_MSG_RESULT([$enable_unit_tests]) 9718e96acad6Smrg]) # XORG_ENABLE_UNIT_TESTS 9719e96acad6Smrg 9720e96acad6Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 9721e96acad6Smrg# ------------------------------------------------------ 9722e96acad6Smrg# Minimum version: 1.17.0 9723e96acad6Smrg# 9724e96acad6Smrg# This macro enables a builder to enable/disable integration testing 9725e96acad6Smrg# It makes no assumption about the test cases' implementation 9726e96acad6Smrg# Test cases may or may not use Automake "Support for test suites" 9727e96acad6Smrg# 9728e96acad6Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 9729e96acad6Smrg# usually requires less dependencies and may be built and run under less 9730e96acad6Smrg# stringent environments than integration tests. 9731e96acad6Smrg# 9732e96acad6Smrg# Interface to module: 9733e96acad6Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 9734e96acad6Smrg# enable_integration_tests: used in configure.ac for additional configuration 9735e96acad6Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 9736e96acad6Smrg# 'no' user instructs the module not to build tests 9737e96acad6Smrg# parm1: specify the default value, yes or no. 9738e96acad6Smrg# 9739e96acad6SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 9740e96acad6SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9741e96acad6Smrgm4_define([_defopt], m4_default([$1], [auto])) 9742e96acad6SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 9743e96acad6Smrg [Enable building integration test cases (default: ]_defopt[)]), 9744e96acad6Smrg [enable_integration_tests=$enableval], 9745e96acad6Smrg [enable_integration_tests=]_defopt) 9746e96acad6Smrgm4_undefine([_defopt]) 9747e96acad6SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 9748e96acad6Smrg [test "x$enable_integration_tests" != xno]) 9749e96acad6SmrgAC_MSG_CHECKING([whether to build unit test cases]) 9750e96acad6SmrgAC_MSG_RESULT([$enable_integration_tests]) 9751e96acad6Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 9752e96acad6Smrg 9753e96acad6Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 9754e96acad6Smrg# ---------------------------------------- 9755e96acad6Smrg# Minimum version: 1.13.0 9756e96acad6Smrg# 9757e96acad6Smrg# GLib is a library which provides advanced data structures and functions. 9758e96acad6Smrg# This macro enables a module to test for the presence of Glib. 9759e96acad6Smrg# 9760e96acad6Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 9761e96acad6Smrg# Otherwise the value of $enable_unit_tests is blank. 9762e96acad6Smrg# 9763e96acad6Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 9764e96acad6Smrg# test support usually requires less dependencies and may be built and run under 9765e96acad6Smrg# less stringent environments than integration tests. 9766e96acad6Smrg# 9767e96acad6Smrg# Interface to module: 9768e96acad6Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 9769e96acad6Smrg# with_glib: used in configure.ac to know if GLib has been found 9770e96acad6Smrg# --with-glib: 'yes' user instructs the module to use glib 9771e96acad6Smrg# 'no' user instructs the module not to use glib 9772e96acad6Smrg# 9773e96acad6SmrgAC_DEFUN([XORG_WITH_GLIB],[ 9774e96acad6SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9775e96acad6Smrgm4_define([_defopt], m4_default([$2], [auto])) 9776e96acad6SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 9777e96acad6Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 9778e96acad6Smrg [with_glib=$withval], [with_glib=]_defopt) 9779e96acad6Smrgm4_undefine([_defopt]) 9780e96acad6Smrg 9781e96acad6Smrghave_glib=no 9782e96acad6Smrg# Do not probe GLib if user explicitly disabled unit testing 9783e96acad6Smrgif test "x$enable_unit_tests" != x"no"; then 9784e96acad6Smrg # Do not probe GLib if user explicitly disabled it 9785e96acad6Smrg if test "x$with_glib" != x"no"; then 9786e96acad6Smrg m4_ifval( 9787e96acad6Smrg [$1], 9788e96acad6Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 9789e96acad6Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 9790e96acad6Smrg ) 9791e96acad6Smrg fi 9792e96acad6Smrgfi 9793e96acad6Smrg 9794e96acad6Smrg# Not having GLib when unit testing has been explicitly requested is an error 9795e96acad6Smrgif test "x$enable_unit_tests" = x"yes"; then 9796e96acad6Smrg if test "x$have_glib" = x"no"; then 9797e96acad6Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9798e96acad6Smrg fi 9799e96acad6Smrgfi 9800e96acad6Smrg 9801e96acad6Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 9802e96acad6Smrgif test "x$enable_unit_tests" = x"no"; then 9803e96acad6Smrg if test "x$with_glib" = x"yes"; then 9804e96acad6Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9805e96acad6Smrg fi 9806e96acad6Smrgfi 9807e96acad6Smrg 9808e96acad6Smrg# Not having GLib when it has been explicitly requested is an error 9809e96acad6Smrgif test "x$with_glib" = x"yes"; then 9810e96acad6Smrg if test "x$have_glib" = x"no"; then 9811e96acad6Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 9812e96acad6Smrg fi 9813e96acad6Smrgfi 9814e96acad6Smrg 9815e96acad6SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 9816e96acad6Smrg]) # XORG_WITH_GLIB 9817e96acad6Smrg 9818e96acad6Smrg# XORG_LD_WRAP([required|optional]) 9819e96acad6Smrg# --------------------------------- 9820e96acad6Smrg# Minimum version: 1.13.0 9821e96acad6Smrg# 9822e96acad6Smrg# Check if linker supports -wrap, passed via compiler flags 9823e96acad6Smrg# 9824e96acad6Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 9825e96acad6Smrg# Otherwise the value of $enable_unit_tests is blank. 9826e96acad6Smrg# 9827e96acad6Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 9828e96acad6Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 9829e96acad6Smrg# available, an argument of "optional" allows use when some unit tests require 9830e96acad6Smrg# ld -wrap and others do not. 9831e96acad6Smrg# 9832e96acad6SmrgAC_DEFUN([XORG_LD_WRAP],[ 9833e96acad6SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 9834e96acad6Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 9835e96acad6Smrg void __wrap_exit(int status) { return; }], 9836e96acad6Smrg [exit(0);])]) 9837e96acad6Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 9838e96acad6Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 9839e96acad6Smrg if test "x$have_ld_wrap" = x"no"; then 9840e96acad6Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 9841e96acad6Smrg fi 9842e96acad6Smrgfi 9843e96acad6SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 9844e96acad6Smrg# 9845e96acad6Smrg]) # XORG_LD_WRAP 9846e96acad6Smrg 9847e96acad6Smrg# XORG_CHECK_LINKER_FLAGS 9848e96acad6Smrg# ----------------------- 9849e96acad6Smrg# SYNOPSIS 9850e96acad6Smrg# 9851e96acad6Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 9852e96acad6Smrg# 9853e96acad6Smrg# DESCRIPTION 9854e96acad6Smrg# 9855e96acad6Smrg# Check whether the given linker FLAGS work with the current language's 9856e96acad6Smrg# linker, or whether they give an error. 9857e96acad6Smrg# 9858e96acad6Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 9859e96acad6Smrg# success/failure. 9860e96acad6Smrg# 9861e96acad6Smrg# PROGRAM-SOURCE is the program source to link with, if needed 9862e96acad6Smrg# 9863e96acad6Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 9864e96acad6Smrg# 9865e96acad6Smrg# LICENSE 9866e96acad6Smrg# 9867e96acad6Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 9868e96acad6Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 9869e96acad6Smrg# Copyright (c) 2009 Matteo Frigo 9870e96acad6Smrg# 9871e96acad6Smrg# This program is free software: you can redistribute it and/or modify it 9872e96acad6Smrg# under the terms of the GNU General Public License as published by the 9873e96acad6Smrg# Free Software Foundation, either version 3 of the License, or (at your 9874e96acad6Smrg# option) any later version. 9875e96acad6Smrg# 9876e96acad6Smrg# This program is distributed in the hope that it will be useful, but 9877e96acad6Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9878e96acad6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 9879e96acad6Smrg# Public License for more details. 9880e96acad6Smrg# 9881e96acad6Smrg# You should have received a copy of the GNU General Public License along 9882e96acad6Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 9883e96acad6Smrg# 9884e96acad6Smrg# As a special exception, the respective Autoconf Macro's copyright owner 9885e96acad6Smrg# gives unlimited permission to copy, distribute and modify the configure 9886e96acad6Smrg# scripts that are the output of Autoconf when processing the Macro. You 9887e96acad6Smrg# need not follow the terms of the GNU General Public License when using 9888e96acad6Smrg# or distributing such scripts, even though portions of the text of the 9889e96acad6Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 9890e96acad6Smrg# all other use of the material that constitutes the Autoconf Macro. 9891e96acad6Smrg# 9892e96acad6Smrg# This special exception to the GPL applies to versions of the Autoconf 9893e96acad6Smrg# Macro released by the Autoconf Archive. When you make and distribute a 9894e96acad6Smrg# modified version of the Autoconf Macro, you may extend this special 9895e96acad6Smrg# exception to the GPL to apply to your modified version as well.# 9896e96acad6SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 9897e96acad6Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 9898e96acad6Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 9899e96acad6SmrgAS_LITERAL_IF([$1], 9900e96acad6Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 9901e96acad6Smrg ax_save_FLAGS=$LDFLAGS 9902e96acad6Smrg LDFLAGS="$1" 9903e96acad6Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 9904e96acad6Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 9905e96acad6Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 9906e96acad6Smrg LDFLAGS=$ax_save_FLAGS])], 9907e96acad6Smrg [ax_save_FLAGS=$LDFLAGS 9908e96acad6Smrg LDFLAGS="$1" 9909e96acad6Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 9910e96acad6Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 9911e96acad6Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 9912e96acad6Smrg LDFLAGS=$ax_save_FLAGS]) 9913e96acad6Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 9914e96acad6SmrgAC_MSG_RESULT($xorg_check_linker_flags) 9915e96acad6Smrgif test "x$xorg_check_linker_flags" = xyes; then 9916e96acad6Smrg m4_default([$2], :) 9917e96acad6Smrgelse 9918e96acad6Smrg m4_default([$3], :) 9919e96acad6Smrgfi 9920e96acad6Smrg]) # XORG_CHECK_LINKER_FLAGS 9921e96acad6Smrg 9922e96acad6Smrg# XORG_MEMORY_CHECK_FLAGS 9923e96acad6Smrg# ----------------------- 9924e96acad6Smrg# Minimum version: 1.16.0 9925e96acad6Smrg# 9926e96acad6Smrg# This macro attempts to find appropriate memory checking functionality 9927e96acad6Smrg# for various platforms which unit testing code may use to catch various 9928e96acad6Smrg# forms of memory allocation and access errors in testing. 9929e96acad6Smrg# 9930e96acad6Smrg# Interface to module: 9931e96acad6Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 9932e96acad6Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 9933e96acad6Smrg# 9934e96acad6Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 9935e96acad6Smrg# 9936e96acad6SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 9937e96acad6Smrg 9938e96acad6SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9939e96acad6SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 9940e96acad6Smrg [Environment variables to enable memory checking in tests]) 9941e96acad6Smrg 9942e96acad6Smrg# Check for different types of support on different platforms 9943e96acad6Smrgcase $host_os in 9944e96acad6Smrg solaris*) 9945e96acad6Smrg AC_CHECK_LIB([umem], [umem_alloc], 9946e96acad6Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 9947e96acad6Smrg ;; 9948e96acad6Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 9949e96acad6Smrg # both directly and inverted, so should not be 0 or 255. 9950e96acad6Smrg malloc_debug_env='MALLOC_PERTURB_=15' 9951e96acad6Smrg ;; 9952e96acad6Smrg darwin*) 9953e96acad6Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 9954e96acad6Smrg ;; 9955e96acad6Smrg *bsd*) 9956e96acad6Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 9957e96acad6Smrg ;; 9958e96acad6Smrgesac 9959e96acad6Smrg 9960e96acad6Smrg# User supplied flags override default flags 9961e96acad6Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 9962e96acad6Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 9963e96acad6Smrgfi 9964dbbd9e4bSmacallan 9965e96acad6SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 9966e96acad6Smrg]) # XORG_WITH_LINT 9967dbbd9e4bSmacallan 9968dbbd9e4bSmacallan# XORG_CHECK_MALLOC_ZERO 9969dbbd9e4bSmacallan# ---------------------- 9970dbbd9e4bSmacallan# Minimum version: 1.0.0 9971dbbd9e4bSmacallan# 9972dbbd9e4bSmacallan# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 9973dbbd9e4bSmacallan# malloc(0) returns NULL. Packages should add one of these cflags to 9974dbbd9e4bSmacallan# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 9975dbbd9e4bSmacallanAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 9976dbbd9e4bSmacallanAC_ARG_ENABLE(malloc0returnsnull, 9977e96acad6Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 9978dbbd9e4bSmacallan [malloc(0) returns NULL (default: auto)]), 9979dbbd9e4bSmacallan [MALLOC_ZERO_RETURNS_NULL=$enableval], 9980dbbd9e4bSmacallan [MALLOC_ZERO_RETURNS_NULL=auto]) 9981dbbd9e4bSmacallan 9982dbbd9e4bSmacallanAC_MSG_CHECKING([whether malloc(0) returns NULL]) 9983dbbd9e4bSmacallanif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 9984e96acad6Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 9985e96acad6Smrg#include <stdlib.h> 9986e96acad6Smrg],[ 9987dbbd9e4bSmacallan char *m0, *r0, *c0, *p; 9988dbbd9e4bSmacallan m0 = malloc(0); 9989dbbd9e4bSmacallan p = malloc(10); 9990dbbd9e4bSmacallan r0 = realloc(p,0); 9991e96acad6Smrg c0 = calloc(0,10); 9992e96acad6Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 9993e96acad6Smrg])], 9994dbbd9e4bSmacallan [MALLOC_ZERO_RETURNS_NULL=yes], 9995e96acad6Smrg [MALLOC_ZERO_RETURNS_NULL=no], 9996e96acad6Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 9997dbbd9e4bSmacallanfi 9998dbbd9e4bSmacallanAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 9999dbbd9e4bSmacallan 10000dbbd9e4bSmacallanif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10001dbbd9e4bSmacallan MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10002dbbd9e4bSmacallan XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10003dbbd9e4bSmacallan XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10004dbbd9e4bSmacallanelse 10005dbbd9e4bSmacallan MALLOC_ZERO_CFLAGS="" 10006dbbd9e4bSmacallan XMALLOC_ZERO_CFLAGS="" 10007dbbd9e4bSmacallan XTMALLOC_ZERO_CFLAGS="" 10008dbbd9e4bSmacallanfi 10009dbbd9e4bSmacallan 10010dbbd9e4bSmacallanAC_SUBST([MALLOC_ZERO_CFLAGS]) 10011dbbd9e4bSmacallanAC_SUBST([XMALLOC_ZERO_CFLAGS]) 10012dbbd9e4bSmacallanAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10013dbbd9e4bSmacallan]) # XORG_CHECK_MALLOC_ZERO 10014dbbd9e4bSmacallan 10015dbbd9e4bSmacallan# XORG_WITH_LINT() 10016dbbd9e4bSmacallan# ---------------- 10017dbbd9e4bSmacallan# Minimum version: 1.1.0 10018dbbd9e4bSmacallan# 10019e96acad6Smrg# This macro enables the use of a tool that flags some suspicious and 10020e96acad6Smrg# non-portable constructs (likely to be bugs) in C language source code. 10021e96acad6Smrg# It will attempt to locate the tool and use appropriate options. 10022e96acad6Smrg# There are various lint type tools on different platforms. 10023e96acad6Smrg# 10024e96acad6Smrg# Interface to module: 10025e96acad6Smrg# LINT: returns the path to the tool found on the platform 10026e96acad6Smrg# or the value set to LINT on the configure cmd line 10027e96acad6Smrg# also an Automake conditional 10028e96acad6Smrg# LINT_FLAGS: an Automake variable with appropriate flags 10029e96acad6Smrg# 10030e96acad6Smrg# --with-lint: 'yes' user instructs the module to use lint 10031e96acad6Smrg# 'no' user instructs the module not to use lint (default) 10032e96acad6Smrg# 10033e96acad6Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10034e96acad6Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 10035dbbd9e4bSmacallan# 10036dbbd9e4bSmacallanAC_DEFUN([XORG_WITH_LINT],[ 10037dbbd9e4bSmacallan 10038e96acad6SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10039e96acad6SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10040e96acad6SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10041dbbd9e4bSmacallan [Use a lint-style source code checker (default: disabled)])], 10042dbbd9e4bSmacallan [use_lint=$withval], [use_lint=no]) 10043e96acad6Smrg 10044e96acad6Smrg# Obtain platform specific info like program name and options 10045e96acad6Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10046e96acad6Smrgcase $host_os in 10047e96acad6Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10048e96acad6Smrg lint_name=splint 10049e96acad6Smrg lint_options="-badflag" 10050e96acad6Smrg ;; 10051e96acad6Smrg *freebsd* | *netbsd*) 10052e96acad6Smrg lint_name=lint 10053e96acad6Smrg lint_options="-u -b" 10054e96acad6Smrg ;; 10055e96acad6Smrg *solaris*) 10056e96acad6Smrg lint_name=lint 10057e96acad6Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10058e96acad6Smrg ;; 10059e96acad6Smrgesac 10060e96acad6Smrg 10061e96acad6Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10062e96acad6Smrgif test "x$use_lint" = x"yes" ; then 10063e96acad6Smrg AC_PATH_PROG([LINT], [$lint_name]) 10064e96acad6Smrg if test "x$LINT" = "x"; then 10065e96acad6Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10066e96acad6Smrg fi 10067e96acad6Smrgelif test "x$use_lint" = x"no" ; then 10068e96acad6Smrg if test "x$LINT" != "x"; then 10069e96acad6Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10070e96acad6Smrg fi 10071dbbd9e4bSmacallanelse 10072e96acad6Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10073dbbd9e4bSmacallanfi 10074e96acad6Smrg 10075e96acad6Smrg# User supplied flags override default flags 10076e96acad6Smrgif test "x$LINT_FLAGS" != "x"; then 10077e96acad6Smrg lint_options=$LINT_FLAGS 10078dbbd9e4bSmacallanfi 10079dbbd9e4bSmacallan 10080e96acad6SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10081e96acad6SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10082dbbd9e4bSmacallan 10083dbbd9e4bSmacallan]) # XORG_WITH_LINT 10084dbbd9e4bSmacallan 10085dbbd9e4bSmacallan# XORG_LINT_LIBRARY(LIBNAME) 10086dbbd9e4bSmacallan# -------------------------- 10087dbbd9e4bSmacallan# Minimum version: 1.1.0 10088dbbd9e4bSmacallan# 10089dbbd9e4bSmacallan# Sets up flags for building lint libraries for checking programs that call 10090dbbd9e4bSmacallan# functions in the library. 10091dbbd9e4bSmacallan# 10092e96acad6Smrg# Interface to module: 10093e96acad6Smrg# LINTLIB - Automake variable with the name of lint library file to make 10094e96acad6Smrg# MAKE_LINT_LIB - Automake conditional 10095e96acad6Smrg# 10096e96acad6Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10097e96acad6Smrg# - 'no' user instructs the module not to create a lint library (default) 10098dbbd9e4bSmacallan 10099dbbd9e4bSmacallanAC_DEFUN([XORG_LINT_LIBRARY],[ 10100dbbd9e4bSmacallanAC_REQUIRE([XORG_WITH_LINT]) 10101e96acad6SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10102dbbd9e4bSmacallan [Create lint library (default: disabled)])], 10103dbbd9e4bSmacallan [make_lint_lib=$enableval], [make_lint_lib=no]) 10104e96acad6Smrg 10105e96acad6Smrgif test "x$make_lint_lib" = x"yes" ; then 10106e96acad6Smrg LINTLIB=llib-l$1.ln 10107e96acad6Smrg if test "x$LINT" = "x"; then 10108e96acad6Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10109e96acad6Smrg fi 10110e96acad6Smrgelif test "x$make_lint_lib" != x"no" ; then 10111e96acad6Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10112dbbd9e4bSmacallanfi 10113e96acad6Smrg 10114dbbd9e4bSmacallanAC_SUBST(LINTLIB) 10115dbbd9e4bSmacallanAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10116dbbd9e4bSmacallan 10117dbbd9e4bSmacallan]) # XORG_LINT_LIBRARY 10118dbbd9e4bSmacallan 10119e96acad6Smrg# XORG_COMPILER_BRAND 10120e96acad6Smrg# ------------------- 10121e96acad6Smrg# Minimum version: 1.14.0 10122e96acad6Smrg# 10123e96acad6Smrg# Checks for various brands of compilers and sets flags as appropriate: 10124e96acad6Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10125e96acad6Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10126e96acad6Smrg# clang compiler - sets CLANGCC to "yes" 10127e96acad6Smrg# Intel compiler - sets INTELCC to "yes" 10128e96acad6Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10129e96acad6Smrg# 10130e96acad6SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10131e96acad6SmrgAC_LANG_CASE( 10132e96acad6Smrg [C], [ 10133e96acad6Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10134e96acad6Smrg ], 10135e96acad6Smrg [C++], [ 10136e96acad6Smrg AC_REQUIRE([AC_PROG_CXX]) 10137e96acad6Smrg ] 10138e96acad6Smrg) 10139e96acad6SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10140e96acad6SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10141e96acad6SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10142e96acad6Smrg]) # XORG_COMPILER_BRAND 10143e96acad6Smrg 10144e96acad6Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10145e96acad6Smrg# --------------- 10146e96acad6Smrg# Minimum version: 1.16.0 10147e96acad6Smrg# 10148e96acad6Smrg# Test if the compiler works when passed the given flag as a command line argument. 10149e96acad6Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10150e96acad6Smrg# next flag in the list until there are no more options. 10151e96acad6Smrg# 10152e96acad6Smrg# Note that this does not guarantee that the compiler supports the flag as some 10153e96acad6Smrg# compilers will simply ignore arguments that they do not understand, but we do 10154e96acad6Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10155e96acad6Smrg# -Werror=unused-command-line-argument 10156e96acad6Smrg# 10157e96acad6SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10158e96acad6Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10159e96acad6Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10160e96acad6Smrg 10161e96acad6SmrgAC_LANG_COMPILER_REQUIRE 10162e96acad6Smrg 10163e96acad6SmrgAC_LANG_CASE( 10164e96acad6Smrg [C], [ 10165e96acad6Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10166e96acad6Smrg define([PREFIX], [C]) 10167e96acad6Smrg define([CACHE_PREFIX], [cc]) 10168e96acad6Smrg define([COMPILER], [$CC]) 10169e96acad6Smrg ], 10170e96acad6Smrg [C++], [ 10171e96acad6Smrg define([PREFIX], [CXX]) 10172e96acad6Smrg define([CACHE_PREFIX], [cxx]) 10173e96acad6Smrg define([COMPILER], [$CXX]) 10174e96acad6Smrg ] 10175e96acad6Smrg) 10176e96acad6Smrg 10177e96acad6Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10178e96acad6Smrg 10179e96acad6Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10180e96acad6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10181e96acad6Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10182e96acad6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10183e96acad6Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10184e96acad6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10185e96acad6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10186e96acad6Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10187e96acad6Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10188e96acad6Smrgfi 10189e96acad6Smrg 10190e96acad6Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10191e96acad6Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10192e96acad6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10193e96acad6Smrg fi 10194e96acad6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10195e96acad6Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10196e96acad6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10197e96acad6Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10198e96acad6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10199e96acad6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10200e96acad6Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10201e96acad6Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10202e96acad6Smrgfi 10203e96acad6Smrg 10204e96acad6Smrgfound="no" 10205e96acad6Smrgm4_foreach([flag], m4_cdr($@), [ 10206e96acad6Smrg if test $found = "no" ; then 10207e96acad6Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 10208e96acad6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10209e96acad6Smrg fi 10210e96acad6Smrg 10211e96acad6Smrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 10212e96acad6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10213e96acad6Smrg fi 10214e96acad6Smrg 10215e96acad6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10216e96acad6Smrg 10217e96acad6Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10218e96acad6Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10219e96acad6Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10220e96acad6Smrg AC_CACHE_VAL($cacheid, 10221e96acad6Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10222e96acad6Smrg [eval $cacheid=yes], 10223e96acad6Smrg [eval $cacheid=no])]) 10224e96acad6Smrg 10225e96acad6Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10226e96acad6Smrg 10227e96acad6Smrg eval supported=\$$cacheid 10228e96acad6Smrg AC_MSG_RESULT([$supported]) 10229e96acad6Smrg if test "$supported" = "yes" ; then 10230e96acad6Smrg $1="$$1 ]flag[" 10231e96acad6Smrg found="yes" 10232e96acad6Smrg fi 10233e96acad6Smrg fi 10234e96acad6Smrg]) 10235e96acad6Smrg]) # XORG_TESTSET_CFLAG 10236e96acad6Smrg 10237e96acad6Smrg# XORG_COMPILER_FLAGS 10238e96acad6Smrg# --------------- 10239e96acad6Smrg# Minimum version: 1.16.0 10240e96acad6Smrg# 10241e96acad6Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10242e96acad6Smrg# arguments supported by the selected compiler which do NOT alter the generated 10243e96acad6Smrg# code. These arguments will cause the compiler to print various warnings 10244e96acad6Smrg# during compilation AND turn a conservative set of warnings into errors. 10245e96acad6Smrg# 10246e96acad6Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10247e96acad6Smrg# future versions of util-macros as options are added to new compilers. 10248e96acad6Smrg# 10249e96acad6SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10250e96acad6SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10251e96acad6Smrg 10252e96acad6SmrgAC_ARG_ENABLE(selective-werror, 10253e96acad6Smrg AS_HELP_STRING([--disable-selective-werror], 10254e96acad6Smrg [Turn off selective compiler errors. (default: enabled)]), 10255e96acad6Smrg [SELECTIVE_WERROR=$enableval], 10256e96acad6Smrg [SELECTIVE_WERROR=yes]) 10257e96acad6Smrg 10258e96acad6SmrgAC_LANG_CASE( 10259e96acad6Smrg [C], [ 10260e96acad6Smrg define([PREFIX], [C]) 10261e96acad6Smrg ], 10262e96acad6Smrg [C++], [ 10263e96acad6Smrg define([PREFIX], [CXX]) 10264e96acad6Smrg ] 10265e96acad6Smrg) 10266e96acad6Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 10267e96acad6Smrgif test "x$SUNCC" = "xyes"; then 10268e96acad6Smrg [BASE_]PREFIX[FLAGS]="-v" 10269e96acad6Smrgelse 10270e96acad6Smrg [BASE_]PREFIX[FLAGS]="" 10271e96acad6Smrgfi 10272e96acad6Smrg 10273e96acad6Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10274e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10275e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10276e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10277e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10278e96acad6Smrg 10279e96acad6SmrgAC_LANG_CASE( 10280e96acad6Smrg [C], [ 10281e96acad6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10282e96acad6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10283e96acad6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10284e96acad6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 10285e96acad6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 10286e96acad6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10287e96acad6Smrg ] 10288e96acad6Smrg) 10289e96acad6Smrg 10290e96acad6Smrg# This chunk adds additional warnings that could catch undesired effects. 10291e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10292e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10293e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10294e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10295e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10296e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10297e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 10298e96acad6Smrg 10299e96acad6Smrg# These are currently disabled because they are noisy. They will be enabled 10300e96acad6Smrg# in the future once the codebase is sufficiently modernized to silence 10301e96acad6Smrg# them. For now, I don't want them to drown out the other warnings. 10302e96acad6Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10303e96acad6Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10304e96acad6Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 10305e96acad6Smrg 10306e96acad6Smrg# Turn some warnings into errors, so we don't accidently get successful builds 10307e96acad6Smrg# when there are problems that should be fixed. 10308e96acad6Smrg 10309e96acad6Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 10310e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10311e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10312e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10313e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10314e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10315e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10316e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10317e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10318e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10319e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10320e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10321e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10322e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10323e96acad6Smrgelse 10324e96acad6SmrgAC_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]) 10325e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10326e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10327e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10328e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10329e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10330e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10331e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10332e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10333e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10334e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10335e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10336e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10337e96acad6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10338e96acad6Smrgfi 10339e96acad6Smrg 10340e96acad6SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10341e96acad6Smrg]) # XORG_COMPILER_FLAGS 10342e96acad6Smrg 103431c397cbaSmrg# XORG_CWARNFLAGS 103441c397cbaSmrg# --------------- 103451c397cbaSmrg# Minimum version: 1.2.0 10346e96acad6Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 103471c397cbaSmrg# 103481c397cbaSmrg# Defines CWARNFLAGS to enable C compiler warnings. 103491c397cbaSmrg# 10350e96acad6Smrg# This function is deprecated because it defines -fno-strict-aliasing 10351e96acad6Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 10352e96acad6Smrg# is needed, then it should be added explicitly in the module when 10353e96acad6Smrg# it is updated to use BASE_CFLAGS. 10354e96acad6Smrg# 103551c397cbaSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 10356e96acad6SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10357e96acad6SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10358e96acad6SmrgAC_LANG_CASE( 10359e96acad6Smrg [C], [ 10360e96acad6Smrg CWARNFLAGS="$BASE_CFLAGS" 10361e96acad6Smrg if test "x$GCC" = xyes ; then 10362e96acad6Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 10363e96acad6Smrg fi 10364e96acad6Smrg AC_SUBST(CWARNFLAGS) 10365e96acad6Smrg ] 10366e96acad6Smrg) 103671c397cbaSmrg]) # XORG_CWARNFLAGS 10368e96acad6Smrg 10369e96acad6Smrg# XORG_STRICT_OPTION 10370e96acad6Smrg# ----------------------- 10371e96acad6Smrg# Minimum version: 1.3.0 10372e96acad6Smrg# 10373e96acad6Smrg# Add configure option to enable strict compilation flags, such as treating 10374e96acad6Smrg# warnings as fatal errors. 10375e96acad6Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 10376e96acad6Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 10377e96acad6Smrg# 10378e96acad6Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 10379e96acad6Smrg# when strict compilation is unconditionally desired. 10380e96acad6SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 10381e96acad6SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 10382e96acad6SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10383e96acad6Smrg 10384e96acad6SmrgAC_ARG_ENABLE(strict-compilation, 10385e96acad6Smrg AS_HELP_STRING([--enable-strict-compilation], 10386e96acad6Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 10387e96acad6Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 10388e96acad6Smrg 10389e96acad6SmrgAC_LANG_CASE( 10390e96acad6Smrg [C], [ 10391e96acad6Smrg define([PREFIX], [C]) 10392e96acad6Smrg ], 10393e96acad6Smrg [C++], [ 10394e96acad6Smrg define([PREFIX], [CXX]) 10395e96acad6Smrg ] 10396e96acad6Smrg) 10397e96acad6Smrg 10398e96acad6Smrg[STRICT_]PREFIX[FLAGS]="" 10399e96acad6SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 10400e96acad6SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 10401e96acad6Smrg 10402e96acad6Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 10403e96acad6Smrg# activate it with -Werror, so we add it here explicitly. 10404e96acad6SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 10405e96acad6Smrg 10406e96acad6Smrgif test "x$STRICT_COMPILE" = "xyes"; then 10407e96acad6Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 10408e96acad6Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 10409e96acad6Smrgfi 10410e96acad6SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 10411e96acad6SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10412e96acad6SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 10413e96acad6Smrg]) # XORG_STRICT_OPTION 10414e96acad6Smrg 10415e96acad6Smrg# XORG_DEFAULT_OPTIONS 10416e96acad6Smrg# -------------------- 10417e96acad6Smrg# Minimum version: 1.3.0 10418e96acad6Smrg# 10419e96acad6Smrg# Defines default options for X.Org modules. 10420e96acad6Smrg# 10421e96acad6SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 10422e96acad6SmrgAC_REQUIRE([AC_PROG_INSTALL]) 10423e96acad6SmrgXORG_COMPILER_FLAGS 10424e96acad6SmrgXORG_CWARNFLAGS 10425e96acad6SmrgXORG_STRICT_OPTION 10426e96acad6SmrgXORG_RELEASE_VERSION 10427e96acad6SmrgXORG_CHANGELOG 10428e96acad6SmrgXORG_INSTALL 10429e96acad6SmrgXORG_MANPAGE_SECTIONS 10430e96acad6Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 10431e96acad6Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 10432e96acad6Smrg]) # XORG_DEFAULT_OPTIONS 10433e96acad6Smrg 10434e96acad6Smrg# XORG_INSTALL() 10435e96acad6Smrg# ---------------- 10436e96acad6Smrg# Minimum version: 1.4.0 10437e96acad6Smrg# 10438e96acad6Smrg# Defines the variable INSTALL_CMD as the command to copy 10439e96acad6Smrg# INSTALL from $prefix/share/util-macros. 10440e96acad6Smrg# 10441e96acad6SmrgAC_DEFUN([XORG_INSTALL], [ 10442e96acad6SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10443e96acad6Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 10444e96acad6SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 10445e96acad6Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 10446e96acad6Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 10447e96acad6Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 10448e96acad6SmrgAC_SUBST([INSTALL_CMD]) 10449e96acad6Smrg]) # XORG_INSTALL 10450dbbd9e4bSmacallandnl Copyright 2005 Red Hat, Inc 10451dbbd9e4bSmacallandnl 10452dbbd9e4bSmacallandnl Permission to use, copy, modify, distribute, and sell this software and its 10453dbbd9e4bSmacallandnl documentation for any purpose is hereby granted without fee, provided that 10454dbbd9e4bSmacallandnl the above copyright notice appear in all copies and that both that 10455dbbd9e4bSmacallandnl copyright notice and this permission notice appear in supporting 10456dbbd9e4bSmacallandnl documentation. 10457dbbd9e4bSmacallandnl 10458dbbd9e4bSmacallandnl The above copyright notice and this permission notice shall be included 10459dbbd9e4bSmacallandnl in all copies or substantial portions of the Software. 10460dbbd9e4bSmacallandnl 10461dbbd9e4bSmacallandnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10462dbbd9e4bSmacallandnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10463dbbd9e4bSmacallandnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10464dbbd9e4bSmacallandnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10465dbbd9e4bSmacallandnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10466dbbd9e4bSmacallandnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10467dbbd9e4bSmacallandnl OTHER DEALINGS IN THE SOFTWARE. 10468dbbd9e4bSmacallandnl 10469dbbd9e4bSmacallandnl Except as contained in this notice, the name of the copyright holders shall 10470dbbd9e4bSmacallandnl not be used in advertising or otherwise to promote the sale, use or 10471dbbd9e4bSmacallandnl other dealings in this Software without prior written authorization 10472dbbd9e4bSmacallandnl from the copyright holders. 10473dbbd9e4bSmacallandnl 10474dbbd9e4bSmacallan 10475dbbd9e4bSmacallan# XORG_RELEASE_VERSION 10476dbbd9e4bSmacallan# -------------------- 10477e96acad6Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 10478dbbd9e4bSmacallan 10479dbbd9e4bSmacallanAC_DEFUN([XORG_RELEASE_VERSION],[ 10480dbbd9e4bSmacallan AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 10481dbbd9e4bSmacallan [`echo $PACKAGE_VERSION | cut -d . -f 1`], 10482dbbd9e4bSmacallan [Major version of this package]) 10483dbbd9e4bSmacallan PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 10484dbbd9e4bSmacallan if test "x$PVM" = "x"; then 10485dbbd9e4bSmacallan PVM="0" 10486dbbd9e4bSmacallan fi 10487dbbd9e4bSmacallan AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 10488dbbd9e4bSmacallan [$PVM], 10489dbbd9e4bSmacallan [Minor version of this package]) 10490dbbd9e4bSmacallan PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 10491dbbd9e4bSmacallan if test "x$PVP" = "x"; then 10492dbbd9e4bSmacallan PVP="0" 10493dbbd9e4bSmacallan fi 10494dbbd9e4bSmacallan AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 10495dbbd9e4bSmacallan [$PVP], 10496dbbd9e4bSmacallan [Patch version of this package]) 10497dbbd9e4bSmacallan]) 10498dbbd9e4bSmacallan 104991c397cbaSmrg# XORG_CHANGELOG() 105001c397cbaSmrg# ---------------- 105011c397cbaSmrg# Minimum version: 1.2.0 105021c397cbaSmrg# 105031c397cbaSmrg# Defines the variable CHANGELOG_CMD as the command to generate 105041c397cbaSmrg# ChangeLog from git. 105051c397cbaSmrg# 105061c397cbaSmrg# 105071c397cbaSmrgAC_DEFUN([XORG_CHANGELOG], [ 10508e96acad6SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 10509e96acad6Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 10510e96acad6Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 105111c397cbaSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 105121c397cbaSmrgAC_SUBST([CHANGELOG_CMD]) 105131c397cbaSmrg]) # XORG_CHANGELOG 105141c397cbaSmrg 10515e96acad6Smrgdnl Copyright 2005 Red Hat, Inc 10516e96acad6Smrgdnl 10517e96acad6Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 10518e96acad6Smrgdnl documentation for any purpose is hereby granted without fee, provided that 10519e96acad6Smrgdnl the above copyright notice appear in all copies and that both that 10520e96acad6Smrgdnl copyright notice and this permission notice appear in supporting 10521e96acad6Smrgdnl documentation. 10522e96acad6Smrgdnl 10523e96acad6Smrgdnl The above copyright notice and this permission notice shall be included 10524e96acad6Smrgdnl in all copies or substantial portions of the Software. 10525e96acad6Smrgdnl 10526e96acad6Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10527e96acad6Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10528e96acad6Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10529e96acad6Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10530e96acad6Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10531e96acad6Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10532e96acad6Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 10533e96acad6Smrgdnl 10534e96acad6Smrgdnl Except as contained in this notice, the name of the copyright holders shall 10535e96acad6Smrgdnl not be used in advertising or otherwise to promote the sale, use or 10536e96acad6Smrgdnl other dealings in this Software without prior written authorization 10537e96acad6Smrgdnl from the copyright holders. 10538e96acad6Smrgdnl 10539e96acad6Smrg 10540e96acad6Smrg# XORG_DRIVER_CHECK_EXT() 10541e96acad6Smrg# -------------------------- 10542e96acad6Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 10543e96acad6Smrg# is defined, then add $1 to $REQUIRED_MODULES. 10544e96acad6Smrg 10545e96acad6SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 10546e96acad6Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10547e96acad6Smrg SAVE_CFLAGS="$CFLAGS" 10548e96acad6Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 10549e96acad6Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 10550e96acad6Smrg#include "xorg-server.h" 10551e96acad6Smrg#if !defined $1 10552e96acad6Smrg#error $1 not defined 10553e96acad6Smrg#endif 10554e96acad6Smrg ]])], 10555e96acad6Smrg [_EXT_CHECK=yes], 10556e96acad6Smrg [_EXT_CHECK=no]) 10557e96acad6Smrg CFLAGS="$SAVE_CFLAGS" 10558e96acad6Smrg AC_MSG_CHECKING([if $1 is defined]) 10559e96acad6Smrg AC_MSG_RESULT([$_EXT_CHECK]) 10560e96acad6Smrg if test "$_EXT_CHECK" != no; then 10561e96acad6Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 10562e96acad6Smrg fi 10563e96acad6Smrg]) 10564e96acad6Smrg 10565e96acad6Smrg# Copyright (C) 2002-2012 Free Software Foundation, Inc. 10566dbbd9e4bSmacallan# 10567dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 10568dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 10569dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 10570dbbd9e4bSmacallan 10571dbbd9e4bSmacallan# AM_AUTOMAKE_VERSION(VERSION) 10572dbbd9e4bSmacallan# ---------------------------- 10573dbbd9e4bSmacallan# Automake X.Y traces this macro to ensure aclocal.m4 has been 10574dbbd9e4bSmacallan# generated from the m4 files accompanying Automake X.Y. 10575dbbd9e4bSmacallan# (This private macro should not be called outside this file.) 10576dbbd9e4bSmacallanAC_DEFUN([AM_AUTOMAKE_VERSION], 10577e96acad6Smrg[am__api_version='1.12' 10578dbbd9e4bSmacallandnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 10579dbbd9e4bSmacallandnl require some minimum version. Point them to the right macro. 10580e96acad6Smrgm4_if([$1], [1.12.6], [], 10581dbbd9e4bSmacallan [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 10582dbbd9e4bSmacallan]) 10583dbbd9e4bSmacallan 10584dbbd9e4bSmacallan# _AM_AUTOCONF_VERSION(VERSION) 10585dbbd9e4bSmacallan# ----------------------------- 10586dbbd9e4bSmacallan# aclocal traces this macro to find the Autoconf version. 10587dbbd9e4bSmacallan# This is a private macro too. Using m4_define simplifies 10588dbbd9e4bSmacallan# the logic in aclocal, which can simply ignore this definition. 10589dbbd9e4bSmacallanm4_define([_AM_AUTOCONF_VERSION], []) 10590dbbd9e4bSmacallan 10591dbbd9e4bSmacallan# AM_SET_CURRENT_AUTOMAKE_VERSION 10592dbbd9e4bSmacallan# ------------------------------- 10593dbbd9e4bSmacallan# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 105941c397cbaSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 10595dbbd9e4bSmacallanAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 10596e96acad6Smrg[AM_AUTOMAKE_VERSION([1.12.6])dnl 10597dbbd9e4bSmacallanm4_ifndef([AC_AUTOCONF_VERSION], 10598dbbd9e4bSmacallan [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 105991c397cbaSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 10600dbbd9e4bSmacallan 10601dbbd9e4bSmacallan# Figure out how to run the assembler. -*- Autoconf -*- 10602dbbd9e4bSmacallan 10603e96acad6Smrg# Copyright (C) 2001-2012 Free Software Foundation, Inc. 10604dbbd9e4bSmacallan# 10605dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 10606dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 10607dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 10608dbbd9e4bSmacallan 10609dbbd9e4bSmacallan# AM_PROG_AS 10610dbbd9e4bSmacallan# ---------- 10611dbbd9e4bSmacallanAC_DEFUN([AM_PROG_AS], 10612dbbd9e4bSmacallan[# By default we simply use the C compiler to build assembly code. 10613dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_CC]) 10614dbbd9e4bSmacallantest "${CCAS+set}" = set || CCAS=$CC 10615dbbd9e4bSmacallantest "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS 10616dbbd9e4bSmacallanAC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) 10617dbbd9e4bSmacallanAC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) 10618dbbd9e4bSmacallan_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl 10619dbbd9e4bSmacallan]) 10620dbbd9e4bSmacallan 10621dbbd9e4bSmacallan# AM_AUX_DIR_EXPAND -*- Autoconf -*- 10622dbbd9e4bSmacallan 10623e96acad6Smrg# Copyright (C) 2001-2012 Free Software Foundation, Inc. 10624dbbd9e4bSmacallan# 10625dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 10626dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 10627dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 10628dbbd9e4bSmacallan 10629dbbd9e4bSmacallan# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 10630e96acad6Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 10631e96acad6Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 10632dbbd9e4bSmacallan# 10633dbbd9e4bSmacallan# Of course, Automake must honor this variable whenever it calls a 10634dbbd9e4bSmacallan# tool from the auxiliary directory. The problem is that $srcdir (and 10635dbbd9e4bSmacallan# therefore $ac_aux_dir as well) can be either absolute or relative, 10636dbbd9e4bSmacallan# depending on how configure is run. This is pretty annoying, since 10637dbbd9e4bSmacallan# it makes $ac_aux_dir quite unusable in subdirectories: in the top 10638dbbd9e4bSmacallan# source directory, any form will work fine, but in subdirectories a 10639dbbd9e4bSmacallan# relative path needs to be adjusted first. 10640dbbd9e4bSmacallan# 10641dbbd9e4bSmacallan# $ac_aux_dir/missing 10642dbbd9e4bSmacallan# fails when called from a subdirectory if $ac_aux_dir is relative 10643dbbd9e4bSmacallan# $top_srcdir/$ac_aux_dir/missing 10644dbbd9e4bSmacallan# fails if $ac_aux_dir is absolute, 10645dbbd9e4bSmacallan# fails when called from a subdirectory in a VPATH build with 10646dbbd9e4bSmacallan# a relative $ac_aux_dir 10647dbbd9e4bSmacallan# 10648dbbd9e4bSmacallan# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 10649dbbd9e4bSmacallan# are both prefixed by $srcdir. In an in-source build this is usually 10650e96acad6Smrg# harmless because $srcdir is '.', but things will broke when you 10651dbbd9e4bSmacallan# start a VPATH build or use an absolute $srcdir. 10652dbbd9e4bSmacallan# 10653dbbd9e4bSmacallan# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 10654dbbd9e4bSmacallan# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 10655dbbd9e4bSmacallan# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 10656dbbd9e4bSmacallan# and then we would define $MISSING as 10657dbbd9e4bSmacallan# MISSING="\${SHELL} $am_aux_dir/missing" 10658dbbd9e4bSmacallan# This will work as long as MISSING is not called from configure, because 10659dbbd9e4bSmacallan# unfortunately $(top_srcdir) has no meaning in configure. 10660dbbd9e4bSmacallan# However there are other variables, like CC, which are often used in 10661dbbd9e4bSmacallan# configure, and could therefore not use this "fixed" $ac_aux_dir. 10662dbbd9e4bSmacallan# 10663dbbd9e4bSmacallan# Another solution, used here, is to always expand $ac_aux_dir to an 10664dbbd9e4bSmacallan# absolute PATH. The drawback is that using absolute paths prevent a 10665dbbd9e4bSmacallan# configured tree to be moved without reconfiguration. 10666dbbd9e4bSmacallan 10667dbbd9e4bSmacallanAC_DEFUN([AM_AUX_DIR_EXPAND], 10668dbbd9e4bSmacallan[dnl Rely on autoconf to set up CDPATH properly. 10669dbbd9e4bSmacallanAC_PREREQ([2.50])dnl 10670dbbd9e4bSmacallan# expand $ac_aux_dir to an absolute path 10671dbbd9e4bSmacallanam_aux_dir=`cd $ac_aux_dir && pwd` 10672dbbd9e4bSmacallan]) 10673dbbd9e4bSmacallan 10674dbbd9e4bSmacallan# AM_CONDITIONAL -*- Autoconf -*- 10675dbbd9e4bSmacallan 10676e96acad6Smrg# Copyright (C) 1997-2012 Free Software Foundation, Inc. 10677dbbd9e4bSmacallan# 10678dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 10679dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 10680dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 10681dbbd9e4bSmacallan 10682dbbd9e4bSmacallan# AM_CONDITIONAL(NAME, SHELL-CONDITION) 10683dbbd9e4bSmacallan# ------------------------------------- 10684dbbd9e4bSmacallan# Define a conditional. 10685dbbd9e4bSmacallanAC_DEFUN([AM_CONDITIONAL], 10686e96acad6Smrg[AC_PREREQ([2.52])dnl 10687e96acad6Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 10688e96acad6Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 10689dbbd9e4bSmacallanAC_SUBST([$1_TRUE])dnl 10690dbbd9e4bSmacallanAC_SUBST([$1_FALSE])dnl 10691dbbd9e4bSmacallan_AM_SUBST_NOTMAKE([$1_TRUE])dnl 10692dbbd9e4bSmacallan_AM_SUBST_NOTMAKE([$1_FALSE])dnl 106931c397cbaSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 10694dbbd9e4bSmacallanif $2; then 10695dbbd9e4bSmacallan $1_TRUE= 10696dbbd9e4bSmacallan $1_FALSE='#' 10697dbbd9e4bSmacallanelse 10698dbbd9e4bSmacallan $1_TRUE='#' 10699dbbd9e4bSmacallan $1_FALSE= 10700dbbd9e4bSmacallanfi 10701dbbd9e4bSmacallanAC_CONFIG_COMMANDS_PRE( 10702dbbd9e4bSmacallan[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 10703dbbd9e4bSmacallan AC_MSG_ERROR([[conditional "$1" was never defined. 10704dbbd9e4bSmacallanUsually this means the macro was only invoked conditionally.]]) 10705dbbd9e4bSmacallanfi])]) 10706dbbd9e4bSmacallan 10707e96acad6Smrg# Copyright (C) 1999-2012 Free Software Foundation, Inc. 10708dbbd9e4bSmacallan# 10709dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 10710dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 10711dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 10712dbbd9e4bSmacallan 10713dbbd9e4bSmacallan 10714e96acad6Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 10715dbbd9e4bSmacallan# written in clear, in which case automake, when reading aclocal.m4, 10716dbbd9e4bSmacallan# will think it sees a *use*, and therefore will trigger all it's 10717dbbd9e4bSmacallan# C support machinery. Also note that it means that autoscan, seeing 10718dbbd9e4bSmacallan# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 10719dbbd9e4bSmacallan 10720dbbd9e4bSmacallan 10721dbbd9e4bSmacallan# _AM_DEPENDENCIES(NAME) 10722dbbd9e4bSmacallan# ---------------------- 10723dbbd9e4bSmacallan# See how the compiler implements dependency checking. 10724e96acad6Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 10725dbbd9e4bSmacallan# We try a few techniques and use that to set a single cache variable. 10726dbbd9e4bSmacallan# 10727dbbd9e4bSmacallan# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 10728dbbd9e4bSmacallan# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 10729dbbd9e4bSmacallan# dependency, and given that the user is not expected to run this macro, 10730dbbd9e4bSmacallan# just rely on AC_PROG_CC. 10731dbbd9e4bSmacallanAC_DEFUN([_AM_DEPENDENCIES], 10732dbbd9e4bSmacallan[AC_REQUIRE([AM_SET_DEPDIR])dnl 10733dbbd9e4bSmacallanAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 10734dbbd9e4bSmacallanAC_REQUIRE([AM_MAKE_INCLUDE])dnl 10735dbbd9e4bSmacallanAC_REQUIRE([AM_DEP_TRACK])dnl 10736dbbd9e4bSmacallan 10737e96acad6Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 10738e96acad6Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 10739e96acad6Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 10740e96acad6Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 10741e96acad6Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 10742e96acad6Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 10743e96acad6Smrg [depcc="$$1" am_compiler_list=]) 10744dbbd9e4bSmacallan 10745dbbd9e4bSmacallanAC_CACHE_CHECK([dependency style of $depcc], 10746dbbd9e4bSmacallan [am_cv_$1_dependencies_compiler_type], 10747dbbd9e4bSmacallan[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 10748dbbd9e4bSmacallan # We make a subdir and do the tests there. Otherwise we can end up 10749dbbd9e4bSmacallan # making bogus files that we don't know about and never remove. For 10750dbbd9e4bSmacallan # instance it was reported that on HP-UX the gcc test will end up 10751e96acad6Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 10752e96acad6Smrg # in D". 10753e96acad6Smrg rm -rf conftest.dir 10754dbbd9e4bSmacallan mkdir conftest.dir 10755dbbd9e4bSmacallan # Copy depcomp to subdir because otherwise we won't find it if we're 10756dbbd9e4bSmacallan # using a relative directory. 10757dbbd9e4bSmacallan cp "$am_depcomp" conftest.dir 10758dbbd9e4bSmacallan cd conftest.dir 10759dbbd9e4bSmacallan # We will build objects and dependencies in a subdirectory because 10760dbbd9e4bSmacallan # it helps to detect inapplicable dependency modes. For instance 10761dbbd9e4bSmacallan # both Tru64's cc and ICC support -MD to output dependencies as a 10762dbbd9e4bSmacallan # side effect of compilation, but ICC will put the dependencies in 10763dbbd9e4bSmacallan # the current directory while Tru64 will put them in the object 10764dbbd9e4bSmacallan # directory. 10765dbbd9e4bSmacallan mkdir sub 10766dbbd9e4bSmacallan 10767dbbd9e4bSmacallan am_cv_$1_dependencies_compiler_type=none 10768dbbd9e4bSmacallan if test "$am_compiler_list" = ""; then 10769dbbd9e4bSmacallan am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 10770dbbd9e4bSmacallan fi 107711c397cbaSmrg am__universal=false 107721c397cbaSmrg m4_case([$1], [CC], 107731c397cbaSmrg [case " $depcc " in #( 107741c397cbaSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 107751c397cbaSmrg esac], 107761c397cbaSmrg [CXX], 107771c397cbaSmrg [case " $depcc " in #( 107781c397cbaSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 107791c397cbaSmrg esac]) 107801c397cbaSmrg 10781dbbd9e4bSmacallan for depmode in $am_compiler_list; do 10782dbbd9e4bSmacallan # Setup a source with many dependencies, because some compilers 10783dbbd9e4bSmacallan # like to wrap large dependency lists on column 80 (with \), and 10784dbbd9e4bSmacallan # we should not choose a depcomp mode which is confused by this. 10785dbbd9e4bSmacallan # 10786dbbd9e4bSmacallan # We need to recreate these files for each test, as the compiler may 10787dbbd9e4bSmacallan # overwrite some of them when testing with obscure command lines. 10788dbbd9e4bSmacallan # This happens at least with the AIX C compiler. 10789dbbd9e4bSmacallan : > sub/conftest.c 10790dbbd9e4bSmacallan for i in 1 2 3 4 5 6; do 10791dbbd9e4bSmacallan echo '#include "conftst'$i'.h"' >> sub/conftest.c 10792e96acad6Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 10793e96acad6Smrg # Solaris 10 /bin/sh. 10794e96acad6Smrg echo '/* dummy */' > sub/conftst$i.h 10795dbbd9e4bSmacallan done 10796dbbd9e4bSmacallan echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 10797dbbd9e4bSmacallan 10798e96acad6Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 107991c397cbaSmrg # mode. It turns out that the SunPro C++ compiler does not properly 10800e96acad6Smrg # handle '-M -o', and we need to detect this. Also, some Intel 10801e96acad6Smrg # versions had trouble with output in subdirs. 108021c397cbaSmrg am__obj=sub/conftest.${OBJEXT-o} 108031c397cbaSmrg am__minus_obj="-o $am__obj" 10804dbbd9e4bSmacallan case $depmode in 108051c397cbaSmrg gcc) 108061c397cbaSmrg # This depmode causes a compiler race in universal mode. 108071c397cbaSmrg test "$am__universal" = false || continue 108081c397cbaSmrg ;; 10809dbbd9e4bSmacallan nosideeffect) 10810e96acad6Smrg # After this tag, mechanisms are not by side-effect, so they'll 10811e96acad6Smrg # only be used when explicitly requested. 10812dbbd9e4bSmacallan if test "x$enable_dependency_tracking" = xyes; then 10813dbbd9e4bSmacallan continue 10814dbbd9e4bSmacallan else 10815dbbd9e4bSmacallan break 10816dbbd9e4bSmacallan fi 10817dbbd9e4bSmacallan ;; 10818e96acad6Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 10819e96acad6Smrg # This compiler won't grok '-c -o', but also, the minuso test has 108201c397cbaSmrg # not run yet. These depmodes are late enough in the game, and 108211c397cbaSmrg # so weak that their functioning should not be impacted. 108221c397cbaSmrg am__obj=conftest.${OBJEXT-o} 108231c397cbaSmrg am__minus_obj= 108241c397cbaSmrg ;; 10825dbbd9e4bSmacallan none) break ;; 10826dbbd9e4bSmacallan esac 10827dbbd9e4bSmacallan if depmode=$depmode \ 108281c397cbaSmrg source=sub/conftest.c object=$am__obj \ 10829dbbd9e4bSmacallan depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 108301c397cbaSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 10831dbbd9e4bSmacallan >/dev/null 2>conftest.err && 10832dbbd9e4bSmacallan grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 10833dbbd9e4bSmacallan grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 108341c397cbaSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 10835dbbd9e4bSmacallan ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 10836dbbd9e4bSmacallan # icc doesn't choke on unknown options, it will just issue warnings 10837dbbd9e4bSmacallan # or remarks (even with -Werror). So we grep stderr for any message 10838dbbd9e4bSmacallan # that says an option was ignored or not supported. 10839dbbd9e4bSmacallan # When given -MP, icc 7.0 and 7.1 complain thusly: 10840dbbd9e4bSmacallan # icc: Command line warning: ignoring option '-M'; no argument required 10841dbbd9e4bSmacallan # The diagnosis changed in icc 8.0: 10842dbbd9e4bSmacallan # icc: Command line remark: option '-MP' not supported 10843dbbd9e4bSmacallan if (grep 'ignoring option' conftest.err || 10844dbbd9e4bSmacallan grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 10845dbbd9e4bSmacallan am_cv_$1_dependencies_compiler_type=$depmode 10846dbbd9e4bSmacallan break 10847dbbd9e4bSmacallan fi 10848dbbd9e4bSmacallan fi 10849dbbd9e4bSmacallan done 10850dbbd9e4bSmacallan 10851dbbd9e4bSmacallan cd .. 10852dbbd9e4bSmacallan rm -rf conftest.dir 10853dbbd9e4bSmacallanelse 10854dbbd9e4bSmacallan am_cv_$1_dependencies_compiler_type=none 10855dbbd9e4bSmacallanfi 10856dbbd9e4bSmacallan]) 10857dbbd9e4bSmacallanAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 10858dbbd9e4bSmacallanAM_CONDITIONAL([am__fastdep$1], [ 10859dbbd9e4bSmacallan test "x$enable_dependency_tracking" != xno \ 10860dbbd9e4bSmacallan && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 10861dbbd9e4bSmacallan]) 10862dbbd9e4bSmacallan 10863dbbd9e4bSmacallan 10864dbbd9e4bSmacallan# AM_SET_DEPDIR 10865dbbd9e4bSmacallan# ------------- 10866dbbd9e4bSmacallan# Choose a directory name for dependency files. 10867e96acad6Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 10868dbbd9e4bSmacallanAC_DEFUN([AM_SET_DEPDIR], 10869dbbd9e4bSmacallan[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 10870dbbd9e4bSmacallanAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 10871dbbd9e4bSmacallan]) 10872dbbd9e4bSmacallan 10873dbbd9e4bSmacallan 10874dbbd9e4bSmacallan# AM_DEP_TRACK 10875dbbd9e4bSmacallan# ------------ 10876dbbd9e4bSmacallanAC_DEFUN([AM_DEP_TRACK], 10877e96acad6Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 10878e96acad6SmrgAS_HELP_STRING( 10879e96acad6Smrg [--enable-dependency-tracking], 10880e96acad6Smrg [do not reject slow dependency extractors]) 10881e96acad6SmrgAS_HELP_STRING( 10882e96acad6Smrg [--disable-dependency-tracking], 10883e96acad6Smrg [speeds up one-time build])]) 10884dbbd9e4bSmacallanif test "x$enable_dependency_tracking" != xno; then 10885dbbd9e4bSmacallan am_depcomp="$ac_aux_dir/depcomp" 10886dbbd9e4bSmacallan AMDEPBACKSLASH='\' 10887e96acad6Smrg am__nodep='_no' 10888dbbd9e4bSmacallanfi 10889dbbd9e4bSmacallanAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 10890dbbd9e4bSmacallanAC_SUBST([AMDEPBACKSLASH])dnl 10891dbbd9e4bSmacallan_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 10892e96acad6SmrgAC_SUBST([am__nodep])dnl 10893e96acad6Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 10894dbbd9e4bSmacallan]) 10895dbbd9e4bSmacallan 10896dbbd9e4bSmacallan# Generate code to set up dependency tracking. -*- Autoconf -*- 10897dbbd9e4bSmacallan 10898e96acad6Smrg# Copyright (C) 1999-2012 Free Software Foundation, Inc. 10899dbbd9e4bSmacallan# 10900dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 10901dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 10902dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 10903dbbd9e4bSmacallan 10904dbbd9e4bSmacallan 10905dbbd9e4bSmacallan# _AM_OUTPUT_DEPENDENCY_COMMANDS 10906dbbd9e4bSmacallan# ------------------------------ 10907dbbd9e4bSmacallanAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 109081c397cbaSmrg[{ 109091c397cbaSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 109101c397cbaSmrg # are listed without --file. Let's play safe and only enable the eval 109111c397cbaSmrg # if we detect the quoting. 109121c397cbaSmrg case $CONFIG_FILES in 109131c397cbaSmrg *\'*) eval set x "$CONFIG_FILES" ;; 109141c397cbaSmrg *) set x $CONFIG_FILES ;; 109151c397cbaSmrg esac 109161c397cbaSmrg shift 109171c397cbaSmrg for mf 109181c397cbaSmrg do 109191c397cbaSmrg # Strip MF so we end up with the name of the file. 109201c397cbaSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 109211c397cbaSmrg # Check whether this is an Automake generated Makefile or not. 10922e96acad6Smrg # We used to match only the files named 'Makefile.in', but 109231c397cbaSmrg # some people rename them; so instead we look at the file content. 109241c397cbaSmrg # Grep'ing the first line is not enough: some people post-process 109251c397cbaSmrg # each Makefile.in and add a new line on top of each file to say so. 109261c397cbaSmrg # Grep'ing the whole file is not good either: AIX grep has a line 109271c397cbaSmrg # limit of 2048, but all sed's we know have understand at least 4000. 109281c397cbaSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 109291c397cbaSmrg dirpart=`AS_DIRNAME("$mf")` 109301c397cbaSmrg else 109311c397cbaSmrg continue 109321c397cbaSmrg fi 109331c397cbaSmrg # Extract the definition of DEPDIR, am__include, and am__quote 10934e96acad6Smrg # from the Makefile without running 'make'. 109351c397cbaSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 109361c397cbaSmrg test -z "$DEPDIR" && continue 109371c397cbaSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 109381c397cbaSmrg test -z "am__include" && continue 109391c397cbaSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 109401c397cbaSmrg # Find all dependency output files, they are included files with 109411c397cbaSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 109421c397cbaSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 109431c397cbaSmrg # expansion. 109441c397cbaSmrg for file in `sed -n " 109451c397cbaSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 10946e96acad6Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 109471c397cbaSmrg # Make sure the directory exists. 109481c397cbaSmrg test -f "$dirpart/$file" && continue 109491c397cbaSmrg fdir=`AS_DIRNAME(["$file"])` 109501c397cbaSmrg AS_MKDIR_P([$dirpart/$fdir]) 109511c397cbaSmrg # echo "creating $dirpart/$file" 109521c397cbaSmrg echo '# dummy' > "$dirpart/$file" 109531c397cbaSmrg done 10954dbbd9e4bSmacallan done 109551c397cbaSmrg} 10956dbbd9e4bSmacallan])# _AM_OUTPUT_DEPENDENCY_COMMANDS 10957dbbd9e4bSmacallan 10958dbbd9e4bSmacallan 10959dbbd9e4bSmacallan# AM_OUTPUT_DEPENDENCY_COMMANDS 10960dbbd9e4bSmacallan# ----------------------------- 10961dbbd9e4bSmacallan# This macro should only be invoked once -- use via AC_REQUIRE. 10962dbbd9e4bSmacallan# 10963dbbd9e4bSmacallan# This code is only required when automatic dependency tracking 10964e96acad6Smrg# is enabled. FIXME. This creates each '.P' file that we will 10965dbbd9e4bSmacallan# need in order to bootstrap the dependency handling code. 10966dbbd9e4bSmacallanAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 10967dbbd9e4bSmacallan[AC_CONFIG_COMMANDS([depfiles], 10968dbbd9e4bSmacallan [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 10969dbbd9e4bSmacallan [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 10970dbbd9e4bSmacallan]) 10971dbbd9e4bSmacallan 10972dbbd9e4bSmacallan# Do all the work for Automake. -*- Autoconf -*- 10973dbbd9e4bSmacallan 10974e96acad6Smrg# Copyright (C) 1996-2012 Free Software Foundation, Inc. 10975dbbd9e4bSmacallan# 10976dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 10977dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 10978dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 10979dbbd9e4bSmacallan 10980dbbd9e4bSmacallan# This macro actually does too much. Some checks are only needed if 10981dbbd9e4bSmacallan# your package does certain things. But this isn't really a big deal. 10982dbbd9e4bSmacallan 10983dbbd9e4bSmacallan# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 10984dbbd9e4bSmacallan# AM_INIT_AUTOMAKE([OPTIONS]) 10985dbbd9e4bSmacallan# ----------------------------------------------- 10986dbbd9e4bSmacallan# The call with PACKAGE and VERSION arguments is the old style 10987dbbd9e4bSmacallan# call (pre autoconf-2.50), which is being phased out. PACKAGE 10988dbbd9e4bSmacallan# and VERSION should now be passed to AC_INIT and removed from 10989dbbd9e4bSmacallan# the call to AM_INIT_AUTOMAKE. 10990dbbd9e4bSmacallan# We support both call styles for the transition. After 10991dbbd9e4bSmacallan# the next Automake release, Autoconf can make the AC_INIT 10992dbbd9e4bSmacallan# arguments mandatory, and then we can depend on a new Autoconf 10993dbbd9e4bSmacallan# release and drop the old call support. 10994dbbd9e4bSmacallanAC_DEFUN([AM_INIT_AUTOMAKE], 109951c397cbaSmrg[AC_PREREQ([2.62])dnl 10996dbbd9e4bSmacallandnl Autoconf wants to disallow AM_ names. We explicitly allow 10997dbbd9e4bSmacallandnl the ones we care about. 10998dbbd9e4bSmacallanm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 10999dbbd9e4bSmacallanAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11000dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_INSTALL])dnl 11001dbbd9e4bSmacallanif test "`cd $srcdir && pwd`" != "`pwd`"; then 11002dbbd9e4bSmacallan # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11003dbbd9e4bSmacallan # is not polluted with repeated "-I." 11004dbbd9e4bSmacallan AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11005dbbd9e4bSmacallan # test to see if srcdir already configured 11006dbbd9e4bSmacallan if test -f $srcdir/config.status; then 11007dbbd9e4bSmacallan AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11008dbbd9e4bSmacallan fi 11009dbbd9e4bSmacallanfi 11010dbbd9e4bSmacallan 11011dbbd9e4bSmacallan# test whether we have cygpath 11012dbbd9e4bSmacallanif test -z "$CYGPATH_W"; then 11013dbbd9e4bSmacallan if (cygpath --version) >/dev/null 2>/dev/null; then 11014dbbd9e4bSmacallan CYGPATH_W='cygpath -w' 11015dbbd9e4bSmacallan else 11016dbbd9e4bSmacallan CYGPATH_W=echo 11017dbbd9e4bSmacallan fi 11018dbbd9e4bSmacallanfi 11019dbbd9e4bSmacallanAC_SUBST([CYGPATH_W]) 11020dbbd9e4bSmacallan 11021dbbd9e4bSmacallan# Define the identity of the package. 11022dbbd9e4bSmacallandnl Distinguish between old-style and new-style calls. 11023dbbd9e4bSmacallanm4_ifval([$2], 11024e96acad6Smrg[AC_DIAGNOSE([obsolete], 11025e96acad6Smrg[$0: two- and three-arguments forms are deprecated. For more info, see: 11026e96acad6Smrghttp://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) 11027e96acad6Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11028dbbd9e4bSmacallan AC_SUBST([PACKAGE], [$1])dnl 11029dbbd9e4bSmacallan AC_SUBST([VERSION], [$2])], 11030dbbd9e4bSmacallan[_AM_SET_OPTIONS([$1])dnl 11031dbbd9e4bSmacallandnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11032e96acad6Smrgm4_if( 11033e96acad6Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 11034e96acad6Smrg [ok:ok],, 11035dbbd9e4bSmacallan [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11036dbbd9e4bSmacallan AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11037dbbd9e4bSmacallan AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11038dbbd9e4bSmacallan 11039dbbd9e4bSmacallan_AM_IF_OPTION([no-define],, 11040e96acad6Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 11041e96acad6Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 11042dbbd9e4bSmacallan 11043dbbd9e4bSmacallan# Some tools Automake needs. 11044dbbd9e4bSmacallanAC_REQUIRE([AM_SANITY_CHECK])dnl 11045dbbd9e4bSmacallanAC_REQUIRE([AC_ARG_PROGRAM])dnl 11046e96acad6SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 11047e96acad6SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 11048e96acad6SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 11049e96acad6SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 11050e96acad6SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 110511c397cbaSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 110521c397cbaSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11053e96acad6SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 11054e96acad6Smrg# For better backward compatibility. To be removed once Automake 1.9.x 11055e96acad6Smrg# dies out for good. For more background, see: 11056e96acad6Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11057e96acad6Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11058e96acad6SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 11059dbbd9e4bSmacallan# We need awk for the "check" target. The system "awk" is bad on 11060dbbd9e4bSmacallan# some platforms. 11061dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_AWK])dnl 11062dbbd9e4bSmacallanAC_REQUIRE([AC_PROG_MAKE_SET])dnl 11063dbbd9e4bSmacallanAC_REQUIRE([AM_SET_LEADING_DOT])dnl 11064dbbd9e4bSmacallan_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 110651c397cbaSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 110661c397cbaSmrg [_AM_PROG_TAR([v7])])]) 11067dbbd9e4bSmacallan_AM_IF_OPTION([no-dependencies],, 11068dbbd9e4bSmacallan[AC_PROVIDE_IFELSE([AC_PROG_CC], 11069e96acad6Smrg [_AM_DEPENDENCIES([CC])], 11070e96acad6Smrg [m4_define([AC_PROG_CC], 11071e96acad6Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 11072dbbd9e4bSmacallanAC_PROVIDE_IFELSE([AC_PROG_CXX], 11073e96acad6Smrg [_AM_DEPENDENCIES([CXX])], 11074e96acad6Smrg [m4_define([AC_PROG_CXX], 11075e96acad6Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 11076dbbd9e4bSmacallanAC_PROVIDE_IFELSE([AC_PROG_OBJC], 11077e96acad6Smrg [_AM_DEPENDENCIES([OBJC])], 11078e96acad6Smrg [m4_define([AC_PROG_OBJC], 11079e96acad6Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11080e96acad6Smrgdnl Support for Objective C++ was only introduced in Autoconf 2.65, 11081e96acad6Smrgdnl but we still cater to Autoconf 2.62. 11082e96acad6Smrgm4_ifdef([AC_PROG_OBJCXX], 11083e96acad6Smrg[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11084e96acad6Smrg [_AM_DEPENDENCIES([OBJCXX])], 11085e96acad6Smrg [m4_define([AC_PROG_OBJCXX], 11086e96acad6Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl 11087dbbd9e4bSmacallan]) 110881c397cbaSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 11089e96acad6Smrgdnl The 'parallel-tests' driver may need to know about EXEEXT, so add the 11090e96acad6Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 110911c397cbaSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 110921c397cbaSmrgAC_CONFIG_COMMANDS_PRE(dnl 110931c397cbaSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 110941c397cbaSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11095dbbd9e4bSmacallan]) 11096dbbd9e4bSmacallan 11097e96acad6Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 110981c397cbaSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 110991c397cbaSmrgdnl mangled by Autoconf and run in a shell conditional statement. 111001c397cbaSmrgm4_define([_AC_COMPILER_EXEEXT], 111011c397cbaSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 111021c397cbaSmrg 11103dbbd9e4bSmacallan 11104dbbd9e4bSmacallan# When config.status generates a header, we must update the stamp-h file. 11105dbbd9e4bSmacallan# This file resides in the same directory as the config header 11106dbbd9e4bSmacallan# that is generated. The stamp files are numbered to have different names. 11107dbbd9e4bSmacallan 11108dbbd9e4bSmacallan# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11109dbbd9e4bSmacallan# loop where config.status creates the headers, so we can generate 11110dbbd9e4bSmacallan# our stamp files there. 11111dbbd9e4bSmacallanAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11112dbbd9e4bSmacallan[# Compute $1's index in $config_headers. 11113dbbd9e4bSmacallan_am_arg=$1 11114dbbd9e4bSmacallan_am_stamp_count=1 11115dbbd9e4bSmacallanfor _am_header in $config_headers :; do 11116dbbd9e4bSmacallan case $_am_header in 11117dbbd9e4bSmacallan $_am_arg | $_am_arg:* ) 11118dbbd9e4bSmacallan break ;; 11119dbbd9e4bSmacallan * ) 11120dbbd9e4bSmacallan _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11121dbbd9e4bSmacallan esac 11122dbbd9e4bSmacallandone 11123dbbd9e4bSmacallanecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11124dbbd9e4bSmacallan 11125e96acad6Smrg# Copyright (C) 2001-2012 Free Software Foundation, Inc. 11126dbbd9e4bSmacallan# 11127dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 11128dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 11129dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 11130dbbd9e4bSmacallan 11131dbbd9e4bSmacallan# AM_PROG_INSTALL_SH 11132dbbd9e4bSmacallan# ------------------ 11133dbbd9e4bSmacallan# Define $install_sh. 11134dbbd9e4bSmacallanAC_DEFUN([AM_PROG_INSTALL_SH], 11135dbbd9e4bSmacallan[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 111361c397cbaSmrgif test x"${install_sh}" != xset; then 111371c397cbaSmrg case $am_aux_dir in 111381c397cbaSmrg *\ * | *\ *) 111391c397cbaSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 111401c397cbaSmrg *) 111411c397cbaSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 111421c397cbaSmrg esac 111431c397cbaSmrgfi 11144e96acad6SmrgAC_SUBST([install_sh])]) 11145dbbd9e4bSmacallan 11146e96acad6Smrg# Copyright (C) 2003-2012 Free Software Foundation, Inc. 11147dbbd9e4bSmacallan# 11148dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 11149dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 11150dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 11151dbbd9e4bSmacallan 11152dbbd9e4bSmacallan# Check whether the underlying file-system supports filenames 11153dbbd9e4bSmacallan# with a leading dot. For instance MS-DOS doesn't. 11154dbbd9e4bSmacallanAC_DEFUN([AM_SET_LEADING_DOT], 11155dbbd9e4bSmacallan[rm -rf .tst 2>/dev/null 11156dbbd9e4bSmacallanmkdir .tst 2>/dev/null 11157dbbd9e4bSmacallanif test -d .tst; then 11158dbbd9e4bSmacallan am__leading_dot=. 11159dbbd9e4bSmacallanelse 11160dbbd9e4bSmacallan am__leading_dot=_ 11161dbbd9e4bSmacallanfi 11162dbbd9e4bSmacallanrmdir .tst 2>/dev/null 11163dbbd9e4bSmacallanAC_SUBST([am__leading_dot])]) 11164dbbd9e4bSmacallan 11165dbbd9e4bSmacallan# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 11166dbbd9e4bSmacallan# From Jim Meyering 11167dbbd9e4bSmacallan 11168e96acad6Smrg# Copyright (C) 1996-2012 Free Software Foundation, Inc. 11169dbbd9e4bSmacallan# 11170dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 11171dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 11172dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 11173dbbd9e4bSmacallan 111741c397cbaSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 111751c397cbaSmrg# ---------------------------------- 111761c397cbaSmrg# Control maintainer-specific portions of Makefiles. 11177e96acad6Smrg# Default is to disable them, unless 'enable' is passed literally. 11178e96acad6Smrg# For symmetry, 'disable' may be passed as well. Anyway, the user 111791c397cbaSmrg# can override the default with the --enable/--disable switch. 11180dbbd9e4bSmacallanAC_DEFUN([AM_MAINTAINER_MODE], 111811c397cbaSmrg[m4_case(m4_default([$1], [disable]), 111821c397cbaSmrg [enable], [m4_define([am_maintainer_other], [disable])], 111831c397cbaSmrg [disable], [m4_define([am_maintainer_other], [enable])], 111841c397cbaSmrg [m4_define([am_maintainer_other], [enable]) 111851c397cbaSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 11186e96acad6SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 111871c397cbaSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 111881c397cbaSmrg AC_ARG_ENABLE([maintainer-mode], 11189e96acad6Smrg [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 11190e96acad6Smrg am_maintainer_other[ make rules and dependencies not useful 11191e96acad6Smrg (and sometimes confusing) to the casual installer])], 11192e96acad6Smrg [USE_MAINTAINER_MODE=$enableval], 11193e96acad6Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 11194dbbd9e4bSmacallan AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 111951c397cbaSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 11196dbbd9e4bSmacallan MAINT=$MAINTAINER_MODE_TRUE 111971c397cbaSmrg AC_SUBST([MAINT])dnl 11198dbbd9e4bSmacallan] 11199dbbd9e4bSmacallan) 11200dbbd9e4bSmacallan 11201dbbd9e4bSmacallanAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 11202dbbd9e4bSmacallan 11203dbbd9e4bSmacallan# Check to see how 'make' treats includes. -*- Autoconf -*- 11204dbbd9e4bSmacallan 11205e96acad6Smrg# Copyright (C) 2001-2012 Free Software Foundation, Inc. 11206dbbd9e4bSmacallan# 11207dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 11208dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 11209dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 11210dbbd9e4bSmacallan 11211dbbd9e4bSmacallan# AM_MAKE_INCLUDE() 11212dbbd9e4bSmacallan# ----------------- 11213dbbd9e4bSmacallan# Check to see how make treats includes. 11214dbbd9e4bSmacallanAC_DEFUN([AM_MAKE_INCLUDE], 11215dbbd9e4bSmacallan[am_make=${MAKE-make} 11216dbbd9e4bSmacallancat > confinc << 'END' 11217dbbd9e4bSmacallanam__doit: 112181c397cbaSmrg @echo this is the am__doit target 11219dbbd9e4bSmacallan.PHONY: am__doit 11220dbbd9e4bSmacallanEND 11221dbbd9e4bSmacallan# If we don't find an include directive, just comment out the code. 11222dbbd9e4bSmacallanAC_MSG_CHECKING([for style of include used by $am_make]) 11223dbbd9e4bSmacallanam__include="#" 11224dbbd9e4bSmacallanam__quote= 11225dbbd9e4bSmacallan_am_result=none 11226dbbd9e4bSmacallan# First try GNU make style include. 11227dbbd9e4bSmacallanecho "include confinc" > confmf 11228e96acad6Smrg# Ignore all kinds of additional output from 'make'. 112291c397cbaSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 112301c397cbaSmrg*the\ am__doit\ target*) 112311c397cbaSmrg am__include=include 112321c397cbaSmrg am__quote= 112331c397cbaSmrg _am_result=GNU 112341c397cbaSmrg ;; 112351c397cbaSmrgesac 11236dbbd9e4bSmacallan# Now try BSD make style include. 11237dbbd9e4bSmacallanif test "$am__include" = "#"; then 11238dbbd9e4bSmacallan echo '.include "confinc"' > confmf 112391c397cbaSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 112401c397cbaSmrg *the\ am__doit\ target*) 112411c397cbaSmrg am__include=.include 112421c397cbaSmrg am__quote="\"" 112431c397cbaSmrg _am_result=BSD 112441c397cbaSmrg ;; 112451c397cbaSmrg esac 11246dbbd9e4bSmacallanfi 11247dbbd9e4bSmacallanAC_SUBST([am__include]) 11248dbbd9e4bSmacallanAC_SUBST([am__quote]) 11249dbbd9e4bSmacallanAC_MSG_RESULT([$_am_result]) 11250dbbd9e4bSmacallanrm -f confinc confmf 11251dbbd9e4bSmacallan]) 11252dbbd9e4bSmacallan 11253dbbd9e4bSmacallan# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11254dbbd9e4bSmacallan 11255e96acad6Smrg# Copyright (C) 1997-2012 Free Software Foundation, Inc. 11256dbbd9e4bSmacallan# 11257dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 11258dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 11259dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 11260dbbd9e4bSmacallan 11261dbbd9e4bSmacallan# AM_MISSING_PROG(NAME, PROGRAM) 11262dbbd9e4bSmacallan# ------------------------------ 11263dbbd9e4bSmacallanAC_DEFUN([AM_MISSING_PROG], 11264dbbd9e4bSmacallan[AC_REQUIRE([AM_MISSING_HAS_RUN]) 11265dbbd9e4bSmacallan$1=${$1-"${am_missing_run}$2"} 11266dbbd9e4bSmacallanAC_SUBST($1)]) 11267dbbd9e4bSmacallan 11268dbbd9e4bSmacallan# AM_MISSING_HAS_RUN 11269dbbd9e4bSmacallan# ------------------ 11270dbbd9e4bSmacallan# Define MISSING if not defined so far and test if it supports --run. 11271dbbd9e4bSmacallan# If it does, set am_missing_run to use it, otherwise, to nothing. 11272dbbd9e4bSmacallanAC_DEFUN([AM_MISSING_HAS_RUN], 11273dbbd9e4bSmacallan[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11274dbbd9e4bSmacallanAC_REQUIRE_AUX_FILE([missing])dnl 112751c397cbaSmrgif test x"${MISSING+set}" != xset; then 112761c397cbaSmrg case $am_aux_dir in 112771c397cbaSmrg *\ * | *\ *) 112781c397cbaSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 112791c397cbaSmrg *) 112801c397cbaSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 112811c397cbaSmrg esac 112821c397cbaSmrgfi 11283dbbd9e4bSmacallan# Use eval to expand $SHELL 11284dbbd9e4bSmacallanif eval "$MISSING --run true"; then 11285dbbd9e4bSmacallan am_missing_run="$MISSING --run " 11286dbbd9e4bSmacallanelse 11287dbbd9e4bSmacallan am_missing_run= 11288e96acad6Smrg AC_MSG_WARN(['missing' script is too old or missing]) 11289dbbd9e4bSmacallanfi 11290dbbd9e4bSmacallan]) 11291dbbd9e4bSmacallan 11292dbbd9e4bSmacallan# Helper functions for option handling. -*- Autoconf -*- 11293dbbd9e4bSmacallan 11294e96acad6Smrg# Copyright (C) 2001-2012 Free Software Foundation, Inc. 11295dbbd9e4bSmacallan# 11296dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 11297dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 11298dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 11299dbbd9e4bSmacallan 11300dbbd9e4bSmacallan# _AM_MANGLE_OPTION(NAME) 11301dbbd9e4bSmacallan# ----------------------- 11302dbbd9e4bSmacallanAC_DEFUN([_AM_MANGLE_OPTION], 11303dbbd9e4bSmacallan[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 11304dbbd9e4bSmacallan 11305dbbd9e4bSmacallan# _AM_SET_OPTION(NAME) 11306e96acad6Smrg# -------------------- 11307dbbd9e4bSmacallan# Set option NAME. Presently that only means defining a flag for this option. 11308dbbd9e4bSmacallanAC_DEFUN([_AM_SET_OPTION], 11309e96acad6Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 11310dbbd9e4bSmacallan 11311dbbd9e4bSmacallan# _AM_SET_OPTIONS(OPTIONS) 11312e96acad6Smrg# ------------------------ 11313dbbd9e4bSmacallan# OPTIONS is a space-separated list of Automake options. 11314dbbd9e4bSmacallanAC_DEFUN([_AM_SET_OPTIONS], 113151c397cbaSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 11316dbbd9e4bSmacallan 11317dbbd9e4bSmacallan# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 11318dbbd9e4bSmacallan# ------------------------------------------- 11319dbbd9e4bSmacallan# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11320dbbd9e4bSmacallanAC_DEFUN([_AM_IF_OPTION], 11321dbbd9e4bSmacallan[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 11322dbbd9e4bSmacallan 11323dbbd9e4bSmacallan# Check to make sure that the build environment is sane. -*- Autoconf -*- 11324dbbd9e4bSmacallan 11325e96acad6Smrg# Copyright (C) 1996-2012 Free Software Foundation, Inc. 11326dbbd9e4bSmacallan# 11327dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 11328dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 11329dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 11330dbbd9e4bSmacallan 11331dbbd9e4bSmacallan# AM_SANITY_CHECK 11332dbbd9e4bSmacallan# --------------- 11333dbbd9e4bSmacallanAC_DEFUN([AM_SANITY_CHECK], 11334dbbd9e4bSmacallan[AC_MSG_CHECKING([whether build environment is sane]) 113351c397cbaSmrg# Reject unsafe characters in $srcdir or the absolute working directory 113361c397cbaSmrg# name. Accept space and tab only in the latter. 113371c397cbaSmrgam_lf=' 113381c397cbaSmrg' 113391c397cbaSmrgcase `pwd` in 113401c397cbaSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 113411c397cbaSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 113421c397cbaSmrgesac 113431c397cbaSmrgcase $srcdir in 113441c397cbaSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 11345e96acad6Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 113461c397cbaSmrgesac 113471c397cbaSmrg 11348e96acad6Smrg# Do 'set' in a subshell so we don't clobber the current shell's 11349dbbd9e4bSmacallan# arguments. Must try -L first in case configure is actually a 11350dbbd9e4bSmacallan# symlink; some systems play weird games with the mod time of symlinks 11351dbbd9e4bSmacallan# (eg FreeBSD returns the mod time of the symlink's containing 11352dbbd9e4bSmacallan# directory). 11353dbbd9e4bSmacallanif ( 11354e96acad6Smrg am_has_slept=no 11355e96acad6Smrg for am_try in 1 2; do 11356e96acad6Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 11357e96acad6Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 11358e96acad6Smrg if test "$[*]" = "X"; then 11359e96acad6Smrg # -L didn't work. 11360e96acad6Smrg set X `ls -t "$srcdir/configure" conftest.file` 11361e96acad6Smrg fi 11362e96acad6Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 11363e96acad6Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 11364e96acad6Smrg 11365e96acad6Smrg # If neither matched, then we have a broken ls. This can happen 11366e96acad6Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 11367e96acad6Smrg # broken ls alias from the environment. This has actually 11368e96acad6Smrg # happened. Such a system could not be considered "sane". 11369e96acad6Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 11370e96acad6Smrg alias in your environment]) 11371e96acad6Smrg fi 11372e96acad6Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 11373e96acad6Smrg break 11374e96acad6Smrg fi 11375e96acad6Smrg # Just in case. 11376e96acad6Smrg sleep 1 11377e96acad6Smrg am_has_slept=yes 11378e96acad6Smrg done 11379dbbd9e4bSmacallan test "$[2]" = conftest.file 11380dbbd9e4bSmacallan ) 11381dbbd9e4bSmacallanthen 11382dbbd9e4bSmacallan # Ok. 11383dbbd9e4bSmacallan : 11384dbbd9e4bSmacallanelse 11385dbbd9e4bSmacallan AC_MSG_ERROR([newly created file is older than distributed files! 11386dbbd9e4bSmacallanCheck your system clock]) 11387dbbd9e4bSmacallanfi 11388e96acad6SmrgAC_MSG_RESULT([yes]) 11389e96acad6Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 11390e96acad6Smrg# generated files are strictly newer. 11391e96acad6Smrgam_sleep_pid= 11392e96acad6Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 11393e96acad6Smrg ( sleep 1 ) & 11394e96acad6Smrg am_sleep_pid=$! 11395e96acad6Smrgfi 11396e96acad6SmrgAC_CONFIG_COMMANDS_PRE( 11397e96acad6Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 11398e96acad6Smrg if test -n "$am_sleep_pid"; then 11399e96acad6Smrg # Hide warnings about reused PIDs. 11400e96acad6Smrg wait $am_sleep_pid 2>/dev/null 11401e96acad6Smrg fi 11402e96acad6Smrg AC_MSG_RESULT([done])]) 11403e96acad6Smrgrm -f conftest.file 11404e96acad6Smrg]) 11405e96acad6Smrg 11406e96acad6Smrg# Copyright (C) 2009-2012 Free Software Foundation, Inc. 11407e96acad6Smrg# 11408e96acad6Smrg# This file is free software; the Free Software Foundation 11409e96acad6Smrg# gives unlimited permission to copy and/or distribute it, 11410e96acad6Smrg# with or without modifications, as long as this notice is preserved. 11411e96acad6Smrg 11412e96acad6Smrg# AM_SILENT_RULES([DEFAULT]) 11413e96acad6Smrg# -------------------------- 11414e96acad6Smrg# Enable less verbose build rules; with the default set to DEFAULT 11415e96acad6Smrg# ("yes" being less verbose, "no" or empty being verbose). 11416e96acad6SmrgAC_DEFUN([AM_SILENT_RULES], 11417e96acad6Smrg[AC_ARG_ENABLE([silent-rules], [dnl 11418e96acad6SmrgAS_HELP_STRING( 11419e96acad6Smrg [--enable-silent-rules], 11420e96acad6Smrg [less verbose build output (undo: "make V=1")]) 11421e96acad6SmrgAS_HELP_STRING( 11422e96acad6Smrg [--disable-silent-rules], 11423e96acad6Smrg [verbose build output (undo: "make V=0")])dnl 11424e96acad6Smrg]) 11425e96acad6Smrgcase $enable_silent_rules in @%:@ ((( 11426e96acad6Smrg yes) AM_DEFAULT_VERBOSITY=0;; 11427e96acad6Smrg no) AM_DEFAULT_VERBOSITY=1;; 11428e96acad6Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 11429e96acad6Smrgesac 11430e96acad6Smrgdnl 11431e96acad6Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 11432e96acad6Smrgdnl do not support nested variable expansions. 11433e96acad6Smrgdnl See automake bug#9928 and bug#10237. 11434e96acad6Smrgam_make=${MAKE-make} 11435e96acad6SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 11436e96acad6Smrg [am_cv_make_support_nested_variables], 11437e96acad6Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 11438e96acad6SmrgBAR0=false 11439e96acad6SmrgBAR1=true 11440e96acad6SmrgV=1 11441e96acad6Smrgam__doit: 11442e96acad6Smrg @$(TRUE) 11443e96acad6Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 11444e96acad6Smrg am_cv_make_support_nested_variables=yes 11445e96acad6Smrgelse 11446e96acad6Smrg am_cv_make_support_nested_variables=no 11447e96acad6Smrgfi]) 11448e96acad6Smrgif test $am_cv_make_support_nested_variables = yes; then 11449e96acad6Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 11450e96acad6Smrg AM_V='$(V)' 11451e96acad6Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 11452e96acad6Smrgelse 11453e96acad6Smrg AM_V=$AM_DEFAULT_VERBOSITY 11454e96acad6Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 11455e96acad6Smrgfi 11456e96acad6SmrgAC_SUBST([AM_V])dnl 11457e96acad6SmrgAM_SUBST_NOTMAKE([AM_V])dnl 11458e96acad6SmrgAC_SUBST([AM_DEFAULT_V])dnl 11459e96acad6SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 11460e96acad6SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 11461e96acad6SmrgAM_BACKSLASH='\' 11462e96acad6SmrgAC_SUBST([AM_BACKSLASH])dnl 11463e96acad6Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 11464e96acad6Smrg]) 11465dbbd9e4bSmacallan 11466e96acad6Smrg# Copyright (C) 2001-2012 Free Software Foundation, Inc. 11467dbbd9e4bSmacallan# 11468dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 11469dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 11470dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 11471dbbd9e4bSmacallan 11472dbbd9e4bSmacallan# AM_PROG_INSTALL_STRIP 11473dbbd9e4bSmacallan# --------------------- 11474e96acad6Smrg# One issue with vendor 'install' (even GNU) is that you can't 11475dbbd9e4bSmacallan# specify the program used to strip binaries. This is especially 11476dbbd9e4bSmacallan# annoying in cross-compiling environments, where the build's strip 11477dbbd9e4bSmacallan# is unlikely to handle the host's binaries. 11478dbbd9e4bSmacallan# Fortunately install-sh will honor a STRIPPROG variable, so we 11479e96acad6Smrg# always use install-sh in "make install-strip", and initialize 11480dbbd9e4bSmacallan# STRIPPROG with the value of the STRIP variable (set by the user). 11481dbbd9e4bSmacallanAC_DEFUN([AM_PROG_INSTALL_STRIP], 11482dbbd9e4bSmacallan[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11483e96acad6Smrg# Installed binaries are usually stripped using 'strip' when the user 11484e96acad6Smrg# run "make install-strip". However 'strip' might not be the right 11485dbbd9e4bSmacallan# tool to use in cross-compilation environments, therefore Automake 11486e96acad6Smrg# will honor the 'STRIP' environment variable to overrule this program. 11487e96acad6Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 11488dbbd9e4bSmacallanif test "$cross_compiling" != no; then 11489dbbd9e4bSmacallan AC_CHECK_TOOL([STRIP], [strip], :) 11490dbbd9e4bSmacallanfi 11491dbbd9e4bSmacallanINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 11492dbbd9e4bSmacallanAC_SUBST([INSTALL_STRIP_PROGRAM])]) 11493dbbd9e4bSmacallan 11494e96acad6Smrg# Copyright (C) 2006-2012 Free Software Foundation, Inc. 11495dbbd9e4bSmacallan# 11496dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 11497dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 11498dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 11499dbbd9e4bSmacallan 11500dbbd9e4bSmacallan# _AM_SUBST_NOTMAKE(VARIABLE) 11501dbbd9e4bSmacallan# --------------------------- 11502dbbd9e4bSmacallan# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 11503dbbd9e4bSmacallan# This macro is traced by Automake. 11504dbbd9e4bSmacallanAC_DEFUN([_AM_SUBST_NOTMAKE]) 11505dbbd9e4bSmacallan 115061c397cbaSmrg# AM_SUBST_NOTMAKE(VARIABLE) 11507e96acad6Smrg# -------------------------- 115081c397cbaSmrg# Public sister of _AM_SUBST_NOTMAKE. 115091c397cbaSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 115101c397cbaSmrg 11511dbbd9e4bSmacallan# Check how to create a tarball. -*- Autoconf -*- 11512dbbd9e4bSmacallan 11513e96acad6Smrg# Copyright (C) 2004-2012 Free Software Foundation, Inc. 11514dbbd9e4bSmacallan# 11515dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 11516dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 11517dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 11518dbbd9e4bSmacallan 11519dbbd9e4bSmacallan# _AM_PROG_TAR(FORMAT) 11520dbbd9e4bSmacallan# -------------------- 11521dbbd9e4bSmacallan# Check how to create a tarball in format FORMAT. 11522e96acad6Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 11523dbbd9e4bSmacallan# 11524dbbd9e4bSmacallan# Substitute a variable $(am__tar) that is a command 11525dbbd9e4bSmacallan# writing to stdout a FORMAT-tarball containing the directory 11526dbbd9e4bSmacallan# $tardir. 11527dbbd9e4bSmacallan# tardir=directory && $(am__tar) > result.tar 11528dbbd9e4bSmacallan# 11529dbbd9e4bSmacallan# Substitute a variable $(am__untar) that extract such 11530dbbd9e4bSmacallan# a tarball read from stdin. 11531dbbd9e4bSmacallan# $(am__untar) < result.tar 11532dbbd9e4bSmacallanAC_DEFUN([_AM_PROG_TAR], 11533e96acad6Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 11534e96acad6Smrg# in the wild :-( We should find a proper way to deprecate it ... 11535e96acad6SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 11536dbbd9e4bSmacallanm4_if([$1], [v7], 11537e96acad6Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 11538dbbd9e4bSmacallan [m4_case([$1], [ustar],, [pax],, 11539dbbd9e4bSmacallan [m4_fatal([Unknown tar format])]) 11540dbbd9e4bSmacallanAC_MSG_CHECKING([how to create a $1 tar archive]) 11541dbbd9e4bSmacallan# Loop over all known methods to create a tar archive until one works. 11542dbbd9e4bSmacallan_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 11543dbbd9e4bSmacallan_am_tools=${am_cv_prog_tar_$1-$_am_tools} 11544dbbd9e4bSmacallan# Do not fold the above two line into one, because Tru64 sh and 11545e96acad6Smrg# Solaris sh will not grok spaces in the rhs of '-'. 11546dbbd9e4bSmacallanfor _am_tool in $_am_tools 11547dbbd9e4bSmacallando 11548dbbd9e4bSmacallan case $_am_tool in 11549dbbd9e4bSmacallan gnutar) 11550dbbd9e4bSmacallan for _am_tar in tar gnutar gtar; 11551dbbd9e4bSmacallan do 11552dbbd9e4bSmacallan AM_RUN_LOG([$_am_tar --version]) && break 11553dbbd9e4bSmacallan done 11554dbbd9e4bSmacallan am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 11555dbbd9e4bSmacallan am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 11556dbbd9e4bSmacallan am__untar="$_am_tar -xf -" 11557dbbd9e4bSmacallan ;; 11558dbbd9e4bSmacallan plaintar) 11559dbbd9e4bSmacallan # Must skip GNU tar: if it does not support --format= it doesn't create 11560dbbd9e4bSmacallan # ustar tarball either. 11561dbbd9e4bSmacallan (tar --version) >/dev/null 2>&1 && continue 11562dbbd9e4bSmacallan am__tar='tar chf - "$$tardir"' 11563dbbd9e4bSmacallan am__tar_='tar chf - "$tardir"' 11564dbbd9e4bSmacallan am__untar='tar xf -' 11565dbbd9e4bSmacallan ;; 11566dbbd9e4bSmacallan pax) 11567dbbd9e4bSmacallan am__tar='pax -L -x $1 -w "$$tardir"' 11568dbbd9e4bSmacallan am__tar_='pax -L -x $1 -w "$tardir"' 11569dbbd9e4bSmacallan am__untar='pax -r' 11570dbbd9e4bSmacallan ;; 11571dbbd9e4bSmacallan cpio) 11572dbbd9e4bSmacallan am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11573dbbd9e4bSmacallan am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11574dbbd9e4bSmacallan am__untar='cpio -i -H $1 -d' 11575dbbd9e4bSmacallan ;; 11576dbbd9e4bSmacallan none) 11577dbbd9e4bSmacallan am__tar=false 11578dbbd9e4bSmacallan am__tar_=false 11579dbbd9e4bSmacallan am__untar=false 11580dbbd9e4bSmacallan ;; 11581dbbd9e4bSmacallan esac 11582dbbd9e4bSmacallan 11583dbbd9e4bSmacallan # If the value was cached, stop now. We just wanted to have am__tar 11584dbbd9e4bSmacallan # and am__untar set. 11585dbbd9e4bSmacallan test -n "${am_cv_prog_tar_$1}" && break 11586dbbd9e4bSmacallan 11587dbbd9e4bSmacallan # tar/untar a dummy directory, and stop if the command works 11588dbbd9e4bSmacallan rm -rf conftest.dir 11589dbbd9e4bSmacallan mkdir conftest.dir 11590dbbd9e4bSmacallan echo GrepMe > conftest.dir/file 11591dbbd9e4bSmacallan AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11592dbbd9e4bSmacallan rm -rf conftest.dir 11593dbbd9e4bSmacallan if test -s conftest.tar; then 11594dbbd9e4bSmacallan AM_RUN_LOG([$am__untar <conftest.tar]) 11595dbbd9e4bSmacallan grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11596dbbd9e4bSmacallan fi 11597dbbd9e4bSmacallandone 11598dbbd9e4bSmacallanrm -rf conftest.dir 11599dbbd9e4bSmacallan 11600dbbd9e4bSmacallanAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11601dbbd9e4bSmacallanAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11602dbbd9e4bSmacallanAC_SUBST([am__tar]) 11603dbbd9e4bSmacallanAC_SUBST([am__untar]) 11604dbbd9e4bSmacallan]) # _AM_PROG_TAR 11605dbbd9e4bSmacallan 11606